From c9ca68d5d8cabe5958cb64193cb6ddc9d3f483a2 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 3 Feb 2026 21:03:24 -0800 Subject: [PATCH 1/7] Changes to src --- src/compiler/binder.ts | 4 ++-- src/compiler/commandLineParser.ts | 3 +-- src/compiler/program.ts | 3 +++ src/compiler/transformers/module/module.ts | 4 ++-- src/compiler/transformers/module/system.ts | 4 ++-- src/compiler/transformers/ts.ts | 4 ++-- src/compiler/utilities.ts | 10 ++++++---- 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 3632a9fed1e50..9ea90805fb51e 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -82,6 +82,7 @@ import { FunctionExpression, FunctionLikeDeclaration, GetAccessorDeclaration, + getAlwaysStrict, getAssignedExpandoInitializer, getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind, @@ -108,7 +109,6 @@ import { getSourceFileOfNode, getSourceTextOfNodeFromSourceFile, getSpanOfTokenAtPosition, - getStrictOptionValue, getSymbolNameForPrivateIdentifier, getTextOfIdentifierOrLiteral, getThisContainer, @@ -618,7 +618,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { } function bindInStrictMode(file: SourceFile, opts: CompilerOptions): boolean { - if (getStrictOptionValue(opts, "alwaysStrict") && !file.isDeclarationFile) { + if (getAlwaysStrict(opts) && !file.isDeclarationFile) { // bind in strict mode source files with alwaysStrict option return true; } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 476bef61f4005..3657d15800a5b 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -987,10 +987,9 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ affectsSourceFile: true, affectsEmit: true, affectsBuildInfo: true, - strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Ensure_use_strict_is_always_emitted, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, + defaultValueDescription: true, }, // Additional Checks diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b0314dc12e53a..cba6998dd8306 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -4526,6 +4526,9 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro }); checkDeprecations("6.0", "7.0", createDiagnostic, createDeprecatedDiagnostic => { + if (options.alwaysStrict === false) { + createDeprecatedDiagnostic("alwaysStrict", "false", /*useInstead*/ undefined, /*related*/ undefined); + } if (options.target === ScriptTarget.ES5) { createDeprecatedDiagnostic("target", "ES5"); } diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index ae0d2a0aaa87c..1c43d18afccc5 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -41,6 +41,7 @@ import { FunctionDeclaration, FunctionExpression, GeneratedIdentifierFlags, + getAlwaysStrict, getEmitFlags, getEmitModuleKind, getEmitScriptTarget, @@ -55,7 +56,6 @@ import { getNamespaceDeclarationNode, getNodeId, getOriginalNodeId, - getStrictOptionValue, getTextOfIdentifierOrLiteral, hasJSFileExtension, hasJsonModuleEmitEnabled, @@ -277,7 +277,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile startLexicalEnvironment(); const statements: Statement[] = []; - const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile); + const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile); const statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor); if (shouldEmitUnderscoreUnderscoreESModule()) { diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index c9fd1645345ca..8a4f01392decb 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -33,6 +33,7 @@ import { ForOfStatement, ForStatement, FunctionDeclaration, + getAlwaysStrict, getEmitFlags, getExternalHelpersModuleName, getExternalModuleNameLiteral, @@ -40,7 +41,6 @@ import { getNodeId, getOriginalNode, getOriginalNodeId, - getStrictOptionValue, getTextOfIdentifierOrLiteral, hasSyntacticModifier, Identifier, @@ -357,7 +357,7 @@ export function transformSystemModule(context: TransformationContext): (x: Sourc startLexicalEnvironment(); // Add any prologue directives. - const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile); + const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile); const statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor); // var __moduleName = context_1 && context_1.id; diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 5a927a0496ce8..f66568ac169ed 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -47,6 +47,7 @@ import { FunctionExpression, FunctionLikeDeclaration, GetAccessorDeclaration, + getAlwaysStrict, getEffectiveBaseTypeNode, getEmitFlags, getEmitModuleKind, @@ -57,7 +58,6 @@ import { getOriginalNode, getParseTreeNode, getProperties, - getStrictOptionValue, getTextOfNode, hasDecorators, hasSyntacticModifier, @@ -836,7 +836,7 @@ export function transformTypeScript(context: TransformationContext): Transformer } function visitSourceFile(node: SourceFile) { - const alwaysStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") && + const alwaysStrict = getAlwaysStrict(compilerOptions) && !(isExternalModule(node) && moduleKind >= ModuleKind.ES2015) && !isJsonSourceFile(node); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 433646b13176f..809225c090613 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2132,7 +2132,7 @@ export function isEffectiveStrictModeSourceFile(node: SourceFile, compilerOption return false; } // If `alwaysStrict` is set, then treat the file as strict. - if (getStrictOptionValue(compilerOptions, "alwaysStrict")) { + if (getAlwaysStrict(compilerOptions)) { return true; } // Starting with a "use strict" directive indicates the file is strict. @@ -9212,10 +9212,11 @@ const _computedOptions = createComputedCompilerOptions({ return getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn"); }, }, + // Previously a strict-mode flag, but no longer. alwaysStrict: { - dependencies: ["strict"], + dependencies: [], computeValue: compilerOptions => { - return getStrictOptionValue(compilerOptions, "alwaysStrict"); + return compilerOptions.alwaysStrict !== false; }, }, useUnknownInCatchVariables: { @@ -9263,6 +9264,8 @@ export const getAreDeclarationMapsEnabled: (compilerOptions: CompilerOptions) => export const getAllowJSCompilerOption: (compilerOptions: CompilerOptions) => boolean = _computedOptions.allowJs.computeValue; /** @internal */ export const getUseDefineForClassFields: (compilerOptions: CompilerOptions) => boolean = _computedOptions.useDefineForClassFields.computeValue; +/** @internal */ +export const getAlwaysStrict: (compilerOptions: CompilerOptions) => boolean = _computedOptions.alwaysStrict.computeValue; /** @internal */ export function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean { @@ -9305,7 +9308,6 @@ export type StrictOptionName = | "strictBindCallApply" | "strictPropertyInitialization" | "strictBuiltinIteratorReturn" - | "alwaysStrict" | "useUnknownInCatchVariables"; /** @internal */ From 4690f7832d048ce69984080349f1072881c64e26 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 3 Feb 2026 21:03:35 -0800 Subject: [PATCH 2/7] Fourslash hardcoded changes --- tests/cases/fourslash/constEnumsEmitOutputInMultipleFiles.ts | 2 +- ...agnosticsJsFileCompilationDuplicateFunctionImplementation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cases/fourslash/constEnumsEmitOutputInMultipleFiles.ts b/tests/cases/fourslash/constEnumsEmitOutputInMultipleFiles.ts index f0d8c10462af7..85023d9a83f24 100644 --- a/tests/cases/fourslash/constEnumsEmitOutputInMultipleFiles.ts +++ b/tests/cases/fourslash/constEnumsEmitOutputInMultipleFiles.ts @@ -15,6 +15,6 @@ goTo.marker("1"); verify.verifyGetEmitOutputForCurrentFile( -"/// \n\ +"\"use strict\";\n/// \n\ var testInOtherFile = 1 /* TestEnum.Bar */;\n" ) \ No newline at end of file diff --git a/tests/cases/fourslash/diagnosticsJsFileCompilationDuplicateFunctionImplementation.ts b/tests/cases/fourslash/diagnosticsJsFileCompilationDuplicateFunctionImplementation.ts index 01767fef7bc5f..1580c1bda4b51 100644 --- a/tests/cases/fourslash/diagnosticsJsFileCompilationDuplicateFunctionImplementation.ts +++ b/tests/cases/fourslash/diagnosticsJsFileCompilationDuplicateFunctionImplementation.ts @@ -21,7 +21,7 @@ verify.getSemanticDiagnostics([{ code: 2393 }]); verify.verifyGetEmitOutputContentsForCurrentFile([ - { name: "out.js", text: "function foo() { return 10; }\nfunction foo() { return 30; }\n", writeByteOrderMark: false }, + { name: "out.js", text: "\"use strict\";\nfunction foo() { return 10; }\nfunction foo() { return 30; }\n", writeByteOrderMark: false }, { name: "out.d.ts", text: "declare function foo(): number;\ndeclare function foo(): number;\n", writeByteOrderMark: false }]); goTo.marker("2"); verify.getSemanticDiagnostics([{ From 017588c35b8c3f28c665f14f64c9de816e37c14b Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 3 Feb 2026 21:24:52 -0800 Subject: [PATCH 3/7] Update testcases that need sloppy behavior --- tests/cases/compiler/ambientWithStatements.ts | 2 + ...gumentsBindsToFunctionScopeArgumentList.ts | 2 + .../argumentsReferenceInObjectLiteral_Js.ts | 2 + .../compiler/asiPublicPrivateProtected.ts | 2 + .../collisionArgumentsArrowFunctions.ts | 2 + .../compiler/collisionArgumentsFunction.ts | 2 + .../collisionArgumentsFunctionExpressions.ts | 2 + .../compiler/collisionArgumentsInType.ts | 2 + .../collisionArgumentsInterfaceMembers.ts | 2 + .../constDeclarations-invalidContexts.ts | 2 + .../compiler/constDeclarations-scopes.ts | 2 + .../constDeclarations-validContexts.ts | 2 + tests/cases/compiler/convertKeywordsYes.ts | 2 + .../es5-asyncFunctionWithStatements.ts | 2 + ...jsFileCompilationBindReachabilityErrors.ts | 2 + .../compiler/missingCloseParenStatements.ts | 2 + .../emitArrowFunctionWhenUsingArguments03.ts | 4 +- ...itArrowFunctionWhenUsingArguments03_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments04.ts | 4 +- ...itArrowFunctionWhenUsingArguments04_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments05.ts | 4 +- ...itArrowFunctionWhenUsingArguments05_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments06.ts | 4 +- ...itArrowFunctionWhenUsingArguments06_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments07.ts | 4 +- ...itArrowFunctionWhenUsingArguments07_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments08.ts | 4 +- ...itArrowFunctionWhenUsingArguments08_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments11.ts | 4 +- ...itArrowFunctionWhenUsingArguments11_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments13.ts | 4 +- ...itArrowFunctionWhenUsingArguments13_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments14.ts | 4 +- ...itArrowFunctionWhenUsingArguments14_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments15.ts | 4 +- ...itArrowFunctionWhenUsingArguments15_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments16.ts | 4 +- ...itArrowFunctionWhenUsingArguments16_ES6.ts | 4 +- .../emitArrowFunctionWhenUsingArguments17.ts | 4 +- ...itArrowFunctionWhenUsingArguments17_ES6.ts | 4 +- .../es6/for-ofStatements/for-of56.ts | 4 +- .../FunctionDeclaration2_es6.ts | 2 + .../yieldExpressions/generatorTypeCheck38.ts | 2 + .../functions/arrowFunctionContexts.ts | 2 + .../deleteOperatorWithAnyOtherType.ts | 126 +++++++++--------- .../NonInitializedExportInInternalModule.ts | 74 +++++----- ...ser.asyncGenerators.classMethods.es2018.ts | 2 + ...cGenerators.functionDeclarations.es2018.ts | 2 + ...ncGenerators.functionExpressions.es2018.ts | 2 + ...cGenerators.objectLiteralMethods.es2018.ts | 2 + ...atementIsNotAMemberVariableDeclaration1.ts | 12 +- .../for-ofStatements/ES5For-of19.ts | 2 + 52 files changed, 232 insertions(+), 128 deletions(-) diff --git a/tests/cases/compiler/ambientWithStatements.ts b/tests/cases/compiler/ambientWithStatements.ts index be6a0cd4f557b..749461ca4ebb3 100644 --- a/tests/cases/compiler/ambientWithStatements.ts +++ b/tests/cases/compiler/ambientWithStatements.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false declare namespace M { break; continue; diff --git a/tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts b/tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts index df63faab89e92..bc1845675c51b 100644 --- a/tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts +++ b/tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false var arguments = 10; function foo(a) { arguments = 10; /// This shouldnt be of type number and result in error. diff --git a/tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts b/tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts index 559edba66c28a..db44e059c2cdb 100644 --- a/tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts +++ b/tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @checkJs: true // @allowJs: true // @target: es6 diff --git a/tests/cases/compiler/asiPublicPrivateProtected.ts b/tests/cases/compiler/asiPublicPrivateProtected.ts index 9428425767682..2929e6f7bffb5 100644 --- a/tests/cases/compiler/asiPublicPrivateProtected.ts +++ b/tests/cases/compiler/asiPublicPrivateProtected.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false public class NonPublicClass { public s() { diff --git a/tests/cases/compiler/collisionArgumentsArrowFunctions.ts b/tests/cases/compiler/collisionArgumentsArrowFunctions.ts index d80d6692634c2..b2f19d5a40c60 100644 --- a/tests/cases/compiler/collisionArgumentsArrowFunctions.ts +++ b/tests/cases/compiler/collisionArgumentsArrowFunctions.ts @@ -1,5 +1,7 @@ // @target: es5, es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false var f1 = (i: number, ...arguments) => { //arguments is error var arguments: any[]; // no error } diff --git a/tests/cases/compiler/collisionArgumentsFunction.ts b/tests/cases/compiler/collisionArgumentsFunction.ts index 8d20a82ee75f0..2438c395e5b52 100644 --- a/tests/cases/compiler/collisionArgumentsFunction.ts +++ b/tests/cases/compiler/collisionArgumentsFunction.ts @@ -1,5 +1,7 @@ // @target: es5, es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false // Functions function f1(arguments: number, ...restParameters) { //arguments is error var arguments = 10; // no error diff --git a/tests/cases/compiler/collisionArgumentsFunctionExpressions.ts b/tests/cases/compiler/collisionArgumentsFunctionExpressions.ts index e21457320ffb6..bbb0e2c11aee7 100644 --- a/tests/cases/compiler/collisionArgumentsFunctionExpressions.ts +++ b/tests/cases/compiler/collisionArgumentsFunctionExpressions.ts @@ -1,5 +1,7 @@ // @target: es5, es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false function foo() { function f1(arguments: number, ...restParameters) { //arguments is error var arguments = 10; // no error diff --git a/tests/cases/compiler/collisionArgumentsInType.ts b/tests/cases/compiler/collisionArgumentsInType.ts index 426ec223c81f4..173437ce9beff 100644 --- a/tests/cases/compiler/collisionArgumentsInType.ts +++ b/tests/cases/compiler/collisionArgumentsInType.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false var v1: (i: number, ...arguments) => void; // no error - no code gen var v12: (arguments: number, ...restParameters) => void; // no error - no code gen var v2: { diff --git a/tests/cases/compiler/collisionArgumentsInterfaceMembers.ts b/tests/cases/compiler/collisionArgumentsInterfaceMembers.ts index 45d553b04f9b5..204350d6e0aa6 100644 --- a/tests/cases/compiler/collisionArgumentsInterfaceMembers.ts +++ b/tests/cases/compiler/collisionArgumentsInterfaceMembers.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false // call interface i1 { (i: number, ...arguments); // no error - no code gen diff --git a/tests/cases/compiler/constDeclarations-invalidContexts.ts b/tests/cases/compiler/constDeclarations-invalidContexts.ts index bf7d290befb4d..48242c5a4bc47 100644 --- a/tests/cases/compiler/constDeclarations-invalidContexts.ts +++ b/tests/cases/compiler/constDeclarations-invalidContexts.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @allowUnreachableCode: true // @target: ES6 diff --git a/tests/cases/compiler/constDeclarations-scopes.ts b/tests/cases/compiler/constDeclarations-scopes.ts index b2cd4416e43d7..9166e3b55e222 100644 --- a/tests/cases/compiler/constDeclarations-scopes.ts +++ b/tests/cases/compiler/constDeclarations-scopes.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: ES6 // global diff --git a/tests/cases/compiler/constDeclarations-validContexts.ts b/tests/cases/compiler/constDeclarations-validContexts.ts index 7806fd34534d4..2cc2b22bca443 100644 --- a/tests/cases/compiler/constDeclarations-validContexts.ts +++ b/tests/cases/compiler/constDeclarations-validContexts.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @allowUnreachableCode: true // @target: ES6 diff --git a/tests/cases/compiler/convertKeywordsYes.ts b/tests/cases/compiler/convertKeywordsYes.ts index 3d048f209e1f7..8552a315f506f 100644 --- a/tests/cases/compiler/convertKeywordsYes.ts +++ b/tests/cases/compiler/convertKeywordsYes.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false // reserved ES5 future in strict mode var constructor = 0; diff --git a/tests/cases/compiler/es5-asyncFunctionWithStatements.ts b/tests/cases/compiler/es5-asyncFunctionWithStatements.ts index 4aaf945f82b73..552d49f7d9482 100644 --- a/tests/cases/compiler/es5-asyncFunctionWithStatements.ts +++ b/tests/cases/compiler/es5-asyncFunctionWithStatements.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @lib: es5,es2015.promise // @noEmitHelpers: true // @target: ES5, ES2015 diff --git a/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts b/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts index cbef66b6264fc..96766e8ab013f 100644 --- a/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts +++ b/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false // @allowJs: true // @checkJs: true // @noEmit: true diff --git a/tests/cases/compiler/missingCloseParenStatements.ts b/tests/cases/compiler/missingCloseParenStatements.ts index 530ac6c70fa45..eed31575643ec 100644 --- a/tests/cases/compiler/missingCloseParenStatements.ts +++ b/tests/cases/compiler/missingCloseParenStatements.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false var a1, a2, a3 = 0; if ( a1 && (a2 + a3 > 0) { while( (a2 > 0) && a1 diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts index 38accf5330c90..81986299bb214 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 var arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts index 328879f8c9687..f4eddf7e56bc2 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 var arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts index 562adaa54b1f9..259406bd46765 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts index e068bc1435366..009fbaefd9740 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts index c784e7d1e18b2..ee56bfa4afbce 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts index ac44e6f756a88..16b9532cd23c5 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts index 6a4c856b01129..34fca3f7e5534 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts index 1d5a7e280bf62..81185bba03912 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts index fae7ce6211f78..1982d5ea1ac2b 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts index e169ddbdc3e55..be4b678fa45b0 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts index edaf3a9f88074..db0d90cc12f3f 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts index ede6a656567d3..83e5dc9223ffb 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts index 538a3e6acfbbf..f57f0cc9b1cfc 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts index 23258f0a92287..868cba88db6af 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts index bd39bb933b183..a8832ff325bd4 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts index a9fa39bf596aa..663b92525bf81 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts index 4920a3c266674..c5b5b068f4414 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts index be41f1ae6ae97..2dcd0f5226983 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts index 6636dc4c8bdff..c34b76db6c484 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts index af0d3eae46046..7aa36a40fe07b 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts index d9a327521785e..85f50f6d8dcd0 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts index e50a8745f487b..46a21ff9cb6bb 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts index 142279b7566f3..f7528dfc40812 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es5, es2015 function f() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts index e55f0724d9b7c..a60d5a3b9dbf3 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts @@ -1,4 +1,6 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f() { diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of56.ts b/tests/cases/conformance/es6/for-ofStatements/for-of56.ts index 6687d61f2ea2d..6282864dd5138 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of56.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of56.ts @@ -1,3 +1,5 @@ -// @strict: false +// @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false //@target: ES6 for (var let of []) {} \ No newline at end of file diff --git a/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts b/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts index 7b3900b8513eb..53f2b17daa6e5 100644 --- a/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts +++ b/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es6 function f(yield) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts b/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts index 07b761b4f8d86..9d6a389e6fedf 100644 --- a/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts +++ b/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false //@target: ES6 var yield; function* g() { diff --git a/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts b/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts index dd8f02085d463..cc6f34d622bfc 100644 --- a/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts +++ b/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts @@ -1,5 +1,7 @@ // @target: es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false // Arrow function used in with statement with (window) { diff --git a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts index e49b86e6f6e99..24902229d76cb 100644 --- a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts @@ -1,63 +1,65 @@ -// @target: es2015 -// @strict: false -// delete operator on any type - -declare var ANY: any; -declare var ANY1; -var ANY2: any[] = ["", ""]; -declare var obj: () => {}; -var obj1 = { x: "", y: () => { }}; -function foo(): any { - var a; - return a; -} -class A { - public a: any; - static foo() { - var a; - return a; - } -} -namespace M { - export var n: any; -} -var objA = new A(); - -// any type var -var ResultIsBoolean1 = delete ANY1; -var ResultIsBoolean2 = delete ANY2; -var ResultIsBoolean3 = delete A; -var ResultIsBoolean4 = delete M; -var ResultIsBoolean5 = delete obj; -var ResultIsBoolean6 = delete obj1; - -// any type literal -var ResultIsBoolean7 = delete undefined; -var ResultIsBoolean8 = delete null; - -// any type expressions -var ResultIsBoolean9 = delete ANY2[0]; -var ResultIsBoolean10 = delete obj1.x; -var ResultIsBoolean11 = delete obj1.y; -var ResultIsBoolean12 = delete objA.a; -var ResultIsBoolean13 = delete M.n; -var ResultIsBoolean14 = delete foo(); -var ResultIsBoolean15 = delete A.foo(); -var ResultIsBoolean16 = delete (ANY + ANY1); -var ResultIsBoolean17 = delete (null + undefined); -var ResultIsBoolean18 = delete (null + null); -var ResultIsBoolean19 = delete (undefined + undefined); - -// multiple delete operators -var ResultIsBoolean20 = delete delete ANY; -var ResultIsBoolean21 = delete delete delete (ANY + ANY1); - -// miss assignment operators -delete ANY; -delete ANY1; -delete ANY2[0]; -delete ANY, ANY1; -delete obj1.x; -delete obj1.y; -delete objA.a; +// @target: es2015 +// @ignoreDeprecations: 6.0 +// @strict: false +// @alwaysStrict: true, false +// delete operator on any type + +declare var ANY: any; +declare var ANY1; +var ANY2: any[] = ["", ""]; +declare var obj: () => {}; +var obj1 = { x: "", y: () => { }}; +function foo(): any { + var a; + return a; +} +class A { + public a: any; + static foo() { + var a; + return a; + } +} +namespace M { + export var n: any; +} +var objA = new A(); + +// any type var +var ResultIsBoolean1 = delete ANY1; +var ResultIsBoolean2 = delete ANY2; +var ResultIsBoolean3 = delete A; +var ResultIsBoolean4 = delete M; +var ResultIsBoolean5 = delete obj; +var ResultIsBoolean6 = delete obj1; + +// any type literal +var ResultIsBoolean7 = delete undefined; +var ResultIsBoolean8 = delete null; + +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +var ResultIsBoolean10 = delete obj1.x; +var ResultIsBoolean11 = delete obj1.y; +var ResultIsBoolean12 = delete objA.a; +var ResultIsBoolean13 = delete M.n; +var ResultIsBoolean14 = delete foo(); +var ResultIsBoolean15 = delete A.foo(); +var ResultIsBoolean16 = delete (ANY + ANY1); +var ResultIsBoolean17 = delete (null + undefined); +var ResultIsBoolean18 = delete (null + null); +var ResultIsBoolean19 = delete (undefined + undefined); + +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); + +// miss assignment operators +delete ANY; +delete ANY1; +delete ANY2[0]; +delete ANY, ANY1; +delete obj1.x; +delete obj1.y; +delete objA.a; delete M.n; \ No newline at end of file diff --git a/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts b/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts index 114be9abdf612..8c0b2851b4754 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts @@ -1,37 +1,39 @@ -// @target: es2015 -// @strict: false - -namespace Inner { - var; - let; - const; - - export var a; - export let b; - export var c: string; - export let d: number; - class A {} - export var e: A; - export let f: A; - - namespace B { - export let a = 1, b, c = 2; - export let x, y, z; - } - - namespace C { - export var a = 1, b, c = 2; - export var x, y, z; - } - - // Shouldn't be filtered - export var a1 = 1; - export let b1 = 1; - export var c1: string = 'a'; - export let d1: number = 1; - class D {} - export var e1 = new D; - export let f1 = new D; - export var g1: D = new D; - export let h1: D = new D; +// @target: es2015 +// @ignoreDeprecations: 6.0 +// @strict: false +// @alwaysStrict: true, false + +namespace Inner { + var; + let; + const; + + export var a; + export let b; + export var c: string; + export let d: number; + class A {} + export var e: A; + export let f: A; + + namespace B { + export let a = 1, b, c = 2; + export let x, y, z; + } + + namespace C { + export var a = 1, b, c = 2; + export var x, y, z; + } + + // Shouldn't be filtered + export var a1 = 1; + export let b1 = 1; + export var c1: string = 'a'; + export let d1: number = 1; + class D {} + export var e1 = new D; + export let f1 = new D; + export var g1: D = new D; + export let h1: D = new D; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts index 5ba5c2f9a662b..ed1f8739fab80 100644 --- a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts +++ b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es2018 // @lib: esnext // @noEmit: true diff --git a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts index 1b52bac20c9e7..b98812cd98d5d 100644 --- a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts +++ b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es2018 // @lib: esnext // @noEmit: true diff --git a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts index 20bb2d7900ed3..6e29e63f2f0f4 100644 --- a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts +++ b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es2018 // @lib: esnext // @noEmit: true diff --git a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts index 8f7699ace8e26..347f07d152773 100644 --- a/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts +++ b/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts @@ -1,4 +1,6 @@ // @strict: false +// @ignoreDeprecations: 6.0 +// @alwaysStrict: true, false // @target: es2018 // @skipLibCheck: true // @lib: esnext diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts index e1711f189b6b3..4466d082c1fa0 100644 --- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts +++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts @@ -1,12 +1,14 @@ // @target: es2015 -// @strict: false -return { +// @ignoreDeprecations: 6.0 +// @strict: false +// @alwaysStrict: true, false +return { - "set": function (key, value) { + "set": function (key, value) { // 'private' should not be considered a member variable here. - private[key] = value; + private[key] = value; - } + } }; \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts index acbf3fed9e115..3cf6cccf50ca6 100644 --- a/tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts @@ -1,5 +1,7 @@ // @target: es5, es2015 +// @ignoreDeprecations: 6.0 // @strict: false +// @alwaysStrict: true, false for (let v of []) { v; function foo() { From 441d2b8ef733f5a6e01c5982f4d72f26cdb1b54b Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 3 Feb 2026 21:25:17 -0800 Subject: [PATCH 4/7] All .js baseline updates --- tests/baselines/reference/ArrowFunction4.js | 1 + .../baselines/reference/ClassDeclaration10.js | 1 + .../baselines/reference/ClassDeclaration13.js | 1 + .../baselines/reference/ClassDeclaration14.js | 1 + .../baselines/reference/ClassDeclaration15.js | 1 + .../baselines/reference/ClassDeclaration21.js | 1 + .../baselines/reference/ClassDeclaration22.js | 1 + .../baselines/reference/ClassDeclaration26.js | 1 + .../baselines/reference/ClassDeclaration9.js | 1 + ...nWithInvalidConstOnPropertyDeclaration2.js | 1 + .../reference/ES5For-of14(target=es2015).js | 1 + .../reference/ES5For-of14(target=es5).js | 1 + .../reference/ES5For-of15(target=es2015).js | 1 + .../reference/ES5For-of15(target=es5).js | 1 + .../reference/ES5For-of16(target=es2015).js | 1 + .../reference/ES5For-of16(target=es5).js | 1 + .../reference/ES5For-of18(target=es2015).js | 1 + .../reference/ES5For-of18(target=es5).js | 1 + ...-of19(alwaysstrict=false,target=es2015).js | 22 + ...For-of19(alwaysstrict=false,target=es5).js | 24 + ...r-of19(alwaysstrict=true,target=es2015).js | 23 + ...5For-of19(alwaysstrict=true,target=es5).js | 25 + .../reference/ES5For-of2(target=es2015).js | 1 + .../reference/ES5For-of2(target=es5).js | 1 + .../reference/ES5For-of20(target=es2015).js | 1 + .../reference/ES5For-of20(target=es5).js | 1 + .../reference/ES5For-of21(target=es2015).js | 1 + .../reference/ES5For-of21(target=es5).js | 1 + .../reference/ES5For-of22(target=es2015).js | 1 + .../reference/ES5For-of22(target=es5).js | 1 + .../reference/ES5For-of23(target=es2015).js | 1 + .../reference/ES5For-of23(target=es5).js | 1 + .../reference/ES5For-of24(target=es2015).js | 1 + .../reference/ES5For-of24(target=es5).js | 1 + .../reference/ES5For-of25(target=es2015).js | 1 + .../reference/ES5For-of25(target=es5).js | 1 + .../reference/ES5For-of26(target=es2015).js | 1 + .../reference/ES5For-of26(target=es5).js | 1 + .../reference/ES5For-of27(target=es2015).js | 1 + .../reference/ES5For-of27(target=es5).js | 1 + .../reference/ES5For-of28(target=es2015).js | 1 + .../reference/ES5For-of28(target=es5).js | 1 + .../reference/ES5For-of29(target=es2015).js | 1 + .../reference/ES5For-of29(target=es5).js | 1 + .../reference/ES5For-of4(target=es2015).js | 1 + .../reference/ES5For-of4(target=es5).js | 1 + .../reference/ES5For-of5(target=es2015).js | 1 + .../reference/ES5For-of5(target=es5).js | 1 + .../reference/ES5For-of6(target=es2015).js | 1 + .../reference/ES5For-of6(target=es5).js | 1 + .../ES5SymbolProperty2(target=es2015).js | 1 + .../ES5SymbolProperty2(target=es5).js | 1 + ...sClassHeritageListMemberTypeAnnotations.js | 1 + ...accessibleTypeInTypeParameterConstraint.js | 1 + ...ionDeclaration2_es6(alwaysstrict=false).js | 9 + ...tionDeclaration2_es6(alwaysstrict=true).js | 10 + .../reference/FunctionDeclaration9_es6.js | 1 + ...ortInInternalModule(alwaysstrict=false).js | 66 +++ ...portInInternalModule(alwaysstrict=true).js | 67 +++ tests/baselines/reference/Protected8.js | 1 + tests/baselines/reference/Protected9.js | 1 + ...edAndNonExportedInterfacesOfTheSameName.js | 1 + ...EachWithExportedInterfacesOfTheSameName.js | 1 + .../reference/VariableDeclaration2_es6.js | 1 + .../reference/YieldExpression13_es6.js | 1 + .../reference/YieldExpression3_es6.js | 1 + .../reference/YieldExpression4_es6.js | 1 + .../reference/YieldExpression6_es6.js | 1 + .../reference/YieldStarExpression4_es6.js | 1 + .../accessibilityModifiers(target=es2015).js | 1 + .../accessibilityModifiers(target=es5).js | 1 + ...terAccessibilityModifier(target=es2015).js | 1 + ...ameterAccessibilityModifier(target=es5).js | 1 + .../accessorWithES5(target=es2015).js | 1 + .../reference/accessorWithES5(target=es5).js | 1 + .../accessorWithInitializer(target=es2015).js | 1 + .../accessorWithInitializer(target=es5).js | 1 + .../accessorWithRestParam(target=es2015).js | 1 + .../accessorWithRestParam(target=es5).js | 1 + .../accessorWithoutBody1(target=es2015).js | 1 + .../accessorWithoutBody1(target=es5).js | 1 + .../accessorWithoutBody2(target=es2015).js | 1 + .../accessorWithoutBody2(target=es5).js | 1 + tests/baselines/reference/accessorsEmit.js | 1 + .../additionOperatorWithAnyAndEveryType.js | 1 + .../additionOperatorWithInvalidOperands.js | 1 + .../ambientClassDeclarationWithExtends.js | 3 + .../ambientClassOverloadForFunction.js | 1 + .../reference/ambientDeclarations.js | 1 + .../reference/ambientDeclarationsExternal.js | 1 + .../ambientDeclarationsPatterns_merging1.js | 1 + .../ambientDeclarationsPatterns_merging2.js | 1 + .../ambientDeclarationsPatterns_merging3.js | 1 + ...ntDeclarationsPatterns_tooManyAsterisks.js | 1 + tests/baselines/reference/ambientErrors.js | 1 + tests/baselines/reference/ambientFundule.js | 1 + .../reference/ambientInsideNonAmbient.js | 1 + tests/baselines/reference/ambientModules.js | 1 + ...bientWithStatements(alwaysstrict=false).js | 32 ++ ...mbientWithStatements(alwaysstrict=true).js | 33 ++ .../reference/ambiguousGenericAssertion1.js | 1 + .../baselines/reference/ambiguousOverload.js | 1 + .../reference/ambiguousOverloadResolution.js | 1 + .../reference/anyAsReturnTypeForNewOnCall.js | 1 + .../anyAssignabilityInInheritance.js | 1 + .../reference/anyAssignableToEveryType2.js | 1 + .../reference/anyIdenticalToItself.js | 1 + .../reference/argumentsAsPropertyName.js | 1 + .../reference/argumentsAsPropertyName2.js | 1 + ...onScopeArgumentList(alwaysstrict=false).js | 13 + ...ionScopeArgumentList(alwaysstrict=true).js | 14 + .../argumentsPropertyNameInJsMode1.js | 1 + .../argumentsPropertyNameInJsMode2.js | 1 + ...eInObjectLiteral_Js(alwaysstrict=false).js | 53 ++ ...ceInObjectLiteral_Js(alwaysstrict=true).js | 54 ++ .../arityErrorRelatedSpanBindingPattern.js | 1 + .../reference/arrayAssignmentTest2.js | 1 + .../reference/arrayAssignmentTest4.js | 1 + .../reference/arrayIndexWithArrayFails.js | 1 + .../baselines/reference/arrayLiteralSpread.js | 1 + .../arrayLiteralSpreadES5iterable.js | 1 + .../reference/arrayLiteralWidened.js | 1 + tests/baselines/reference/arrayLiterals.js | 1 + .../baselines/reference/arrayLiterals2ES5.js | 1 + .../arrayLiteralsWithRecursiveGenerics.js | 1 + ...rayOfSubtypeIsAssignableToReadonlyArray.js | 1 + .../reference/arrayTypeOfFunctionTypes.js | 1 + .../reference/arrayTypeOfFunctionTypes2.js | 1 + ...rowFunctionContexts(alwaysstrict=false).js | 178 ++++++ ...rrowFunctionContexts(alwaysstrict=true).js | 179 ++++++ .../reference/arrowFunctionErrorSpan.js | 1 + .../reference/arrowFunctionExpressions.js | 1 + .../arrowFunctionWithObjectLiteralBody3.js | 1 + .../arrowFunctionWithObjectLiteralBody4.js | 1 + ...arameterNameAsync_es2017(target=es2015).js | 1 + ...thParameterNameAsync_es2017(target=es5).js | 1 + ...thParameterNameAsync_es5(target=es2015).js | 1 + ...nWithParameterNameAsync_es5(target=es5).js | 1 + ...thParameterNameAsync_es6(target=es2015).js | 1 + ...nWithParameterNameAsync_es6(target=es5).js | 1 + .../reference/arrowFunctionsMissingTokens.js | 1 + tests/baselines/reference/asOpEmitParens.js | 1 + tests/baselines/reference/asOperatorASI.js | 1 + tests/baselines/reference/asiAbstract.js | 1 + .../asiPreventsParsingAsTypeAlias02.js | 1 + ...licPrivateProtected(alwaysstrict=false).js | 74 +++ ...blicPrivateProtected(alwaysstrict=true).js | 75 +++ .../assertInWrapSomeTypeParameter.js | 1 + .../assignLambdaToNominalSubtypeOfFunction.js | 1 + .../reference/assignmentCompatForEnums.js | 1 + ...CompatInterfaceWithStringIndexSignature.js | 1 + ...ricCallSignaturesWithOptionalParameters.js | 1 + .../assignmentCompatWithObjectMembers.js | 1 + .../assignmentCompatWithObjectMembers2.js | 1 + .../assignmentCompatWithObjectMembers3.js | 1 + .../assignmentCompatWithObjectMembers4.js | 1 + .../assignmentCompatWithObjectMembers5.js | 1 + ...entCompatWithObjectMembersAccessibility.js | 1 + ...mentCompatWithObjectMembersNumericNames.js | 1 + ...nmentCompatWithObjectMembersOptionality.js | 1 + ...mentCompatWithObjectMembersOptionality2.js | 1 + ...mpatWithObjectMembersStringNumericNames.js | 1 + .../reference/assignmentCompatability37.js | 1 + .../reference/assignmentCompatability38.js | 1 + ...-apply-member-off-of-function-interface.js | 1 + ...g-call-member-off-of-function-interface.js | 1 + .../reference/assignmentLHSIsValue.js | 1 + .../assignmentNonObjectTypeConstraints.js | 1 + .../assignmentToObjectAndFunction.js | 1 + .../reference/assignmentToReferenceTypes.js | 1 + tests/baselines/reference/assignments.js | 1 + .../reference/asyncArrowFunction2_es2017.js | 1 + .../asyncArrowFunction2_es5(target=es2015).js | 1 + .../asyncArrowFunction2_es5(target=es5).js | 1 + .../reference/asyncArrowFunction2_es6.js | 1 + .../reference/asyncArrowFunction3_es2017.js | 1 + .../asyncArrowFunction3_es5(target=es2015).js | 1 + .../asyncArrowFunction3_es5(target=es5).js | 1 + .../reference/asyncArrowFunction3_es6.js | 1 + .../reference/asyncArrowFunction5_es2017.js | 1 + .../asyncArrowFunction5_es5(target=es2015).js | 3 +- .../asyncArrowFunction5_es5(target=es5).js | 4 +- .../reference/asyncArrowFunction5_es6.js | 3 +- .../reference/asyncArrowFunction9_es2017.js | 1 + .../asyncArrowFunction9_es5(target=es2015).js | 1 + .../asyncArrowFunction9_es5(target=es5).js | 1 + .../reference/asyncArrowFunction9_es6.js | 1 + .../asyncFunctionDeclaration10_es2017.js | 1 + ...unctionDeclaration10_es5(target=es2015).js | 1 + ...ncFunctionDeclaration10_es5(target=es5).js | 1 + .../asyncFunctionDeclaration10_es6.js | 1 + ...unctionDeclaration15_es5(target=es2015).js | 1 + ...ncFunctionDeclaration15_es5(target=es5).js | 1 + .../asyncFunctionDeclaration15_es6.js | 1 + .../asyncFunctionDeclaration2_es2017.js | 1 + ...FunctionDeclaration2_es5(target=es2015).js | 1 + ...yncFunctionDeclaration2_es5(target=es5).js | 1 + .../asyncFunctionDeclaration2_es6.js | 1 + .../asyncFunctionDeclaration3_es2017.js | 1 + ...FunctionDeclaration3_es5(target=es2015).js | 1 + ...yncFunctionDeclaration3_es5(target=es5).js | 1 + .../asyncFunctionDeclaration3_es6.js | 1 + .../asyncFunctionDeclaration5_es2017.js | 1 + ...FunctionDeclaration5_es5(target=es2015).js | 1 + ...yncFunctionDeclaration5_es5(target=es5).js | 1 + .../asyncFunctionDeclaration5_es6.js | 1 + ...ationParameterEvaluation(target=es2015).js | 1 + ...ationParameterEvaluation(target=es2017).js | 1 + ...ctionTempVariableScoping(target=es2015).js | 3 +- ...FunctionTempVariableScoping(target=es5).js | 4 +- ...ratorParameterEvaluation(target=es2015).js | 1 + ...ratorParameterEvaluation(target=es2017).js | 1 + ...ratorParameterEvaluation(target=es2018).js | 1 + .../asyncMethodWithSuperConflict_es6.js | 1 + .../asyncSetter_es5(target=es2015).js | 1 + .../reference/asyncSetter_es5(target=es5).js | 1 + tests/baselines/reference/asyncSetter_es6.js | 1 + ...syncUnParenthesizedArrowFunction_es2017.js | 1 + ...hesizedArrowFunction_es5(target=es2015).js | 5 +- ...enthesizedArrowFunction_es5(target=es5).js | 6 +- .../asyncUnParenthesizedArrowFunction_es6.js | 5 +- .../reference/asyncWithVarShadowing_es6.js | 1 + ...entedClassWithPrototypePropertyOnModule.js | 1 + ...entedTypeAssignmentCompatIndexSignature.js | 1 + ...ugmentedTypeBracketAccessIndexSignature.js | 1 + ...augmentedTypeBracketNamedPropertyAccess.js | 1 + tests/baselines/reference/autoAccessor11.js | 1 + .../autoAsiForStaticsInClassDeclaration.js | 1 + tests/baselines/reference/avoid.js | 1 + tests/baselines/reference/awaitAndYield.js | 1 + .../reference/awaitAndYieldInProperty.js | 1 + .../reference/awaitUsingDeclarations.12.js | 1 + .../reference/awaitUsingDeclarations.13.js | 1 + .../reference/awaitUsingDeclarations.14.js | 1 + .../reference/awaitUsingDeclarations.15.js | 1 + .../reference/awaitUsingDeclarations.16.js | 1 + .../reference/awaitUsingDeclarations.7.js | 1 + ...itUsingDeclarationsInFor(target=es2015).js | 1 + ...itUsingDeclarationsInFor(target=es2017).js | 1 + ...itUsingDeclarationsInFor(target=es2022).js | 1 + ...awaitUsingDeclarationsInFor(target=es5).js | 1 + ...itUsingDeclarationsInFor(target=esnext).js | 1 + ...DeclarationsInForAwaitOf(target=es2015).js | 1 + ...DeclarationsInForAwaitOf(target=es2017).js | 1 + ...DeclarationsInForAwaitOf(target=es2022).js | 1 + ...ingDeclarationsInForAwaitOf(target=es5).js | 1 + ...DeclarationsInForAwaitOf(target=esnext).js | 1 + .../awaitUsingDeclarationsInForAwaitOf.2.js | 1 + .../awaitUsingDeclarationsInForIn.js | 1 + ...ingDeclarationsInForOf.1(target=es2015).js | 1 + ...ingDeclarationsInForOf.1(target=es2017).js | 1 + ...ingDeclarationsInForOf.1(target=es2022).js | 1 + ...tUsingDeclarationsInForOf.1(target=es5).js | 1 + ...ingDeclarationsInForOf.1(target=esnext).js | 1 + .../awaitUsingDeclarationsInForOf.2.js | 1 + .../awaitUsingDeclarationsInForOf.3.js | 1 + .../awaitUsingDeclarationsInForOf.4.js | 1 + tests/baselines/reference/awaitedTypeCrash.js | 1 + .../baselines/reference/awaitedTypeJQuery.js | 1 + tests/baselines/reference/badArraySyntax.js | 1 + tests/baselines/reference/bases.js | 1 + .../bestCommonTypeWithContextualTyping.js | 1 + tests/baselines/reference/bigintIndex.js | 1 + tests/baselines/reference/bigintWithLib.js | 1 + .../binopAssignmentShouldHaveType.js | 1 + .../bitwiseNotOperatorWithAnyOtherType.js | 1 + ...blockScopedBindingCaptureThisInFunction.js | 1 + .../blockScopedBindingUsedBeforeDef.js | 1 + ...edNamespaceDifferentFile(target=es2015).js | 1 + ...copedNamespaceDifferentFile(target=es5).js | 1 + ...pedVariablesUseBeforeDef(target=es2015).js | 1 + ...ScopedVariablesUseBeforeDef(target=es5).js | 1 + tests/baselines/reference/callChain.2.js | 1 + ...callNonGenericFunctionWithTypeArguments.js | 1 + tests/baselines/reference/callOverloads1.js | 1 + tests/baselines/reference/callOverloads2.js | 1 + tests/baselines/reference/callOverloads5.js | 1 + ...tureWithOptionalParameterAndInitializer.js | 1 + .../callSignatureWithoutAnnotationsOrBody.js | 1 + ...ureWithoutReturnTypeAnnotationInference.js | 1 + ...allSignaturesThatDifferOnlyByReturnType.js | 1 + ...llSignaturesThatDifferOnlyByReturnType2.js | 1 + ...llSignaturesThatDifferOnlyByReturnType3.js | 1 + ...sWithAccessibilityModifiersOnParameters.js | 1 + .../callSignaturesWithDuplicateParameters.js | 1 + .../callSignaturesWithOptionalParameters.js | 1 + .../callSignaturesWithOptionalParameters2.js | 1 + ...callSignaturesWithParameterInitializers.js | 1 + ...allSignaturesWithParameterInitializers2.js | 1 + .../baselines/reference/callWithSpreadES6.js | 1 + .../callbackArgsDifferByOptionality.js | 1 + .../reference/canFollowGetSetKeyword.js | 1 + .../reference/capturedLetConstInLoop1.js | 1 + .../reference/capturedLetConstInLoop10.js | 1 + .../reference/capturedLetConstInLoop10_ES6.js | 1 + .../reference/capturedLetConstInLoop11.js | 1 + .../reference/capturedLetConstInLoop11_ES6.js | 1 + .../reference/capturedLetConstInLoop12.js | 1 + .../reference/capturedLetConstInLoop13.js | 1 + .../reference/capturedLetConstInLoop1_ES6.js | 1 + .../reference/capturedLetConstInLoop2.js | 1 + .../reference/capturedLetConstInLoop2_ES6.js | 1 + .../reference/capturedLetConstInLoop3.js | 1 + .../reference/capturedLetConstInLoop3_ES6.js | 1 + .../reference/capturedLetConstInLoop5.js | 1 + .../reference/capturedLetConstInLoop5_ES6.js | 1 + .../reference/capturedLetConstInLoop6.js | 1 + .../reference/capturedLetConstInLoop6_ES6.js | 1 + .../reference/capturedLetConstInLoop7.js | 1 + .../reference/capturedLetConstInLoop7_ES6.js | 1 + .../reference/capturedLetConstInLoop9.js | 1 + .../reference/capturedLetConstInLoop9_ES6.js | 1 + .../capturedParametersInInitializers1.js | 1 + .../capturedVarInLoop(target=es2015).js | 1 + .../capturedVarInLoop(target=es5).js | 1 + .../reference/castExpressionParentheses.js | 1 + .../baselines/reference/chainedAssignment1.js | 1 + .../reference/chainedAssignmentChecking.js | 1 + ...arameterConstrainedToOtherTypeParameter.js | 1 + ...rameterConstrainedToOtherTypeParameter2.js | 1 + .../checkInfiniteExpansionTermination.js | 1 + .../checkInfiniteExpansionTermination2.js | 1 + ...ramOnVariableDeclaredFunctionExpression.js | 1 + .../checkJsdocTypedefOnlySourceFile.js | 1 + .../checkSuperCallBeforeThisAccessing6.js | 1 + .../reference/circularTypeofWithVarOrFunc.js | 1 + .../classAbstractAccessor(target=es2015).js | 1 + .../classAbstractAccessor(target=es5).js | 1 + .../reference/classAbstractCrashedOnce.js | 1 + .../reference/classAbstractExtends.js | 1 + .../reference/classAbstractGeneric.js | 1 + .../reference/classAbstractInheritance1.js | 1 + .../classAbstractMethodInNonAbstractClass.js | 1 + .../classAbstractMixedWithModifiers.js | 1 + .../reference/classAbstractOverloads.js | 1 + .../classAbstractOverrideWithAbstract.js | 1 + .../reference/classAbstractSuperCalls.js | 1 + .../classAbstractUsingAbstractMethods2.js | 1 + ...ionWithStaticProperties2(target=es2015).js | 1 + ...essionWithStaticProperties2(target=es5).js | 1 + ...classExpressionWithStaticPropertiesES62.js | 1 + .../classExtendsValidConstructorFunction.js | 1 + .../classImplementingInterfaceIndexer.js | 1 + .../classImplementsImportedInterface.js | 1 + .../classMemberInitializerScoping.js | 1 + ...t=es2017,usedefineforclassfields=false).js | 1 + ...et=es2017,usedefineforclassfields=true).js | 1 + ...t=esnext,usedefineforclassfields=false).js | 1 + ...et=esnext,usedefineforclassfields=true).js | 1 + .../classMemberWithMissingIdentifier.js | 1 + .../classMemberWithMissingIdentifier2.js | 1 + .../reference/classPropertyAsPrivate.js | 1 + .../reference/classPropertyAsProtected.js | 1 + .../classPropertyIsPublicByDefault.js | 1 + .../classStaticBlock26(target=es2022).js | 1 + .../classStaticBlock26(target=esnext).js | 1 + tests/baselines/reference/classUpdateTests.js | 1 + .../reference/classWithMultipleBaseClasses.js | 1 + ...ssWithOverloadImplementationOfWrongName.js | 1 + ...sWithOverloadImplementationOfWrongName2.js | 1 + .../reference/classWithPrivateProperty.js | 1 + .../reference/classWithProtectedProperty.js | 1 + .../reference/classWithPublicProperty.js | 1 + ...nParameterBindingPattern(target=es2015).js | 1 + ...ldInParameterBindingPattern(target=es5).js | 1 + ...nParameterBindingPattern(target=esnext).js | 1 + .../classWithTwoConstructorDefinitions.js | 1 + .../reference/classdecl(target=es2015).js | 1 + .../reference/classdecl(target=es5).js | 1 + tests/baselines/reference/cloduleTest2.js | 1 + .../reference/cloduleWithDuplicateMember2.js | 1 + ...tions(alwaysstrict=false,target=es2015).js | 36 ++ ...unctions(alwaysstrict=false,target=es5).js | 48 ++ ...ctions(alwaysstrict=true,target=es2015).js | 37 ++ ...Functions(alwaysstrict=true,target=es5).js | 49 ++ ...rgumentsClassConstructor(target=es2015).js | 1 + ...onArgumentsClassConstructor(target=es5).js | 1 + ...sionArgumentsClassMethod(target=es2015).js | 1 + ...llisionArgumentsClassMethod(target=es5).js | 1 + ...ction(alwaysstrict=false,target=es2015).js | 74 +++ ...Function(alwaysstrict=false,target=es5).js | 94 +++ ...nction(alwaysstrict=true,target=es2015).js | 75 +++ ...sFunction(alwaysstrict=true,target=es5).js | 95 ++++ ...sions(alwaysstrict=false,target=es2015).js | 65 +++ ...ressions(alwaysstrict=false,target=es5).js | 85 +++ ...ssions(alwaysstrict=true,target=es2015).js | 66 +++ ...pressions(alwaysstrict=true,target=es5).js | 86 +++ ...sionArgumentsInType(alwaysstrict=false).js | 23 + ...isionArgumentsInType(alwaysstrict=true).js | 24 + ...ntsInterfaceMembers(alwaysstrict=false).js | 33 ++ ...entsInterfaceMembers(alwaysstrict=true).js | 34 ++ ...lisionCodeGenModuleWithAccessorChildren.js | 1 + ...ionCodeGenModuleWithConstructorChildren.js | 1 + ...lisionCodeGenModuleWithFunctionChildren.js | 1 + ...ollisionCodeGenModuleWithMethodChildren.js | 1 + .../collisionRestParameterArrowFunctions.js | 1 + .../collisionRestParameterClassConstructor.js | 1 + .../collisionRestParameterClassMethod.js | 1 + .../collisionRestParameterFunction.js | 1 + ...llisionRestParameterFunctionExpressions.js | 1 + .../reference/collisionRestParameterInType.js | 1 + .../collisionRestParameterInterfaceMembers.js | 1 + .../collisionSuperAndNameResolution.js | 1 + ...llisionSuperAndParameter(target=es2015).js | 1 + .../collisionSuperAndParameter(target=es5).js | 1 + .../reference/collisionSuperAndParameter1.js | 1 + ...collisionThisExpressionAndAliasInGlobal.js | 1 + ...onThisExpressionAndAmbientClassInGlobal.js | 1 + ...sionThisExpressionAndAmbientVarInGlobal.js | 1 + ...collisionThisExpressionAndClassInGlobal.js | 1 + .../collisionThisExpressionAndEnumInGlobal.js | 1 + ...lisionThisExpressionAndFunctionInGlobal.js | 1 + ...onAndLocalVarInAccessors(target=es2015).js | 1 + ...ssionAndLocalVarInAccessors(target=es5).js | 1 + ...nThisExpressionAndLocalVarInConstructor.js | 1 + ...sionThisExpressionAndLocalVarInFunction.js | 1 + ...lisionThisExpressionAndLocalVarInLambda.js | 1 + ...lisionThisExpressionAndLocalVarInMethod.js | 1 + ...sionThisExpressionAndLocalVarInProperty.js | 1 + ...ollisionThisExpressionAndModuleInGlobal.js | 1 + ...ollisionThisExpressionAndNameResolution.js | 1 + .../collisionThisExpressionAndParameter.js | 1 + ...ionAndPropertyNameAsConstuctorParameter.js | 1 + .../collisionThisExpressionAndVarInGlobal.js | 1 + .../commaOperatorWithSecondOperandAnyType.js | 1 + .../reference/commentLeadingCloseBrace.js | 1 + .../reference/commentOnAmbientModule.js | 2 + .../reference/commentOnAmbientfunction.js | 2 + .../reference/commentOnParameter1.js | 1 + .../reference/commentOnParameter2.js | 1 + .../reference/commentOnParameter3.js | 1 + .../reference/commentOnSignature1.js | 2 + .../reference/commentsAfterCaseClauses1.js | 1 + .../reference/commentsAfterCaseClauses2.js | 1 + .../reference/commentsAfterCaseClauses3.js | 1 + .../commentsAfterFunctionExpression1.js | 1 + .../reference/commentsAfterSpread.js | 1 + .../commentsBeforeFunctionExpression1.js | 1 + .../commentsCommentParsing(target=es2015).js | 1 + .../commentsCommentParsing(target=es5).js | 1 + .../commentsInterface(target=es2015).js | 1 + .../commentsInterface(target=es5).js | 1 + .../reference/commentsOnObjectLiteral2.js | 1 + .../commentsOverloads(target=es2015).js | 1 + .../commentsOverloads(target=es5).js | 1 + ...ommentsdoNotEmitComments(target=es2015).js | 1 + .../commentsdoNotEmitComments(target=es5).js | 1 + .../commentsemitComments(target=es2015).js | 1 + .../commentsemitComments(target=es5).js | 1 + .../reference/commonJSAliasedExport.js | 2 + ...isonOperatorWithSubtypeObjectOnProperty.js | 1 + .../complicatedPrivacy(target=es2015).js | 1 + .../complicatedPrivacy(target=es5).js | 1 + .../compoundAssignmentLHSIsReference.js | 1 + .../reference/compoundAssignmentLHSIsValue.js | 1 + ...poundExponentiationAssignmentLHSIsValue.js | 1 + ...putedPropertyNames11_ES5(target=es2015).js | 1 + ...computedPropertyNames11_ES5(target=es5).js | 1 + .../reference/computedPropertyNames11_ES6.js | 1 + ...putedPropertyNames16_ES5(target=es2015).js | 1 + ...computedPropertyNames16_ES5(target=es5).js | 1 + .../reference/computedPropertyNames16_ES6.js | 1 + ...putedPropertyNames17_ES5(target=es2015).js | 1 + ...computedPropertyNames17_ES5(target=es5).js | 1 + .../reference/computedPropertyNames17_ES6.js | 1 + ...putedPropertyNames20_ES5(target=es2015).js | 1 + ...computedPropertyNames20_ES5(target=es5).js | 1 + .../reference/computedPropertyNames20_ES6.js | 1 + ...mputedPropertyNames2_ES5(target=es2015).js | 1 + .../computedPropertyNames2_ES5(target=es5).js | 1 + .../reference/computedPropertyNames2_ES6.js | 1 + ...putedPropertyNames36_ES5(target=es2015).js | 1 + ...computedPropertyNames36_ES5(target=es5).js | 1 + .../reference/computedPropertyNames36_ES6.js | 1 + ...putedPropertyNames37_ES5(target=es2015).js | 1 + ...computedPropertyNames37_ES5(target=es5).js | 1 + .../reference/computedPropertyNames37_ES6.js | 1 + ...putedPropertyNames38_ES5(target=es2015).js | 1 + ...computedPropertyNames38_ES5(target=es5).js | 1 + .../reference/computedPropertyNames38_ES6.js | 1 + ...putedPropertyNames39_ES5(target=es2015).js | 1 + ...computedPropertyNames39_ES5(target=es5).js | 1 + .../reference/computedPropertyNames39_ES6.js | 1 + ...mputedPropertyNames3_ES5(target=es2015).js | 1 + .../computedPropertyNames3_ES5(target=es5).js | 1 + .../reference/computedPropertyNames3_ES6.js | 1 + ...putedPropertyNames40_ES5(target=es2015).js | 1 + ...computedPropertyNames40_ES5(target=es5).js | 1 + .../reference/computedPropertyNames40_ES6.js | 1 + ...putedPropertyNames41_ES5(target=es2015).js | 1 + ...computedPropertyNames41_ES5(target=es5).js | 1 + .../reference/computedPropertyNames41_ES6.js | 1 + ...putedPropertyNames42_ES5(target=es2015).js | 1 + ...computedPropertyNames42_ES5(target=es5).js | 1 + .../reference/computedPropertyNames42_ES6.js | 1 + ...putedPropertyNames43_ES5(target=es2015).js | 1 + ...computedPropertyNames43_ES5(target=es5).js | 1 + .../reference/computedPropertyNames43_ES6.js | 1 + ...putedPropertyNames44_ES5(target=es2015).js | 1 + ...computedPropertyNames44_ES5(target=es5).js | 1 + .../reference/computedPropertyNames44_ES6.js | 1 + ...putedPropertyNames45_ES5(target=es2015).js | 1 + ...computedPropertyNames45_ES5(target=es5).js | 1 + .../reference/computedPropertyNames45_ES6.js | 1 + .../reference/computedPropertyNames49_ES5.js | 1 + .../reference/computedPropertyNames49_ES6.js | 1 + .../reference/computedPropertyNames50_ES5.js | 1 + .../reference/computedPropertyNames50_ES6.js | 1 + ...mputedPropertyNames5_ES5(target=es2015).js | 1 + .../computedPropertyNames5_ES5(target=es5).js | 1 + .../reference/computedPropertyNames5_ES6.js | 1 + ...mputedPropertyNames9_ES5(target=es2015).js | 1 + .../computedPropertyNames9_ES5(target=es5).js | 1 + .../reference/computedPropertyNames9_ES6.js | 1 + ...amesDeclarationEmit1_ES5(target=es2015).js | 1 + ...tyNamesDeclarationEmit1_ES5(target=es5).js | 1 + ...mputedPropertyNamesDeclarationEmit1_ES6.js | 1 + ...amesDeclarationEmit2_ES5(target=es2015).js | 1 + ...tyNamesDeclarationEmit2_ES5(target=es5).js | 1 + ...mputedPropertyNamesDeclarationEmit2_ES6.js | 1 + ...amesDeclarationEmit5_ES5(target=es2015).js | 1 + ...tyNamesDeclarationEmit5_ES5(target=es5).js | 1 + ...mputedPropertyNamesDeclarationEmit5_ES6.js | 1 + ...ertyNamesOnOverloads_ES5(target=es2015).js | 1 + ...ropertyNamesOnOverloads_ES5(target=es5).js | 1 + .../computedPropertyNamesOnOverloads_ES6.js | 1 + ...InES5ShouldBeTransformed(target=es2015).js | 1 + ...iesInES5ShouldBeTransformed(target=es5).js | 1 + .../reference/conditionalExpressions2.js | 1 + .../reference/constDeclarations-access.js | 2 + .../reference/constDeclarations-access2.js | 1 + .../reference/constDeclarations-access3.js | 1 + .../reference/constDeclarations-access4.js | 1 + .../constDeclarations-ambient-errors.js | 1 + .../reference/constDeclarations-ambient.js | 1 + .../reference/constDeclarations-errors.js | 1 + .../constDeclarations-es5(target=es2015).js | 1 + .../constDeclarations-es5(target=es5).js | 1 + ...ons-invalidContexts(alwaysstrict=false).js | 58 ++ ...ions-invalidContexts(alwaysstrict=true).js | 59 ++ ...Declarations-scopes(alwaysstrict=false).js | 275 +++++++++ ...tDeclarations-scopes(alwaysstrict=true).js | 276 +++++++++ .../reference/constDeclarations-scopes2.js | 1 + .../constDeclarations-useBeforeDefinition.js | 1 + .../constDeclarations-useBeforeDefinition2.js | 1 + ...tions-validContexts(alwaysstrict=false).js | 227 ++++++++ ...ations-validContexts(alwaysstrict=true).js | 228 ++++++++ .../baselines/reference/constDeclarations.js | 1 + .../baselines/reference/constDeclarations2.js | 1 + ...gTypeParameterFromSameTypeParameterList.js | 1 + ...eWithAccessibilityModifiersOnParameters.js | 1 + ...WithAccessibilityModifiersOnParameters2.js | 1 + ...structorImplementationWithDefaultValues.js | 1 + ...tructorImplementationWithDefaultValues2.js | 1 + .../reference/constructorOverloads7.js | 1 + .../reference/constructorOverloads8.js | 1 + ...structorOverloadsWithOptionalParameters.js | 1 + .../reference/constructorStaticParamName.js | 1 + .../constructorsWithSpecializedSignatures.js | 1 + ...tualSignatureInstatiationContravariance.js | 1 + ...ntextualSignatureInstatiationCovariance.js | 1 + tests/baselines/reference/contextualTyping.js | 1 + ...ualTypingArrayDestructuringWithDefaults.js | 1 + .../contextualTypingArrayOfLambdas.js | 1 + ...ntextualTypingFunctionReturningFunction.js | 1 + ...textualTypingFunctionReturningFunction2.js | 1 + .../reference/contextualTypingOfAccessors.js | 1 + .../contextualTypingOfArrayLiterals1.js | 1 + ...contextualTypingOfConditionalExpression.js | 1 + ...ontextualTypingOfConditionalExpression2.js | 1 + ...lTypingOfGenericFunctionTypedArguments1.js | 1 + ...ontextualTypingOfLambdaReturnExpression.js | 1 + ...ualTypingOfLambdaWithMultipleSignatures.js | 1 + ...alTypingOfLambdaWithMultipleSignatures2.js | 1 + .../contextualTypingOfObjectLiterals.js | 1 + .../contextualTypingOfObjectLiterals2.js | 1 + .../contextualTypingOfTooShortOverloads.js | 1 + ...alTypingTwoInstancesOfSameTypeParameter.js | 1 + ...ontextualTypingWithFixedTypeParameters1.js | 1 + ...FunctionExpressionsAndReturnAnnotations.js | 1 + .../reference/contextuallyTypedIife.js | 1 + .../reference/contextuallyTypingOrOperator.js | 1 + .../contextuallyTypingOrOperator2.js | 1 + .../contextuallyTypingOrOperator3.js | 1 + .../baselines/reference/controlFlowCaching.js | 1 + .../convertKeywordsYes(alwaysstrict=false).js | 532 +++++++++++++++++ .../convertKeywordsYes(alwaysstrict=true).js | 533 ++++++++++++++++++ .../reference/crashInEmitTokenWithComment.js | 1 + .../crashInresolveReturnStatement.js | 1 + tests/baselines/reference/createArray.js | 1 + ...lFileConstructSignatures(target=es2015).js | 1 + ...declFileConstructSignatures(target=es5).js | 1 + ...declFileForClassWithMultipleBaseClasses.js | 1 + ...leForClassWithPrivateOverloadedFunction.js | 1 + ...eclFileForInterfaceWithOptionalFunction.js | 1 + .../declFileForInterfaceWithRestParams.js | 1 + .../declFileFunctions(target=es2015).js | 1 + .../declFileFunctions(target=es5).js | 1 + .../declFileOptionalInterfaceMethod.js | 1 + .../declFilePrivateMethodOverloads.js | 1 + .../declFilePrivateStatic(target=es2015).js | 1 + .../declFilePrivateStatic(target=es5).js | 1 + .../reference/declFileRegressionTests.js | 1 + ...RestParametersOfFunctionAndFunctionType.js | 1 + ...ypeAnnotationBuiltInType(target=es2015).js | 1 + ...leTypeAnnotationBuiltInType(target=es5).js | 1 + ...eTypeAnnotationTypeAlias(target=es2015).js | 1 + ...FileTypeAnnotationTypeAlias(target=es5).js | 1 + ...VisibilityErrorTypeAlias(target=es2015).js | 1 + ...ionVisibilityErrorTypeAlias(target=es5).js | 1 + .../reference/declFileTypeofFunction.js | 1 + ...eclFileWithErrorsInInputDeclarationFile.js | 1 + ...WithErrorsInInputDeclarationFileWithOut.js | 1 + tests/baselines/reference/declInput-2.js | 1 + tests/baselines/reference/declInput.js | 1 + tests/baselines/reference/declInput3.js | 1 + tests/baselines/reference/declInput4.js | 1 + .../declarationEmitBindingPatterns.js | 1 + ...larationEmitBindingPatternsFunctionExpr.js | 1 + .../declarationEmitBindingPatternsUnused.js | 1 + ...ClassMemberNameConflict2(target=es2015).js | 1 + ...mitClassMemberNameConflict2(target=es5).js | 1 + .../declarationEmitDestructuring2.js | 1 + .../declarationEmitDestructuring3.js | 1 + .../declarationEmitDestructuring5.js | 1 + ...ingOptionalBindingParametersInOverloads.js | 1 + .../declarationEmitNameConflicts2.js | 1 + ...tionEmitProtectedMembers(target=es2015).js | 1 + ...arationEmitProtectedMembers(target=es5).js | 1 + .../reference/declarationInAmbientContext.js | 1 + .../reference/declarationMapsOutFile2.js | 1 + .../reference/declarationMapsWithSourceMap.js | 1 + .../reference/declarationMerging1.js | 2 + .../reference/declarationWithNoInitializer.js | 1 + .../reference/declarationsAndAssignments.js | 1 + .../baselines/reference/declareAlreadySeen.js | 1 + .../reference/declaredExternalModule.js | 1 + ...laredExternalModuleWithExportAssignment.js | 1 + .../decoratorMetadataNoStrictNull.js | 1 + ...ecoratorOnClassAccessor3(target=es2015).js | 1 + .../decoratorOnClassAccessor3(target=es5).js | 1 + ...ecoratorOnClassAccessor6(target=es2015).js | 1 + .../decoratorOnClassAccessor6(target=es5).js | 1 + ...assConstructorParameter4(target=es2015).js | 1 + ...nClassConstructorParameter4(target=es5).js | 1 + .../reference/decoratorOnClassMethod16.js | 1 + .../reference/decoratorOnClassMethod17.js | 1 + .../reference/decoratorOnClassMethod18.js | 1 + ...decoratorOnClassMethod19(target=es2015).js | 1 + ...decoratorOnClassMethod19(target=es2022).js | 1 + ...decoratorOnClassMethod19(target=esnext).js | 1 + .../decoratorOnClassMethod3(target=es2015).js | 1 + .../decoratorOnClassMethod3(target=es5).js | 1 + ...orOnClassMethodOverload1(target=es2015).js | 1 + ...ratorOnClassMethodOverload1(target=es5).js | 1 + ...orOnClassMethodOverload2(target=es2015).js | 1 + ...ratorOnClassMethodOverload2(target=es5).js | 1 + ...ecoratorOnClassProperty1(target=es2015).js | 1 + .../decoratorOnClassProperty1(target=es5).js | 1 + ...coratorOnClassProperty10(target=es2015).js | 1 + .../decoratorOnClassProperty10(target=es5).js | 1 + ...coratorOnClassProperty11(target=es2015).js | 1 + .../decoratorOnClassProperty11(target=es5).js | 1 + ...coratorOnClassProperty12(target=es2015).js | 1 + .../decoratorOnClassProperty12(target=es5).js | 1 + .../reference/decoratorOnClassProperty13.js | 1 + ...ecoratorOnClassProperty2(target=es2015).js | 1 + .../decoratorOnClassProperty2(target=es5).js | 1 + ...ecoratorOnClassProperty3(target=es2015).js | 1 + .../decoratorOnClassProperty3(target=es5).js | 1 + ...ecoratorOnClassProperty6(target=es2015).js | 1 + .../decoratorOnClassProperty6(target=es5).js | 1 + ...ecoratorOnClassProperty7(target=es2015).js | 1 + .../decoratorOnClassProperty7(target=es5).js | 1 + tests/baselines/reference/decoratorOnUsing.js | 1 + .../reference/decoratorReferences.js | 1 + .../decrementAndIncrementOperators.js | 1 + .../decrementOperatorWithAnyOtherType.js | 1 + ...eratorWithAnyOtherTypeInvalidOperations.js | 1 + ...ntOperatorWithEnumTypeInvalidOperations.js | 1 + .../defaultArgsInFunctionExpressions.js | 1 + .../reference/defaultArgsInOverloads.js | 1 + .../defaultBestCommonTypesHaveDecls.js | 1 + .../baselines/reference/defaultIndexProps2.js | 1 + .../defaultValueInFunctionOverload1.js | 1 + .../reference/defineProperty(target=es5).js | 1 + .../defineProperty(target=esnext).js | 1 + ...defineVariables_useDefineForClassFields.js | 1 + ...efiniteAssignmentWithErrorStillStripped.js | 1 + ...eExpressionMustBeOptional(strict=false).js | 1 + ...torWithAnyOtherType(alwaysstrict=false).js | 117 ++++ ...atorWithAnyOtherType(alwaysstrict=true).js | 118 ++++ tests/baselines/reference/deleteReadonly.js | 1 + .../derivedClassIncludesInheritedMembers.js | 1 + .../derivedClassSuperCallsWithThisArg.js | 1 + ...ivedClassSuperProperties(target=es2015).js | 1 + ...derivedClassSuperProperties(target=es5).js | 1 + ...edTypeCallingBaseImplWithOptionalParams.js | 1 + ...false,useunknownincatchvariables=false).js | 1 + ...=false,useunknownincatchvariables=true).js | 1 + ...turingArrayBindingPatternAndAssignment3.js | 1 + .../destructuringControlFlowNoCrash.js | 3 +- .../reference/destructuringInFunctionType.js | 1 + ...ngObjectBindingPatternAndAssignment1ES5.js | 1 + ...ngObjectBindingPatternAndAssignment1ES6.js | 1 + .../destructuringWithLiteralInitializers.js | 1 + .../detachedCommentAtStartOfConstructor1.js | 1 + .../disallowLineTerminatorBeforeArrow.js | 1 + .../doNotEmitPinnedCommentOnNotEmittedNode.js | 1 + ...oNotEmitPinnedCommentOnNotEmittedNodets.js | 1 + ...NeedToChangeYourTargetLibraryES2016Plus.js | 1 + .../dontShowCompilerGeneratedMembers.js | 1 + tests/baselines/reference/dottedModuleName.js | 1 + .../baselines/reference/dottedModuleName2.js | 1 + .../reference/duplicateClassElements.js | 1 + .../duplicateIdentifierDifferentModifiers.js | 1 + ...ateIdentifiersAcrossContainerBoundaries.js | 1 + ...uplicateIdentifiersAcrossFileBoundaries.js | 2 + .../reference/duplicatePropertyNames.js | 1 + .../reference/elementAccessChain.2.js | 1 + ...EmbeddedStatementsReplacedWithSemicolon.js | 1 + ...essionInArrowFunctionES5(target=es2015).js | 1 + ...xpressionInArrowFunctionES5(target=es5).js | 1 + ...jectLiteralExpressionInArrowFunctionES6.js | 1 + .../emitArrowFunction(target=es2015).js | 1 + .../emitArrowFunction(target=es5).js | 1 + .../emitArrowFunctionAsIs(target=es2015).js | 1 + .../emitArrowFunctionAsIs(target=es5).js | 1 + .../reference/emitArrowFunctionAsIsES6.js | 1 + .../reference/emitArrowFunctionES6.js | 1 + ...rowFunctionThisCapturing(target=es2015).js | 1 + ...tArrowFunctionThisCapturing(target=es5).js | 1 + .../emitArrowFunctionThisCapturingES6.js | 1 + ...tionWhenUsingArguments01(target=es2015).js | 1 + ...unctionWhenUsingArguments01(target=es5).js | 1 + ...itArrowFunctionWhenUsingArguments01_ES6.js | 1 + ...tionWhenUsingArguments02(target=es2015).js | 1 + ...unctionWhenUsingArguments02(target=es5).js | 1 + ...itArrowFunctionWhenUsingArguments02_ES6.js | 1 + ...nts03(alwaysstrict=false,target=es2015).js | 9 + ...uments03(alwaysstrict=false,target=es5).js | 9 + ...ents03(alwaysstrict=true,target=es2015).js | 10 + ...guments03(alwaysstrict=true,target=es5).js | 10 + ...singArguments03_ES6(alwaysstrict=false).js | 9 + ...UsingArguments03_ES6(alwaysstrict=true).js | 10 + ...nts04(alwaysstrict=false,target=es2015).js | 13 + ...uments04(alwaysstrict=false,target=es5).js | 13 + ...ents04(alwaysstrict=true,target=es2015).js | 14 + ...guments04(alwaysstrict=true,target=es5).js | 14 + ...singArguments04_ES6(alwaysstrict=false).js | 13 + ...UsingArguments04_ES6(alwaysstrict=true).js | 14 + ...nts05(alwaysstrict=false,target=es2015).js | 11 + ...uments05(alwaysstrict=false,target=es5).js | 11 + ...ents05(alwaysstrict=true,target=es2015).js | 12 + ...guments05(alwaysstrict=true,target=es5).js | 12 + ...singArguments05_ES6(alwaysstrict=false).js | 11 + ...UsingArguments05_ES6(alwaysstrict=true).js | 12 + ...nts06(alwaysstrict=false,target=es2015).js | 11 + ...uments06(alwaysstrict=false,target=es5).js | 11 + ...ents06(alwaysstrict=true,target=es2015).js | 12 + ...guments06(alwaysstrict=true,target=es5).js | 12 + ...singArguments06_ES6(alwaysstrict=false).js | 11 + ...UsingArguments06_ES6(alwaysstrict=true).js | 12 + ...nts07(alwaysstrict=false,target=es2015).js | 11 + ...uments07(alwaysstrict=false,target=es5).js | 11 + ...ents07(alwaysstrict=true,target=es2015).js | 12 + ...guments07(alwaysstrict=true,target=es5).js | 12 + ...singArguments07_ES6(alwaysstrict=false).js | 11 + ...UsingArguments07_ES6(alwaysstrict=true).js | 12 + ...nts08(alwaysstrict=false,target=es2015).js | 11 + ...uments08(alwaysstrict=false,target=es5).js | 11 + ...ents08(alwaysstrict=true,target=es2015).js | 12 + ...guments08(alwaysstrict=true,target=es5).js | 12 + ...singArguments08_ES6(alwaysstrict=false).js | 11 + ...UsingArguments08_ES6(alwaysstrict=true).js | 12 + ...tionWhenUsingArguments09(target=es2015).js | 1 + ...unctionWhenUsingArguments09(target=es5).js | 1 + ...itArrowFunctionWhenUsingArguments09_ES6.js | 1 + ...tionWhenUsingArguments10(target=es2015).js | 1 + ...unctionWhenUsingArguments10(target=es5).js | 1 + ...itArrowFunctionWhenUsingArguments10_ES6.js | 1 + ...nts11(alwaysstrict=false,target=es2015).js | 13 + ...uments11(alwaysstrict=false,target=es5).js | 13 + ...ents11(alwaysstrict=true,target=es2015).js | 14 + ...guments11(alwaysstrict=true,target=es5).js | 14 + ...singArguments11_ES6(alwaysstrict=false).js | 13 + ...UsingArguments11_ES6(alwaysstrict=true).js | 14 + ...tionWhenUsingArguments12(target=es2015).js | 1 + ...unctionWhenUsingArguments12(target=es5).js | 1 + ...itArrowFunctionWhenUsingArguments12_ES6.js | 1 + ...nts13(alwaysstrict=false,target=es2015).js | 13 + ...uments13(alwaysstrict=false,target=es5).js | 13 + ...ents13(alwaysstrict=true,target=es2015).js | 14 + ...guments13(alwaysstrict=true,target=es5).js | 14 + ...singArguments13_ES6(alwaysstrict=false).js | 13 + ...UsingArguments13_ES6(alwaysstrict=true).js | 14 + ...nts14(alwaysstrict=false,target=es2015).js | 17 + ...uments14(alwaysstrict=false,target=es5).js | 17 + ...ents14(alwaysstrict=true,target=es2015).js | 18 + ...guments14(alwaysstrict=true,target=es5).js | 18 + ...singArguments14_ES6(alwaysstrict=false).js | 17 + ...UsingArguments14_ES6(alwaysstrict=true).js | 18 + ...nts15(alwaysstrict=false,target=es2015).js | 19 + ...uments15(alwaysstrict=false,target=es5).js | 19 + ...ents15(alwaysstrict=true,target=es2015).js | 20 + ...guments15(alwaysstrict=true,target=es5).js | 20 + ...singArguments15_ES6(alwaysstrict=false).js | 19 + ...UsingArguments15_ES6(alwaysstrict=true).js | 20 + ...nts16(alwaysstrict=false,target=es2015).js | 19 + ...uments16(alwaysstrict=false,target=es5).js | 19 + ...ents16(alwaysstrict=true,target=es2015).js | 20 + ...guments16(alwaysstrict=true,target=es5).js | 20 + ...singArguments16_ES6(alwaysstrict=false).js | 19 + ...UsingArguments16_ES6(alwaysstrict=true).js | 20 + ...nts17(alwaysstrict=false,target=es2015).js | 19 + ...uments17(alwaysstrict=false,target=es5).js | 19 + ...ents17(alwaysstrict=true,target=es2015).js | 20 + ...guments17(alwaysstrict=true,target=es5).js | 20 + ...singArguments17_ES6(alwaysstrict=false).js | 19 + ...UsingArguments17_ES6(alwaysstrict=true).js | 20 + ...tionWhenUsingArguments18(target=es2015).js | 1 + ...unctionWhenUsingArguments18(target=es5).js | 1 + ...itArrowFunctionWhenUsingArguments18_ES6.js | 1 + ...tionWhenUsingArguments19(target=es2015).js | 1 + ...unctionWhenUsingArguments19(target=es5).js | 1 + ...itArrowFunctionWhenUsingArguments19_ES6.js | 1 + .../emitArrowFunctionsAsIs(target=es2015).js | 1 + .../emitArrowFunctionsAsIs(target=es5).js | 1 + .../reference/emitArrowFunctionsAsIsES6.js | 1 + ...mitClassDeclarationWithConstructorInES6.js | 1 + ...arationWithTypeArgumentAndOverloadInES6.js | 1 + ...coratorMetadata_restArgs(target=es2015).js | 1 + ...tDecoratorMetadata_restArgs(target=es5).js | 1 + ...efaultParametersFunction(target=es2015).js | 1 + ...itDefaultParametersFunction(target=es5).js | 1 + .../emitDefaultParametersFunctionES6.js | 1 + ...metersFunctionExpression(target=es2015).js | 1 + ...arametersFunctionExpression(target=es5).js | 1 + ...tDefaultParametersFunctionExpressionES6.js | 1 + ...rametersFunctionProperty(target=es2015).js | 1 + ...tParametersFunctionProperty(target=es5).js | 1 + ...mitDefaultParametersFunctionPropertyES6.js | 1 + ...tDefaultParametersMethod(target=es2015).js | 1 + ...emitDefaultParametersMethod(target=es5).js | 1 + .../emitDefaultParametersMethodES6.js | 1 + ...itRestParametersFunction(target=es2015).js | 1 + .../emitRestParametersFunction(target=es5).js | 1 + .../emitRestParametersFunctionES6.js | 1 + ...metersFunctionExpression(target=es2015).js | 1 + ...arametersFunctionExpression(target=es5).js | 1 + ...emitRestParametersFunctionExpressionES6.js | 1 + ...rametersFunctionProperty(target=es2015).js | 1 + ...tParametersFunctionProperty(target=es5).js | 1 + .../emitRestParametersFunctionPropertyES6.js | 1 + ...emitRestParametersMethod(target=es2015).js | 1 + .../emitRestParametersMethod(target=es5).js | 1 + .../reference/emitRestParametersMethodES6.js | 1 + ...hisInObjectLiteralGetter(target=es2015).js | 1 + ...itThisInObjectLiteralGetter(target=es5).js | 1 + ...ter.asyncGenerators.classMethods.es2015.js | 9 + ...ter.asyncGenerators.classMethods.es2018.js | 9 + ...erators.classMethods.es5(target=es2015).js | 9 + ...Generators.classMethods.es5(target=es5).js | 9 + ...cGenerators.functionDeclarations.es2015.js | 7 + ...cGenerators.functionDeclarations.es2018.js | 7 + ...functionDeclarations.es5(target=es2015).js | 7 + ...rs.functionDeclarations.es5(target=es5).js | 7 + ...ncGenerators.functionExpressions.es2015.js | 7 + ...ncGenerators.functionExpressions.es2018.js | 7 + ....functionExpressions.es5(target=es2015).js | 7 + ...ors.functionExpressions.es5(target=es5).js | 7 + ...cGenerators.objectLiteralMethods.es2015.js | 7 + ...cGenerators.objectLiteralMethods.es2018.js | 7 + ...objectLiteralMethods.es5(target=es2015).js | 7 + ...rs.objectLiteralMethods.es5(target=es5).js | 7 + .../reference/emptyArgumentsListComment.js | 1 + .../emptyArrayBindingPatternParameter02.js | 1 + .../emptyArrayBindingPatternParameter03.js | 1 + .../emptyObjectBindingPatternParameter02.js | 1 + .../emptyObjectBindingPatternParameter03.js | 1 + .../enumAssignabilityInInheritance.js | 1 + tests/baselines/reference/enumBasics.js | 1 + tests/baselines/reference/enumBasics1.js | 1 + tests/baselines/reference/enumBasics2.js | 1 + tests/baselines/reference/enumBasics3.js | 1 + tests/baselines/reference/enumIndexer.js | 1 + .../enumIsNotASubtypeOfAnythingButNumber.js | 1 + ...llishCoalescingAssignment(strict=false).js | 1 + tests/baselines/reference/errorElaboration.js | 1 + ...tionDivesIntoApparentlyPresentPropsOnly.js | 1 + .../errorMessagesIntersectionTypes03.js | 1 + .../errorMessagesIntersectionTypes04.js | 1 + tests/baselines/reference/errorSuperCalls.js | 1 + ...errorSuperPropertyAccess(target=es2015).js | 1 + .../errorSuperPropertyAccess(target=es5).js | 1 + .../reference/errorsInGenericTypeReference.js | 1 + .../es5-asyncFunction(target=es2015).js | 1 + .../es5-asyncFunction(target=es5).js | 1 + ...yncFunctionArrayLiterals(target=es2015).js | 1 + ...-asyncFunctionArrayLiterals(target=es5).js | 1 + ...unctionBinaryExpressions(target=es2015).js | 1 + ...ncFunctionBinaryExpressions(target=es5).js | 1 + ...cFunctionCallExpressions(target=es2015).js | 1 + ...syncFunctionCallExpressions(target=es5).js | 1 + ...syncFunctionConditionals(target=es2015).js | 1 + ...5-asyncFunctionConditionals(target=es5).js | 1 + ...syncFunctionDoStatements(target=es2015).js | 1 + ...5-asyncFunctionDoStatements(target=es5).js | 1 + ...yncFunctionElementAccess(target=es2015).js | 1 + ...-asyncFunctionElementAccess(target=es5).js | 1 + ...cFunctionForInStatements(target=es2015).js | 1 + ...syncFunctionForInStatements(target=es5).js | 1 + ...cFunctionForOfStatements(target=es2015).js | 1 + ...syncFunctionForOfStatements(target=es5).js | 1 + ...yncFunctionForStatements(target=es2015).js | 1 + ...-asyncFunctionForStatements(target=es5).js | 1 + ...s5-asyncFunctionHoisting(target=es2015).js | 1 + .../es5-asyncFunctionHoisting(target=es5).js | 1 + ...syncFunctionIfStatements(target=es2015).js | 1 + ...5-asyncFunctionIfStatements(target=es5).js | 1 + ...unctionLongObjectLiteral(target=es2015).js | 5 +- ...ncFunctionLongObjectLiteral(target=es5).js | 6 +- ...asyncFunctionNestedLoops(target=es2015).js | 1 + ...s5-asyncFunctionNestedLoops(target=es5).js | 1 + ...ncFunctionNewExpressions(target=es2015).js | 1 + ...asyncFunctionNewExpressions(target=es5).js | 1 + ...ncFunctionObjectLiterals(target=es2015).js | 1 + ...asyncFunctionObjectLiterals(target=es5).js | 1 + ...ncFunctionPropertyAccess(target=es2015).js | 1 + ...asyncFunctionPropertyAccess(target=es5).js | 1 + ...FunctionReturnStatements(target=es2015).js | 1 + ...yncFunctionReturnStatements(target=es5).js | 1 + ...FunctionSwitchStatements(target=es2015).js | 1 + ...yncFunctionSwitchStatements(target=es5).js | 1 + ...yncFunctionTryStatements(target=es2015).js | 1 + ...-asyncFunctionTryStatements(target=es5).js | 1 + ...cFunctionWhileStatements(target=es2015).js | 1 + ...syncFunctionWhileStatements(target=es5).js | 1 + ...ments(alwaysstrict=false,target=es2015).js | 70 +++ ...atements(alwaysstrict=false,target=es5).js | 120 ++++ ...ements(alwaysstrict=true,target=es2015).js | 71 +++ ...tatements(alwaysstrict=true,target=es5).js | 121 ++++ ...ldFunctionObjectLiterals(target=es2015).js | 1 + ...yieldFunctionObjectLiterals(target=es5).js | 1 + tests/baselines/reference/es6ClassTest.js | 1 + tests/baselines/reference/es6ClassTest2.js | 1 + tests/baselines/reference/es6ClassTest3.js | 1 + tests/baselines/reference/es6ClassTest4.js | 1 + tests/baselines/reference/es6ClassTest5.js | 1 + tests/baselines/reference/es6ClassTest7.js | 1 + tests/baselines/reference/es6ClassTest8.js | 1 + tests/baselines/reference/es6ClassTest9.js | 1 + ...ators-classDeclaration-exportModifier.2.js | 4 + .../esDecorators-privateFieldAccess.js | 1 + .../esDecoratorsMetadata1(target=es2015).js | 1 + .../esDecoratorsMetadata1(target=es2022).js | 1 + .../esDecoratorsMetadata2(target=es2015).js | 1 + .../esDecoratorsMetadata2(target=es2022).js | 1 + .../esDecoratorsMetadata3(target=es2015).js | 1 + .../esDecoratorsMetadata3(target=es2022).js | 1 + .../esDecoratorsMetadata4(target=es2015).js | 1 + .../esDecoratorsMetadata4(target=es2022).js | 1 + tests/baselines/reference/evalAfter0.js | 1 + .../reference/everyTypeWithInitializer.js | 1 + .../excessPropertyCheckWithSpread.js | 1 + .../expandoFunctionNestedAssigments.js | 1 + ...expandoFunctionNestedAssigmentsDeclared.js | 1 + .../baselines/reference/exportAlreadySeen.js | 1 + ...rtSpecifierAndExportedMemberDeclaration.js | 1 + ...xportSpecifierAndLocalMemberDeclaration.js | 1 + ...xportStarFromEmptyModule(target=es2015).js | 1 + .../exportStarFromEmptyModule(target=es5).js | 1 + .../expressionTypeNodeShouldError.js | 3 + tests/baselines/reference/extendArray.js | 1 + .../baselines/reference/extendGlobalThis2.js | 1 + .../reference/extendNonClassSymbol2.js | 1 + tests/baselines/reference/extension.js | 1 + tests/baselines/reference/externSemantics.js | 1 + tests/baselines/reference/externSyntax.js | 1 + ...ernceResolutionOrderInImportDeclaration.js | 1 + .../baselines/reference/fallFromLastCase1.js | 1 + .../baselines/reference/fallFromLastCase2.js | 1 + .../baselines/reference/fatarrowfunctions.js | 1 + .../reference/fatarrowfunctionsErrors.js | 1 + ...rowfunctionsInFunctionParameterDefaults.js | 1 + .../reference/fatarrowfunctionsInFunctions.js | 1 + .../fatarrowfunctionsOptionalArgsErrors1.js | 1 + .../fatarrowfunctionsOptionalArgsErrors2.js | 1 + .../fatarrowfunctionsOptionalArgsErrors3.js | 1 + .../fatarrowfunctionsOptionalArgsErrors4.js | 1 + .../reference/findLast(target=es2022).js | 1 + .../reference/findLast(target=esnext).js | 1 + .../reference/fixSignatureCaching.js | 1 + .../fixingTypeParametersRepeatedly1.js | 1 + .../fixingTypeParametersRepeatedly2.js | 1 + .../fixingTypeParametersRepeatedly3.js | 1 + tests/baselines/reference/for-inStatements.js | 1 + .../reference/for-inStatementsArray.js | 1 + .../for-inStatementsAsyncIdentifier.js | 1 + .../for-inStatementsDestructuring3.js | 1 + .../for-inStatementsDestructuring4.js | 1 + .../reference/for-inStatementsInvalid.js | 1 + .../reference/for-of56(alwaysstrict=false).js | 7 + .../reference/for-of56(alwaysstrict=true).js | 8 + tests/baselines/reference/forIn.js | 1 + tests/baselines/reference/forIn2.js | 1 + .../reference/forInBreakStatements.js | 1 + .../reference/forInContinueStatements.js | 1 + tests/baselines/reference/forInModule.js | 1 + tests/baselines/reference/forInStatement1.js | 1 + tests/baselines/reference/forInStatement2.js | 1 + tests/baselines/reference/forInStatement3.js | 1 + tests/baselines/reference/forInStatement4.js | 1 + tests/baselines/reference/forInStatement5.js | 1 + tests/baselines/reference/forInStatement6.js | 1 + tests/baselines/reference/forInStatement7.js | 1 + .../reference/forStatementInnerComments.js | 1 + ...rwardRefInTypeDeclaration(strict=false).js | 1 + tests/baselines/reference/funClodule.js | 1 + tests/baselines/reference/funcdecl.js | 1 + ...ignabilityWithArrayLike01(strict=false).js | 1 + .../baselines/reference/functionAssignment.js | 1 + .../reference/functionAssignmentError.js | 1 + tests/baselines/reference/functionCall18.js | 1 + tests/baselines/reference/functionCall5.js | 1 + tests/baselines/reference/functionCall7.js | 1 + .../functionConstraintSatisfaction.js | 1 + .../functionConstraintSatisfaction2.js | 1 + .../functionConstraintSatisfaction3.js | 1 + ...tionWithArgumentOfTypeFunctionTypeArray.js | 1 + ...ctionExpressionAndLambdaMatchesFunction.js | 1 + .../functionExpressionContextualTyping1.js | 1 + ...tionImplementationErrors(target=es2015).js | 1 + ...unctionImplementationErrors(target=es5).js | 1 + .../reference/functionImplementations.js | 1 + .../functionInIfStatementInModule.js | 1 + .../reference/functionLiteralForOverloads.js | 1 + .../reference/functionLiteralForOverloads2.js | 1 + .../reference/functionNameConflicts.js | 1 + .../reference/functionOverloadAmbiguity1.js | 1 + .../reference/functionOverloadErrors.js | 1 + .../reference/functionOverloadErrorsSyntax.js | 1 + ...nctionOverloadImplementationOfWrongName.js | 1 + ...ctionOverloadImplementationOfWrongName2.js | 1 + .../baselines/reference/functionOverloads1.js | 1 + .../reference/functionOverloads10.js | 1 + .../reference/functionOverloads11.js | 1 + .../reference/functionOverloads12.js | 1 + .../reference/functionOverloads13.js | 1 + .../reference/functionOverloads14.js | 1 + .../reference/functionOverloads15.js | 1 + .../reference/functionOverloads16.js | 1 + .../reference/functionOverloads17.js | 1 + .../reference/functionOverloads18.js | 1 + .../reference/functionOverloads19.js | 1 + .../reference/functionOverloads21.js | 1 + .../reference/functionOverloads23.js | 1 + .../reference/functionOverloads24.js | 1 + .../reference/functionOverloads44.js | 1 + .../reference/functionOverloads45.js | 1 + .../baselines/reference/functionOverloads5.js | 1 + .../baselines/reference/functionOverloads6.js | 1 + .../baselines/reference/functionOverloads7.js | 1 + .../baselines/reference/functionOverloads8.js | 1 + .../baselines/reference/functionOverloads9.js | 1 + .../functionParameterArityMismatch.js | 1 + ...ctionParameterObjectRestAndInitializers.js | 1 + .../reference/functionSubtypingOfVarArgs.js | 1 + .../reference/functionSubtypingOfVarArgs2.js | 1 + .../functionTypeArgumentArityErrors.js | 1 + .../functionTypesLackingReturnTypes.js | 1 + ...onWithDefaultParameterWithNoStatements8.js | 1 + .../reference/generatedContextualTyping.js | 1 + tests/baselines/reference/generatorES6_1.js | 1 + tests/baselines/reference/generatorES6_6.js | 1 + .../reference/generatorTypeCheck31.js | 1 + .../reference/generatorTypeCheck36.js | 1 + .../reference/generatorTypeCheck37.js | 1 + ...eneratorTypeCheck38(alwaysstrict=false).js | 15 + ...generatorTypeCheck38(alwaysstrict=true).js | 16 + .../reference/generatorTypeCheck39.js | 1 + .../reference/generatorTypeCheck40.js | 1 + .../reference/generatorTypeCheck41.js | 1 + .../reference/generatorTypeCheck43.js | 1 + .../reference/generatorTypeCheck45.js | 1 + .../reference/generatorTypeCheck46.js | 1 + .../reference/generatorTypeCheck55.js | 1 + .../reference/generatorTypeCheck56.js | 1 + .../reference/generatorTypeCheck57.js | 1 + .../reference/generatorTypeCheck58.js | 1 + .../reference/generatorTypeCheck60.js | 1 + .../genericCallTypeArgumentInference.js | 1 + ...allWithConstraintsTypeArgumentInference.js | 1 + ...llWithConstraintsTypeArgumentInference2.js | 1 + .../genericCallWithFixedArguments.js | 1 + ...enericCallWithGenericSignatureArguments.js | 1 + ...nericCallWithGenericSignatureArguments2.js | 1 + ...nericCallWithGenericSignatureArguments3.js | 1 + ...allWithOverloadedFunctionTypedArguments.js | 1 + ...llWithOverloadedFunctionTypedArguments2.js | 1 + ...cClassPropertyInheritanceSpecialization.js | 1 + ...nericClassWithStaticsUsingTypeArguments.js | 1 + .../baselines/reference/genericConstraint2.js | 1 + .../genericConstructSignatureInInterface.js | 1 + .../genericFunctionSpecializations1.js | 1 + .../baselines/reference/genericImplements.js | 1 + ...cInstantiationEquivalentToObjectLiteral.js | 1 + .../genericLambaArgWithoutTypeArguments.js | 1 + .../reference/genericOverloadSignatures.js | 1 + .../reference/genericPrototypeProperty2.js | 1 + .../reference/genericTypeAssertions3.js | 1 + .../reference/genericTypeAssertions6.js | 1 + .../genericTypeParameterEquivalence2.js | 1 + ...enericTypeReferenceWithoutTypeArgument3.js | 1 + .../genericsWithDuplicateTypeParameters1.js | 1 + .../reference/getAndSetAsMemberNames.js | 1 + .../reference/getterSetterNonAccessor.js | 1 + .../baselines/reference/globalThisCapture.js | 1 + .../baselines/reference/globalThisUnknown.js | 1 + .../baselines/reference/grammarAmbiguities.js | 1 + .../reference/grammarAmbiguities1.js | 1 + .../heterogeneousArrayAndOverloads.js | 1 + .../reference/heterogeneousArrayLiterals.js | 1 + tests/baselines/reference/icomparable.js | 1 + .../reference/identicalCallSignatures.js | 1 + .../reference/identicalCallSignatures2.js | 1 + .../reference/identicalCallSignatures3.js | 1 + .../implementInterfaceAnyMemberWithVoid.js | 1 + .../inKeywordTypeguard(strict=false).js | 1 + tests/baselines/reference/inOperator.js | 1 + .../reference/inOperatorWithFunction.js | 1 + .../reference/inOperatorWithGeneric.js | 1 + .../inOperatorWithInvalidOperands.js | 1 + .../reference/inOperatorWithValidOperands.js | 1 + .../baselines/reference/incompatibleTypes.js | 1 + .../reference/incorrectClassOverloadChain.js | 1 + .../incrementOperatorWithAnyOtherType.js | 1 + ...eratorWithAnyOtherTypeInvalidOperations.js | 1 + .../baselines/reference/indexClassByNumber.js | 1 + tests/baselines/reference/indexTypeCheck.js | 1 + .../indexerSignatureWithRestParam.js | 1 + .../indirectTypeParameterReferences.js | 1 + ...inferObjectTypeFromStringLiteralToKeyof.js | 1 + .../reference/inferSecondaryParameter.js | 1 + ...eArgumentsInSignatureWithRestParameters.js | 1 + .../inferentialTypingObjectLiteralMethod1.js | 1 + .../inferentialTypingObjectLiteralMethod2.js | 1 + .../inferringClassMembersFromAssignments8.js | 1 + tests/baselines/reference/inheritance.js | 1 + tests/baselines/reference/inheritance1.js | 1 + ...itanceGrandParentPrivateMemberCollision.js | 1 + ...tPrivateMemberCollisionWithPublicMember.js | 1 + ...tPublicMemberCollisionWithPrivateMember.js | 1 + ...ritanceMemberAccessorOverridingAccessor.js | 1 + ...AccessorOverridingMethod(target=es2015).js | 1 + ...berAccessorOverridingMethod(target=es5).js | 1 + ...ritanceMemberAccessorOverridingProperty.js | 1 + ...inheritanceMemberFuncOverridingAccessor.js | 1 + .../inheritanceMemberFuncOverridingMethod.js | 1 + ...inheritanceMemberFuncOverridingProperty.js | 1 + ...ritanceMemberPropertyOverridingAccessor.js | 1 + ...heritanceMemberPropertyOverridingMethod.js | 1 + ...ritanceMemberPropertyOverridingProperty.js | 1 + .../inheritanceOfGenericConstructorMethod1.js | 1 + .../inheritanceOfGenericConstructorMethod2.js | 1 + ...ritanceStaticAccessorOverridingAccessor.js | 1 + ...heritanceStaticAccessorOverridingMethod.js | 1 + ...ritanceStaticAccessorOverridingProperty.js | 1 + ...inheritanceStaticFuncOverridingAccessor.js | 1 + ...eStaticFuncOverridingAccessorOfFuncType.js | 1 + .../inheritanceStaticFuncOverridingMethod.js | 1 + ...inheritanceStaticFuncOverridingProperty.js | 1 + ...eStaticFuncOverridingPropertyOfFuncType.js | 1 + ...taticFunctionOverridingInstanceProperty.js | 1 + .../inheritanceStaticMembersCompatible.js | 1 + .../inheritanceStaticMembersIncompatible.js | 1 + ...ritanceStaticPropertyOverridingAccessor.js | 1 + ...heritanceStaticPropertyOverridingMethod.js | 1 + ...ritanceStaticPropertyOverridingProperty.js | 1 + ...nheritedFunctionAssignmentCompatibility.js | 1 + ...ersAndIndexSignaturesFromDifferentBases.js | 1 + ...rsAndIndexSignaturesFromDifferentBases2.js | 1 + ...edStringIndexersFromDifferentBaseTypes2.js | 1 + ...initializerReferencingConstructorLocals.js | 1 + ...ializerReferencingConstructorParameters.js | 1 + tests/baselines/reference/innerExtern.js | 1 + tests/baselines/reference/innerOverloads.js | 1 + .../innerTypeCheckOfLambdaArgument.js | 1 + .../reference/instanceOfAssignability.js | 1 + ...tantiateNonGenericTypeWithTypeArguments.js | 1 + tests/baselines/reference/intTypeCheck.js | 1 + .../reference/interfaceImplementation1.js | 1 + tests/baselines/reference/interfaceOnly.js | 1 + .../reference/interfaceWithCommaSeparators.js | 1 + tests/baselines/reference/interfacedecl.js | 1 + .../interfacedeclWithIndexerErrors.js | 1 + .../internalAliasUninitializedModule.js | 1 + .../internalAliasWithDottedNameEmit.js | 1 + .../reference/intersectionReduction.js | 1 + tests/baselines/reference/intrinsics.js | 1 + .../baselines/reference/invalidConstraint1.js | 1 + .../invalidNewTarget.es5(target=es2015).js | 1 + .../invalidNewTarget.es5(target=es5).js | 1 + .../reference/invalidNewTarget.es6.js | 1 + .../baselines/reference/isolatedModulesOut.js | 1 + .../reference/iterableArrayPattern10.js | 1 + .../reference/iterableArrayPattern11.js | 1 + .../reference/iterableArrayPattern12.js | 1 + .../reference/iterableArrayPattern13.js | 1 + .../reference/iterableArrayPattern14.js | 1 + .../reference/iterableArrayPattern15.js | 1 + .../reference/iterableArrayPattern16.js | 1 + .../reference/iterableArrayPattern17.js | 1 + .../reference/iterableArrayPattern18.js | 1 + .../reference/iterableArrayPattern19.js | 1 + .../reference/iterableArrayPattern20.js | 1 + .../reference/iterableArrayPattern25.js | 1 + .../reference/iterableArrayPattern3.js | 1 + .../reference/iterableArrayPattern30.js | 1 + .../reference/iterableArrayPattern4.js | 1 + .../reference/iterableArrayPattern5.js | 1 + .../reference/iterableArrayPattern6.js | 1 + .../reference/iterableArrayPattern7.js | 1 + .../reference/iterableArrayPattern8.js | 1 + .../reference/iterableArrayPattern9.js | 1 + .../javascriptThisAssignmentInStaticBlock.js | 1 + ...tionsDocCommentsOnConsts(target=es2015).js | 1 + ...arationsDocCommentsOnConsts(target=es5).js | 1 + .../jsDeclarationsExportedClassAliases.js | 2 + ...larationsMissingGenerics(target=es2015).js | 1 + ...DeclarationsMissingGenerics(target=es5).js | 1 + ...onsMissingTypeParameters(target=es2015).js | 1 + ...ationsMissingTypeParameters(target=es5).js | 1 + .../reference/jsObjectsMarkedAsOpenEnded.js | 1 + .../jsdocAccessibilityTagsDeclarations.js | 1 + .../baselines/reference/jsdocInTypeScript.js | 1 + .../jsdocParameterParsingInvalidName.js | 1 + .../reference/jsdocReadonlyDeclarations.js | 1 + .../reference/jsdocTemplateTagDefault.js | 1 + .../jsdocTemplateTagNameResolution.js | 1 + .../jsxAttributeInitializer(jsx=preserve).js | 1 + .../jsxAttributeInitializer(jsx=react).js | 1 + .../jsxParsingError4(strict=false).js | 1 + .../reference/jsxPreserveWithJsInput.js | 5 + .../reference/jsxSpreadTag(target=es2015).js | 1 + .../reference/jsxSpreadTag(target=esnext).js | 1 + .../reference/jsxUnclosedParserRecovery.js | 1 + tests/baselines/reference/lambdaParamTypes.js | 1 + tests/baselines/reference/lambdaPropSelf.js | 1 + ...stMatchingParameterNames(target=es2015).js | 1 + ...ConstMatchingParameterNames(target=es5).js | 1 + tests/baselines/reference/libMembers.js | 1 + .../baselines/reference/localClassesInLoop.js | 1 + .../reference/localClassesInLoop_ES6.js | 1 + tests/baselines/reference/localTypes4.js | 1 + .../logicalAndOperatorWithEveryType.js | 1 + .../logicalAssignment10(target=es2015).js | 1 + .../logicalAssignment10(target=es2020).js | 1 + .../logicalAssignment10(target=es2021).js | 1 + .../logicalAssignment10(target=esnext).js | 1 + .../logicalOrOperatorWithEveryType.js | 1 + .../reference/mappedTypeNoTypeNoCrash.js | 1 + ...FunctionOverloadMixingStaticAndInstance.js | 1 + .../memberFunctionsWithPrivateOverloads.js | 1 + .../memberFunctionsWithPublicOverloads.js | 1 + ...mberFunctionsWithPublicPrivateOverloads.js | 1 + .../mergedModuleDeclarationCodeGen2.js | 1 + .../mergedModuleDeclarationCodeGen3.js | 1 + .../mergedModuleDeclarationCodeGen4.js | 1 + ...dContainingLocalFunction(target=es2015).js | 1 + ...thodContainingLocalFunction(target=es5).js | 1 + ...loseParenStatements(alwaysstrict=false).js | 30 + ...CloseParenStatements(alwaysstrict=true).js | 31 + .../missingDecoratorType(target=es2015).js | 2 + .../missingDecoratorType(target=es5).js | 2 + .../reference/missingTypeArguments3.js | 1 + tests/baselines/reference/mixedExports.js | 1 + ...pertyElementAccessAssignmentDeclaration.js | 1 + .../mixingFunctionAndAmbientModule1.js | 1 + .../mixingStaticAndInstanceOverloads.js | 1 + tests/baselines/reference/modFunctionCrash.js | 1 + .../reference/modifierOnParameter1.js | 1 + ...gES5LibES6ArrayLibES6WellknownSymbolLib.js | 1 + .../reference/moduleAugmentationGlobal6.js | 1 + .../reference/moduleAugmentationGlobal6_1.js | 1 + .../reference/moduleAugmentationGlobal7.js | 1 + .../reference/moduleAugmentationGlobal7_1.js | 1 + .../moduleMemberWithoutTypeAnnotation1.js | 1 + .../moduleMemberWithoutTypeAnnotation2.js | 1 + tests/baselines/reference/moduleProperty2.js | 1 + .../reference/moduleUnassignedVariable.js | 1 + .../reference/moduleVisibilityTest1.js | 1 + .../reference/moduleVisibilityTest2.js | 1 + .../module_augmentUninstantiatedModule.js | 1 + .../reference/moduledecl(target=es2015).js | 1 + .../reference/moduledecl(target=es5).js | 1 + ...nePropertyAccessAndArrowFunctionIndent1.js | 1 + .../reference/multiModuleFundule1.js | 1 + .../multipleClassPropertyModifiers.js | 1 + .../multipleClassPropertyModifiersErrors.js | 1 + ...leExportAssignmentsInAmbientDeclaration.js | 1 + .../reference/multipleInheritance.js | 1 + tests/baselines/reference/multivar.js | 1 + .../namedFunctionExpressionInModule.js | 1 + .../narrowExceptionVariableInCatchClause.js | 1 + .../narrowFromAnyWithTypePredicate.js | 1 + .../reference/nestedBlockScopedBindings3.js | 1 + .../reference/nestedBlockScopedBindings4.js | 1 + .../reference/nestedBlockScopedBindings5.js | 1 + .../reference/nestedBlockScopedBindings6.js | 1 + tests/baselines/reference/nestedIndexer.js | 1 + ...WithOnlyInnerLetCaptured(target=es2015).js | 1 + ...oopWithOnlyInnerLetCaptured(target=es5).js | 1 + .../reference/nestedRecursiveLambda.js | 1 + .../newNamesInGlobalAugmentations1.js | 1 + .../reference/newOperatorConformance.js | 1 + .../reference/newOperatorErrorCases.js | 1 + tests/baselines/reference/newWithSpread.js | 1 + .../newWithSpreadES5(target=es2015).js | 1 + .../reference/newWithSpreadES5(target=es5).js | 1 + tests/baselines/reference/newWithSpreadES6.js | 1 + ...ionThisExpressionAndLocalVarInAccessors.js | 1 + ...nThisExpressionAndLocalVarInConstructor.js | 1 + ...sionThisExpressionAndLocalVarInFunction.js | 1 + ...lisionThisExpressionAndLocalVarInLambda.js | 1 + ...lisionThisExpressionAndLocalVarInMethod.js | 1 + ...sionThisExpressionAndLocalVarInProperty.js | 1 + ...nThisExpressionInFunctionAndVarInGlobal.js | 1 + .../noCrashOnParameterNamedRequire.js | 1 + .../reference/noImplicitReturnsInAsync2.js | 1 + ...oImplicitReturnsWithoutReturnExpression.js | 1 + .../reference/noImplicitThisFunctions.js | 1 + .../reference/noRepeatedPropertyNames.js | 1 + .../reference/noUncheckedIndexAccess.js | 1 + .../noUnusedLocals_writeOnlyProperty.js | 1 + ...edLocals_writeOnlyProperty_dynamicNames.js | 1 + tests/baselines/reference/nodeResolution4.js | 1 + tests/baselines/reference/nonArrayRestArgs.js | 1 + .../nonContextuallyTypedLogicalOr.js | 1 + .../nonExportedElementsOfMergedModules.js | 1 + ...bleAndObjectIntersections(strict=false).js | 1 + .../nonPrimitiveIndexingWithForIn.js | 1 + ...PrimitiveIndexingWithForInNoImplicitAny.js | 1 + tests/baselines/reference/null.js | 1 + .../reference/nullAssignableToEveryType.js | 1 + .../reference/nullAssignedToUndefined.js | 1 + .../nullIsSubtypeOfEverythingButUndefined.js | 1 + tests/baselines/reference/nullPropertyName.js | 1 + ...OperatorInAsyncGenerator(target=es2015).js | 1 + ...ingOperatorInAsyncGenerator(target=es5).js | 1 + ...OperatorInAsyncGenerator(target=esnext).js | 1 + ...nParameterBindingPattern(target=es2015).js | 1 + ...orInParameterBindingPattern(target=es5).js | 1 + ...nParameterBindingPattern(target=esnext).js | 1 + ...orInParameterInitializer(target=es2015).js | 1 + ...ratorInParameterInitializer(target=es5).js | 1 + ...orInParameterInitializer(target=esnext).js | 1 + .../nullishCoalescingOperator_not_strict.js | 1 + ...icIndexerConstrainsPropertyDeclarations.js | 1 + ...cIndexerConstrainsPropertyDeclarations2.js | 1 + ...ericLiteralsWithTrailingDecimalPoints01.js | 1 + ...ericLiteralsWithTrailingDecimalPoints02.js | 1 + .../reference/objectLitArrayDeclNoNew.js | 1 + .../objectLitIndexerContextualType.js | 1 + .../objectLiteralArraySpecialization.js | 1 + .../objectLiteralFreshnessWithSpread.js | 1 + ...jectLiteralFunctionArgContextualTyping2.js | 1 + .../objectLiteralGettersAndSetters.js | 1 + ...teralShorthandProperties(target=es2015).js | 1 + ...tLiteralShorthandProperties(target=es5).js | 1 + .../objectLiteralShorthandPropertiesES6.js | 1 + ...opertiesErrorFromNoneExistingIdentifier.js | 1 + ...ndPropertiesErrorFromNotUsingIdentifier.js | 1 + ...teralShorthandPropertiesErrorWithModule.js | 1 + ...ectLiteralShorthandPropertiesWithModule.js | 1 + ...LiteralShorthandPropertiesWithModuleES6.js | 1 + .../reference/objectLiteralWidened.js | 1 + tests/baselines/reference/objectRest.js | 1 + tests/baselines/reference/objectRest2.js | 1 + .../reference/objectRestAssignment.js | 1 + .../baselines/reference/objectRestCatchES5.js | 1 + tests/baselines/reference/objectRestForOf.js | 1 + .../reference/objectRestParameter.js | 1 + .../objectRestParameterES5(target=es2015).js | 1 + .../objectRestParameterES5(target=es5).js | 1 + .../reference/objectRestPropertyMustBeLast.js | 1 + .../baselines/reference/objectRestReadonly.js | 1 + tests/baselines/reference/objectRestSpread.js | 1 + ...objectTypeHidingMembersOfExtendedObject.js | 1 + ...ignatureHidingMembersOfExtendedFunction.js | 1 + ...ignatureHidingMembersOfExtendedFunction.js | 1 + .../objectTypeWithDuplicateNumericProperty.js | 1 + ...ypeWithStringIndexerHidingObjectIndexer.js | 1 + ...hStringNamedPropertyOfIllegalCharacters.js | 1 + .../reference/objectTypesIdentity.js | 1 + .../reference/objectTypesIdentity2.js | 1 + .../objectTypesIdentityWithCallSignatures.js | 1 + .../objectTypesIdentityWithCallSignatures2.js | 1 + .../objectTypesIdentityWithCallSignatures3.js | 1 + ...yWithCallSignaturesDifferingParamCounts.js | 1 + ...WithCallSignaturesDifferingParamCounts2.js | 1 + ...IdentityWithCallSignaturesWithOverloads.js | 1 + ...jectTypesIdentityWithComplexConstraints.js | 1 + ...ectTypesIdentityWithConstructSignatures.js | 1 + ...ctTypesIdentityWithConstructSignatures2.js | 1 + ...ConstructSignaturesDifferingParamCounts.js | 1 + ...tTypesIdentityWithGenericCallSignatures.js | 1 + ...TypesIdentityWithGenericCallSignatures2.js | 1 + ...ricCallSignaturesDifferingByConstraints.js | 1 + ...icCallSignaturesDifferingByConstraints2.js | 1 + ...icCallSignaturesDifferingByConstraints3.js | 1 + ...ericCallSignaturesDifferingByReturnType.js | 1 + ...ricCallSignaturesDifferingByReturnType2.js | 1 + ...lSignaturesDifferingTypeParameterCounts.js | 1 + ...SignaturesDifferingTypeParameterCounts2.js | 1 + ...llSignaturesDifferingTypeParameterNames.js | 1 + ...WithGenericCallSignaturesOptionalParams.js | 1 + ...ithGenericCallSignaturesOptionalParams2.js | 1 + ...ithGenericCallSignaturesOptionalParams3.js | 1 + ...nstructSignaturesDifferingByConstraints.js | 1 + ...structSignaturesDifferingByConstraints2.js | 1 + ...structSignaturesDifferingByConstraints3.js | 1 + ...onstructSignaturesDifferingByReturnType.js | 1 + ...nstructSignaturesDifferingByReturnType2.js | 1 + ...tSignaturesDifferingTypeParameterCounts.js | 1 + ...ctSignaturesDifferingTypeParameterNames.js | 1 + ...enericConstructSignaturesOptionalParams.js | 1 + ...nericConstructSignaturesOptionalParams2.js | 1 + ...nericConstructSignaturesOptionalParams3.js | 1 + ...objectTypesIdentityWithNumericIndexers1.js | 1 + ...objectTypesIdentityWithNumericIndexers2.js | 1 + ...objectTypesIdentityWithNumericIndexers3.js | 1 + .../objectTypesIdentityWithOptionality.js | 1 + .../objectTypesIdentityWithPrivates.js | 1 + .../objectTypesIdentityWithPrivates2.js | 1 + .../objectTypesIdentityWithPublics.js | 1 + .../objectTypesIdentityWithStringIndexers.js | 1 + .../objectTypesIdentityWithStringIndexers2.js | 1 + .../objectTypesWithOptionalProperties2.js | 1 + .../operatorsAndIntersectionTypes.js | 1 + .../optionalArgsWithDefaultValues.js | 1 + ...nParameterBindingPattern(target=es2015).js | 1 + ...ngInParameterBindingPattern(target=es5).js | 1 + ...nParameterBindingPattern(target=esnext).js | 1 + .../optionalConstructorArgInSuper.js | 1 + .../optionalParamReferencingOtherParams3.js | 1 + .../reference/optionalPropertiesSyntax.js | 1 + tests/baselines/reference/optionalProperty.js | 1 + tests/baselines/reference/overload2.js | 1 + tests/baselines/reference/overloadCallTest.js | 1 + .../reference/overloadConsecutiveness.js | 1 + tests/baselines/reference/overloadCrash.js | 1 + .../overloadOnConstDuplicateOverloads1.js | 1 + ...nstInBaseWithBadImplementationInDerived.js | 1 + .../reference/overloadOnConstInCallback1.js | 1 + ...tInObjectLiteralImplementingAnInterface.js | 1 + .../reference/overloadOnConstInheritance4.js | 1 + .../overloadOnConstNoAnyImplementation.js | 1 + .../overloadOnConstNoAnyImplementation2.js | 1 + ...verloadOnConstNoNonSpecializedSignature.js | 1 + .../overloadOnConstNoStringImplementation.js | 1 + .../overloadOnConstNoStringImplementation2.js | 1 + ...verloadOnGenericClassAndNonGenericClass.js | 1 + .../baselines/reference/overloadResolution.js | 1 + .../overloadResolutionClassConstructors.js | 1 + .../overloadResolutionConstructors.js | 1 + ...overloadResolutionOnDefaultConstructor1.js | 1 + .../overloadResolutionOverCTLambda.js | 1 + .../overloadResolutionOverNonCTLambdas.js | 1 + .../overloadResolutionOverNonCTObjectLit.js | 1 + .../reference/overloadResolutionTest1.js | 1 + .../reference/overloadResolutionWithAny.js | 1 + ...CallbacksWithDifferingOptionalityOnArgs.js | 1 + .../overloadingOnConstantsInImplementation.js | 1 + ...esolutionWithConstraintCheckingDeferred.js | 1 + .../overloadsAndTypeArgumentArity.js | 1 + .../overloadsAndTypeArgumentArityErrors.js | 1 + ...sInDifferentContainersDisagreeOnAmbient.js | 1 + .../reference/overloadsWithinClasses.js | 1 + ...lizersForwardReferencing(target=es2015).js | 1 + ...tializersForwardReferencing(target=es5).js | 1 + ...izersForwardReferencing1(target=es2015).js | 1 + ...ializersForwardReferencing1(target=es5).js | 1 + ...eterInitializersForwardReferencing1_es6.js | 1 + .../parameterPropertyOutsideConstructor.js | 1 + .../parametersWithNoAnnotationAreAny.js | 1 + .../paramterDestrcuturingDeclaration.js | 1 + .../parenthesizedAsyncArrowFunction.js | 3 +- .../parenthesizedContexualTyping1.js | 1 + .../baselines/reference/parenthesizedTypes.js | 1 + tests/baselines/reference/parseBigInt.js | 1 + .../parseErrorIncorrectReturnToken.js | 1 + tests/baselines/reference/parseLinkTag.js | 1 + .../parseObjectLiteralsWithoutTypes.js | 1 + ...rseUnaryExpressionNoTypeAssertionInJsx4.js | 1 + tests/baselines/reference/parser509630.js | 1 + tests/baselines/reference/parser642331.js | 1 + tests/baselines/reference/parser643728.js | 1 + .../parserAccessibilityAfterStatic2.js | 1 + .../parserAccessibilityAfterStatic5.js | 1 + .../parserAccessibilityAfterStatic6.js | 1 + .../parserAccessors2(target=es2015).js | 1 + .../reference/parserAccessors2(target=es5).js | 1 + .../parserAccessors4(target=es2015).js | 1 + .../reference/parserAccessors4(target=es5).js | 1 + .../parserAccessors6(target=es2015).js | 1 + .../reference/parserAccessors6(target=es5).js | 1 + .../parserAccessors8(target=es2015).js | 1 + .../reference/parserAccessors8(target=es5).js | 1 + .../parserAccessors9(target=es2015).js | 1 + .../reference/parserAccessors9(target=es5).js | 1 + .../parserAmbiguityWithBinaryOperator1.js | 1 + .../parserAmbiguityWithBinaryOperator2.js | 1 + .../parserAmbiguityWithBinaryOperator3.js | 1 + .../parserArrowFunctionExpression10.js | 2 + .../parserArrowFunctionExpression11.js | 2 + .../parserArrowFunctionExpression12.js | 2 + .../parserArrowFunctionExpression15.js | 2 + .../parserArrowFunctionExpression16.js | 2 + .../parserArrowFunctionExpression17.js | 2 + .../parserArrowFunctionExpression8.js | 2 + .../parserArrowFunctionExpression9.js | 2 + .../parserCastVersusArrowFunction1.js | 1 + .../reference/parserClassDeclaration10.js | 1 + .../reference/parserClassDeclaration12.js | 1 + .../reference/parserClassDeclaration13.js | 1 + .../reference/parserClassDeclaration14.js | 1 + .../reference/parserClassDeclaration15.js | 1 + .../reference/parserClassDeclaration16.js | 1 + .../reference/parserClassDeclaration17.js | 1 + .../reference/parserClassDeclaration19.js | 1 + .../reference/parserClassDeclaration20.js | 1 + .../reference/parserClassDeclaration21.js | 1 + .../reference/parserClassDeclaration22.js | 1 + .../reference/parserClassDeclaration26.js | 1 + .../reference/parserClassDeclaration9.js | 1 + .../reference/parserCommaInTypeMemberList2.js | 1 + .../reference/parserComputedPropertyName11.js | 1 + .../reference/parserComputedPropertyName17.js | 1 + .../reference/parserComputedPropertyName19.js | 1 + .../reference/parserComputedPropertyName24.js | 1 + .../reference/parserComputedPropertyName25.js | 1 + .../reference/parserComputedPropertyName26.js | 1 + .../reference/parserComputedPropertyName27.js | 1 + .../reference/parserComputedPropertyName33.js | 1 + .../reference/parserComputedPropertyName7.js | 1 + .../reference/parserComputedPropertyName8.js | 1 + .../reference/parserES3Accessors2.js | 1 + ...S5ComputedPropertyName11(target=es2015).js | 1 + ...erES5ComputedPropertyName11(target=es5).js | 1 + ...ES5ComputedPropertyName7(target=es2015).js | 1 + ...serES5ComputedPropertyName7(target=es5).js | 1 + ...arserES5ForOfStatement18(target=es2015).js | 1 + .../parserES5ForOfStatement18(target=es5).js | 1 + ...arserES5ForOfStatement19(target=es2015).js | 1 + .../parserES5ForOfStatement19(target=es5).js | 1 + ...arserES5ForOfStatement20(target=es2015).js | 1 + .../parserES5ForOfStatement20(target=es5).js | 1 + .../parserErrantSemicolonInClass1.js | 1 + ...ErrorRecovery_IncompleteMemberVariable2.js | 1 + .../parserErrorRecovery_ParameterList1.js | 1 + .../parserErrorRecovery_ParameterList2.js | 1 + .../reference/parserForOfStatement18.js | 1 + .../reference/parserForOfStatement19.js | 1 + .../reference/parserForOfStatement20.js | 1 + .../reference/parserForStatement2.js | 1 + .../reference/parserFunctionDeclaration1.js | 1 + .../reference/parserFunctionDeclaration4.js | 1 + .../reference/parserFunctionDeclaration5.js | 1 + .../reference/parserFunctionDeclaration6.js | 1 + .../reference/parserFunctionDeclaration7.js | 1 + .../reference/parserFunctionDeclaration8.js | 1 + .../parserIndexMemberDeclaration10.js | 1 + .../reference/parserIndexSignature1.js | 1 + .../reference/parserIndexSignature10.js | 1 + .../reference/parserIndexSignature11.js | 1 + .../reference/parserIndexSignature2.js | 1 + .../reference/parserIndexSignature3.js | 1 + .../reference/parserIndexSignature4.js | 1 + .../reference/parserIndexSignature5.js | 1 + ...berAccessorDeclaration13(target=es2015).js | 1 + ...MemberAccessorDeclaration13(target=es5).js | 1 + ...berAccessorDeclaration16(target=es2015).js | 1 + ...MemberAccessorDeclaration16(target=es5).js | 1 + ...berAccessorDeclaration18(target=es2015).js | 1 + ...MemberAccessorDeclaration18(target=es5).js | 1 + ...mberAccessorDeclaration4(target=es2015).js | 1 + ...rMemberAccessorDeclaration4(target=es5).js | 1 + ...mberAccessorDeclaration5(target=es2015).js | 1 + ...rMemberAccessorDeclaration5(target=es5).js | 1 + ...mberAccessorDeclaration6(target=es2015).js | 1 + ...rMemberAccessorDeclaration6(target=es5).js | 1 + ...mberAccessorDeclaration8(target=es2015).js | 1 + ...rMemberAccessorDeclaration8(target=es5).js | 1 + .../parserMemberFunctionDeclaration2.js | 1 + .../parserMemberVariableDeclaration1.js | 1 + .../parserMemberVariableDeclaration2.js | 1 + .../parserMemberVariableDeclaration3.js | 1 + .../parserMemberVariableDeclaration4.js | 1 + .../parserMemberVariableDeclaration5.js | 1 + .../reference/parserMethodSignature1.js | 1 + .../reference/parserMethodSignature10.js | 1 + .../reference/parserMethodSignature11.js | 1 + .../reference/parserMethodSignature12.js | 1 + .../reference/parserMethodSignature2.js | 1 + .../reference/parserMethodSignature3.js | 1 + .../reference/parserMethodSignature4.js | 1 + .../reference/parserMethodSignature5.js | 1 + .../reference/parserMethodSignature6.js | 1 + .../reference/parserMethodSignature7.js | 1 + .../reference/parserMethodSignature8.js | 1 + .../reference/parserMethodSignature9.js | 1 + .../parserMissingLambdaOpenBrace1.js | 1 + .../parserModifierOnPropertySignature1.js | 1 + .../parserModifierOnPropertySignature2.js | 1 + .../reference/parserModuleDeclaration11.js | 1 + .../baselines/reference/parserObjectType3.js | 1 + .../baselines/reference/parserObjectType4.js | 1 + .../baselines/reference/parserObjectType5.js | 1 + .../reference/parserParameterList1.js | 1 + .../reference/parserParameterList10.js | 1 + .../reference/parserParameterList12.js | 1 + .../reference/parserParameterList13.js | 1 + .../reference/parserParameterList14.js | 1 + .../reference/parserParameterList15.js | 1 + .../reference/parserParameterList16.js | 1 + .../reference/parserParameterList17.js | 1 + .../reference/parserParameterList3.js | 1 + .../reference/parserParameterList4.js | 1 + .../reference/parserParameterList5.js | 1 + .../reference/parserParameterList6.js | 1 + .../reference/parserParameterList9.js | 1 + .../reference/parserPropertySignature1.js | 1 + .../reference/parserPropertySignature10.js | 1 + .../reference/parserPropertySignature11.js | 1 + .../reference/parserPropertySignature12.js | 1 + .../reference/parserPropertySignature2.js | 1 + .../reference/parserPropertySignature5.js | 1 + .../reference/parserPropertySignature6.js | 1 + .../reference/parserPropertySignature9.js | 1 + .../baselines/reference/parserRealSource1.js | 1 + .../baselines/reference/parserRealSource10.js | 1 + .../baselines/reference/parserRealSource11.js | 1 + .../baselines/reference/parserRealSource12.js | 1 + .../baselines/reference/parserRealSource13.js | 1 + .../baselines/reference/parserRealSource14.js | 1 + .../baselines/reference/parserRealSource2.js | 1 + .../baselines/reference/parserRealSource4.js | 1 + .../baselines/reference/parserRealSource5.js | 1 + .../baselines/reference/parserRealSource9.js | 1 + .../reference/parserRegularExpression6.js | 1 + ...parserRegularExpressionDivideAmbiguity6.js | 1 + .../baselines/reference/parserS12.11_A3_T4.js | 1 + ...essorWithTypeAnnotation1(target=es2015).js | 1 + ...AccessorWithTypeAnnotation1(target=es5).js | 1 + ...essorWithTypeParameters1(target=es2015).js | 1 + ...AccessorWithTypeParameters1(target=es5).js | 1 + ...ariableDeclaration1(alwaysstrict=false).js | 21 + ...VariableDeclaration1(alwaysstrict=true).js | 22 + .../parserUsingConstructorAsIdentifier.js | 1 + .../reference/parserVariableDeclaration4.js | 1 + .../reference/parserX_ArrowFunction4.js | 1 + ...sRecoversWhenHittingUnexpectedSemicolon.js | 1 + ...artiallyAnnotatedFunctionInferenceError.js | 1 + .../reference/plusOperatorWithAnyOtherType.js | 1 + .../baselines/reference/predicateSemantics.js | 1 + tests/baselines/reference/primitiveMembers.js | 1 + .../reference/primtiveTypesAreIdentical.js | 1 + tests/baselines/reference/privacyGloImport.js | 1 + .../reference/privacyGloImportParseErrors.js | 1 + .../reference/privacyGloInterface.js | 1 + .../privacyInterfaceExtendsClauseDeclFile.js | 1 + ...ivateClassPropertyAccessibleWithinClass.js | 1 + tests/baselines/reference/privateIndexer2.js | 1 + ...tanceMemberAccessibility(target=es2015).js | 1 + ...InstanceMemberAccessibility(target=es5).js | 1 + .../privateNameAccessorsCallExpression.js | 1 + .../reference/privateNameBadSuper.js | 1 + ...rUseDefineForClassFields(target=es2022).js | 1 + ...rUseDefineForClassFields(target=esnext).js | 1 + ...ameComputedPropertyName3(target=es2015).js | 1 + ...ameComputedPropertyName3(target=es2022).js | 1 + ...ameComputedPropertyName3(target=esnext).js | 1 + .../privateNameConstructorSignature.js | 1 + .../privateNameDeclarationMerging.js | 1 + .../privateNameFieldCallExpression.js | 1 + .../reference/privateNameFieldInitializer.js | 1 + .../privateNameFieldsESNext(target=es2022).js | 1 + .../privateNameFieldsESNext(target=esnext).js | 1 + .../reference/privateNameHashCharName.js | 1 + .../reference/privateNameLateSuper.js | 1 + ...rUseDefineForClassFields(target=es2022).js | 1 + ...rUseDefineForClassFields(target=esnext).js | 1 + .../privateNameMethodCallExpression.js | 1 + .../privateNameNestedClassFieldShadowing.js | 1 + .../reference/privateNameSetterNoGetter.js | 1 + ...rivateNameStaticAccessorsCallExpression.js | 1 + .../privateNameStaticFieldCallExpression.js | 1 + ...meStaticFieldInitializer(target=es2015).js | 1 + ...meStaticFieldInitializer(target=es2022).js | 1 + ...meStaticFieldInitializer(target=esnext).js | 1 + ...StaticFieldNoInitializer(target=es2015).js | 1 + ...StaticFieldNoInitializer(target=es2022).js | 1 + ...StaticFieldNoInitializer(target=esnext).js | 1 + .../privateNameStaticMethodCallExpression.js | 1 + .../reference/privateNameWeakMapCollision.js | 1 + .../privateNamesInterfaceExtendingClass.js | 1 + .../reference/privateNamesUseBeforeDef.js | 1 + ...tedMembersAreNotAccessibleDestructuring.js | 1 + .../reference/promisePermutations.js | 1 + .../reference/promisePermutations2.js | 1 + .../reference/promisePermutations3.js | 1 + tests/baselines/reference/promiseType.js | 1 + .../reference/promiseTypeInference.js | 1 + .../reference/promiseTypeInferenceUnion.js | 1 + tests/baselines/reference/propertyAccess.js | 1 + tests/baselines/reference/propertyAccess1.js | 1 + tests/baselines/reference/propertyAccess2.js | 1 + tests/baselines/reference/propertyAccess3.js | 1 + tests/baselines/reference/propertyAccess6.js | 1 + tests/baselines/reference/propertyAccess7.js | 1 + .../reference/propertyAccessChain.2.js | 1 + .../propertyAccessExpressionInnerComments.js | 1 + .../propertyAccessNumericLiterals.es6.js | 1 + .../propertyAccessNumericLiterals.js | 1 + .../propertyAccessOfReadonlyIndexSignature.js | 1 + .../propertyAccessOnObjectLiteral.js | 1 + ...rtyAccessOnTypeParameterWithConstraints.js | 1 + ...tyAccessOnTypeParameterWithConstraints2.js | 1 + ...tyAccessOnTypeParameterWithConstraints3.js | 1 + ...tyAccessOnTypeParameterWithConstraints4.js | 1 + ...tyAccessOnTypeParameterWithConstraints5.js | 1 + ...AccessOnTypeParameterWithoutConstraints.js | 1 + .../reference/propertyAccessibility1.js | 1 + .../reference/propertyAccessibility2.js | 1 + .../propertyAndAccessorWithSameName.js | 1 + .../propertyAndFunctionWithSameName.js | 1 + .../baselines/reference/propertyAssignment.js | 1 + .../propertyAssignmentUseParentType3.js | 1 + .../propertyIdentityWithPrivacyMismatch.js | 1 + .../propertyNameWithoutTypeAnnotation.js | 1 + .../reference/propertyNamesOfReservedWords.js | 1 + .../baselines/reference/propertyOrdering2.js | 1 + .../propertyParameterWithQuestionMark.js | 1 + .../baselines/reference/propertySignatures.js | 1 + .../reference/propertyWrappedInTry.js | 1 + ...rtyAccessibleWithinClass(target=es2015).js | 1 + ...opertyAccessibleWithinClass(target=es5).js | 1 + tests/baselines/reference/protectedMembers.js | 1 + .../protectedMembersThisParameter.js | 1 + .../protoAsIndexInIndexExpression.js | 1 + tests/baselines/reference/protoAssignment.js | 1 + tests/baselines/reference/protoInIndexer.js | 1 + .../prototypeOnConstructorFunctions.js | 1 + tests/baselines/reference/qualify.js | 1 + .../reference/reachabilityChecks1.js | 1 + .../reference/reachabilityChecks11.js | 1 + .../reference/reachabilityChecks4.js | 1 + .../reference/reachabilityChecks5.js | 1 + .../reference/reachabilityChecks6.js | 1 + .../reference/reachabilityChecks7.js | 1 + .../reference/readonlyInAmbientClass.js | 1 + ...yInNonPropertyParameters(target=es2015).js | 1 + ...onlyInNonPropertyParameters(target=es5).js | 1 + tests/baselines/reference/recur1.js | 1 + .../reference/recursiveClassReferenceTest.js | 1 + .../reference/recursiveGetterAccess.js | 1 + .../reference/recursiveInference1.js | 1 + .../reference/recursiveInitializer.js | 1 + .../reference/recursiveNamedLambdaCall.js | 1 + .../recursiveProperties(target=es2015).js | 1 + .../recursiveProperties(target=es5).js | 1 + .../recursiveSpecializationOfSignatures.js | 1 + .../recursiveTypesUsedAsFunctionParameters.js | 1 + .../redeclareParameterInCatchBlock.js | 1 + ...amingDestructuredPropertyInFunctionType.js | 1 + ...mingDestructuredPropertyInFunctionType3.js | 1 + .../requiredInitializedParameter1.js | 1 + .../requiredInitializedParameter2.js | 1 + .../requiredInitializedParameter3.js | 1 + .../requiredInitializedParameter4.js | 1 + ...lassDeclarationWhenInBaseTypeResolution.js | 1 + .../baselines/reference/restArgMissingName.js | 1 + ...ementWithNullInitializer(target=es2015).js | 1 + ...tElementWithNullInitializer(target=es5).js | 1 + .../reference/restParamAsOptional.js | 1 + .../baselines/reference/restParamModifier.js | 1 + .../baselines/reference/restParamModifier2.js | 1 + .../restParameterAssignmentCompatibility.js | 1 + .../restParameterNoTypeAnnotation.js | 1 + .../restParameterWithBindingPattern1.js | 1 + .../restParameterWithBindingPattern2.js | 1 + ...estParameterWithoutAnnotationIsAnyArray.js | 1 + .../restParametersOfNonArrayTypes.js | 1 + .../restParametersOfNonArrayTypes2.js | 1 + .../restParametersWithArrayTypeAnnotations.js | 1 + .../reference/returnInfiniteIntersection.js | 1 + tests/baselines/reference/returnStatement1.js | 1 + .../returnTypeParameterWithModules.js | 1 + .../reference/returnValueInSetter.js | 1 + ...peCheckExtendedClassInsidePublicMethod2.js | 1 + ...peCheckExtendedClassInsideStaticMethod1.js | 1 + .../scopeCheckInsidePublicMethod1.js | 1 + .../scopeCheckInsideStaticMethod1.js | 1 + tests/baselines/reference/scopeTests.js | 1 + .../selfReferencesInFunctionParameters.js | 1 + tests/baselines/reference/setMethods.js | 1 + tests/baselines/reference/setterWithReturn.js | 1 + ...specializationsShouldNotAffectEachOther.js | 1 + .../baselines/reference/specializeVarArgs1.js | 1 + .../specializedOverloadWithRestParameters.js | 1 + ...pecializedSignatureAsCallbackParameter1.js | 1 + ...reIsNotSubtypeOfNonSpecializedSignature.js | 1 + ...atureIsSubtypeOfNonSpecializedSignature.js | 1 + .../baselines/reference/staticAsIdentifier.js | 1 + .../reference/staticClassMemberError.js | 1 + ...AndPublicMemberOfAnotherClassAssignment.js | 1 + .../reference/staticModifierAlreadySeen.js | 1 + ...ngIndexerConstrainsPropertyDeclarations.js | 1 + ...gIndexerConstrainsPropertyDeclarations2.js | 1 + .../baselines/reference/stringLiteralType.js | 1 + .../stringLiteralTypeIsSubtypeOfString.js | 1 + .../stringLiteralTypesAndTuples01.js | 1 + .../reference/stringLiteralTypesAsTags01.js | 1 + .../reference/stringLiteralTypesAsTags02.js | 1 + .../reference/stringLiteralTypesAsTags03.js | 1 + ...gLiteralTypesInImplementationSignatures.js | 1 + ...LiteralTypesInImplementationSignatures2.js | 1 + .../stringLiteralTypesInUnionTypes01.js | 1 + .../stringLiteralTypesInUnionTypes02.js | 1 + .../stringLiteralTypesInUnionTypes03.js | 1 + .../stringLiteralTypesInUnionTypes04.js | 1 + ...ingLiteralTypesInVariableDeclarations01.js | 1 + .../stringLiteralTypesOverloads01.js | 1 + .../stringLiteralTypesOverloads02.js | 1 + .../stringLiteralTypesOverloads04.js | 1 + .../stringLiteralTypesTypePredicates01.js | 1 + .../structuralTypeInDeclareFileForModule.js | 1 + tests/baselines/reference/subtypesOfAny.js | 1 + tests/baselines/reference/subtypesOfUnion.js | 1 + .../reference/subtypingWithCallSignatures4.js | 1 + .../subtypingWithConstructSignatures4.js | 1 + tests/baselines/reference/super1.js | 1 + .../superCallBeforeThisAccessing1.js | 1 + .../superCallBeforeThisAccessing2.js | 1 + .../superCallBeforeThisAccessing5.js | 1 + .../superCallBeforeThisAccessing8.js | 1 + ...eButWithIncorrectNumberOfTypeArguments1.js | 1 + ...sFromGenericTypeButWithNoTypeArguments1.js | 1 + ...ivesNonGenericTypeButWithTypeArguments1.js | 1 + .../superCallFromClassThatHasNoBaseType1.js | 1 + .../reference/superCallFromFunction1.js | 1 + tests/baselines/reference/superNewCall1.js | 1 + ...perPropertyAccessNoError(target=es2015).js | 1 + .../superPropertyAccessNoError(target=es5).js | 1 + .../reference/superWithTypeArgument2.js | 1 + .../switchCaseCircularRefeference.js | 1 + .../reference/symbolDeclarationEmit13.js | 1 + .../reference/symbolDeclarationEmit3.js | 1 + tests/baselines/reference/symbolProperty10.js | 1 + tests/baselines/reference/symbolProperty11.js | 1 + tests/baselines/reference/symbolProperty12.js | 1 + tests/baselines/reference/symbolProperty13.js | 1 + tests/baselines/reference/symbolProperty14.js | 1 + tests/baselines/reference/symbolProperty15.js | 1 + tests/baselines/reference/symbolProperty16.js | 1 + tests/baselines/reference/symbolProperty19.js | 1 + tests/baselines/reference/symbolProperty39.js | 1 + tests/baselines/reference/symbolProperty40.js | 1 + tests/baselines/reference/symbolProperty41.js | 1 + tests/baselines/reference/symbolProperty42.js | 1 + tests/baselines/reference/symbolProperty48.js | 1 + tests/baselines/reference/symbolProperty49.js | 1 + tests/baselines/reference/symbolProperty56.js | 1 + tests/baselines/reference/symbolProperty57.js | 1 + tests/baselines/reference/symbolProperty8.js | 1 + tests/baselines/reference/symbolProperty9.js | 1 + tests/baselines/reference/symbolType14.js | 1 + tests/baselines/reference/symbolType17.js | 1 + tests/baselines/reference/symbolType18.js | 1 + ...ringsWithCurriedFunction(target=es2015).js | 1 + ...eStringsWithCurriedFunction(target=es5).js | 1 + .../baselines/reference/targetTypeCastTest.js | 1 + tests/baselines/reference/targetTypeTest1.js | 1 + .../templateStringInArrowFunctionES6.js | 1 + .../reference/templateStringInYieldKeyword.js | 1 + ...plateStringWithEmbeddedArrowFunctionES6.js | 1 + ...mplateStringWithEmbeddedYieldKeywordES6.js | 1 + tests/baselines/reference/testTypings.js | 1 + tests/baselines/reference/thisBinding.js | 1 + .../thisExpressionInIndexExpression.js | 1 + ...thisInArrowFunctionInStaticInitializer1.js | 1 + .../reference/thisInConstructorParameter1.js | 1 + .../reference/thisInInvalidContexts.js | 1 + tests/baselines/reference/thisInSuperCall.js | 1 + tests/baselines/reference/thisInSuperCall1.js | 1 + tests/baselines/reference/thisInSuperCall2.js | 1 + tests/baselines/reference/thisInSuperCall3.js | 1 + ...eferencedInFunctionInsideArrowFunction1.js | 1 + .../reference/thisTypeInFunctions.js | 1 + .../reference/thisTypeInFunctions3.js | 1 + .../reference/thisTypeInFunctions4.js | 1 + .../reference/thisTypeInFunctionsNegative.js | 5 +- .../reference/throwInEnclosingStatements.js | 1 + tests/baselines/reference/throwStatements.js | 1 + tests/baselines/reference/topLevel.js | 1 + .../reference/topLevelAmbientModule.js | 1 + .../topLevelAwait.2(module=es2022).js | 1 + .../topLevelAwait.2(module=esnext).js | 1 + .../topLevelAwaitNonModule(module=es2022).js | 1 + .../topLevelAwaitNonModule(module=esnext).js | 1 + tests/baselines/reference/topLevelLambda.js | 1 + tests/baselines/reference/topLevelLambda2.js | 1 + .../topLevelModuleDeclarationAndFile.js | 1 + .../reference/topLevelThisAssignment.js | 1 + .../trailingCommasES5(target=es2015).js | 1 + .../trailingCommasES5(target=es5).js | 1 + .../trailingCommasInBindingPatterns.js | 1 + ...onParametersAndArguments(target=es2015).js | 1 + ...ctionParametersAndArguments(target=es5).js | 1 + ...ScopedLoopVarInitializer(target=es2015).js | 1 + ...ockScopedLoopVarInitializer(target=es5).js | 1 + .../transformsElideNullUndefinedType.js | 1 + .../modules-and-globals-mixed-in-amd.js | 150 ++--- .../prepend-reports-deprecation-error.js | 150 ++--- ...e-resolution-finds-original-source-file.js | 82 +-- .../outFile/baseline-sectioned-sourcemaps.js | 364 ++++++------ .../outFile/builds-till-project-specified.js | 3 +- .../tsbuild/outFile/clean-projects.js | 9 +- .../outFile/cleans-till-project-specified.js | 9 +- .../non-module-projects-without-prepend.js | 18 +- ...al-flag-changes-between-non-dts-changes.js | 15 +- ...-in-tsbuildinfo-doesnt-match-ts-version.js | 9 +- ...erated-when-incremental-is-set-to-false.js | 9 +- ...-buildInfo-absence-results-in-new-build.js | 9 +- ...roject-is-not-composite-but-incremental.js | 212 +++---- ...t-composite-but-uses-project-references.js | 296 +++++----- ...final-project-specifies-tsBuildInfoFile.js | 212 +++---- ...ot-change-but-its-modified-time-changes.js | 9 +- .../works-with-extended-source-files.js | 10 +- .../reference/tsc/commandLine/help-all.js | 2 +- .../extended-source-files-are-watched.js | 18 - ...es-errors-when-strictNullChecks-changes.js | 6 +- ...-orphan,-and-orphan-script-info-changes.js | 6 +- ...he-source-file-if-script-info-is-orphan.js | 6 +- ...twoAccessorsWithSameName(target=es2015).js | 1 + .../twoAccessorsWithSameName(target=es5).js | 1 + .../reference/twoAccessorsWithSameName2.js | 1 + tests/baselines/reference/typeAliasExport.js | 1 + .../typeArgumentConstraintResolution1.js | 1 + ...ypeArgumentInferenceConstructSignatures.js | 1 + ...mentInferenceWithConstraintAsCommonRoot.js | 1 + .../typeArgumentInferenceWithObjectLiteral.js | 1 + tests/baselines/reference/typeAssertions.js | 1 + .../typeAssertionsWithIntersectionTypes01.js | 1 + .../typeAssertionsWithUnionTypes01.js | 1 + .../reference/typeCheckTypeArgument.js | 1 + .../reference/typeFromPropertyAssignment29.js | 1 + .../reference/typeFromPropertyAssignment30.js | 1 + .../reference/typeFromPropertyAssignment31.js | 1 + .../reference/typeFromPropertyAssignment32.js | 2 + .../reference/typeFromPropertyAssignment33.js | 2 + .../baselines/reference/typeGuardFunction.js | 1 + .../reference/typeGuardFunctionGenerics.js | 1 + .../reference/typeGuardFunctionOfFormThis.js | 1 + .../typeGuardFunctionOfFormThisErrors.js | 1 + .../reference/typeGuardOfFormExpr1AndExpr2.js | 1 + .../reference/typeGuardOfFormExpr1OrExpr2.js | 1 + tests/baselines/reference/typeMatch1.js | 1 + tests/baselines/reference/typeMatch2.js | 1 + tests/baselines/reference/typeName1.js | 1 + .../baselines/reference/typeOfThisGeneral.js | 1 + ...erAsTypeParameterConstraintTransitively.js | 1 + ...rAsTypeParameterConstraintTransitively2.js | 1 + ...arameterConstrainedToOuterTypeParameter.js | 1 + ...rameterConstrainedToOuterTypeParameter2.js | 1 + .../typeParameterExplicitlyExtendsAny.js | 1 + .../reference/typeParameterExtendingUnion1.js | 1 + .../reference/typeParameterExtendingUnion2.js | 1 + .../typeParameterFixingWithConstraints.js | 1 + ...eterFixingWithContextSensitiveArguments.js | 1 + ...terFixingWithContextSensitiveArguments2.js | 1 + ...terFixingWithContextSensitiveArguments3.js | 1 + ...terFixingWithContextSensitiveArguments4.js | 1 + ...terFixingWithContextSensitiveArguments5.js | 1 + .../typeParameterWithInvalidConstraintType.js | 1 + .../typeParametersAreIdenticalToThemselves.js | 1 + tests/baselines/reference/typeQueryOnClass.js | 1 + .../reference/typeReferenceDirectives1.js | 1 + .../reference/typeReferenceDirectives2.js | 1 + .../reference/typeReferenceDirectives3.js | 1 + .../reference/typeReferenceDirectives4.js | 1 + .../reference/typeReferenceDirectives6.js | 1 + .../typedArrays-es5(target=es2015).js | 1 + .../reference/typedArrays-es5(target=es5).js | 1 + tests/baselines/reference/typedArrays-es6.js | 1 + tests/baselines/reference/typedArrays.js | 1 + .../reference/typedArraysSubarray.js | 1 + tests/baselines/reference/typeofClass2.js | 1 + .../typeofOperatorInvalidOperations.js | 1 + .../typesWithSpecializedCallSignatures.js | 1 + ...typesWithSpecializedConstructSignatures.js | 1 + .../reference/uncaughtCompilerError1.js | 1 + .../reference/undefinedTypeAssignment2.js | 1 + tests/baselines/reference/underscoreTest1.js | 2 + ...tyCheckNoApparentPropTypeMismatchErrors.js | 1 + ...nSubtypeIfEveryConstituentTypeIsSubtype.js | 1 + .../reference/unionTypeIndexSignature.js | 1 + .../baselines/reference/unionTypeReduction.js | 1 + .../reference/uniqueSymbolsErrors.js | 1 + tests/baselines/reference/unknownSymbols1.js | 1 + tests/baselines/reference/unknownSymbols2.js | 1 + .../reference/unknownTypeArgOnCall.js | 1 + .../untypedArgumentInLambdaExpression.js | 1 + ...untypedFunctionCallsWithTypeParameters1.js | 1 + .../unusedDestructuringParameters.js | 1 + .../reference/unusedMethodsInInterface.js | 1 + .../reference/unusedParameterProperty2.js | 1 + .../reference/unusedParametersInLambda1.js | 1 + .../reference/unusedParametersInLambda2.js | 1 + .../unusedParametersWithUnderscore.js | 1 + .../unusedPrivateMembers(target=es2015).js | 1 + .../unusedPrivateMembers(target=es5).js | 1 + .../reference/usingDeclarations.10.js | 1 + .../usingDeclarations.11(target=es2015).js | 1 + .../usingDeclarations.11(target=es5).js | 1 + ...tions.12(usedefineforclassfields=false).js | 1 + ...ations.12(usedefineforclassfields=true).js | 1 + .../reference/usingDeclarations.14.js | 1 + .../reference/usingDeclarations.16.js | 1 + .../usingDeclarations.3(target=es2015).js | 1 + .../usingDeclarations.3(target=es2017).js | 1 + .../usingDeclarations.3(target=es2022).js | 1 + .../usingDeclarations.3(target=es5).js | 1 + .../usingDeclarations.3(target=esnext).js | 1 + .../reference/usingDeclarations.5.js | 1 + .../reference/usingDeclarations.7.js | 1 + .../reference/usingDeclarations.8.js | 1 + .../reference/usingDeclarations.9.js | 1 + .../usingDeclarationsInFor(target=es2015).js | 1 + .../usingDeclarationsInFor(target=es2017).js | 1 + .../usingDeclarationsInFor(target=es2022).js | 1 + .../usingDeclarationsInFor(target=es5).js | 1 + .../usingDeclarationsInFor(target=esnext).js | 1 + ...DeclarationsInForAwaitOf(target=es2015).js | 1 + ...DeclarationsInForAwaitOf(target=es2017).js | 1 + ...DeclarationsInForAwaitOf(target=es2022).js | 1 + ...ingDeclarationsInForAwaitOf(target=es5).js | 1 + ...DeclarationsInForAwaitOf(target=esnext).js | 1 + .../reference/usingDeclarationsInForIn.js | 1 + ...ingDeclarationsInForOf.1(target=es2015).js | 1 + ...ingDeclarationsInForOf.1(target=es2017).js | 1 + ...ingDeclarationsInForOf.1(target=es2022).js | 1 + .../usingDeclarationsInForOf.1(target=es5).js | 1 + ...ingDeclarationsInForOf.1(target=esnext).js | 1 + .../reference/usingDeclarationsInForOf.2.js | 1 + .../reference/usingDeclarationsInForOf.3.js | 1 + .../reference/usingDeclarationsInForOf.4.js | 1 + tests/baselines/reference/varAsID.js | 1 + tests/baselines/reference/varBlock.js | 1 + tests/baselines/reference/vardecl.js | 1 + ...eclaratorResolvedDuringContextualTyping.js | 1 + .../varianceCantBeStrictWhileStructureIsnt.js | 1 + tests/baselines/reference/voidOperator1.js | 1 + .../voidOperatorInvalidOperations.js | 1 + .../reference/voidOperatorWithBooleanType.js | 1 + .../reference/voidOperatorWithEnumType.js | 1 + .../reference/voidOperatorWithNumberType.js | 1 + .../reference/voidOperatorWithStringType.js | 1 + .../reference/voidReturnLambdaValue.js | 1 + tests/baselines/reference/widenedTypes.js | 1 + tests/baselines/reference/widenedTypes1.js | 1 + tests/baselines/reference/wideningTuples1.js | 1 + tests/baselines/reference/wideningTuples2.js | 1 + tests/baselines/reference/wideningTuples3.js | 1 + tests/baselines/reference/wideningTuples4.js | 1 + tests/baselines/reference/wideningTuples5.js | 1 + tests/baselines/reference/wideningTuples6.js | 1 + tests/baselines/reference/wideningTuples7.js | 1 + tests/baselines/reference/witness.js | 1 + .../reference/wrappedIncovations1.js | 1 + .../reference/wrappedIncovations2.js | 1 + 2082 files changed, 8776 insertions(+), 800 deletions(-) create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).js create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).js create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=false).js create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=true).js create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).js create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).js create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).js create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).js create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).js create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).js create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).js create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).js create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).js create mode 100644 tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).js create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).js create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).js create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).js create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).js create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).js create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).js create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).js create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).js create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).js create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).js create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).js create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).js create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).js create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).js create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).js create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).js create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).js create mode 100644 tests/baselines/reference/for-of56(alwaysstrict=false).js create mode 100644 tests/baselines/reference/for-of56(alwaysstrict=true).js create mode 100644 tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).js create mode 100644 tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).js create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).js create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).js create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).js create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).js diff --git a/tests/baselines/reference/ArrowFunction4.js b/tests/baselines/reference/ArrowFunction4.js index 309f54c2ef75f..c817fb853adb0 100644 --- a/tests/baselines/reference/ArrowFunction4.js +++ b/tests/baselines/reference/ArrowFunction4.js @@ -6,5 +6,6 @@ var v = (a, b) => { }; //// [ArrowFunction4.js] +"use strict"; var v = (a, b) => { }; diff --git a/tests/baselines/reference/ClassDeclaration10.js b/tests/baselines/reference/ClassDeclaration10.js index 3cb041d7a5b45..316829b237104 100644 --- a/tests/baselines/reference/ClassDeclaration10.js +++ b/tests/baselines/reference/ClassDeclaration10.js @@ -7,5 +7,6 @@ class C { } //// [ClassDeclaration10.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/ClassDeclaration13.js b/tests/baselines/reference/ClassDeclaration13.js index 371e91c0bc865..061f53ef88085 100644 --- a/tests/baselines/reference/ClassDeclaration13.js +++ b/tests/baselines/reference/ClassDeclaration13.js @@ -7,6 +7,7 @@ class C { } //// [ClassDeclaration13.js] +"use strict"; class C { bar() { } } diff --git a/tests/baselines/reference/ClassDeclaration14.js b/tests/baselines/reference/ClassDeclaration14.js index 3b62c34cf23fa..63158ee095999 100644 --- a/tests/baselines/reference/ClassDeclaration14.js +++ b/tests/baselines/reference/ClassDeclaration14.js @@ -7,5 +7,6 @@ class C { } //// [ClassDeclaration14.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/ClassDeclaration15.js b/tests/baselines/reference/ClassDeclaration15.js index f94caa3511ee2..64b359498036a 100644 --- a/tests/baselines/reference/ClassDeclaration15.js +++ b/tests/baselines/reference/ClassDeclaration15.js @@ -7,6 +7,7 @@ class C { } //// [ClassDeclaration15.js] +"use strict"; class C { constructor() { } } diff --git a/tests/baselines/reference/ClassDeclaration21.js b/tests/baselines/reference/ClassDeclaration21.js index 3245fbc09db44..309cc33f3b7d1 100644 --- a/tests/baselines/reference/ClassDeclaration21.js +++ b/tests/baselines/reference/ClassDeclaration21.js @@ -7,6 +7,7 @@ class C { } //// [ClassDeclaration21.js] +"use strict"; class C { 1() { } } diff --git a/tests/baselines/reference/ClassDeclaration22.js b/tests/baselines/reference/ClassDeclaration22.js index 6fffe6f1ecb59..d50f45e250f23 100644 --- a/tests/baselines/reference/ClassDeclaration22.js +++ b/tests/baselines/reference/ClassDeclaration22.js @@ -7,6 +7,7 @@ class C { } //// [ClassDeclaration22.js] +"use strict"; class C { "bar"() { } } diff --git a/tests/baselines/reference/ClassDeclaration26.js b/tests/baselines/reference/ClassDeclaration26.js index ef0394713d52a..8506fb52e1f2a 100644 --- a/tests/baselines/reference/ClassDeclaration26.js +++ b/tests/baselines/reference/ClassDeclaration26.js @@ -8,6 +8,7 @@ class C { } //// [ClassDeclaration26.js] +"use strict"; class C { constructor() { this.foo = 10; diff --git a/tests/baselines/reference/ClassDeclaration9.js b/tests/baselines/reference/ClassDeclaration9.js index da185fe963361..7859100b1d7bc 100644 --- a/tests/baselines/reference/ClassDeclaration9.js +++ b/tests/baselines/reference/ClassDeclaration9.js @@ -6,5 +6,6 @@ class C { } //// [ClassDeclaration9.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js index 40df79ce06b4e..426db23ee92d0 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js @@ -7,6 +7,7 @@ class C { } //// [ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js] +"use strict"; class C { constructor() { this.x = 10; diff --git a/tests/baselines/reference/ES5For-of14(target=es2015).js b/tests/baselines/reference/ES5For-of14(target=es2015).js index 3e84ee916125a..9a82f40f11d98 100644 --- a/tests/baselines/reference/ES5For-of14(target=es2015).js +++ b/tests/baselines/reference/ES5For-of14(target=es2015).js @@ -6,6 +6,7 @@ for (const v of []) { } //// [ES5For-of14.js] +"use strict"; for (const v of []) { var x = v; } diff --git a/tests/baselines/reference/ES5For-of14(target=es5).js b/tests/baselines/reference/ES5For-of14(target=es5).js index 6e3c5a2ff5642..3fa80915dedb5 100644 --- a/tests/baselines/reference/ES5For-of14(target=es5).js +++ b/tests/baselines/reference/ES5For-of14(target=es5).js @@ -6,6 +6,7 @@ for (const v of []) { } //// [ES5For-of14.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var v = _a[_i]; var x = v; diff --git a/tests/baselines/reference/ES5For-of15(target=es2015).js b/tests/baselines/reference/ES5For-of15(target=es2015).js index 58d1ffb0dab23..0e809ad936cd9 100644 --- a/tests/baselines/reference/ES5For-of15(target=es2015).js +++ b/tests/baselines/reference/ES5For-of15(target=es2015).js @@ -9,6 +9,7 @@ for (let v of []) { } //// [ES5For-of15.js] +"use strict"; for (let v of []) { v; for (const v of []) { diff --git a/tests/baselines/reference/ES5For-of15(target=es5).js b/tests/baselines/reference/ES5For-of15(target=es5).js index c9138b2974055..ed40afc4dfdf7 100644 --- a/tests/baselines/reference/ES5For-of15(target=es5).js +++ b/tests/baselines/reference/ES5For-of15(target=es5).js @@ -9,6 +9,7 @@ for (let v of []) { } //// [ES5For-of15.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var v = _a[_i]; v; diff --git a/tests/baselines/reference/ES5For-of16(target=es2015).js b/tests/baselines/reference/ES5For-of16(target=es2015).js index 199e8a861ca35..bd0125bf5105a 100644 --- a/tests/baselines/reference/ES5For-of16(target=es2015).js +++ b/tests/baselines/reference/ES5For-of16(target=es2015).js @@ -10,6 +10,7 @@ for (let v of []) { } //// [ES5For-of16.js] +"use strict"; for (let v of []) { v; for (let v of []) { diff --git a/tests/baselines/reference/ES5For-of16(target=es5).js b/tests/baselines/reference/ES5For-of16(target=es5).js index 72a190faae400..57cc2aeb3276d 100644 --- a/tests/baselines/reference/ES5For-of16(target=es5).js +++ b/tests/baselines/reference/ES5For-of16(target=es5).js @@ -10,6 +10,7 @@ for (let v of []) { } //// [ES5For-of16.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var v = _a[_i]; v; diff --git a/tests/baselines/reference/ES5For-of18(target=es2015).js b/tests/baselines/reference/ES5For-of18(target=es2015).js index d68fda7a14662..24bc7ce9cecca 100644 --- a/tests/baselines/reference/ES5For-of18(target=es2015).js +++ b/tests/baselines/reference/ES5For-of18(target=es2015).js @@ -10,6 +10,7 @@ for (let v of []) { //// [ES5For-of18.js] +"use strict"; for (let v of []) { v; } diff --git a/tests/baselines/reference/ES5For-of18(target=es5).js b/tests/baselines/reference/ES5For-of18(target=es5).js index e120417cbb582..cf76f8ea5f9ef 100644 --- a/tests/baselines/reference/ES5For-of18(target=es5).js +++ b/tests/baselines/reference/ES5For-of18(target=es5).js @@ -10,6 +10,7 @@ for (let v of []) { //// [ES5For-of18.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var v = _a[_i]; v; diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..5c3a9a9e90c3f --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).js @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +//// [ES5For-of19.ts] +for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } +} + + +//// [ES5For-of19.js] +for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } +} diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).js b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..fa2933b5c3390 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).js @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +//// [ES5For-of19.ts] +for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } +} + + +//// [ES5For-of19.js] +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + v; + function foo() { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v_1 = _a[_i]; + v_1; + } + } +} diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..294c9624cfdd3 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).js @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +//// [ES5For-of19.ts] +for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } +} + + +//// [ES5For-of19.js] +"use strict"; +for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } +} diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).js b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..945b75dd239ae --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).js @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +//// [ES5For-of19.ts] +for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } +} + + +//// [ES5For-of19.js] +"use strict"; +for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v = _a[_i]; + v; + function foo() { + for (var _i = 0, _a = []; _i < _a.length; _i++) { + var v_1 = _a[_i]; + v_1; + } + } +} diff --git a/tests/baselines/reference/ES5For-of2(target=es2015).js b/tests/baselines/reference/ES5For-of2(target=es2015).js index 4df827070fd14..cb30595dca296 100644 --- a/tests/baselines/reference/ES5For-of2(target=es2015).js +++ b/tests/baselines/reference/ES5For-of2(target=es2015).js @@ -6,6 +6,7 @@ for (var v of []) { } //// [ES5For-of2.js] +"use strict"; for (var v of []) { var x = v; } diff --git a/tests/baselines/reference/ES5For-of2(target=es5).js b/tests/baselines/reference/ES5For-of2(target=es5).js index a816e9a1abd21..8d5e6d25f52a7 100644 --- a/tests/baselines/reference/ES5For-of2(target=es5).js +++ b/tests/baselines/reference/ES5For-of2(target=es5).js @@ -6,6 +6,7 @@ for (var v of []) { } //// [ES5For-of2.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var v = _a[_i]; var x = v; diff --git a/tests/baselines/reference/ES5For-of20(target=es2015).js b/tests/baselines/reference/ES5For-of20(target=es2015).js index f8315134bee34..d3d3208a1a8bf 100644 --- a/tests/baselines/reference/ES5For-of20(target=es2015).js +++ b/tests/baselines/reference/ES5For-of20(target=es2015).js @@ -9,6 +9,7 @@ for (let v of []) { } //// [ES5For-of20.js] +"use strict"; for (let v of []) { let v; for (let v of [v]) { diff --git a/tests/baselines/reference/ES5For-of20(target=es5).js b/tests/baselines/reference/ES5For-of20(target=es5).js index 2438413e2f2bd..a4cbd609fefbc 100644 --- a/tests/baselines/reference/ES5For-of20(target=es5).js +++ b/tests/baselines/reference/ES5For-of20(target=es5).js @@ -9,6 +9,7 @@ for (let v of []) { } //// [ES5For-of20.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var v = _a[_i]; var v_1; diff --git a/tests/baselines/reference/ES5For-of21(target=es2015).js b/tests/baselines/reference/ES5For-of21(target=es2015).js index 53c46d7b35453..1fa4a33d8fae3 100644 --- a/tests/baselines/reference/ES5For-of21(target=es2015).js +++ b/tests/baselines/reference/ES5For-of21(target=es2015).js @@ -6,6 +6,7 @@ for (let v of []) { } //// [ES5For-of21.js] +"use strict"; for (let v of []) { for (let _i of []) { } } diff --git a/tests/baselines/reference/ES5For-of21(target=es5).js b/tests/baselines/reference/ES5For-of21(target=es5).js index 57cc47fbfc294..4beace125f0da 100644 --- a/tests/baselines/reference/ES5For-of21(target=es5).js +++ b/tests/baselines/reference/ES5For-of21(target=es5).js @@ -6,6 +6,7 @@ for (let v of []) { } //// [ES5For-of21.js] +"use strict"; for (var _a = 0, _b = []; _a < _b.length; _a++) { var v = _b[_a]; for (var _c = 0, _d = []; _c < _d.length; _c++) { diff --git a/tests/baselines/reference/ES5For-of22(target=es2015).js b/tests/baselines/reference/ES5For-of22(target=es2015).js index 3d522b59363b0..1521690c43397 100644 --- a/tests/baselines/reference/ES5For-of22(target=es2015).js +++ b/tests/baselines/reference/ES5For-of22(target=es2015).js @@ -7,6 +7,7 @@ for (var x of [1, 2, 3]) { } //// [ES5For-of22.js] +"use strict"; for (var x of [1, 2, 3]) { let _a = 0; console.log(x); diff --git a/tests/baselines/reference/ES5For-of22(target=es5).js b/tests/baselines/reference/ES5For-of22(target=es5).js index ad6e593985551..5845ac26471af 100644 --- a/tests/baselines/reference/ES5For-of22(target=es5).js +++ b/tests/baselines/reference/ES5For-of22(target=es5).js @@ -7,6 +7,7 @@ for (var x of [1, 2, 3]) { } //// [ES5For-of22.js] +"use strict"; for (var _i = 0, _b = [1, 2, 3]; _i < _b.length; _i++) { var x = _b[_i]; var _a = 0; diff --git a/tests/baselines/reference/ES5For-of23(target=es2015).js b/tests/baselines/reference/ES5For-of23(target=es2015).js index e6a6acdcca266..fb33817fe7194 100644 --- a/tests/baselines/reference/ES5For-of23(target=es2015).js +++ b/tests/baselines/reference/ES5For-of23(target=es2015).js @@ -7,6 +7,7 @@ for (var x of [1, 2, 3]) { } //// [ES5For-of23.js] +"use strict"; for (var x of [1, 2, 3]) { var _a = 0; console.log(x); diff --git a/tests/baselines/reference/ES5For-of23(target=es5).js b/tests/baselines/reference/ES5For-of23(target=es5).js index 3082de8b084e0..de426b30bf906 100644 --- a/tests/baselines/reference/ES5For-of23(target=es5).js +++ b/tests/baselines/reference/ES5For-of23(target=es5).js @@ -7,6 +7,7 @@ for (var x of [1, 2, 3]) { } //// [ES5For-of23.js] +"use strict"; for (var _i = 0, _b = [1, 2, 3]; _i < _b.length; _i++) { var x = _b[_i]; var _a = 0; diff --git a/tests/baselines/reference/ES5For-of24(target=es2015).js b/tests/baselines/reference/ES5For-of24(target=es2015).js index aed1c5adbdf66..fdd8256f85bd6 100644 --- a/tests/baselines/reference/ES5For-of24(target=es2015).js +++ b/tests/baselines/reference/ES5For-of24(target=es2015).js @@ -7,6 +7,7 @@ for (var v of a) { } //// [ES5For-of24.js] +"use strict"; var a = [1, 2, 3]; for (var v of a) { let a = 0; diff --git a/tests/baselines/reference/ES5For-of24(target=es5).js b/tests/baselines/reference/ES5For-of24(target=es5).js index c7f4b85d84f49..5b56ae1f75bbd 100644 --- a/tests/baselines/reference/ES5For-of24(target=es5).js +++ b/tests/baselines/reference/ES5For-of24(target=es5).js @@ -7,6 +7,7 @@ for (var v of a) { } //// [ES5For-of24.js] +"use strict"; var a = [1, 2, 3]; for (var _i = 0, a_1 = a; _i < a_1.length; _i++) { var v = a_1[_i]; diff --git a/tests/baselines/reference/ES5For-of25(target=es2015).js b/tests/baselines/reference/ES5For-of25(target=es2015).js index 481e49092b250..e165a93724cd3 100644 --- a/tests/baselines/reference/ES5For-of25(target=es2015).js +++ b/tests/baselines/reference/ES5For-of25(target=es2015).js @@ -8,6 +8,7 @@ for (var v of a) { } //// [ES5For-of25.js] +"use strict"; var a = [1, 2, 3]; for (var v of a) { v; diff --git a/tests/baselines/reference/ES5For-of25(target=es5).js b/tests/baselines/reference/ES5For-of25(target=es5).js index d84336430159d..2710f7fba083a 100644 --- a/tests/baselines/reference/ES5For-of25(target=es5).js +++ b/tests/baselines/reference/ES5For-of25(target=es5).js @@ -8,6 +8,7 @@ for (var v of a) { } //// [ES5For-of25.js] +"use strict"; var a = [1, 2, 3]; for (var _i = 0, a_1 = a; _i < a_1.length; _i++) { var v = a_1[_i]; diff --git a/tests/baselines/reference/ES5For-of26(target=es2015).js b/tests/baselines/reference/ES5For-of26(target=es2015).js index 9a37217bc7329..4adeef520467b 100644 --- a/tests/baselines/reference/ES5For-of26(target=es2015).js +++ b/tests/baselines/reference/ES5For-of26(target=es2015).js @@ -7,6 +7,7 @@ for (var [a = 0, b = 1] of [2, 3]) { } //// [ES5For-of26.js] +"use strict"; for (var [a = 0, b = 1] of [2, 3]) { a; b; diff --git a/tests/baselines/reference/ES5For-of26(target=es5).js b/tests/baselines/reference/ES5For-of26(target=es5).js index 00d65b7c2f184..4ccc7c058c868 100644 --- a/tests/baselines/reference/ES5For-of26(target=es5).js +++ b/tests/baselines/reference/ES5For-of26(target=es5).js @@ -7,6 +7,7 @@ for (var [a = 0, b = 1] of [2, 3]) { } //// [ES5For-of26.js] +"use strict"; for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) { var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; a; diff --git a/tests/baselines/reference/ES5For-of27(target=es2015).js b/tests/baselines/reference/ES5For-of27(target=es2015).js index 1ca415339df70..d8eb49cb8c747 100644 --- a/tests/baselines/reference/ES5For-of27(target=es2015).js +++ b/tests/baselines/reference/ES5For-of27(target=es2015).js @@ -7,6 +7,7 @@ for (var {x: a = 0, y: b = 1} of [2, 3]) { } //// [ES5For-of27.js] +"use strict"; for (var { x: a = 0, y: b = 1 } of [2, 3]) { a; b; diff --git a/tests/baselines/reference/ES5For-of27(target=es5).js b/tests/baselines/reference/ES5For-of27(target=es5).js index 28110b6177be7..096fc082bf229 100644 --- a/tests/baselines/reference/ES5For-of27(target=es5).js +++ b/tests/baselines/reference/ES5For-of27(target=es5).js @@ -7,6 +7,7 @@ for (var {x: a = 0, y: b = 1} of [2, 3]) { } //// [ES5For-of27.js] +"use strict"; for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) { var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d; a; diff --git a/tests/baselines/reference/ES5For-of28(target=es2015).js b/tests/baselines/reference/ES5For-of28(target=es2015).js index c9314fb1830b5..93aaffc4d52da 100644 --- a/tests/baselines/reference/ES5For-of28(target=es2015).js +++ b/tests/baselines/reference/ES5For-of28(target=es2015).js @@ -7,6 +7,7 @@ for (let [a = 0, b = 1] of [2, 3]) { } //// [ES5For-of28.js] +"use strict"; for (let [a = 0, b = 1] of [2, 3]) { a; b; diff --git a/tests/baselines/reference/ES5For-of28(target=es5).js b/tests/baselines/reference/ES5For-of28(target=es5).js index 933f6548a0852..9854cecb24b75 100644 --- a/tests/baselines/reference/ES5For-of28(target=es5).js +++ b/tests/baselines/reference/ES5For-of28(target=es5).js @@ -7,6 +7,7 @@ for (let [a = 0, b = 1] of [2, 3]) { } //// [ES5For-of28.js] +"use strict"; for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) { var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; a; diff --git a/tests/baselines/reference/ES5For-of29(target=es2015).js b/tests/baselines/reference/ES5For-of29(target=es2015).js index ca022d966c1ac..3090950a11032 100644 --- a/tests/baselines/reference/ES5For-of29(target=es2015).js +++ b/tests/baselines/reference/ES5For-of29(target=es2015).js @@ -7,6 +7,7 @@ for (const {x: a = 0, y: b = 1} of [2, 3]) { } //// [ES5For-of29.js] +"use strict"; for (const { x: a = 0, y: b = 1 } of [2, 3]) { a; b; diff --git a/tests/baselines/reference/ES5For-of29(target=es5).js b/tests/baselines/reference/ES5For-of29(target=es5).js index 45c85c38d5915..514a8a4e9558f 100644 --- a/tests/baselines/reference/ES5For-of29(target=es5).js +++ b/tests/baselines/reference/ES5For-of29(target=es5).js @@ -7,6 +7,7 @@ for (const {x: a = 0, y: b = 1} of [2, 3]) { } //// [ES5For-of29.js] +"use strict"; for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) { var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d; a; diff --git a/tests/baselines/reference/ES5For-of4(target=es2015).js b/tests/baselines/reference/ES5For-of4(target=es2015).js index 497507bb4f7b0..a6557f370f252 100644 --- a/tests/baselines/reference/ES5For-of4(target=es2015).js +++ b/tests/baselines/reference/ES5For-of4(target=es2015).js @@ -6,6 +6,7 @@ for (var v of []) var y = v; //// [ES5For-of4.js] +"use strict"; for (var v of []) var x = v; var y = v; diff --git a/tests/baselines/reference/ES5For-of4(target=es5).js b/tests/baselines/reference/ES5For-of4(target=es5).js index f9966ad370998..d1d45ef9b7daf 100644 --- a/tests/baselines/reference/ES5For-of4(target=es5).js +++ b/tests/baselines/reference/ES5For-of4(target=es5).js @@ -6,6 +6,7 @@ for (var v of []) var y = v; //// [ES5For-of4.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var v = _a[_i]; var x = v; diff --git a/tests/baselines/reference/ES5For-of5(target=es2015).js b/tests/baselines/reference/ES5For-of5(target=es2015).js index 795cd99365c42..cffb5f8cbe14b 100644 --- a/tests/baselines/reference/ES5For-of5(target=es2015).js +++ b/tests/baselines/reference/ES5For-of5(target=es2015).js @@ -6,6 +6,7 @@ for (var _a of []) { } //// [ES5For-of5.js] +"use strict"; for (var _a of []) { var x = _a; } diff --git a/tests/baselines/reference/ES5For-of5(target=es5).js b/tests/baselines/reference/ES5For-of5(target=es5).js index 42dc8a621accb..211b3f2733ddc 100644 --- a/tests/baselines/reference/ES5For-of5(target=es5).js +++ b/tests/baselines/reference/ES5For-of5(target=es5).js @@ -6,6 +6,7 @@ for (var _a of []) { } //// [ES5For-of5.js] +"use strict"; for (var _i = 0, _b = []; _i < _b.length; _i++) { var _a = _b[_i]; var x = _a; diff --git a/tests/baselines/reference/ES5For-of6(target=es2015).js b/tests/baselines/reference/ES5For-of6(target=es2015).js index e734734077bf1..c9047090c4f74 100644 --- a/tests/baselines/reference/ES5For-of6(target=es2015).js +++ b/tests/baselines/reference/ES5For-of6(target=es2015).js @@ -8,6 +8,7 @@ for (var w of []) { } //// [ES5For-of6.js] +"use strict"; for (var w of []) { for (var v of []) { var x = [w, v]; diff --git a/tests/baselines/reference/ES5For-of6(target=es5).js b/tests/baselines/reference/ES5For-of6(target=es5).js index 1023bbf09269c..fdef5f97f199d 100644 --- a/tests/baselines/reference/ES5For-of6(target=es5).js +++ b/tests/baselines/reference/ES5For-of6(target=es5).js @@ -8,6 +8,7 @@ for (var w of []) { } //// [ES5For-of6.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var w = _a[_i]; for (var _b = 0, _c = []; _b < _c.length; _b++) { diff --git a/tests/baselines/reference/ES5SymbolProperty2(target=es2015).js b/tests/baselines/reference/ES5SymbolProperty2(target=es2015).js index 97b6ce5bdbe62..9a8f82d1632c2 100644 --- a/tests/baselines/reference/ES5SymbolProperty2(target=es2015).js +++ b/tests/baselines/reference/ES5SymbolProperty2(target=es2015).js @@ -13,6 +13,7 @@ namespace M { (new M.C)[Symbol.iterator]; //// [ES5SymbolProperty2.js] +"use strict"; var M; (function (M) { var Symbol; diff --git a/tests/baselines/reference/ES5SymbolProperty2(target=es5).js b/tests/baselines/reference/ES5SymbolProperty2(target=es5).js index 2bb2480bd32ef..6cf2d9889afd4 100644 --- a/tests/baselines/reference/ES5SymbolProperty2(target=es5).js +++ b/tests/baselines/reference/ES5SymbolProperty2(target=es5).js @@ -13,6 +13,7 @@ namespace M { (new M.C)[Symbol.iterator]; //// [ES5SymbolProperty2.js] +"use strict"; var M; (function (M) { var Symbol; diff --git a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index 10b640014b997..183a15cde2640 100644 --- a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -25,6 +25,7 @@ namespace A { //// [ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] +"use strict"; var A; (function (A) { A.Origin = { x: 0, y: 0 }; diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js index c2a40862fc35f..36c4e2f891502 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,6 +26,7 @@ namespace A { //// [ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js] +"use strict"; var A; (function (A) { A.Origin = { x: 0, y: 0 }; diff --git a/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).js b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).js new file mode 100644 index 0000000000000..b162aa7fe4560 --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).js @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +//// [FunctionDeclaration2_es6.ts] +function f(yield) { +} + +//// [FunctionDeclaration2_es6.js] +function f(yield) { +} diff --git a/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).js b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).js new file mode 100644 index 0000000000000..08c7ab1554d55 --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).js @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +//// [FunctionDeclaration2_es6.ts] +function f(yield) { +} + +//// [FunctionDeclaration2_es6.js] +"use strict"; +function f(yield) { +} diff --git a/tests/baselines/reference/FunctionDeclaration9_es6.js b/tests/baselines/reference/FunctionDeclaration9_es6.js index bab288e53236b..0c221af3078f6 100644 --- a/tests/baselines/reference/FunctionDeclaration9_es6.js +++ b/tests/baselines/reference/FunctionDeclaration9_es6.js @@ -6,6 +6,7 @@ function * foo() { } //// [FunctionDeclaration9_es6.js] +"use strict"; function* foo() { var v = { [yield]: foo }; } diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).js b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).js new file mode 100644 index 0000000000000..ecc4cb85f4043 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).js @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +//// [NonInitializedExportInInternalModule.ts] +namespace Inner { + var; + let; + const; + + export var a; + export let b; + export var c: string; + export let d: number; + class A {} + export var e: A; + export let f: A; + + namespace B { + export let a = 1, b, c = 2; + export let x, y, z; + } + + namespace C { + export var a = 1, b, c = 2; + export var x, y, z; + } + + // Shouldn't be filtered + export var a1 = 1; + export let b1 = 1; + export var c1: string = 'a'; + export let d1: number = 1; + class D {} + export var e1 = new D; + export let f1 = new D; + export var g1: D = new D; + export let h1: D = new D; +} + +//// [NonInitializedExportInInternalModule.js] +var Inner; +(function (Inner) { + var ; + let; + const ; + class A { + } + let B; + (function (B) { + B.a = 1, B.c = 2; + })(B || (B = {})); + let C; + (function (C) { + C.a = 1, C.c = 2; + })(C || (C = {})); + // Shouldn't be filtered + Inner.a1 = 1; + Inner.b1 = 1; + Inner.c1 = 'a'; + Inner.d1 = 1; + class D { + } + Inner.e1 = new D; + Inner.f1 = new D; + Inner.g1 = new D; + Inner.h1 = new D; +})(Inner || (Inner = {})); diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).js b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).js new file mode 100644 index 0000000000000..7dc27edb63e27 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).js @@ -0,0 +1,67 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +//// [NonInitializedExportInInternalModule.ts] +namespace Inner { + var; + let; + const; + + export var a; + export let b; + export var c: string; + export let d: number; + class A {} + export var e: A; + export let f: A; + + namespace B { + export let a = 1, b, c = 2; + export let x, y, z; + } + + namespace C { + export var a = 1, b, c = 2; + export var x, y, z; + } + + // Shouldn't be filtered + export var a1 = 1; + export let b1 = 1; + export var c1: string = 'a'; + export let d1: number = 1; + class D {} + export var e1 = new D; + export let f1 = new D; + export var g1: D = new D; + export let h1: D = new D; +} + +//// [NonInitializedExportInInternalModule.js] +"use strict"; +var Inner; +(function (Inner) { + var ; + let; + const ; + class A { + } + let B; + (function (B) { + B.a = 1, B.c = 2; + })(B || (B = {})); + let C; + (function (C) { + C.a = 1, C.c = 2; + })(C || (C = {})); + // Shouldn't be filtered + Inner.a1 = 1; + Inner.b1 = 1; + Inner.c1 = 'a'; + Inner.d1 = 1; + class D { + } + Inner.e1 = new D; + Inner.f1 = new D; + Inner.g1 = new D; + Inner.h1 = new D; +})(Inner || (Inner = {})); diff --git a/tests/baselines/reference/Protected8.js b/tests/baselines/reference/Protected8.js index 7a2dda4c92738..3a2997f5a4a43 100644 --- a/tests/baselines/reference/Protected8.js +++ b/tests/baselines/reference/Protected8.js @@ -7,3 +7,4 @@ interface I { } //// [Protected8.js] +"use strict"; diff --git a/tests/baselines/reference/Protected9.js b/tests/baselines/reference/Protected9.js index 2088595fe56cb..e9a046d9ca4f4 100644 --- a/tests/baselines/reference/Protected9.js +++ b/tests/baselines/reference/Protected9.js @@ -6,6 +6,7 @@ class C { } //// [Protected9.js] +"use strict"; class C { constructor(p) { this.p = p; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js index cad11bb4f3235..2c5d82481aeb8 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js @@ -40,6 +40,7 @@ var l: X.Y.Z.Line; //// [TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js] +"use strict"; // ensure merges as expected var p; var p; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js index 0af0fe1881879..57e0a9cf27a67 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js @@ -40,6 +40,7 @@ var l: X.Y.Z.Line; //// [TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js] +"use strict"; // ensure merges as expected var p; var p; diff --git a/tests/baselines/reference/VariableDeclaration2_es6.js b/tests/baselines/reference/VariableDeclaration2_es6.js index 8014be127dd8b..994b76542f2d9 100644 --- a/tests/baselines/reference/VariableDeclaration2_es6.js +++ b/tests/baselines/reference/VariableDeclaration2_es6.js @@ -4,4 +4,5 @@ const a //// [VariableDeclaration2_es6.js] +"use strict"; const a; diff --git a/tests/baselines/reference/YieldExpression13_es6.js b/tests/baselines/reference/YieldExpression13_es6.js index 2d31a2ea6388b..11d55624ea9e9 100644 --- a/tests/baselines/reference/YieldExpression13_es6.js +++ b/tests/baselines/reference/YieldExpression13_es6.js @@ -4,4 +4,5 @@ function* foo() { yield } //// [YieldExpression13_es6.js] +"use strict"; function* foo() { yield; } diff --git a/tests/baselines/reference/YieldExpression3_es6.js b/tests/baselines/reference/YieldExpression3_es6.js index 979cbe7b033a0..cf6c343f88e54 100644 --- a/tests/baselines/reference/YieldExpression3_es6.js +++ b/tests/baselines/reference/YieldExpression3_es6.js @@ -7,6 +7,7 @@ function* foo() { } //// [YieldExpression3_es6.js] +"use strict"; function* foo() { yield; yield; diff --git a/tests/baselines/reference/YieldExpression4_es6.js b/tests/baselines/reference/YieldExpression4_es6.js index 4703f404c526a..d48966f583681 100644 --- a/tests/baselines/reference/YieldExpression4_es6.js +++ b/tests/baselines/reference/YieldExpression4_es6.js @@ -7,6 +7,7 @@ function* foo() { } //// [YieldExpression4_es6.js] +"use strict"; function* foo() { yield; yield; diff --git a/tests/baselines/reference/YieldExpression6_es6.js b/tests/baselines/reference/YieldExpression6_es6.js index 93798bb3ac4a0..e14f23fb4dc0f 100644 --- a/tests/baselines/reference/YieldExpression6_es6.js +++ b/tests/baselines/reference/YieldExpression6_es6.js @@ -6,6 +6,7 @@ function* foo() { } //// [YieldExpression6_es6.js] +"use strict"; function* foo() { yield* foo; } diff --git a/tests/baselines/reference/YieldStarExpression4_es6.js b/tests/baselines/reference/YieldStarExpression4_es6.js index 7e743965459d6..ad435152e01a6 100644 --- a/tests/baselines/reference/YieldStarExpression4_es6.js +++ b/tests/baselines/reference/YieldStarExpression4_es6.js @@ -6,6 +6,7 @@ function *g() { } //// [YieldStarExpression4_es6.js] +"use strict"; function* g() { yield* []; } diff --git a/tests/baselines/reference/accessibilityModifiers(target=es2015).js b/tests/baselines/reference/accessibilityModifiers(target=es2015).js index 04c572ea4e276..8320ca4e78621 100644 --- a/tests/baselines/reference/accessibilityModifiers(target=es2015).js +++ b/tests/baselines/reference/accessibilityModifiers(target=es2015).js @@ -47,6 +47,7 @@ class E { //// [accessibilityModifiers.js] +"use strict"; // No errors class C { static privateMethod() { } diff --git a/tests/baselines/reference/accessibilityModifiers(target=es5).js b/tests/baselines/reference/accessibilityModifiers(target=es5).js index 306717824e1b4..cae8a79337a4f 100644 --- a/tests/baselines/reference/accessibilityModifiers(target=es5).js +++ b/tests/baselines/reference/accessibilityModifiers(target=es5).js @@ -47,6 +47,7 @@ class E { //// [accessibilityModifiers.js] +"use strict"; // No errors var C = /** @class */ (function () { function C() { diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es2015).js b/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es2015).js index e930a48da4dae..4796505f4ac53 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es2015).js +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es2015).js @@ -7,6 +7,7 @@ class C { } //// [accessorParameterAccessibilityModifier.js] +"use strict"; class C { set X(v) { } static set X(v2) { } diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).js b/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).js index c0cf7eb7c9eb0..f87eebeb6e8fc 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).js +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).js @@ -7,6 +7,7 @@ class C { } //// [accessorParameterAccessibilityModifier.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/accessorWithES5(target=es2015).js b/tests/baselines/reference/accessorWithES5(target=es2015).js index 6a4a1f425a403..f2dfac11e00ca 100644 --- a/tests/baselines/reference/accessorWithES5(target=es2015).js +++ b/tests/baselines/reference/accessorWithES5(target=es2015).js @@ -21,6 +21,7 @@ var y = { } //// [accessorWithES5.js] +"use strict"; class C { get x() { return 1; diff --git a/tests/baselines/reference/accessorWithES5(target=es5).js b/tests/baselines/reference/accessorWithES5(target=es5).js index 19d5409b7f1b9..5f037856ad487 100644 --- a/tests/baselines/reference/accessorWithES5(target=es5).js +++ b/tests/baselines/reference/accessorWithES5(target=es5).js @@ -21,6 +21,7 @@ var y = { } //// [accessorWithES5.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/accessorWithInitializer(target=es2015).js b/tests/baselines/reference/accessorWithInitializer(target=es2015).js index db9477e948950..0341d24656c16 100644 --- a/tests/baselines/reference/accessorWithInitializer(target=es2015).js +++ b/tests/baselines/reference/accessorWithInitializer(target=es2015).js @@ -7,6 +7,7 @@ class C { } //// [accessorWithInitializer.js] +"use strict"; class C { set X(v = 0) { } static set X(v2 = 0) { } diff --git a/tests/baselines/reference/accessorWithInitializer(target=es5).js b/tests/baselines/reference/accessorWithInitializer(target=es5).js index d70cbd6828395..4d55352be22cc 100644 --- a/tests/baselines/reference/accessorWithInitializer(target=es5).js +++ b/tests/baselines/reference/accessorWithInitializer(target=es5).js @@ -7,6 +7,7 @@ class C { } //// [accessorWithInitializer.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/accessorWithRestParam(target=es2015).js b/tests/baselines/reference/accessorWithRestParam(target=es2015).js index 894e8420ad1da..1f91fbae1afa5 100644 --- a/tests/baselines/reference/accessorWithRestParam(target=es2015).js +++ b/tests/baselines/reference/accessorWithRestParam(target=es2015).js @@ -7,6 +7,7 @@ class C { } //// [accessorWithRestParam.js] +"use strict"; class C { set X(...v) { } static set X(...v2) { } diff --git a/tests/baselines/reference/accessorWithRestParam(target=es5).js b/tests/baselines/reference/accessorWithRestParam(target=es5).js index 1713b6e0ad354..ec2daf41e279f 100644 --- a/tests/baselines/reference/accessorWithRestParam(target=es5).js +++ b/tests/baselines/reference/accessorWithRestParam(target=es5).js @@ -7,6 +7,7 @@ class C { } //// [accessorWithRestParam.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/accessorWithoutBody1(target=es2015).js b/tests/baselines/reference/accessorWithoutBody1(target=es2015).js index 930cd3e6559b3..462c607fa5645 100644 --- a/tests/baselines/reference/accessorWithoutBody1(target=es2015).js +++ b/tests/baselines/reference/accessorWithoutBody1(target=es2015).js @@ -4,4 +4,5 @@ var v = { get foo() } //// [accessorWithoutBody1.js] +"use strict"; var v = { get foo() { } }; diff --git a/tests/baselines/reference/accessorWithoutBody1(target=es5).js b/tests/baselines/reference/accessorWithoutBody1(target=es5).js index 930cd3e6559b3..462c607fa5645 100644 --- a/tests/baselines/reference/accessorWithoutBody1(target=es5).js +++ b/tests/baselines/reference/accessorWithoutBody1(target=es5).js @@ -4,4 +4,5 @@ var v = { get foo() } //// [accessorWithoutBody1.js] +"use strict"; var v = { get foo() { } }; diff --git a/tests/baselines/reference/accessorWithoutBody2(target=es2015).js b/tests/baselines/reference/accessorWithoutBody2(target=es2015).js index 39a3bfd02dd40..7bdb67b3c572b 100644 --- a/tests/baselines/reference/accessorWithoutBody2(target=es2015).js +++ b/tests/baselines/reference/accessorWithoutBody2(target=es2015).js @@ -4,4 +4,5 @@ var v = { set foo(a) } //// [accessorWithoutBody2.js] +"use strict"; var v = { set foo(a) { } }; diff --git a/tests/baselines/reference/accessorWithoutBody2(target=es5).js b/tests/baselines/reference/accessorWithoutBody2(target=es5).js index 39a3bfd02dd40..7bdb67b3c572b 100644 --- a/tests/baselines/reference/accessorWithoutBody2(target=es5).js +++ b/tests/baselines/reference/accessorWithoutBody2(target=es5).js @@ -4,4 +4,5 @@ var v = { set foo(a) } //// [accessorWithoutBody2.js] +"use strict"; var v = { set foo(a) { } }; diff --git a/tests/baselines/reference/accessorsEmit.js b/tests/baselines/reference/accessorsEmit.js index 6b3a7b0443ff1..b080b23d7afd9 100644 --- a/tests/baselines/reference/accessorsEmit.js +++ b/tests/baselines/reference/accessorsEmit.js @@ -18,6 +18,7 @@ class Test2 { } //// [accessorsEmit.js] +"use strict"; class Result { } class Test { diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js index 44661c52d3bed..3dcced7cfb68e 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js @@ -42,6 +42,7 @@ var r19 = a + { a: '' }; var r20 = a + ((a: string) => { return a }); //// [additionOperatorWithAnyAndEveryType.js] +"use strict"; function foo() { } class C { static foo() { } diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.js b/tests/baselines/reference/additionOperatorWithInvalidOperands.js index ee53f3b495928..b664f5c0df71c 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.js @@ -43,6 +43,7 @@ var r19 = E.a + C.foo(); var r20 = E.a + M; //// [additionOperatorWithInvalidOperands.js] +"use strict"; function foo() { } class C { static foo() { } diff --git a/tests/baselines/reference/ambientClassDeclarationWithExtends.js b/tests/baselines/reference/ambientClassDeclarationWithExtends.js index 1b7bcf88b2084..b1d00a84c2dc6 100644 --- a/tests/baselines/reference/ambientClassDeclarationWithExtends.js +++ b/tests/baselines/reference/ambientClassDeclarationWithExtends.js @@ -24,15 +24,18 @@ var f: E = new F(); //// [ambientClassDeclarationExtends_singleFile.js] +"use strict"; var D; (function (D) { var x; })(D || (D = {})); var d = new D(); //// [ambientClassDeclarationExtends_file1.js] +"use strict"; var F; (function (F) { var y; })(F || (F = {})); //// [ambientClassDeclarationExtends_file2.js] +"use strict"; var f = new F(); diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.js b/tests/baselines/reference/ambientClassOverloadForFunction.js index cda770e893fdc..b3193ccce912e 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.js +++ b/tests/baselines/reference/ambientClassOverloadForFunction.js @@ -6,5 +6,6 @@ function foo() { return null; } //// [ambientClassOverloadForFunction.js] +"use strict"; ; function foo() { return null; } diff --git a/tests/baselines/reference/ambientDeclarations.js b/tests/baselines/reference/ambientDeclarations.js index 51c77dcb33df3..28b568f6cea64 100644 --- a/tests/baselines/reference/ambientDeclarations.js +++ b/tests/baselines/reference/ambientDeclarations.js @@ -79,6 +79,7 @@ declare module 'external1' { //// [ambientDeclarations.js] +"use strict"; var x = E3.B; // Ambient module members are always exported with or without export keyword var p = M1.x; diff --git a/tests/baselines/reference/ambientDeclarationsExternal.js b/tests/baselines/reference/ambientDeclarationsExternal.js index 872ca9f1f8041..1bfbc90825013 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.js +++ b/tests/baselines/reference/ambientDeclarationsExternal.js @@ -24,6 +24,7 @@ var n: number; //// [decls.js] +"use strict"; // Ambient external import declaration referencing ambient external module using top level module name //// [consumer.js] "use strict"; diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.js b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.js index 7ffe5313a13c1..a3213e1881844 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.js +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.js @@ -17,6 +17,7 @@ import { everywhere, onlyInA } from "b.foo"; // Error //// [types.js] +"use strict"; //// [testA.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.js b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.js index 97c32855f449e..1833511e82b08 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.js +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.js @@ -19,6 +19,7 @@ declare module "a.foo" { } //// [types.js] +"use strict"; //// [testA.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.js b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.js index 63645257d8e7c..67a35bc03c37d 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.js +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.js @@ -15,6 +15,7 @@ ohno.a // oh no //// [types.js] +"use strict"; //// [test.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js index 912a1132ba3e5..0e881b7e50f35 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js +++ b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js @@ -5,3 +5,4 @@ declare module "too*many*asterisks" { } //// [ambientDeclarationsPatterns_tooManyAsterisks.js] +"use strict"; diff --git a/tests/baselines/reference/ambientErrors.js b/tests/baselines/reference/ambientErrors.js index 3997413b62abc..314361829881b 100644 --- a/tests/baselines/reference/ambientErrors.js +++ b/tests/baselines/reference/ambientErrors.js @@ -62,4 +62,5 @@ declare module 'bar' { //// [ambientErrors.js] +"use strict"; ; diff --git a/tests/baselines/reference/ambientFundule.js b/tests/baselines/reference/ambientFundule.js index 6ede114d99e92..c4c6a6d5d9a60 100644 --- a/tests/baselines/reference/ambientFundule.js +++ b/tests/baselines/reference/ambientFundule.js @@ -6,3 +6,4 @@ declare namespace f { var x } declare function f(x); //// [ambientFundule.js] +"use strict"; diff --git a/tests/baselines/reference/ambientInsideNonAmbient.js b/tests/baselines/reference/ambientInsideNonAmbient.js index c6388d9939ca2..14053755d6f0f 100644 --- a/tests/baselines/reference/ambientInsideNonAmbient.js +++ b/tests/baselines/reference/ambientInsideNonAmbient.js @@ -18,6 +18,7 @@ namespace M2 { } //// [ambientInsideNonAmbient.js] +"use strict"; var M; (function (M) { })(M || (M = {})); diff --git a/tests/baselines/reference/ambientModules.js b/tests/baselines/reference/ambientModules.js index 2bf38460e61c1..500a11a5237b5 100644 --- a/tests/baselines/reference/ambientModules.js +++ b/tests/baselines/reference/ambientModules.js @@ -5,5 +5,6 @@ declare namespace Foo.Bar { export var foo; }; Foo.Bar.foo = 5; //// [ambientModules.js] +"use strict"; ; Foo.Bar.foo = 5; diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).js b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).js new file mode 100644 index 0000000000000..d56d11b02142e --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).js @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +//// [ambientWithStatements.ts] +declare namespace M { + break; + continue; + debugger; + do { } while (true); + var x; + for (x in null) { } + if (true) { } else { } + 1; + L: var y; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "nooo"; + try { + } + catch (e) { + } + finally { + } + with (x) { + } +} + +//// [ambientWithStatements.js] diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).js b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).js new file mode 100644 index 0000000000000..860f4d3012866 --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).js @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +//// [ambientWithStatements.ts] +declare namespace M { + break; + continue; + debugger; + do { } while (true); + var x; + for (x in null) { } + if (true) { } else { } + 1; + L: var y; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "nooo"; + try { + } + catch (e) { + } + finally { + } + with (x) { + } +} + +//// [ambientWithStatements.js] +"use strict"; diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.js b/tests/baselines/reference/ambiguousGenericAssertion1.js index 7c0b0e667cc0a..d4b960dd65c95 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.js +++ b/tests/baselines/reference/ambiguousGenericAssertion1.js @@ -8,6 +8,7 @@ var r3 = <(x: T) => T>f; // ambiguous, appears to the parser as a << operatio //// [ambiguousGenericAssertion1.js] +"use strict"; function f(x) { return null; } var r = (x) => x; var r2 = f; // valid diff --git a/tests/baselines/reference/ambiguousOverload.js b/tests/baselines/reference/ambiguousOverload.js index 725b7dafa9039..179f527f99985 100644 --- a/tests/baselines/reference/ambiguousOverload.js +++ b/tests/baselines/reference/ambiguousOverload.js @@ -14,6 +14,7 @@ var x2: string = foof2("s", null); var y2: number = foof2("s", null); //// [ambiguousOverload.js] +"use strict"; function foof(bar) { return bar; } ; var x = foof("s", null); diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index c844269d597ce..9dc3da0ee734c 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -11,6 +11,7 @@ var x: B; var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js index cbb8d921a64b1..2258b64a07b2a 100644 --- a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js +++ b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js @@ -17,6 +17,7 @@ var xx = o.x; //// [anyAsReturnTypeForNewOnCall.js] +"use strict"; function Point(x, y) { this.x = x; this.y = y; diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.js b/tests/baselines/reference/anyAssignabilityInInheritance.js index e297c39e595c0..4fd1eb556bc5a 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.js +++ b/tests/baselines/reference/anyAssignabilityInInheritance.js @@ -91,6 +91,7 @@ declare function foo18(x: any): any; var r3 = foo3(a); // any //// [anyAssignabilityInInheritance.js] +"use strict"; // any is not a subtype of any other types, errors expected on all the below derived classes unless otherwise noted var a; var r3 = foo2(a); // any, not a subtype of number so it skips that overload, is a subtype of itself so it picks second (if truly ambiguous it would pick first overload) diff --git a/tests/baselines/reference/anyAssignableToEveryType2.js b/tests/baselines/reference/anyAssignableToEveryType2.js index b2b39eb69861a..588df2126d84d 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.js +++ b/tests/baselines/reference/anyAssignableToEveryType2.js @@ -133,6 +133,7 @@ interface I20 { //// [anyAssignableToEveryType2.js] +"use strict"; // any is not a subtype of any other types, but is assignable, all the below should work class A { } diff --git a/tests/baselines/reference/anyIdenticalToItself.js b/tests/baselines/reference/anyIdenticalToItself.js index 7a4289adcd754..5f7462fb5d867 100644 --- a/tests/baselines/reference/anyIdenticalToItself.js +++ b/tests/baselines/reference/anyIdenticalToItself.js @@ -15,6 +15,7 @@ class C { } //// [anyIdenticalToItself.js] +"use strict"; function foo(x, y) { } class C { get X() { diff --git a/tests/baselines/reference/argumentsAsPropertyName.js b/tests/baselines/reference/argumentsAsPropertyName.js index 165050408ea2b..00384d853c06a 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.js +++ b/tests/baselines/reference/argumentsAsPropertyName.js @@ -18,6 +18,7 @@ function myFunction(myType: MyType) { } //// [argumentsAsPropertyName.js] +"use strict"; function myFunction(myType) { for (let i = 0; i < 10; i++) { use(myType.arguments[i]); diff --git a/tests/baselines/reference/argumentsAsPropertyName2.js b/tests/baselines/reference/argumentsAsPropertyName2.js index 46d94dbf3a2dd..5452e31ad277e 100644 --- a/tests/baselines/reference/argumentsAsPropertyName2.js +++ b/tests/baselines/reference/argumentsAsPropertyName2.js @@ -15,6 +15,7 @@ function foo() { //// [argumentsAsPropertyName2.js] +"use strict"; // target: es5 function foo() { for (let x = 0; x < 1; ++x) { diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).js b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).js new file mode 100644 index 0000000000000..b18f1cc7d05f8 --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).js @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +//// [argumentsBindsToFunctionScopeArgumentList.ts] +var arguments = 10; +function foo(a) { + arguments = 10; /// This shouldnt be of type number and result in error. +} + +//// [argumentsBindsToFunctionScopeArgumentList.js] +var arguments = 10; +function foo(a) { + arguments = 10; /// This shouldnt be of type number and result in error. +} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).js b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).js new file mode 100644 index 0000000000000..8cd10362943b0 --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).js @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +//// [argumentsBindsToFunctionScopeArgumentList.ts] +var arguments = 10; +function foo(a) { + arguments = 10; /// This shouldnt be of type number and result in error. +} + +//// [argumentsBindsToFunctionScopeArgumentList.js] +"use strict"; +var arguments = 10; +function foo(a) { + arguments = 10; /// This shouldnt be of type number and result in error. +} diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode1.js b/tests/baselines/reference/argumentsPropertyNameInJsMode1.js index d3d9b4dcf8d67..03375e9f31a08 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode1.js +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode1.js @@ -13,6 +13,7 @@ f2(1, 2, 3); //// [a.js] +"use strict"; const foo = { f1: (params) => { } }; diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode2.js b/tests/baselines/reference/argumentsPropertyNameInJsMode2.js index c32df3f1b4bb4..bfa2bfe582b0d 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode2.js +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode2.js @@ -9,6 +9,7 @@ f(1, 2, 3); //// [a.js] +"use strict"; function f(x) { arguments; } diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).js b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).js new file mode 100644 index 0000000000000..d2b7a2997e9e9 --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).js @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + +//// [a.js] +const a = () => { + return { + arguments: [], + }; +}; + +const b = () => { + const c = { + arguments: [], + } + return c; +}; + +const c = () => { + return { + arguments, + }; +} + +const d = () => { + const arguments = undefined; + return { + arguments, + }; +} + + +//// [a.js] +const a = () => { + return { + arguments: [], + }; +}; +const b = () => { + const c = { + arguments: [], + }; + return c; +}; +const c = () => { + return { + arguments, + }; +}; +const d = () => { + const arguments = undefined; + return { + arguments, + }; +}; diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).js b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).js new file mode 100644 index 0000000000000..76020266477fe --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).js @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + +//// [a.js] +const a = () => { + return { + arguments: [], + }; +}; + +const b = () => { + const c = { + arguments: [], + } + return c; +}; + +const c = () => { + return { + arguments, + }; +} + +const d = () => { + const arguments = undefined; + return { + arguments, + }; +} + + +//// [a.js] +"use strict"; +const a = () => { + return { + arguments: [], + }; +}; +const b = () => { + const c = { + arguments: [], + }; + return c; +}; +const c = () => { + return { + arguments, + }; +}; +const d = () => { + const arguments = undefined; + return { + arguments, + }; +}; diff --git a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js index 61e156447ea13..786e816d1ff8b 100644 --- a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js +++ b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js @@ -11,6 +11,7 @@ bar("", 0); //// [arityErrorRelatedSpanBindingPattern.js] +"use strict"; function foo(a, b, { c }) { } function bar(a, b, [c]) { } foo("", 0); diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 432c43dd6870c..9169dc4a674ab 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -62,6 +62,7 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] +"use strict"; class C1 { IM1() { return null; } C1M1() { return null; } diff --git a/tests/baselines/reference/arrayAssignmentTest4.js b/tests/baselines/reference/arrayAssignmentTest4.js index 66c701032999d..81defbd34cb08 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.js +++ b/tests/baselines/reference/arrayAssignmentTest4.js @@ -27,6 +27,7 @@ arr_any = c3; // should be an error - is //// [arrayAssignmentTest4.js] +"use strict"; class C3 { CM3M1() { return 3; } } diff --git a/tests/baselines/reference/arrayIndexWithArrayFails.js b/tests/baselines/reference/arrayIndexWithArrayFails.js index 3a29bc51b5753..2676ef11db781 100644 --- a/tests/baselines/reference/arrayIndexWithArrayFails.js +++ b/tests/baselines/reference/arrayIndexWithArrayFails.js @@ -6,4 +6,5 @@ declare const arr2: number[]; const j = arr2[arr1[0]]; // should error //// [arrayIndexWithArrayFails.js] +"use strict"; const j = arr2[arr1[0]]; // should error diff --git a/tests/baselines/reference/arrayLiteralSpread.js b/tests/baselines/reference/arrayLiteralSpread.js index 5efdb6c45d19b..aa82fc75ca637 100644 --- a/tests/baselines/reference/arrayLiteralSpread.js +++ b/tests/baselines/reference/arrayLiteralSpread.js @@ -26,6 +26,7 @@ function f2() { //// [arrayLiteralSpread.js] +"use strict"; function f0() { var a = [1, 2, 3]; var a1 = [...a]; diff --git a/tests/baselines/reference/arrayLiteralSpreadES5iterable.js b/tests/baselines/reference/arrayLiteralSpreadES5iterable.js index bf3a64e62817b..22381a7440a4c 100644 --- a/tests/baselines/reference/arrayLiteralSpreadES5iterable.js +++ b/tests/baselines/reference/arrayLiteralSpreadES5iterable.js @@ -26,6 +26,7 @@ function f2() { //// [arrayLiteralSpreadES5iterable.js] +"use strict"; function f0() { var a = [1, 2, 3]; var a1 = [...a]; diff --git a/tests/baselines/reference/arrayLiteralWidened.js b/tests/baselines/reference/arrayLiteralWidened.js index 39ee52e48df39..a8288e5e1a0f2 100644 --- a/tests/baselines/reference/arrayLiteralWidened.js +++ b/tests/baselines/reference/arrayLiteralWidened.js @@ -26,6 +26,7 @@ var d = [undefined, x]; //// [arrayLiteralWidened.js] +"use strict"; // array literals are widened upon assignment according to their element type var a = []; // any[] var a = [, ,]; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index b7f57d1aa4e72..2e200a40fde72 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,6 +39,7 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] +"use strict"; // Empty array literal with no contextual type has type Undefined[] var arr1 = [[], [1], ['']]; var arr2 = [[null], [1], ['']]; diff --git a/tests/baselines/reference/arrayLiterals2ES5.js b/tests/baselines/reference/arrayLiterals2ES5.js index ecd528dfd1a1f..1e5935dc91204 100644 --- a/tests/baselines/reference/arrayLiterals2ES5.js +++ b/tests/baselines/reference/arrayLiterals2ES5.js @@ -59,6 +59,7 @@ var d8: number[][] = [[...temp1]] var d9 = [[...temp1], ...["hello"]]; //// [arrayLiterals2ES5.js] +"use strict"; // ElementList: ( Modified ) // Elisionopt AssignmentExpression // Elisionopt SpreadElement diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index 094bc0ffbd767..1573776687837 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -28,6 +28,7 @@ var myDerivedList: DerivedList; var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] +"use strict"; class List { } class DerivedList extends List { diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 0408bc57205c8..1a4150fbb2f09 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -22,6 +22,7 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.js b/tests/baselines/reference/arrayTypeOfFunctionTypes.js index 840ea1ad405dc..e2a66c37659cc 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.js +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.js @@ -19,6 +19,7 @@ var r6 = r5(); var r6b = new r5(); // error //// [arrayTypeOfFunctionTypes.js] +"use strict"; // valid uses of arrays of function types var x; var r = x[1]; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes2.js b/tests/baselines/reference/arrayTypeOfFunctionTypes2.js index 77e60bb8c08cf..ba706cb44e5b4 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes2.js +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes2.js @@ -19,6 +19,7 @@ var r6 = new r5(); var r6b = r5(); //// [arrayTypeOfFunctionTypes2.js] +"use strict"; // valid uses of arrays of function types var x; var r = x[1]; diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).js b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).js new file mode 100644 index 0000000000000..a8114b4ebcfbd --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).js @@ -0,0 +1,178 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +//// [arrowFunctionContexts.ts] +// Arrow function used in with statement +with (window) { + var p = () => this; +} + +// Arrow function as argument to super call +class Base { + constructor(n: any) { } +} + +class Derived extends Base { + constructor() { + super(() => this); + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); + +// Arrow function as value in array literal + +var obj = (n: number) => ''; +var obj: { (n: number): string; }; // OK + +var arr = [(n: number) => '']; +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + +// Arrow function as enum value +enum E { + x = () => 4, // Error expected + y = (() => this).length // error, can't use this in enum +} + +// Arrow function as module variable initializer +namespace M { + export var a = (s) => ''; + var b = (s) => s; +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +namespace M2 { + // Arrow function used in with statement + with (window) { + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + y = (() => this).length + } + + // Arrow function as module variable initializer + namespace M { + export var a = (s) => ''; + var b = (s) => s; + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T) => [n]; +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +var generic2 = (n: T) => { return [n]; }; +var generic2: { (n: T): T[] }; + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +var asserted1: any; +var asserted2 = ((n) => { return n; }); +var asserted2: any; + + + +//// [arrowFunctionContexts.js] +// Arrow function used in with statement +with (window) { + var p = () => this; +} +// Arrow function as argument to super call +class Base { + constructor(n) { } +} +class Derived extends Base { + constructor() { + super(() => this); + } +} +// Arrow function as function argument +window.setTimeout(() => null, 100); +// Arrow function as value in array literal +var obj = (n) => ''; +var obj; // OK +var arr = [(n) => '']; +var arr; // Incorrect error here (bug 829597) +// Arrow function as enum value +var E; +(function (E) { + E[E["x"] = () => 4] = "x"; + E[E["y"] = (() => this).length] = "y"; // error, can't use this in enum +})(E || (E = {})); +// Arrow function as module variable initializer +var M; +(function (M) { + M.a = (s) => ''; + var b = (s) => s; +})(M || (M = {})); +// Repeat above for module members that are functions? (necessary to redo all of them?) +var M2; +(function (M2) { + // Arrow function used in with statement + with (window) { + var p = () => this; + } + // Arrow function as argument to super call + class Base { + constructor(n) { } + } + class Derived extends Base { + constructor() { + super(() => this); + } + } + // Arrow function as function argument + window.setTimeout(() => null, 100); + // Arrow function as value in array literal + var obj = (n) => ''; + var obj; // OK + var arr = [(n) => '']; + var arr; // Incorrect error here (bug 829597) + // Arrow function as enum value + let E; + (function (E) { + E[E["x"] = () => 4] = "x"; + E[E["y"] = (() => this).length] = "y"; + })(E || (E = {})); + // Arrow function as module variable initializer + let M; + (function (M) { + M.a = (s) => ''; + var b = (s) => s; + })(M || (M = {})); +})(M2 || (M2 = {})); +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n) => [n]; +var generic1; // Incorrect error, Bug 829597 +var generic2 = (n) => { return [n]; }; +var generic2; +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +var asserted1; +var asserted2 = ((n) => { return n; }); +var asserted2; diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).js b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).js new file mode 100644 index 0000000000000..83996fd337a5e --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).js @@ -0,0 +1,179 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +//// [arrowFunctionContexts.ts] +// Arrow function used in with statement +with (window) { + var p = () => this; +} + +// Arrow function as argument to super call +class Base { + constructor(n: any) { } +} + +class Derived extends Base { + constructor() { + super(() => this); + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); + +// Arrow function as value in array literal + +var obj = (n: number) => ''; +var obj: { (n: number): string; }; // OK + +var arr = [(n: number) => '']; +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + +// Arrow function as enum value +enum E { + x = () => 4, // Error expected + y = (() => this).length // error, can't use this in enum +} + +// Arrow function as module variable initializer +namespace M { + export var a = (s) => ''; + var b = (s) => s; +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +namespace M2 { + // Arrow function used in with statement + with (window) { + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + y = (() => this).length + } + + // Arrow function as module variable initializer + namespace M { + export var a = (s) => ''; + var b = (s) => s; + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T) => [n]; +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +var generic2 = (n: T) => { return [n]; }; +var generic2: { (n: T): T[] }; + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +var asserted1: any; +var asserted2 = ((n) => { return n; }); +var asserted2: any; + + + +//// [arrowFunctionContexts.js] +"use strict"; +// Arrow function used in with statement +with (window) { + var p = () => this; +} +// Arrow function as argument to super call +class Base { + constructor(n) { } +} +class Derived extends Base { + constructor() { + super(() => this); + } +} +// Arrow function as function argument +window.setTimeout(() => null, 100); +// Arrow function as value in array literal +var obj = (n) => ''; +var obj; // OK +var arr = [(n) => '']; +var arr; // Incorrect error here (bug 829597) +// Arrow function as enum value +var E; +(function (E) { + E[E["x"] = () => 4] = "x"; + E[E["y"] = (() => this).length] = "y"; // error, can't use this in enum +})(E || (E = {})); +// Arrow function as module variable initializer +var M; +(function (M) { + M.a = (s) => ''; + var b = (s) => s; +})(M || (M = {})); +// Repeat above for module members that are functions? (necessary to redo all of them?) +var M2; +(function (M2) { + // Arrow function used in with statement + with (window) { + var p = () => this; + } + // Arrow function as argument to super call + class Base { + constructor(n) { } + } + class Derived extends Base { + constructor() { + super(() => this); + } + } + // Arrow function as function argument + window.setTimeout(() => null, 100); + // Arrow function as value in array literal + var obj = (n) => ''; + var obj; // OK + var arr = [(n) => '']; + var arr; // Incorrect error here (bug 829597) + // Arrow function as enum value + let E; + (function (E) { + E[E["x"] = () => 4] = "x"; + E[E["y"] = (() => this).length] = "y"; + })(E || (E = {})); + // Arrow function as module variable initializer + let M; + (function (M) { + M.a = (s) => ''; + var b = (s) => s; + })(M || (M = {})); +})(M2 || (M2 = {})); +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n) => [n]; +var generic1; // Incorrect error, Bug 829597 +var generic2 = (n) => { return [n]; }; +var generic2; +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +var asserted1; +var asserted2 = ((n) => { return n; }); +var asserted2; diff --git a/tests/baselines/reference/arrowFunctionErrorSpan.js b/tests/baselines/reference/arrowFunctionErrorSpan.js index 9f7967b6acccf..64d05d1827b3f 100644 --- a/tests/baselines/reference/arrowFunctionErrorSpan.js +++ b/tests/baselines/reference/arrowFunctionErrorSpan.js @@ -57,6 +57,7 @@ f(_ => 1 + //// [arrowFunctionErrorSpan.js] +"use strict"; function f(a) { } // oneliner f(() => { }); diff --git a/tests/baselines/reference/arrowFunctionExpressions.js b/tests/baselines/reference/arrowFunctionExpressions.js index d7b5511f2746d..524fabc4b491d 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.js +++ b/tests/baselines/reference/arrowFunctionExpressions.js @@ -102,6 +102,7 @@ function tryCatchFn() { //// [arrowFunctionExpressions.js] +"use strict"; // ArrowFormalParameters => AssignmentExpression is equivalent to ArrowFormalParameters => { return AssignmentExpression; } var a = (p) => p.length; var a = (p) => { return p.length; }; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js index 77cbeeb1584bc..57254917b61cb 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js @@ -4,4 +4,5 @@ var v = a => {} //// [arrowFunctionWithObjectLiteralBody3.js] +"use strict"; var v = a => ({}); diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js index 40b2842f3c438..8ef0003322644 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js @@ -4,4 +4,5 @@ var v = a => {} //// [arrowFunctionWithObjectLiteralBody4.js] +"use strict"; var v = a => ({}); diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es2015).js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es2015).js index a53f208b4f58d..27d5fc44d5123 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es2015).js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es2015).js @@ -4,4 +4,5 @@ const x = async => async; //// [arrowFunctionWithParameterNameAsync_es2017.js] +"use strict"; const x = async => async; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).js index e767e6f6f169d..ec8759807f03b 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).js @@ -4,4 +4,5 @@ const x = async => async; //// [arrowFunctionWithParameterNameAsync_es2017.js] +"use strict"; var x = function (async) { return async; }; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es2015).js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es2015).js index facea9ac74ca7..d93a5310cf47c 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es2015).js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es2015).js @@ -4,4 +4,5 @@ const x = async => async; //// [arrowFunctionWithParameterNameAsync_es5.js] +"use strict"; const x = async => async; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).js index ceccea14ba50a..222c4b4d0be3c 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).js @@ -4,4 +4,5 @@ const x = async => async; //// [arrowFunctionWithParameterNameAsync_es5.js] +"use strict"; var x = function (async) { return async; }; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es2015).js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es2015).js index 32a1f739fbb6b..b867d2f261cb8 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es2015).js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es2015).js @@ -4,4 +4,5 @@ const x = async => async; //// [arrowFunctionWithParameterNameAsync_es6.js] +"use strict"; const x = async => async; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).js index 8a19c99f8be03..e14cba5f4d752 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).js @@ -4,4 +4,5 @@ const x = async => async; //// [arrowFunctionWithParameterNameAsync_es6.js] +"use strict"; var x = function (async) { return async; }; diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.js b/tests/baselines/reference/arrowFunctionsMissingTokens.js index a7534a4bb721f..740bec08bc635 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.js +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.js @@ -68,6 +68,7 @@ namespace okay { } //// [arrowFunctionsMissingTokens.js] +"use strict"; var missingArrowsWithCurly; (function (missingArrowsWithCurly) { var a = () => { }; diff --git a/tests/baselines/reference/asOpEmitParens.js b/tests/baselines/reference/asOpEmitParens.js index 1096a2a24762d..cd91f56547fdc 100644 --- a/tests/baselines/reference/asOpEmitParens.js +++ b/tests/baselines/reference/asOpEmitParens.js @@ -13,6 +13,7 @@ new (x() as any); //// [asOpEmitParens.js] +"use strict"; // Must emit as (x + 1) * 3 (x + 1) * 3; // Should still emit as x.y diff --git a/tests/baselines/reference/asOperatorASI.js b/tests/baselines/reference/asOperatorASI.js index 0ef77ba3cf5ce..fc78ab26aa249 100644 --- a/tests/baselines/reference/asOperatorASI.js +++ b/tests/baselines/reference/asOperatorASI.js @@ -14,6 +14,7 @@ as(Foo); // should emit //// [asOperatorASI.js] +"use strict"; class Foo { } // Example 1 diff --git a/tests/baselines/reference/asiAbstract.js b/tests/baselines/reference/asiAbstract.js index 0182fa37a9fc7..573e53628923d 100644 --- a/tests/baselines/reference/asiAbstract.js +++ b/tests/baselines/reference/asiAbstract.js @@ -18,6 +18,7 @@ class C3 { //// [asiAbstract.js] +"use strict"; abstract; class NonAbstractClass { } diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js index 6b86e53716a5d..975b5372cdd58 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js @@ -11,6 +11,7 @@ namespace container { } //// [asiPreventsParsingAsTypeAlias02.js] +"use strict"; var type; var string; var Foo; diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).js b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).js new file mode 100644 index 0000000000000..17806e03bd62b --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).js @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +//// [asiPublicPrivateProtected.ts] +public +class NonPublicClass { + public s() { + } +} + +class NonPublicClass2 { + public + private nonPublicFunction() { + } +} +private +class NonPrivateClass { + private s() { + } +} + +class NonPrivateClass2 { + private + public nonPrivateFunction() { + } +} +protected +class NonProtectedClass { + protected s() { + } +} + +class NonProtectedClass2 { + protected + public nonProtectedFunction() { + } +} + +class ClassWithThreeMembers { + public + private + protected +} + + +//// [asiPublicPrivateProtected.js] +public; +class NonPublicClass { + s() { + } +} +class NonPublicClass2 { + nonPublicFunction() { + } +} +private; +class NonPrivateClass { + s() { + } +} +class NonPrivateClass2 { + nonPrivateFunction() { + } +} +protected; +class NonProtectedClass { + s() { + } +} +class NonProtectedClass2 { + nonProtectedFunction() { + } +} +class ClassWithThreeMembers { +} diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).js b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).js new file mode 100644 index 0000000000000..4fc5504c40bcd --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).js @@ -0,0 +1,75 @@ +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +//// [asiPublicPrivateProtected.ts] +public +class NonPublicClass { + public s() { + } +} + +class NonPublicClass2 { + public + private nonPublicFunction() { + } +} +private +class NonPrivateClass { + private s() { + } +} + +class NonPrivateClass2 { + private + public nonPrivateFunction() { + } +} +protected +class NonProtectedClass { + protected s() { + } +} + +class NonProtectedClass2 { + protected + public nonProtectedFunction() { + } +} + +class ClassWithThreeMembers { + public + private + protected +} + + +//// [asiPublicPrivateProtected.js] +"use strict"; +public; +class NonPublicClass { + s() { + } +} +class NonPublicClass2 { + nonPublicFunction() { + } +} +private; +class NonPrivateClass { + s() { + } +} +class NonPrivateClass2 { + nonPrivateFunction() { + } +} +protected; +class NonProtectedClass { + s() { + } +} +class NonProtectedClass2 { + nonProtectedFunction() { + } +} +class ClassWithThreeMembers { +} diff --git a/tests/baselines/reference/assertInWrapSomeTypeParameter.js b/tests/baselines/reference/assertInWrapSomeTypeParameter.js index 81bd47164b0bc..51c552ab7b53d 100644 --- a/tests/baselines/reference/assertInWrapSomeTypeParameter.js +++ b/tests/baselines/reference/assertInWrapSomeTypeParameter.js @@ -8,6 +8,7 @@ class C> { } //// [assertInWrapSomeTypeParameter.js] +"use strict"; class C { foo(x) { return null; diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js index 4f55a6f15e912..b7f1820f0fff6 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js @@ -12,6 +12,7 @@ fn(function (a, b) { return true; }) //// [assignLambdaToNominalSubtypeOfFunction.js] +"use strict"; function fn(cb) { } fn((a, b) => true); fn(function (a, b) { return true; }); diff --git a/tests/baselines/reference/assignmentCompatForEnums.js b/tests/baselines/reference/assignmentCompatForEnums.js index 81fca0dde353a..a9e4473db4d93 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.js +++ b/tests/baselines/reference/assignmentCompatForEnums.js @@ -17,6 +17,7 @@ function foo() { //// [assignmentCompatForEnums.js] +"use strict"; var TokenType; (function (TokenType) { TokenType[TokenType["One"] = 0] = "One"; diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js index 1c9dde49802e8..7726ff7883d9e 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js @@ -19,6 +19,7 @@ Biz(new Foo()); //// [assignmentCompatInterfaceWithStringIndexSignature.js] +"use strict"; class Foo { Boz() { } } diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js index 942fe3967283e..89538fb4bd440 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js @@ -133,6 +133,7 @@ namespace GenericSignaturesValid { } //// [assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js] +"use strict"; // call signatures in derived types must have the same or fewer optional parameters as the target for assignment var ClassTypeParam; (function (ClassTypeParam) { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers.js b/tests/baselines/reference/assignmentCompatWithObjectMembers.js index 7b8babe05e507..764bd9569745d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers.js @@ -88,6 +88,7 @@ namespace ObjectTypes { } //// [assignmentCompatWithObjectMembers.js] +"use strict"; // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // no errors expected var SimpleTypes; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js index d17a38e99c3ab..83b625e20ebc7 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js @@ -45,6 +45,7 @@ a2 = t; //// [assignmentCompatWithObjectMembers2.js] +"use strict"; // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors class S { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js index 33d5a14d979e7..091d6a4b95bce 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js @@ -45,6 +45,7 @@ a2 = t; //// [assignmentCompatWithObjectMembers3.js] +"use strict"; // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors class S { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 58ecfb8be5232..18623c0252d01 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,6 +94,7 @@ namespace WithBase { } //// [assignmentCompatWithObjectMembers4.js] +"use strict"; // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M var OnlyDerived; (function (OnlyDerived) { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.js b/tests/baselines/reference/assignmentCompatWithObjectMembers5.js index 13e09cccd21fe..b7079600fb2b0 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.js @@ -17,6 +17,7 @@ c = i; // error i = c; // error //// [assignmentCompatWithObjectMembers5.js] +"use strict"; class C { } c = i; // error diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js index 20daaf82e1392..01cedd0d45146 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js @@ -112,6 +112,7 @@ namespace TargetIsPublic { } //// [assignmentCompatWithObjectMembersAccessibility.js] +"use strict"; // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M var TargetIsPublic; (function (TargetIsPublic) { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js index b6a861f9f508f..986c97828525b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js @@ -45,6 +45,7 @@ a2 = t; //// [assignmentCompatWithObjectMembersNumericNames.js] +"use strict"; // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // numeric named properties work correctly, no errors expected class S { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index e20f3c05b7f38..a52093fb2fa3c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,6 +91,7 @@ namespace SourceHasOptional { } //// [assignmentCompatWithObjectMembersOptionality.js] +"use strict"; // Derived member is not optional but base member is, should be ok class Base { } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index b826539c8322a..14f466cadad0d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -93,6 +93,7 @@ namespace SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality2.js] +"use strict"; // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N class Base { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js index 97a21b2192768..2ad3a8812036b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js @@ -88,6 +88,7 @@ namespace NumbersAndStrings { } //// [assignmentCompatWithObjectMembersStringNumericNames.js] +"use strict"; // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // string named numeric properties work correctly, errors below unless otherwise noted var JustStrings; diff --git a/tests/baselines/reference/assignmentCompatability37.js b/tests/baselines/reference/assignmentCompatability37.js index 2b639372376b4..5f1ac0f13c20a 100644 --- a/tests/baselines/reference/assignmentCompatability37.js +++ b/tests/baselines/reference/assignmentCompatability37.js @@ -12,6 +12,7 @@ namespace __test2__ { __test2__.__val__aa = __test1__.__val__obj4 //// [assignmentCompatability37.js] +"use strict"; var __test1__; (function (__test1__) { ; diff --git a/tests/baselines/reference/assignmentCompatability38.js b/tests/baselines/reference/assignmentCompatability38.js index 66c46eaeeec0f..29d958fe2cd46 100644 --- a/tests/baselines/reference/assignmentCompatability38.js +++ b/tests/baselines/reference/assignmentCompatability38.js @@ -12,6 +12,7 @@ namespace __test2__ { __test2__.__val__aa = __test1__.__val__obj4 //// [assignmentCompatability38.js] +"use strict"; var __test1__; (function (__test1__) { ; diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js index 96bae1d84ffed..a365c6c662b5a 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js @@ -33,6 +33,7 @@ fn(a => { }); //// [assignmentCompatability_checking-apply-member-off-of-function-interface.js] +"use strict"; // 3.8.4 Assignment Compatibility var x; // Should fail diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js index f4d2de50fcc33..a0c431705cfa3 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js @@ -33,6 +33,7 @@ fn(a => { }); //// [assignmentCompatability_checking-call-member-off-of-function-interface.js] +"use strict"; // 3.8.4 Assignment Compatibility var x; // Should fail diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index cc6dd6342a1f4..1f72fa9a898e4 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -73,6 +73,7 @@ foo() = value; (foo()) = value; //// [assignmentLHSIsValue.js] +"use strict"; // expected error for all the LHS of assignments var value; // this diff --git a/tests/baselines/reference/assignmentNonObjectTypeConstraints.js b/tests/baselines/reference/assignmentNonObjectTypeConstraints.js index 5edb595c6d624..cbe34c0b06cc5 100644 --- a/tests/baselines/reference/assignmentNonObjectTypeConstraints.js +++ b/tests/baselines/reference/assignmentNonObjectTypeConstraints.js @@ -22,6 +22,7 @@ bar(new B); //// [assignmentNonObjectTypeConstraints.js] +"use strict"; function foo(x) { var y = x; // Ok } diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.js b/tests/baselines/reference/assignmentToObjectAndFunction.js index 3bc4cc4bcb2f1..ca5b60e1ec3d5 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.js +++ b/tests/baselines/reference/assignmentToObjectAndFunction.js @@ -32,6 +32,7 @@ namespace bad { var badFundule: Function = bad; // error //// [assignmentToObjectAndFunction.js] +"use strict"; var errObj = { toString: 0 }; // Error, incompatible toString var goodObj = { toString(x) { diff --git a/tests/baselines/reference/assignmentToReferenceTypes.js b/tests/baselines/reference/assignmentToReferenceTypes.js index ac5b8e673d382..68529fb6cc821 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.js +++ b/tests/baselines/reference/assignmentToReferenceTypes.js @@ -26,6 +26,7 @@ function g(x) { } //// [assignmentToReferenceTypes.js] +"use strict"; // Should all be allowed M = null; class C { diff --git a/tests/baselines/reference/assignments.js b/tests/baselines/reference/assignments.js index dac0ea346af56..4bbbd488bf52e 100644 --- a/tests/baselines/reference/assignments.js +++ b/tests/baselines/reference/assignments.js @@ -34,6 +34,7 @@ interface I { } I = null; // Error //// [assignments.js] +"use strict"; // In this file: // Assign to a module // Assign to a class diff --git a/tests/baselines/reference/asyncArrowFunction2_es2017.js b/tests/baselines/reference/asyncArrowFunction2_es2017.js index ec3fe6d438078..60f0a3a4f21e1 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction2_es2017.js @@ -5,5 +5,6 @@ var f = (await) => { } //// [asyncArrowFunction2_es2017.js] +"use strict"; var f = (await) => { }; diff --git a/tests/baselines/reference/asyncArrowFunction2_es5(target=es2015).js b/tests/baselines/reference/asyncArrowFunction2_es5(target=es2015).js index b37b17ccf6cf9..345bcb80eab72 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es5(target=es2015).js +++ b/tests/baselines/reference/asyncArrowFunction2_es5(target=es2015).js @@ -5,5 +5,6 @@ var f = (await) => { } //// [asyncArrowFunction2_es5.js] +"use strict"; var f = (await) => { }; diff --git a/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).js b/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).js index 682593e04a2de..a3b057cb4b270 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).js +++ b/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).js @@ -5,5 +5,6 @@ var f = (await) => { } //// [asyncArrowFunction2_es5.js] +"use strict"; var f = function (await) { }; diff --git a/tests/baselines/reference/asyncArrowFunction2_es6.js b/tests/baselines/reference/asyncArrowFunction2_es6.js index c7e10b6f70cd4..34c355d9cd83d 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es6.js +++ b/tests/baselines/reference/asyncArrowFunction2_es6.js @@ -5,5 +5,6 @@ var f = (await) => { } //// [asyncArrowFunction2_es6.js] +"use strict"; var f = (await) => { }; diff --git a/tests/baselines/reference/asyncArrowFunction3_es2017.js b/tests/baselines/reference/asyncArrowFunction3_es2017.js index e51841e43764b..28fbddf018e12 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction3_es2017.js @@ -5,5 +5,6 @@ function f(await = await) { } //// [asyncArrowFunction3_es2017.js] +"use strict"; function f(await = await) { } diff --git a/tests/baselines/reference/asyncArrowFunction3_es5(target=es2015).js b/tests/baselines/reference/asyncArrowFunction3_es5(target=es2015).js index 68fe8338bebc0..885a7cb90e1f3 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es5(target=es2015).js +++ b/tests/baselines/reference/asyncArrowFunction3_es5(target=es2015).js @@ -5,5 +5,6 @@ function f(await = await) { } //// [asyncArrowFunction3_es5.js] +"use strict"; function f(await = await) { } diff --git a/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).js b/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).js index 9d000b0d1a880..34d9b8f61488c 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).js +++ b/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).js @@ -5,6 +5,7 @@ function f(await = await) { } //// [asyncArrowFunction3_es5.js] +"use strict"; function f(await) { if (await === void 0) { await = await; } } diff --git a/tests/baselines/reference/asyncArrowFunction3_es6.js b/tests/baselines/reference/asyncArrowFunction3_es6.js index 60aa9910e5abc..cb561e34194fd 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es6.js +++ b/tests/baselines/reference/asyncArrowFunction3_es6.js @@ -5,5 +5,6 @@ function f(await = await) { } //// [asyncArrowFunction3_es6.js] +"use strict"; function f(await = await) { } diff --git a/tests/baselines/reference/asyncArrowFunction5_es2017.js b/tests/baselines/reference/asyncArrowFunction5_es2017.js index 62da22fa6d5ce..2bdb8fbb37ae0 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction5_es2017.js @@ -5,5 +5,6 @@ var foo = async (await): Promise => { } //// [asyncArrowFunction5_es2017.js] +"use strict"; var foo = async (await) => { }; diff --git a/tests/baselines/reference/asyncArrowFunction5_es5(target=es2015).js b/tests/baselines/reference/asyncArrowFunction5_es5(target=es2015).js index 80f461b5b5ef9..ded4a059b67a6 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es5(target=es2015).js +++ b/tests/baselines/reference/asyncArrowFunction5_es5(target=es2015).js @@ -5,5 +5,6 @@ var foo = async (await): Promise => { } //// [asyncArrowFunction5_es5.js] -var foo = (await) => __awaiter(this, void 0, void 0, function* () { +"use strict"; +var foo = (await) => __awaiter(void 0, void 0, void 0, function* () { }); diff --git a/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).js b/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).js index 395a3eebbc371..9460508412135 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).js +++ b/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).js @@ -5,8 +5,8 @@ var foo = async (await): Promise => { } //// [asyncArrowFunction5_es5.js] -var _this = this; -var foo = function (await) { return __awaiter(_this, void 0, void 0, function () { +"use strict"; +var foo = function (await) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/]; }); diff --git a/tests/baselines/reference/asyncArrowFunction5_es6.js b/tests/baselines/reference/asyncArrowFunction5_es6.js index b42bc6709df62..9b6d33e70af35 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es6.js +++ b/tests/baselines/reference/asyncArrowFunction5_es6.js @@ -5,5 +5,6 @@ var foo = async (await): Promise => { } //// [asyncArrowFunction5_es6.js] -var foo = (await) => __awaiter(this, void 0, void 0, function* () { +"use strict"; +var foo = (await) => __awaiter(void 0, void 0, void 0, function* () { }); diff --git a/tests/baselines/reference/asyncArrowFunction9_es2017.js b/tests/baselines/reference/asyncArrowFunction9_es2017.js index 3f2cc6c9f69a7..2537d5ae18832 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction9_es2017.js @@ -5,6 +5,7 @@ var foo = async (a = await => await): Promise => { } //// [asyncArrowFunction9_es2017.js] +"use strict"; var foo = async(a = await => await), Promise; ; { diff --git a/tests/baselines/reference/asyncArrowFunction9_es5(target=es2015).js b/tests/baselines/reference/asyncArrowFunction9_es5(target=es2015).js index 159225679709d..b5382a2974b8b 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es5(target=es2015).js +++ b/tests/baselines/reference/asyncArrowFunction9_es5(target=es2015).js @@ -5,6 +5,7 @@ var foo = async (a = await => await): Promise => { } //// [asyncArrowFunction9_es5.js] +"use strict"; var foo = async(a = await => await), Promise; ; { diff --git a/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).js b/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).js index 8128f216ddcd6..8e6c2ebb2ad72 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).js +++ b/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).js @@ -5,6 +5,7 @@ var foo = async (a = await => await): Promise => { } //// [asyncArrowFunction9_es5.js] +"use strict"; var foo = async(a = function (await) { return await; }), Promise; ; { diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.js b/tests/baselines/reference/asyncArrowFunction9_es6.js index a9341bfb68cac..0e8b8ff9456ae 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.js +++ b/tests/baselines/reference/asyncArrowFunction9_es6.js @@ -5,6 +5,7 @@ var foo = async (a = await => await): Promise => { } //// [asyncArrowFunction9_es6.js] +"use strict"; var foo = async(a = await => await), Promise; ; { diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js index 7be1f862134a9..785ca853a0638 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js @@ -5,5 +5,6 @@ async function foo(a = await => await): Promise { } //// [asyncFunctionDeclaration10_es2017.js] +"use strict"; async function foo(a = await , await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es2015).js b/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es2015).js index 040435199ce52..866f56145be07 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es2015).js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es2015).js @@ -5,6 +5,7 @@ async function foo(a = await => await): Promise { } //// [asyncFunctionDeclaration10_es5.js] +"use strict"; function foo() { return __awaiter(this, arguments, void 0, function* (a = yield , await) { }); diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).js b/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).js index 3e4b240577f72..329d096f4277c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).js @@ -5,6 +5,7 @@ async function foo(a = await => await): Promise { } //// [asyncFunctionDeclaration10_es5.js] +"use strict"; function foo() { return __awaiter(this, arguments, void 0, function (a, await) { if (a === void 0) { a = _a.sent(); } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js index f9f438cc67c02..634f669b52333 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js @@ -5,6 +5,7 @@ async function foo(a = await => await): Promise { } //// [asyncFunctionDeclaration10_es6.js] +"use strict"; function foo() { return __awaiter(this, arguments, void 0, function* (a = yield , await) { }); diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es2015).js b/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es2015).js index 9a5737d1524b0..0a705b420d889 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es2015).js +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es2015).js @@ -27,6 +27,7 @@ async function fn19() { await thenable; } // error //// [asyncFunctionDeclaration15_es5.js] +"use strict"; function fn1() { return __awaiter(this, void 0, void 0, function* () { }); } // valid: Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).js b/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).js index c0e2ff621519a..561b5f70675d8 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).js +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).js @@ -27,6 +27,7 @@ async function fn19() { await thenable; } // error //// [asyncFunctionDeclaration15_es5.js] +"use strict"; function fn1() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/]; diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.js b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js index 91923bbd5a08b..131622339875c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js @@ -27,6 +27,7 @@ async function fn19() { await thenable; } // error //// [asyncFunctionDeclaration15_es6.js] +"use strict"; function fn1() { return __awaiter(this, void 0, void 0, function* () { }); } // valid: Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js index 13e9ccaadf235..34eeb6f9ac3c9 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js @@ -5,5 +5,6 @@ function f(await) { } //// [asyncFunctionDeclaration2_es2017.js] +"use strict"; function f(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es2015).js b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es2015).js index 66c4cbddb1038..1de6000b3fb45 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es2015).js +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es2015).js @@ -5,5 +5,6 @@ function f(await) { } //// [asyncFunctionDeclaration2_es5.js] +"use strict"; function f(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).js b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).js index 66c4cbddb1038..1de6000b3fb45 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).js +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).js @@ -5,5 +5,6 @@ function f(await) { } //// [asyncFunctionDeclaration2_es5.js] +"use strict"; function f(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es6.js b/tests/baselines/reference/asyncFunctionDeclaration2_es6.js index e9e4ad3a09d4a..3692624795a90 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es6.js @@ -5,5 +5,6 @@ function f(await) { } //// [asyncFunctionDeclaration2_es6.js] +"use strict"; function f(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js index 59752e8624c7a..e2ad06940e57a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js @@ -5,5 +5,6 @@ function f(await = await) { } //// [asyncFunctionDeclaration3_es2017.js] +"use strict"; function f(await = await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es2015).js b/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es2015).js index 7c74aa4b821af..405f70811fc13 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es2015).js +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es2015).js @@ -5,5 +5,6 @@ function f(await = await) { } //// [asyncFunctionDeclaration3_es5.js] +"use strict"; function f(await = await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).js b/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).js index db9cc78f082b5..00c7fe9f4bf64 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).js +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).js @@ -5,6 +5,7 @@ function f(await = await) { } //// [asyncFunctionDeclaration3_es5.js] +"use strict"; function f(await) { if (await === void 0) { await = await; } } diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es6.js b/tests/baselines/reference/asyncFunctionDeclaration3_es6.js index 3771c751c3a54..4c0f502ab989c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es6.js @@ -5,5 +5,6 @@ function f(await = await) { } //// [asyncFunctionDeclaration3_es6.js] +"use strict"; function f(await = await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js index 4d0a1a61ddd7e..0afbfca77a4fb 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js @@ -5,5 +5,6 @@ async function foo(await): Promise { } //// [asyncFunctionDeclaration5_es2017.js] +"use strict"; async function foo(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es2015).js b/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es2015).js index 8c1c92f4e750b..e623f8b843d56 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es2015).js +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es2015).js @@ -5,6 +5,7 @@ async function foo(await): Promise { } //// [asyncFunctionDeclaration5_es5.js] +"use strict"; function foo(await) { return __awaiter(this, void 0, void 0, function* () { }); diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).js b/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).js index 30a48dd8795af..f28f5173b77a4 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).js +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).js @@ -5,6 +5,7 @@ async function foo(await): Promise { } //// [asyncFunctionDeclaration5_es5.js] +"use strict"; function foo(await) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es6.js b/tests/baselines/reference/asyncFunctionDeclaration5_es6.js index e103205e1f95f..e3cd6d11df470 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es6.js @@ -5,6 +5,7 @@ async function foo(await): Promise { } //// [asyncFunctionDeclaration5_es6.js] +"use strict"; function foo(await) { return __awaiter(this, void 0, void 0, function* () { }); diff --git a/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2015).js b/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2015).js index 8b3f87a20b063..ea4f5efe96569 100644 --- a/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2015).js +++ b/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2015).js @@ -28,6 +28,7 @@ function f() { } //// [asyncFunctionDeclarationParameterEvaluation.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/40410 function f1(x_1) { return __awaiter(this, arguments, void 0, function* (x, y = z) { }); diff --git a/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2017).js b/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2017).js index ec09c5f4d8883..9bec8a05f5b65 100644 --- a/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2017).js +++ b/tests/baselines/reference/asyncFunctionDeclarationParameterEvaluation(target=es2017).js @@ -28,6 +28,7 @@ function f() { } //// [asyncFunctionDeclarationParameterEvaluation.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/40410 async function f1(x, y = z) { } async function f2({ [z]: x }) { } diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es2015).js b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es2015).js index 6b2669d1b0d49..882938caf47f7 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es2015).js +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es2015).js @@ -6,6 +6,7 @@ async ({ foo, bar, ...rest }) => bar(await foo); //// [asyncFunctionTempVariableScoping.js] +"use strict"; // https://github.com/Microsoft/TypeScript/issues/19187 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -27,7 +28,7 @@ var __rest = (this && this.__rest) || function (s, e) { } return t; }; -(_a) => __awaiter(this, void 0, void 0, function* () { +(_a) => __awaiter(void 0, void 0, void 0, function* () { var { foo, bar } = _a, rest = __rest(_a, ["foo", "bar"]); return bar(yield foo); }); diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).js b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).js index a5a52a5c518b7..89bd1d4167b6f 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).js +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).js @@ -6,6 +6,7 @@ async ({ foo, bar, ...rest }) => bar(await foo); //// [asyncFunctionTempVariableScoping.js] +"use strict"; // https://github.com/Microsoft/TypeScript/issues/19187 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -54,8 +55,7 @@ var __rest = (this && this.__rest) || function (s, e) { } return t; }; -var _this = this; -(function (_a) { return __awaiter(_this, void 0, void 0, function () { +(function (_a) { return __awaiter(void 0, void 0, void 0, function () { var _b; var foo = _a.foo, bar = _a.bar, rest = __rest(_a, ["foo", "bar"]); return __generator(this, function (_c) { diff --git a/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2015).js b/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2015).js index 2cbad17364e65..b01ac6b8e69a3 100644 --- a/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2015).js +++ b/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2015).js @@ -12,6 +12,7 @@ class Sub extends Super { //// [asyncGeneratorParameterEvaluation.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/40410 function f1(x_1) { return __asyncGenerator(this, arguments, function* f1_1(x, y = z) { }); } function f2(_a) { return __asyncGenerator(this, arguments, function* f2_1({ [z]: x }) { }); } diff --git a/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2017).js b/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2017).js index 2cbad17364e65..b01ac6b8e69a3 100644 --- a/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2017).js +++ b/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2017).js @@ -12,6 +12,7 @@ class Sub extends Super { //// [asyncGeneratorParameterEvaluation.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/40410 function f1(x_1) { return __asyncGenerator(this, arguments, function* f1_1(x, y = z) { }); } function f2(_a) { return __asyncGenerator(this, arguments, function* f2_1({ [z]: x }) { }); } diff --git a/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2018).js b/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2018).js index 1e72faf417bae..936d77da9b1a0 100644 --- a/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2018).js +++ b/tests/baselines/reference/asyncGeneratorParameterEvaluation(target=es2018).js @@ -12,6 +12,7 @@ class Sub extends Super { //// [asyncGeneratorParameterEvaluation.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/40410 async function* f1(x, y = z) { } async function* f2({ [z]: x }) { } diff --git a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js index bdf1f507d4cd6..6f461525e3377 100644 --- a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js +++ b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js @@ -62,6 +62,7 @@ class B extends A { //// [asyncMethodWithSuperConflict_es6.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/asyncSetter_es5(target=es2015).js b/tests/baselines/reference/asyncSetter_es5(target=es2015).js index 33922c0ac729e..09de5855ac0fb 100644 --- a/tests/baselines/reference/asyncSetter_es5(target=es2015).js +++ b/tests/baselines/reference/asyncSetter_es5(target=es2015).js @@ -7,6 +7,7 @@ class C { } //// [asyncSetter_es5.js] +"use strict"; class C { set foo(value) { } diff --git a/tests/baselines/reference/asyncSetter_es5(target=es5).js b/tests/baselines/reference/asyncSetter_es5(target=es5).js index 78ab925022a50..c5357e34ee04f 100644 --- a/tests/baselines/reference/asyncSetter_es5(target=es5).js +++ b/tests/baselines/reference/asyncSetter_es5(target=es5).js @@ -7,6 +7,7 @@ class C { } //// [asyncSetter_es5.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/asyncSetter_es6.js b/tests/baselines/reference/asyncSetter_es6.js index be7393244047e..72faf0879645b 100644 --- a/tests/baselines/reference/asyncSetter_es6.js +++ b/tests/baselines/reference/asyncSetter_es6.js @@ -7,6 +7,7 @@ class C { } //// [asyncSetter_es6.js] +"use strict"; class C { set foo(value) { } diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js index 42e28b3ced2c9..90aa398908257 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js @@ -6,5 +6,6 @@ const x = async i => await someOtherFunction(i) const x1 = async (i) => await someOtherFunction(i); //// [asyncUnParenthesizedArrowFunction_es2017.js] +"use strict"; const x = async (i) => await someOtherFunction(i); const x1 = async (i) => await someOtherFunction(i); diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es2015).js b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es2015).js index 391660eab9804..1b2469d1b9f80 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es2015).js +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es2015).js @@ -6,5 +6,6 @@ const x = async i => await someOtherFunction(i) const x1 = async (i) => await someOtherFunction(i); //// [asyncUnParenthesizedArrowFunction_es5.js] -const x = (i) => __awaiter(this, void 0, void 0, function* () { return yield someOtherFunction(i); }); -const x1 = (i) => __awaiter(this, void 0, void 0, function* () { return yield someOtherFunction(i); }); +"use strict"; +const x = (i) => __awaiter(void 0, void 0, void 0, function* () { return yield someOtherFunction(i); }); +const x1 = (i) => __awaiter(void 0, void 0, void 0, function* () { return yield someOtherFunction(i); }); diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).js b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).js index c614bd2aa4889..554801da30de7 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).js +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).js @@ -6,14 +6,14 @@ const x = async i => await someOtherFunction(i) const x1 = async (i) => await someOtherFunction(i); //// [asyncUnParenthesizedArrowFunction_es5.js] -var _this = this; -var x = function (i) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { +"use strict"; +var x = function (i) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, someOtherFunction(i)]; case 1: return [2 /*return*/, _a.sent()]; } }); }); }; -var x1 = function (i) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { +var x1 = function (i) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, someOtherFunction(i)]; case 1: return [2 /*return*/, _a.sent()]; diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js index 676472b0adc74..798f01bac1781 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js @@ -6,5 +6,6 @@ const x = async i => await someOtherFunction(i) const x1 = async (i) => await someOtherFunction(i); //// [asyncUnParenthesizedArrowFunction_es6.js] -const x = (i) => __awaiter(this, void 0, void 0, function* () { return yield someOtherFunction(i); }); -const x1 = (i) => __awaiter(this, void 0, void 0, function* () { return yield someOtherFunction(i); }); +"use strict"; +const x = (i) => __awaiter(void 0, void 0, void 0, function* () { return yield someOtherFunction(i); }); +const x1 = (i) => __awaiter(void 0, void 0, void 0, function* () { return yield someOtherFunction(i); }); diff --git a/tests/baselines/reference/asyncWithVarShadowing_es6.js b/tests/baselines/reference/asyncWithVarShadowing_es6.js index b9ba6480b99bf..2c230d0880efa 100644 --- a/tests/baselines/reference/asyncWithVarShadowing_es6.js +++ b/tests/baselines/reference/asyncWithVarShadowing_es6.js @@ -225,6 +225,7 @@ async function fn40(x) { //// [asyncWithVarShadowing_es6.js] +"use strict"; function fn1(x) { return __awaiter(this, void 0, void 0, function* () { var x; diff --git a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js index b9db7b5030505..aa1c7a2ad8b37 100644 --- a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js +++ b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js @@ -9,3 +9,4 @@ declare class m { } //// [augmentedClassWithPrototypePropertyOnModule.js] +"use strict"; diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js index ff2f989ff79cf..c0f4f52887e37 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js @@ -24,6 +24,7 @@ var v2: { } = f; // Should be allowed //// [augmentedTypeAssignmentCompatIndexSignature.js] +"use strict"; var o = {}; var f = () => { }; var v1 = o; // Should be allowed diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js index 144065f73e53a..61090ee1c7cce 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js @@ -16,5 +16,6 @@ var a = {}[0]; // Should be Foo var b = (() => { })[0]; // Should be Bar //// [augmentedTypeBracketAccessIndexSignature.js] +"use strict"; var a = {}[0]; // Should be Foo var b = (() => { })[0]; // Should be Bar diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js index 77f4a07a7ae4d..b6f538f97d554 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js @@ -16,6 +16,7 @@ var r3 = f['functionData']; // Should be string var r4 = f['data']; // Should be number //// [augmentedTypeBracketNamedPropertyAccess.js] +"use strict"; var o = {}; var f = function () { }; var r1 = o['data']; // Should be number diff --git a/tests/baselines/reference/autoAccessor11.js b/tests/baselines/reference/autoAccessor11.js index 30097d652c87e..8165331830af1 100644 --- a/tests/baselines/reference/autoAccessor11.js +++ b/tests/baselines/reference/autoAccessor11.js @@ -18,6 +18,7 @@ class C { //// [autoAccessor11.js] +"use strict"; class C { accessor; a; diff --git a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js index 584e598d15964..b26466d80a91b 100644 --- a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js +++ b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js @@ -7,5 +7,6 @@ class C { } //// [autoAsiForStaticsInClassDeclaration.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/avoid.js b/tests/baselines/reference/avoid.js index e6ec91c9374d3..38caba957adc7 100644 --- a/tests/baselines/reference/avoid.js +++ b/tests/baselines/reference/avoid.js @@ -22,6 +22,7 @@ var N=new f(); // ok with void fn //// [avoid.js] +"use strict"; function f() { var x = 1; } diff --git a/tests/baselines/reference/awaitAndYield.js b/tests/baselines/reference/awaitAndYield.js index 09606a3e8aba5..1ce395f64c2f3 100644 --- a/tests/baselines/reference/awaitAndYield.js +++ b/tests/baselines/reference/awaitAndYield.js @@ -9,6 +9,7 @@ async function* test(x: Promise) { } //// [awaitAndYield.js] +"use strict"; async function* test(x) { let E; (function (E) { diff --git a/tests/baselines/reference/awaitAndYieldInProperty.js b/tests/baselines/reference/awaitAndYieldInProperty.js index f310dc83331f8..7bd1063cf9dbc 100644 --- a/tests/baselines/reference/awaitAndYieldInProperty.js +++ b/tests/baselines/reference/awaitAndYieldInProperty.js @@ -20,6 +20,7 @@ async function* test(x: Promise) { } //// [awaitAndYieldInProperty.js] +"use strict"; async function* test(x) { var _a, _b, _c, _d, _e, _f, _g, _h, _j; class C { diff --git a/tests/baselines/reference/awaitUsingDeclarations.12.js b/tests/baselines/reference/awaitUsingDeclarations.12.js index 32de989383c3c..7b30c19e5e2bd 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.12.js +++ b/tests/baselines/reference/awaitUsingDeclarations.12.js @@ -6,6 +6,7 @@ async function f() { } //// [awaitUsingDeclarations.12.js] +"use strict"; async function f() { await using x = {}; } diff --git a/tests/baselines/reference/awaitUsingDeclarations.13.js b/tests/baselines/reference/awaitUsingDeclarations.13.js index f8a1d89e9f2ee..720f20fc27e10 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.13.js +++ b/tests/baselines/reference/awaitUsingDeclarations.13.js @@ -8,6 +8,7 @@ function f() { } //// [awaitUsingDeclarations.13.js] +"use strict"; await using x = null; function f() { await using x = null; diff --git a/tests/baselines/reference/awaitUsingDeclarations.14.js b/tests/baselines/reference/awaitUsingDeclarations.14.js index 223c913e74869..59f37e14172b7 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.14.js +++ b/tests/baselines/reference/awaitUsingDeclarations.14.js @@ -12,6 +12,7 @@ class C { //// [awaitUsingDeclarations.14.js] +"use strict"; class C { static { await using x = null; diff --git a/tests/baselines/reference/awaitUsingDeclarations.15.js b/tests/baselines/reference/awaitUsingDeclarations.15.js index af20512995cc6..b11fad9e5b2b9 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.15.js +++ b/tests/baselines/reference/awaitUsingDeclarations.15.js @@ -6,6 +6,7 @@ async function f() { } //// [awaitUsingDeclarations.15.js] +"use strict"; async function f() { await using _ = { async [Symbol.asyncDispose]() { } }; } diff --git a/tests/baselines/reference/awaitUsingDeclarations.16.js b/tests/baselines/reference/awaitUsingDeclarations.16.js index 4f9c01e8e2895..a84941f0338d7 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.16.js +++ b/tests/baselines/reference/awaitUsingDeclarations.16.js @@ -12,3 +12,4 @@ declare module 'M' { //// [awaitUsingDeclarations.16.js] +"use strict"; diff --git a/tests/baselines/reference/awaitUsingDeclarations.7.js b/tests/baselines/reference/awaitUsingDeclarations.7.js index c409558f39f9e..e27a9c7b090a3 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.7.js +++ b/tests/baselines/reference/awaitUsingDeclarations.7.js @@ -8,6 +8,7 @@ } //// [awaitUsingDeclarations.7.js] +"use strict"; { await using a = null, { b } = null, c = null; } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2015).js index f1c9be674ccf5..ca7169b2821f2 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2015).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2015).js @@ -10,6 +10,7 @@ async function main() { } //// [awaitUsingDeclarationsInFor.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2017).js index b430e2684b316..ca5d9c15102f7 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2017).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2017).js @@ -10,6 +10,7 @@ async function main() { } //// [awaitUsingDeclarationsInFor.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2022).js index b430e2684b316..ca5d9c15102f7 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2022).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2022).js @@ -10,6 +10,7 @@ async function main() { } //// [awaitUsingDeclarationsInFor.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js index d8226409a5dac..dc7e5ad84cc20 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js @@ -10,6 +10,7 @@ async function main() { } //// [awaitUsingDeclarationsInFor.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=esnext).js index d7e96493ed8a3..53723ed304570 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=esnext).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=esnext).js @@ -10,6 +10,7 @@ async function main() { } //// [awaitUsingDeclarationsInFor.js] +"use strict"; async function main() { for (await using d1 = { [Symbol.dispose]() { } }, d2 = { async [Symbol.asyncDispose]() { } }, d3 = null, d4 = undefined;;) { } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2015).js index aa6dd826bd543..cf078e423db72 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2015).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2015).js @@ -7,6 +7,7 @@ async function main() { } //// [awaitUsingDeclarationsInForAwaitOf.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2017).js index 18c95ea8e4fca..a1fbca94a7033 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2017).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2017).js @@ -7,6 +7,7 @@ async function main() { } //// [awaitUsingDeclarationsInForAwaitOf.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2022).js index ac74f897e702a..960ea670ef0bd 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2022).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2022).js @@ -7,6 +7,7 @@ async function main() { } //// [awaitUsingDeclarationsInForAwaitOf.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js index 4deda344151fc..ae21ea63dce7d 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js @@ -7,6 +7,7 @@ async function main() { } //// [awaitUsingDeclarationsInForAwaitOf.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=esnext).js index 454e995313d07..034537fc8dbfa 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=esnext).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=esnext).js @@ -7,6 +7,7 @@ async function main() { } //// [awaitUsingDeclarationsInForAwaitOf.js] +"use strict"; async function main() { for await (await using d1 of [{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]) { } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.2.js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.2.js index 2c1883eb8b22a..b664bf2bd2719 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.2.js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.2.js @@ -9,6 +9,7 @@ async function test() { //// [awaitUsingDeclarationsInForAwaitOf.2.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/55555 async function test() { for await (await using of of of) { } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForIn.js b/tests/baselines/reference/awaitUsingDeclarationsInForIn.js index 60b8eecfdcdac..a896801194c4d 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForIn.js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForIn.js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForIn.js] +"use strict"; async function main() { for (await using x in {}) { } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2015).js index 9ea879d8b742e..ba2af9ca2aed8 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2015).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2015).js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForOf.1.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2017).js index 4d81c8b1f5f5f..763fd7cb7dd12 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2017).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2017).js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForOf.1.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2022).js index 4d81c8b1f5f5f..763fd7cb7dd12 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2022).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2022).js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForOf.1.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js index b48951bbe6d5e..de4af47d79d03 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForOf.1.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=esnext).js index 28c6d451bf2ae..c732454b4bd2c 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=esnext).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=esnext).js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForOf.1.js] +"use strict"; async function main() { for (await using d1 of [{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]) { } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js index be904e59dc1f7..611e025a4d951 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForOf.2.js] +"use strict"; async function main() { for (await using of of []) { } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.js index 0b25f1b2cb39e..b052e6c915b93 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.js @@ -8,6 +8,7 @@ async function main() { //// [awaitUsingDeclarationsInForOf.3.js] +"use strict"; async function main() { for (await using {} of []) { } diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.4.js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.4.js index 5541669060c52..5344057daa0e5 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.4.js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.4.js @@ -9,6 +9,7 @@ //// [awaitUsingDeclarationsInForOf.4.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/55555 { for (await using of of of) { } diff --git a/tests/baselines/reference/awaitedTypeCrash.js b/tests/baselines/reference/awaitedTypeCrash.js index 5f662c946231a..987bdb080057b 100644 --- a/tests/baselines/reference/awaitedTypeCrash.js +++ b/tests/baselines/reference/awaitedTypeCrash.js @@ -5,5 +5,6 @@ async function* f>(): AsyncGenerator { } //// [awaitedTypeCrash.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/51984 async function* f() { } diff --git a/tests/baselines/reference/awaitedTypeJQuery.js b/tests/baselines/reference/awaitedTypeJQuery.js index fa1b0ac2e6268..17cd32a1692b8 100644 --- a/tests/baselines/reference/awaitedTypeJQuery.js +++ b/tests/baselines/reference/awaitedTypeJQuery.js @@ -128,4 +128,5 @@ interface Promise3>; // string //// [awaitedTypeJQuery.js] +"use strict"; /// diff --git a/tests/baselines/reference/badArraySyntax.js b/tests/baselines/reference/badArraySyntax.js index ccc5b6cca0660..70fb0271fba3a 100644 --- a/tests/baselines/reference/badArraySyntax.js +++ b/tests/baselines/reference/badArraySyntax.js @@ -14,6 +14,7 @@ var a6: Z[][] = new Z [ ] [ ]; //// [badArraySyntax.js] +"use strict"; class Z { constructor() { this.x = ""; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index d3719591b70df..392f0e60eb327 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -23,6 +23,7 @@ new C().y; //// [bases.js] +"use strict"; class B { constructor() { this.y; diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js index 4ce6071619817..3eb18c5763db7 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js @@ -23,6 +23,7 @@ var conditional: Contextual = null ? e : e; // Ellement var contextualOr: Contextual = e || e; // Ellement //// [bestCommonTypeWithContextualTyping.js] +"use strict"; // All of these should pass. Neither type is a supertype of the other, but the RHS should // always use Ellement in these examples (not Contextual). Because Ellement is assignable // to Contextual, no errors. diff --git a/tests/baselines/reference/bigintIndex.js b/tests/baselines/reference/bigintIndex.js index 0ee392380df41..0024d0456dda4 100644 --- a/tests/baselines/reference/bigintIndex.js +++ b/tests/baselines/reference/bigintIndex.js @@ -27,6 +27,7 @@ typedArray[2] = 0xCC; //// [a.js] +"use strict"; const arr = [1, 2, 3]; let num = arr[1]; num = arr["1"]; diff --git a/tests/baselines/reference/bigintWithLib.js b/tests/baselines/reference/bigintWithLib.js index 18d7e410ee900..8141e335c605e 100644 --- a/tests/baselines/reference/bigintWithLib.js +++ b/tests/baselines/reference/bigintWithLib.js @@ -64,6 +64,7 @@ new Intl.NumberFormat("fr").format(bigintVal); //// [bigintWithLib.js] +"use strict"; // Test BigInt functions let bigintVal = BigInt(123); bigintVal = BigInt("456"); diff --git a/tests/baselines/reference/binopAssignmentShouldHaveType.js b/tests/baselines/reference/binopAssignmentShouldHaveType.js index 9d7b76f32b667..bda7df733d89e 100644 --- a/tests/baselines/reference/binopAssignmentShouldHaveType.js +++ b/tests/baselines/reference/binopAssignmentShouldHaveType.js @@ -23,6 +23,7 @@ namespace Test { //// [binopAssignmentShouldHaveType.js] "use strict"; +"use strict"; var Test; (function (Test) { class Bug { diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js index 0025e9e20f321..c70c784de412c 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js @@ -65,6 +65,7 @@ var ResultIsNumber20 = ~~~(ANY + ANY1); ~~obj1.x; //// [bitwiseNotOperatorWithAnyOtherType.js] +"use strict"; // ~ operator on any type function foo() { var a; diff --git a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js index 4661f68d1892b..c939148690745 100644 --- a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js +++ b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js @@ -10,6 +10,7 @@ }; //// [blockScopedBindingCaptureThisInFunction.js] +"use strict"; // https://github.com/Microsoft/TypeScript/issues/11038 () => function () { for (let someKey in {}) { diff --git a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js index 12cffa7411c9c..adc235a842923 100644 --- a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js +++ b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js @@ -11,6 +11,7 @@ for (let {[a]: a} = { }; false; ) continue; let {[b]: b} = { }; //// [blockScopedBindingUsedBeforeDef.js] +"use strict"; // 1: for (let { [a]: a } of [{}]) continue; diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es2015).js b/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es2015).js index f1ff6ca37c8f2..d000e790b0597 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es2015).js +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es2015).js @@ -20,6 +20,7 @@ declare namespace A { //// [out.js] +"use strict"; var C; (function (C) { class Name { diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).js b/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).js index 0933aa90fb61a..0a7c16cf68b5a 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).js +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).js @@ -20,6 +20,7 @@ declare namespace A { //// [out.js] +"use strict"; var C; (function (C) { var Name = /** @class */ (function () { diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es2015).js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es2015).js index c1cfdc27774af..88f82a87da942 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es2015).js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es2015).js @@ -162,6 +162,7 @@ function foo18() { //// [blockScopedVariablesUseBeforeDef.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).js index eed9549b53df8..6340aa1eea313 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).js @@ -162,6 +162,7 @@ function foo18() { //// [blockScopedVariablesUseBeforeDef.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/callChain.2.js b/tests/baselines/reference/callChain.2.js index 1e5985f585401..01a30b47116e7 100644 --- a/tests/baselines/reference/callChain.2.js +++ b/tests/baselines/reference/callChain.2.js @@ -12,6 +12,7 @@ o3.b?.().c; //// [callChain.2.js] +"use strict"; var _a; o1 === null || o1 === void 0 ? void 0 : o1(); o2 === null || o2 === void 0 ? void 0 : o2.b(); diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js index 9940f580d956c..60bf2be74b57c 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js @@ -46,6 +46,7 @@ declare var a2: any; var r8 = a2(); //// [callNonGenericFunctionWithTypeArguments.js] +"use strict"; // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal function f(x) { return null; } diff --git a/tests/baselines/reference/callOverloads1.js b/tests/baselines/reference/callOverloads1.js index 695f5d5d7ab6b..7082bab364933 100644 --- a/tests/baselines/reference/callOverloads1.js +++ b/tests/baselines/reference/callOverloads1.js @@ -20,6 +20,7 @@ f1.bar1(); Foo(); //// [callOverloads1.js] +"use strict"; class Foo { bar1() { } constructor(x) { diff --git a/tests/baselines/reference/callOverloads2.js b/tests/baselines/reference/callOverloads2.js index 0f51e6ccf4d35..e18ff86c89cff 100644 --- a/tests/baselines/reference/callOverloads2.js +++ b/tests/baselines/reference/callOverloads2.js @@ -26,6 +26,7 @@ Foo(); //// [callOverloads2.js] +"use strict"; class Foo { bar1() { } constructor(x) { diff --git a/tests/baselines/reference/callOverloads5.js b/tests/baselines/reference/callOverloads5.js index f424aa5461677..04d9010e2b50a 100644 --- a/tests/baselines/reference/callOverloads5.js +++ b/tests/baselines/reference/callOverloads5.js @@ -22,6 +22,7 @@ Foo("s"); //// [callOverloads5.js] +"use strict"; class Foo { bar1(a) { } constructor(x) { diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js index e8b84d9870327..d345a6ab4a39a 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js @@ -58,6 +58,7 @@ b.b(1); //// [callSignatureWithOptionalParameterAndInitializer.js] +"use strict"; // Optional parameters cannot also have initializer expressions, these are all errors function foo(x = 1) { } var f = function foo(x = 1) { }; diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js index 4cd7b156b0d30..0f543ddf56435 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js @@ -22,6 +22,7 @@ var r4 = a(); var r5 = a.f(); //// [callSignatureWithoutAnnotationsOrBody.js] +"use strict"; // Call signatures without a return type annotation and function body return 'any' function foo(x) { } var r = foo(1); // void since there's a body diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js index 9624e33d1bb22..6c97fa886a5e9 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js @@ -123,6 +123,7 @@ function foo15() { var r15 = foo15(); //// [callSignatureWithoutReturnTypeAnnotationInference.js] +"use strict"; // Call signatures without a return type should infer one from the function body (if present) // Simple types function foo(x) { diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js index 53ae65599d92b..706d9b53c867a 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js @@ -31,5 +31,6 @@ var a2: { } //// [callSignaturesThatDifferOnlyByReturnType.js] +"use strict"; var a; var a2; diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js index 13da70445befb..f14de4d39ab89 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js @@ -17,6 +17,7 @@ var r2 = x.foo(''); // error //// [callSignaturesThatDifferOnlyByReturnType2.js] +"use strict"; // Normally it is an error to have multiple overloads which differ only by return type in a single type declaration. // Here the multiple overloads come from multiple bases. // BUG 822524 diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js index d9ba902f71e74..3e49f46ddbb34 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js @@ -21,5 +21,6 @@ interface I2 { } //// [callSignaturesThatDifferOnlyByReturnType3.js] +"use strict"; // Normally it is an error to have multiple overloads with identical signatures in a single type declaration. // Here the multiple overloads come from multiple merged declarations. diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js index 6fbb336bb8b6f..39c5ebeca9331 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js @@ -41,6 +41,7 @@ var b = { } //// [callSignaturesWithAccessibilityModifiersOnParameters.js] +"use strict"; // Call signature parameters do not allow accessibility modifiers function foo(x, y) { } var f = function foo(x, y) { }; diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js index 62498a8500fe6..e12292325de3a 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js @@ -41,6 +41,7 @@ var b = { } //// [callSignaturesWithDuplicateParameters.js] +"use strict"; // Duplicate parameter names are always an error function foo(x, x) { } var f = function foo(x, x) { }; diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.js b/tests/baselines/reference/callSignaturesWithOptionalParameters.js index 1ace9470e703c..695320ec00e16 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.js @@ -58,6 +58,7 @@ b.b(1); //// [callSignaturesWithOptionalParameters.js] +"use strict"; // Optional parameters should be valid in all the below casts function foo(x) { } var f = function foo(x) { }; diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js index 5849798188b21..5468d4830e0f9 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js @@ -62,6 +62,7 @@ a.foo(1, 2); a.foo(1, 2, 3); //// [callSignaturesWithOptionalParameters2.js] +"use strict"; // Optional parameters should be valid in all the below casts function foo(x) { } foo(1); diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.js b/tests/baselines/reference/callSignaturesWithParameterInitializers.js index fe85cd11cd4d0..a9010fbf34647 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.js @@ -60,6 +60,7 @@ b.b(1); //// [callSignaturesWithParameterInitializers.js] +"use strict"; // Optional parameters allow initializers only in implementation signatures function foo(x = 1) { } var f = function foo(x = 1) { }; diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js index 278c39d54c53c..026653fb0a8e2 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js @@ -28,6 +28,7 @@ b.foo(); b.foo(1); //// [callSignaturesWithParameterInitializers2.js] +"use strict"; // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors function foo(x = 1) { } diff --git a/tests/baselines/reference/callWithSpreadES6.js b/tests/baselines/reference/callWithSpreadES6.js index f322034c5fa79..8fbe69feddda7 100644 --- a/tests/baselines/reference/callWithSpreadES6.js +++ b/tests/baselines/reference/callWithSpreadES6.js @@ -53,6 +53,7 @@ class D extends C { //// [callWithSpreadES6.js] +"use strict"; function foo(x, y, ...z) { } var a; diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.js b/tests/baselines/reference/callbackArgsDifferByOptionality.js index a9baa81b477a8..296c8a11dd15b 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.js +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.js @@ -8,6 +8,7 @@ function x3(callback: (x: any) => number) { } //// [callbackArgsDifferByOptionality.js] +"use strict"; function x3(callback) { cb(); } diff --git a/tests/baselines/reference/canFollowGetSetKeyword.js b/tests/baselines/reference/canFollowGetSetKeyword.js index c43276eba0d59..27a9006555cfb 100644 --- a/tests/baselines/reference/canFollowGetSetKeyword.js +++ b/tests/baselines/reference/canFollowGetSetKeyword.js @@ -19,6 +19,7 @@ const d = { }; //// [canFollowGetSetKeyword.js] +"use strict"; class A { *x() { } } diff --git a/tests/baselines/reference/capturedLetConstInLoop1.js b/tests/baselines/reference/capturedLetConstInLoop1.js index 4f0fc409ef77e..76028113b4ab7 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.js +++ b/tests/baselines/reference/capturedLetConstInLoop1.js @@ -141,6 +141,7 @@ for (let ix in iobj) { } //// [capturedLetConstInLoop1.js] +"use strict"; //==== let for (let x in {}) { (function () { return x; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop10.js b/tests/baselines/reference/capturedLetConstInLoop10.js index e5c79901db394..3b706c1bf5251 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10.js +++ b/tests/baselines/reference/capturedLetConstInLoop10.js @@ -48,6 +48,7 @@ class B { } //// [capturedLetConstInLoop10.js] +"use strict"; class A { foo() { for (let x of [0]) { diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.js b/tests/baselines/reference/capturedLetConstInLoop10_ES6.js index aa1935f3f31fd..fe3f4b858696d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.js @@ -48,6 +48,7 @@ class B { } //// [capturedLetConstInLoop10_ES6.js] +"use strict"; class A { foo() { for (let x of [0]) { diff --git a/tests/baselines/reference/capturedLetConstInLoop11.js b/tests/baselines/reference/capturedLetConstInLoop11.js index ec0adca7b137d..520dee8ec07a1 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11.js +++ b/tests/baselines/reference/capturedLetConstInLoop11.js @@ -16,6 +16,7 @@ function foo() { } //// [capturedLetConstInLoop11.js] +"use strict"; for (;;) { let x = 1; () => x; diff --git a/tests/baselines/reference/capturedLetConstInLoop11_ES6.js b/tests/baselines/reference/capturedLetConstInLoop11_ES6.js index 22beaa2b8ccc1..cc2002bd384a7 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop11_ES6.js @@ -16,6 +16,7 @@ function foo() { } //// [capturedLetConstInLoop11_ES6.js] +"use strict"; for (;;) { let x = 1; () => x; diff --git a/tests/baselines/reference/capturedLetConstInLoop12.js b/tests/baselines/reference/capturedLetConstInLoop12.js index 92d4504710370..832754ce386da 100644 --- a/tests/baselines/reference/capturedLetConstInLoop12.js +++ b/tests/baselines/reference/capturedLetConstInLoop12.js @@ -18,6 +18,7 @@ })(); //// [capturedLetConstInLoop12.js] +"use strict"; (function () { "use strict"; for (let i = 0; i < 4; i++) { diff --git a/tests/baselines/reference/capturedLetConstInLoop13.js b/tests/baselines/reference/capturedLetConstInLoop13.js index ec893691dce57..ac4ac5dee09e7 100644 --- a/tests/baselines/reference/capturedLetConstInLoop13.js +++ b/tests/baselines/reference/capturedLetConstInLoop13.js @@ -25,6 +25,7 @@ class Main { new Main(); //// [capturedLetConstInLoop13.js] +"use strict"; class Main { constructor() { this.register("a", "b", "c"); diff --git a/tests/baselines/reference/capturedLetConstInLoop1_ES6.js b/tests/baselines/reference/capturedLetConstInLoop1_ES6.js index 18727ee67a0b2..97c4b57886fda 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop1_ES6.js @@ -116,6 +116,7 @@ for (const y = 0; y < 1;) { } //// [capturedLetConstInLoop1_ES6.js] +"use strict"; //==== let for (let x in {}) { (function () { return x; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop2.js b/tests/baselines/reference/capturedLetConstInLoop2.js index 2a6e0e472385e..502b00c7b1fd8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2.js +++ b/tests/baselines/reference/capturedLetConstInLoop2.js @@ -177,6 +177,7 @@ function foo8_c(x) { } //// [capturedLetConstInLoop2.js] +"use strict"; // ========let function foo0(x) { for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop2_ES6.js b/tests/baselines/reference/capturedLetConstInLoop2_ES6.js index 745bd874e2341..444fff3e3e83d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop2_ES6.js @@ -177,6 +177,7 @@ function foo8_c(x) { } //// [capturedLetConstInLoop2_ES6.js] +"use strict"; // ========let function foo0(x) { for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop3.js b/tests/baselines/reference/capturedLetConstInLoop3.js index 6baacd54b9c21..de5d4c9286175 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3.js +++ b/tests/baselines/reference/capturedLetConstInLoop3.js @@ -220,6 +220,7 @@ function foo8_c(x) { } //// [capturedLetConstInLoop3.js] +"use strict"; function foo0(x) { for (let x of []) { var v = x; diff --git a/tests/baselines/reference/capturedLetConstInLoop3_ES6.js b/tests/baselines/reference/capturedLetConstInLoop3_ES6.js index 63d6c521b68db..672d39dfff00f 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop3_ES6.js @@ -220,6 +220,7 @@ function foo8_c(x) { } //// [capturedLetConstInLoop3_ES6.js] +"use strict"; function foo0(x) { for (let x of []) { var v = x; diff --git a/tests/baselines/reference/capturedLetConstInLoop5.js b/tests/baselines/reference/capturedLetConstInLoop5.js index becbf24cb8657..82c1a040f2b54 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.js +++ b/tests/baselines/reference/capturedLetConstInLoop5.js @@ -282,6 +282,7 @@ function foo8_c(x) { } //// [capturedLetConstInLoop5.js] +"use strict"; //====let function foo0(x) { for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop5_ES6.js b/tests/baselines/reference/capturedLetConstInLoop5_ES6.js index 2b53c3c5b2d0b..25abdcde1f83a 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop5_ES6.js @@ -282,6 +282,7 @@ function foo8_c(x) { } //// [capturedLetConstInLoop5_ES6.js] +"use strict"; //====let function foo0(x) { for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop6.js b/tests/baselines/reference/capturedLetConstInLoop6.js index 8151166ab21a3..8669b5212ebe2 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.js +++ b/tests/baselines/reference/capturedLetConstInLoop6.js @@ -241,6 +241,7 @@ for (const y = 0; y < 1;) { //// [capturedLetConstInLoop6.js] +"use strict"; // ====let for (let x of []) { (function () { return x; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop6_ES6.js b/tests/baselines/reference/capturedLetConstInLoop6_ES6.js index ca856a9f3f9c4..6d982ebc99af3 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop6_ES6.js @@ -241,6 +241,7 @@ for (const y = 0; y < 1;) { //// [capturedLetConstInLoop6_ES6.js] +"use strict"; // ====let for (let x of []) { (function () { return x; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop7.js b/tests/baselines/reference/capturedLetConstInLoop7.js index 6229ee443abbf..ab5c9f42b5a05 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.js +++ b/tests/baselines/reference/capturedLetConstInLoop7.js @@ -378,6 +378,7 @@ for (const y = 0; y < 1;) { } //// [capturedLetConstInLoop7.js] +"use strict"; //===let l0: for (let x of []) { (function () { return x; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop7_ES6.js b/tests/baselines/reference/capturedLetConstInLoop7_ES6.js index 38974e9809ab1..18122a6f1b742 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop7_ES6.js @@ -378,6 +378,7 @@ for (const y = 0; y < 1;) { } //// [capturedLetConstInLoop7_ES6.js] +"use strict"; //===let l0: for (let x of []) { (function () { return x; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop9.js b/tests/baselines/reference/capturedLetConstInLoop9.js index 2e33b22271438..2f6b7164d869d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9.js +++ b/tests/baselines/reference/capturedLetConstInLoop9.js @@ -141,6 +141,7 @@ function foo3 () { } //// [capturedLetConstInLoop9.js] +"use strict"; for (let x = 0; x < 1; ++x) { let x; (function () { return x; }); diff --git a/tests/baselines/reference/capturedLetConstInLoop9_ES6.js b/tests/baselines/reference/capturedLetConstInLoop9_ES6.js index d5eb6a5571405..5e53a991edb60 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop9_ES6.js @@ -140,6 +140,7 @@ function foo3 () { } //// [capturedLetConstInLoop9_ES6.js] +"use strict"; for (let x = 0; x < 1; ++x) { let x; (function () { return x; }); diff --git a/tests/baselines/reference/capturedParametersInInitializers1.js b/tests/baselines/reference/capturedParametersInInitializers1.js index c3403b7186889..71ce62a3dca19 100644 --- a/tests/baselines/reference/capturedParametersInInitializers1.js +++ b/tests/baselines/reference/capturedParametersInInitializers1.js @@ -43,6 +43,7 @@ function foo9(y = {[z]() { return z; }}, z = 1) { //// [capturedParametersInInitializers1.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/capturedVarInLoop(target=es2015).js b/tests/baselines/reference/capturedVarInLoop(target=es2015).js index bfa6a576a7252..e6204680c544f 100644 --- a/tests/baselines/reference/capturedVarInLoop(target=es2015).js +++ b/tests/baselines/reference/capturedVarInLoop(target=es2015).js @@ -8,6 +8,7 @@ for (var i = 0; i < 10; i++) { } //// [capturedVarInLoop.js] +"use strict"; for (var i = 0; i < 10; i++) { var str = 'x', len = str.length; let lambda1 = (y) => { }; diff --git a/tests/baselines/reference/capturedVarInLoop(target=es5).js b/tests/baselines/reference/capturedVarInLoop(target=es5).js index ff49cda7181b3..c76e955a14692 100644 --- a/tests/baselines/reference/capturedVarInLoop(target=es5).js +++ b/tests/baselines/reference/capturedVarInLoop(target=es5).js @@ -8,6 +8,7 @@ for (var i = 0; i < 10; i++) { } //// [capturedVarInLoop.js] +"use strict"; var _loop_1 = function () { str = 'x', len = str.length; var lambda1 = function (y) { }; diff --git a/tests/baselines/reference/castExpressionParentheses.js b/tests/baselines/reference/castExpressionParentheses.js index f547a2ec92424..11cd9fca73e77 100644 --- a/tests/baselines/reference/castExpressionParentheses.js +++ b/tests/baselines/reference/castExpressionParentheses.js @@ -53,6 +53,7 @@ new (A()); //// [castExpressionParentheses.js] +"use strict"; // parentheses should be omitted // literals ({ a: 0 }); diff --git a/tests/baselines/reference/chainedAssignment1.js b/tests/baselines/reference/chainedAssignment1.js index c89e3356f8f6c..89e57a98a7469 100644 --- a/tests/baselines/reference/chainedAssignment1.js +++ b/tests/baselines/reference/chainedAssignment1.js @@ -25,6 +25,7 @@ c1 = c2 = c3; // a bug made this not report the same error as below c2 = c3; // Error TS111: Cannot convert Z to Y //// [chainedAssignment1.js] +"use strict"; class X { constructor(z) { this.z = z; diff --git a/tests/baselines/reference/chainedAssignmentChecking.js b/tests/baselines/reference/chainedAssignmentChecking.js index f7dd29154fe25..05c1550064d4f 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.js +++ b/tests/baselines/reference/chainedAssignmentChecking.js @@ -25,6 +25,7 @@ c1 = c2 = c3; // Should be error //// [chainedAssignmentChecking.js] +"use strict"; class X { constructor(z) { this.z = z; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index b4db0fe8242eb..effc23dd08c40 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -22,6 +22,7 @@ class C extends B { (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] +"use strict"; class Chain { constructor(value) { this.value = value; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js index 29c0b9d7bc118..428b5ac422c81 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js @@ -44,6 +44,7 @@ class Chain2 { } //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js] +"use strict"; class Chain { constructor(value) { this.value = value; diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination.js b/tests/baselines/reference/checkInfiniteExpansionTermination.js index d54c2d76667ae..1c1abe413423f 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination.js +++ b/tests/baselines/reference/checkInfiniteExpansionTermination.js @@ -20,6 +20,7 @@ values = values2; //// [checkInfiniteExpansionTermination.js] +"use strict"; // Regression test for #1002 // Before fix this code would cause infinite loop var values; diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination2.js b/tests/baselines/reference/checkInfiniteExpansionTermination2.js index 9726e7840487d..d6e4f32fe4998 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination2.js +++ b/tests/baselines/reference/checkInfiniteExpansionTermination2.js @@ -20,6 +20,7 @@ function fn() { //// [checkInfiniteExpansionTermination2.js] +"use strict"; // Regression test for #1002 // Before fix this code would cause infinite loop function fn() { diff --git a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js index fc3748709e8a5..8d34ba0fe0f48 100644 --- a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js +++ b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js @@ -20,6 +20,7 @@ var one = function (s) { }, two = function (untyped) { }; //// [0.js] +"use strict"; // @ts-check /** * @param {number=} n diff --git a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js index 76a2b24725d0b..121c3b518226b 100644 --- a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js +++ b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js @@ -15,6 +15,7 @@ const myString = 'str'; //// [0.js] +"use strict"; // @ts-check var exports = {}; /** diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 0939adc895fb2..b769937eab932 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -13,6 +13,7 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing6.js] +"use strict"; class Base { constructor(...arg) { } diff --git a/tests/baselines/reference/circularTypeofWithVarOrFunc.js b/tests/baselines/reference/circularTypeofWithVarOrFunc.js index f6425e7fbb322..7501b260a2f9d 100644 --- a/tests/baselines/reference/circularTypeofWithVarOrFunc.js +++ b/tests/baselines/reference/circularTypeofWithVarOrFunc.js @@ -30,6 +30,7 @@ function f(): R2 { return 0; } //// [circularTypeofWithVarOrFunc.js] +"use strict"; var varOfAliasedType1; var varOfAliasedType2; function func() { return null; } diff --git a/tests/baselines/reference/classAbstractAccessor(target=es2015).js b/tests/baselines/reference/classAbstractAccessor(target=es2015).js index 0ef7362e9606c..4f50bf417c76d 100644 --- a/tests/baselines/reference/classAbstractAccessor(target=es2015).js +++ b/tests/baselines/reference/classAbstractAccessor(target=es2015).js @@ -10,6 +10,7 @@ abstract class A { //// [classAbstractAccessor.js] +"use strict"; class A { get aa() { return 1; } // error set bb(x) { } // error diff --git a/tests/baselines/reference/classAbstractAccessor(target=es5).js b/tests/baselines/reference/classAbstractAccessor(target=es5).js index 37cd54edf0e1a..ee3ef95f7a5a7 100644 --- a/tests/baselines/reference/classAbstractAccessor(target=es5).js +++ b/tests/baselines/reference/classAbstractAccessor(target=es5).js @@ -10,6 +10,7 @@ abstract class A { //// [classAbstractAccessor.js] +"use strict"; var A = /** @class */ (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 524e88aa39d51..eeb3d1c210caa 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -13,6 +13,7 @@ class bar extends foo { var x = new bar(); //// [classAbstractCrashedOnce.js] +"use strict"; class foo { } class bar extends foo { diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index 86878c2d2598f..7d9dd73e1de3e 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -18,6 +18,7 @@ class E extends B { } //// [classAbstractExtends.js] +"use strict"; class A { foo() { } } diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index bf2f7607a4c7d..d52ed131915c7 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -28,6 +28,7 @@ class G extends A { } //// [classAbstractGeneric.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/classAbstractInheritance1.js b/tests/baselines/reference/classAbstractInheritance1.js index e6ef15e6c1eac..59fee0073e734 100644 --- a/tests/baselines/reference/classAbstractInheritance1.js +++ b/tests/baselines/reference/classAbstractInheritance1.js @@ -24,6 +24,7 @@ class FF extends CC {} abstract class GG extends CC {} //// [classAbstractInheritance1.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js b/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js index 758a12dd16db5..1bee1629e95b0 100644 --- a/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js +++ b/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js @@ -10,6 +10,7 @@ class B { } //// [classAbstractMethodInNonAbstractClass.js] +"use strict"; class A { } class B { diff --git a/tests/baselines/reference/classAbstractMixedWithModifiers.js b/tests/baselines/reference/classAbstractMixedWithModifiers.js index d48a7f547fadf..a6fdfb4de0283 100644 --- a/tests/baselines/reference/classAbstractMixedWithModifiers.js +++ b/tests/baselines/reference/classAbstractMixedWithModifiers.js @@ -21,5 +21,6 @@ abstract class A { //// [classAbstractMixedWithModifiers.js] +"use strict"; class A { } diff --git a/tests/baselines/reference/classAbstractOverloads.js b/tests/baselines/reference/classAbstractOverloads.js index 98fa1e578caa5..71a8a2319a706 100644 --- a/tests/baselines/reference/classAbstractOverloads.js +++ b/tests/baselines/reference/classAbstractOverloads.js @@ -27,6 +27,7 @@ abstract class B { } //// [classAbstractOverloads.js] +"use strict"; class A { baz() { } } diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 22b4ca664f03e..7bb4c422b875c 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -26,6 +26,7 @@ class DD extends BB { } //// [classAbstractOverrideWithAbstract.js] +"use strict"; class A { foo() { } } diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 6712117fb04c4..3600775bade07 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -29,6 +29,7 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] +"use strict"; class A { foo() { return 1; } } diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index cf759fc90ed3f..bc4b89b32a660 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -30,6 +30,7 @@ class DD extends AA { } //// [classAbstractUsingAbstractMethods2.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/classExpressionWithStaticProperties2(target=es2015).js b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es2015).js index 120631521cd13..2824dbac93d4e 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties2(target=es2015).js +++ b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es2015).js @@ -11,6 +11,7 @@ var v = class C { }; //// [classExpressionWithStaticProperties2.js] +"use strict"; var _a; var v = (_a = class C { }, diff --git a/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).js b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).js index 5421f1ff2ab9d..7e6a66e0673f4 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).js +++ b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).js @@ -11,6 +11,7 @@ var v = class C { }; //// [classExpressionWithStaticProperties2.js] +"use strict"; var _a; var v = (_a = /** @class */ (function () { function C() { diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES62.js b/tests/baselines/reference/classExpressionWithStaticPropertiesES62.js index 18aad7005ffc1..0ec443bd055d5 100644 --- a/tests/baselines/reference/classExpressionWithStaticPropertiesES62.js +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES62.js @@ -11,6 +11,7 @@ var v = class C { }; //// [classExpressionWithStaticPropertiesES62.js] +"use strict"; var _a; var v = (_a = class C { }, diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index d149620bde6d0..4ad82dadc274e 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -8,6 +8,7 @@ var x = new foo(); // can be used as a constructor function class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] +"use strict"; function foo() { } var x = new foo(); // can be used as a constructor function class C extends foo { diff --git a/tests/baselines/reference/classImplementingInterfaceIndexer.js b/tests/baselines/reference/classImplementingInterfaceIndexer.js index 94756bfd788c7..d9da19910535b 100644 --- a/tests/baselines/reference/classImplementingInterfaceIndexer.js +++ b/tests/baselines/reference/classImplementingInterfaceIndexer.js @@ -9,5 +9,6 @@ class A implements I { } //// [classImplementingInterfaceIndexer.js] +"use strict"; class A { } diff --git a/tests/baselines/reference/classImplementsImportedInterface.js b/tests/baselines/reference/classImplementsImportedInterface.js index 5101481e359f2..2c6925206e95c 100644 --- a/tests/baselines/reference/classImplementsImportedInterface.js +++ b/tests/baselines/reference/classImplementsImportedInterface.js @@ -15,6 +15,7 @@ namespace M2 { } //// [classImplementsImportedInterface.js] +"use strict"; var M2; (function (M2) { class C { diff --git a/tests/baselines/reference/classMemberInitializerScoping.js b/tests/baselines/reference/classMemberInitializerScoping.js index 0e3bc1a3a7e62..5908cdd30db55 100644 --- a/tests/baselines/reference/classMemberInitializerScoping.js +++ b/tests/baselines/reference/classMemberInitializerScoping.js @@ -23,6 +23,7 @@ class CCCC { //// [classMemberInitializerScoping.js] +"use strict"; var aaa = 1; class CCC { constructor(aaa) { diff --git a/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=false).js b/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=false).js index d7d6fa74d245f..3be6e16b88828 100644 --- a/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=false).js +++ b/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=false).js @@ -9,6 +9,7 @@ class C { //// [classMemberInitializerScoping2.js] +"use strict"; const x = 1; class C { constructor(x) { diff --git a/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=true).js b/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=true).js index 51bb95cc754aa..9c93734ee5c3a 100644 --- a/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=true).js +++ b/tests/baselines/reference/classMemberInitializerScoping2(target=es2017,usedefineforclassfields=true).js @@ -9,6 +9,7 @@ class C { //// [classMemberInitializerScoping2.js] +"use strict"; const x = 1; class C { constructor(x) { diff --git a/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=false).js index d7d6fa74d245f..3be6e16b88828 100644 --- a/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=false).js @@ -9,6 +9,7 @@ class C { //// [classMemberInitializerScoping2.js] +"use strict"; const x = 1; class C { constructor(x) { diff --git a/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=true).js b/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=true).js index fdd412eb0cf5b..f0f58049f7dc0 100644 --- a/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=true).js +++ b/tests/baselines/reference/classMemberInitializerScoping2(target=esnext,usedefineforclassfields=true).js @@ -9,6 +9,7 @@ class C { //// [classMemberInitializerScoping2.js] +"use strict"; const x = 1; class C { p = x; diff --git a/tests/baselines/reference/classMemberWithMissingIdentifier.js b/tests/baselines/reference/classMemberWithMissingIdentifier.js index 9ff702e38bd1b..155aca5765a8d 100644 --- a/tests/baselines/reference/classMemberWithMissingIdentifier.js +++ b/tests/baselines/reference/classMemberWithMissingIdentifier.js @@ -6,6 +6,7 @@ class C { } //// [classMemberWithMissingIdentifier.js] +"use strict"; class C { } { } diff --git a/tests/baselines/reference/classMemberWithMissingIdentifier2.js b/tests/baselines/reference/classMemberWithMissingIdentifier2.js index f49a14b87d640..d4f2e32e5dbfb 100644 --- a/tests/baselines/reference/classMemberWithMissingIdentifier2.js +++ b/tests/baselines/reference/classMemberWithMissingIdentifier2.js @@ -6,6 +6,7 @@ class C { } //// [classMemberWithMissingIdentifier2.js] +"use strict"; class C { } { diff --git a/tests/baselines/reference/classPropertyAsPrivate.js b/tests/baselines/reference/classPropertyAsPrivate.js index 76b289933a97c..fcd0782a15cb5 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.js +++ b/tests/baselines/reference/classPropertyAsPrivate.js @@ -26,6 +26,7 @@ C.b = 1; C.foo(); //// [classPropertyAsPrivate.js] +"use strict"; class C { get y() { return null; } set y(x) { } diff --git a/tests/baselines/reference/classPropertyAsProtected.js b/tests/baselines/reference/classPropertyAsProtected.js index 1fecf3b2383fe..4a00b4af6c4ef 100644 --- a/tests/baselines/reference/classPropertyAsProtected.js +++ b/tests/baselines/reference/classPropertyAsProtected.js @@ -26,6 +26,7 @@ C.b = 1; C.foo(); //// [classPropertyAsProtected.js] +"use strict"; class C { get y() { return null; } set y(x) { } diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.js b/tests/baselines/reference/classPropertyIsPublicByDefault.js index 01d98ef426754..f384cb4133472 100644 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.js +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.js @@ -25,6 +25,7 @@ C.b = 1; C.foo(); //// [classPropertyIsPublicByDefault.js] +"use strict"; class C { get y() { return null; } set y(x) { } diff --git a/tests/baselines/reference/classStaticBlock26(target=es2022).js b/tests/baselines/reference/classStaticBlock26(target=es2022).js index edda6e3b8f1e9..128c2d1bc599c 100644 --- a/tests/baselines/reference/classStaticBlock26(target=es2022).js +++ b/tests/baselines/reference/classStaticBlock26(target=es2022).js @@ -32,6 +32,7 @@ class C { //// [classStaticBlock26.js] +"use strict"; class C { static { await ; // illegal diff --git a/tests/baselines/reference/classStaticBlock26(target=esnext).js b/tests/baselines/reference/classStaticBlock26(target=esnext).js index edda6e3b8f1e9..128c2d1bc599c 100644 --- a/tests/baselines/reference/classStaticBlock26(target=esnext).js +++ b/tests/baselines/reference/classStaticBlock26(target=esnext).js @@ -32,6 +32,7 @@ class C { //// [classStaticBlock26.js] +"use strict"; class C { static { await ; // illegal diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index d8e2ac17f1f76..eeeb32c17549b 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -116,6 +116,7 @@ class R { } //// [classUpdateTests.js] +"use strict"; // // test codegen for instance properties // diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.js b/tests/baselines/reference/classWithMultipleBaseClasses.js index 89fa823772018..0b57c303a3feb 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.js +++ b/tests/baselines/reference/classWithMultipleBaseClasses.js @@ -27,6 +27,7 @@ interface I extends A, B { } //// [classWithMultipleBaseClasses.js] +"use strict"; class A { foo() { } } diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js index 10ccab14fdc04..885f7c75f4210 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js @@ -8,6 +8,7 @@ class C { } //// [classWithOverloadImplementationOfWrongName.js] +"use strict"; class C { bar(x) { } } diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js index a6a9f79159fb7..0440ef3b42494 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js @@ -8,6 +8,7 @@ class C { } //// [classWithOverloadImplementationOfWrongName2.js] +"use strict"; class C { bar(x) { } } diff --git a/tests/baselines/reference/classWithPrivateProperty.js b/tests/baselines/reference/classWithPrivateProperty.js index 1f29ff2ae66d6..e6d95445e748b 100644 --- a/tests/baselines/reference/classWithPrivateProperty.js +++ b/tests/baselines/reference/classWithPrivateProperty.js @@ -25,6 +25,7 @@ var r7: string = C.f(); var r8: string = C.g(); //// [classWithPrivateProperty.js] +"use strict"; // accessing any private outside the class is an error class C { constructor() { diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 2378228dcf7fe..59c2f78327927 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -30,6 +30,7 @@ class D extends C { } //// [classWithProtectedProperty.js] +"use strict"; // accessing any protected outside the class is an error class C { constructor() { diff --git a/tests/baselines/reference/classWithPublicProperty.js b/tests/baselines/reference/classWithPublicProperty.js index 5e8023b5eed4e..35bba5807fc5e 100644 --- a/tests/baselines/reference/classWithPublicProperty.js +++ b/tests/baselines/reference/classWithPublicProperty.js @@ -24,6 +24,7 @@ var r7: string = C.f(); var r8: string = C.g(); //// [classWithPublicProperty.js] +"use strict"; class C { constructor() { this.a = ''; diff --git a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es2015).js b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es2015).js index 1f5494e202bc2..8f04085c9ae46 100644 --- a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es2015).js +++ b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es2015).js @@ -5,6 +5,7 @@ (({ [class { static x = 1 }.x]: b = "" }) => {})(); //// [classWithStaticFieldInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 ((_a) => { var _b; var { [(_b = class { }, diff --git a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es5).js b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es5).js index 63c0427a6ab66..48a95ff3383bd 100644 --- a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es5).js +++ b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es5).js @@ -5,6 +5,7 @@ (({ [class { static x = 1 }.x]: b = "" }) => {})(); //// [classWithStaticFieldInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 (function (_a) { var _b; diff --git a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=esnext).js b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=esnext).js index c8a30ea33d34a..5b96397abbc92 100644 --- a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=esnext).js +++ b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=esnext).js @@ -5,6 +5,7 @@ (({ [class { static x = 1 }.x]: b = "" }) => {})(); //// [classWithStaticFieldInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 (({ [class { static x = 1; diff --git a/tests/baselines/reference/classWithTwoConstructorDefinitions.js b/tests/baselines/reference/classWithTwoConstructorDefinitions.js index a0a4ae278b66f..2ed515c2291ea 100644 --- a/tests/baselines/reference/classWithTwoConstructorDefinitions.js +++ b/tests/baselines/reference/classWithTwoConstructorDefinitions.js @@ -12,6 +12,7 @@ class D { } //// [classWithTwoConstructorDefinitions.js] +"use strict"; class C { constructor() { } // error constructor(x) { } // error diff --git a/tests/baselines/reference/classdecl(target=es2015).js b/tests/baselines/reference/classdecl(target=es2015).js index bdb60b4940f32..7efedd7eef83c 100644 --- a/tests/baselines/reference/classdecl(target=es2015).js +++ b/tests/baselines/reference/classdecl(target=es2015).js @@ -96,6 +96,7 @@ class e { } //// [classdecl.js] +"use strict"; class a { constructor(ns) { } diff --git a/tests/baselines/reference/classdecl(target=es5).js b/tests/baselines/reference/classdecl(target=es5).js index 9afd83763b15f..534d6296ccd6a 100644 --- a/tests/baselines/reference/classdecl(target=es5).js +++ b/tests/baselines/reference/classdecl(target=es5).js @@ -96,6 +96,7 @@ class e { } //// [classdecl.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/cloduleTest2.js b/tests/baselines/reference/cloduleTest2.js index 5270b8176b404..a0777f13626b3 100644 --- a/tests/baselines/reference/cloduleTest2.js +++ b/tests/baselines/reference/cloduleTest2.js @@ -39,6 +39,7 @@ declare class m4d extends m3d { } var r2 = new m4d(); // error //// [cloduleTest2.js] +"use strict"; var T1; (function (T1) { let m3d; diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.js b/tests/baselines/reference/cloduleWithDuplicateMember2.js index 2e58784356b61..b884d008627a8 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.js @@ -14,6 +14,7 @@ namespace C { } //// [cloduleWithDuplicateMember2.js] +"use strict"; class C { set x(y) { } static set y(z) { } diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..3e7ae866ed007 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).js @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +//// [collisionArgumentsArrowFunctions.ts] +var f1 = (i: number, ...arguments) => { //arguments is error + var arguments: any[]; // no error +} +var f12 = (arguments: number, ...rest) => { //arguments is error + var arguments = 10; // no error +} +var f1NoError = (arguments: number) => { // no error + var arguments = 10; // no error +} + +var f2 = (...restParameters) => { + var arguments = 10; // No Error +} +var f2NoError = () => { + var arguments = 10; // no error +} + +//// [collisionArgumentsArrowFunctions.js] +var f1 = (i, ...arguments) => { + var arguments; // no error +}; +var f12 = (arguments, ...rest) => { + var arguments = 10; // no error +}; +var f1NoError = (arguments) => { + var arguments = 10; // no error +}; +var f2 = (...restParameters) => { + var arguments = 10; // No Error +}; +var f2NoError = () => { + var arguments = 10; // no error +}; diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).js b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..78527c71736da --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).js @@ -0,0 +1,48 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +//// [collisionArgumentsArrowFunctions.ts] +var f1 = (i: number, ...arguments) => { //arguments is error + var arguments: any[]; // no error +} +var f12 = (arguments: number, ...rest) => { //arguments is error + var arguments = 10; // no error +} +var f1NoError = (arguments: number) => { // no error + var arguments = 10; // no error +} + +var f2 = (...restParameters) => { + var arguments = 10; // No Error +} +var f2NoError = () => { + var arguments = 10; // no error +} + +//// [collisionArgumentsArrowFunctions.js] +var f1 = function (i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // no error +}; +var f12 = function (arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + var arguments = 10; // no error +}; +var f1NoError = function (arguments) { + var arguments = 10; // no error +}; +var f2 = function () { + var restParameters = []; + for (var _i = 0; _i < arguments.length; _i++) { + restParameters[_i] = arguments[_i]; + } + var arguments = 10; // No Error +}; +var f2NoError = function () { + var arguments = 10; // no error +}; diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..11524f2d2d055 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).js @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +//// [collisionArgumentsArrowFunctions.ts] +var f1 = (i: number, ...arguments) => { //arguments is error + var arguments: any[]; // no error +} +var f12 = (arguments: number, ...rest) => { //arguments is error + var arguments = 10; // no error +} +var f1NoError = (arguments: number) => { // no error + var arguments = 10; // no error +} + +var f2 = (...restParameters) => { + var arguments = 10; // No Error +} +var f2NoError = () => { + var arguments = 10; // no error +} + +//// [collisionArgumentsArrowFunctions.js] +"use strict"; +var f1 = (i, ...arguments) => { + var arguments; // no error +}; +var f12 = (arguments, ...rest) => { + var arguments = 10; // no error +}; +var f1NoError = (arguments) => { + var arguments = 10; // no error +}; +var f2 = (...restParameters) => { + var arguments = 10; // No Error +}; +var f2NoError = () => { + var arguments = 10; // no error +}; diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).js b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..f06a3f27f3d34 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).js @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +//// [collisionArgumentsArrowFunctions.ts] +var f1 = (i: number, ...arguments) => { //arguments is error + var arguments: any[]; // no error +} +var f12 = (arguments: number, ...rest) => { //arguments is error + var arguments = 10; // no error +} +var f1NoError = (arguments: number) => { // no error + var arguments = 10; // no error +} + +var f2 = (...restParameters) => { + var arguments = 10; // No Error +} +var f2NoError = () => { + var arguments = 10; // no error +} + +//// [collisionArgumentsArrowFunctions.js] +"use strict"; +var f1 = function (i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // no error +}; +var f12 = function (arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + var arguments = 10; // no error +}; +var f1NoError = function (arguments) { + var arguments = 10; // no error +}; +var f2 = function () { + var restParameters = []; + for (var _i = 0; _i < arguments.length; _i++) { + restParameters[_i] = arguments[_i]; + } + var arguments = 10; // No Error +}; +var f2NoError = function () { + var arguments = 10; // no error +}; diff --git a/tests/baselines/reference/collisionArgumentsClassConstructor(target=es2015).js b/tests/baselines/reference/collisionArgumentsClassConstructor(target=es2015).js index 10855699e3ee1..5138f024ad1bd 100644 --- a/tests/baselines/reference/collisionArgumentsClassConstructor(target=es2015).js +++ b/tests/baselines/reference/collisionArgumentsClassConstructor(target=es2015).js @@ -89,6 +89,7 @@ declare class c6NoError { } //// [collisionArgumentsClassConstructor.js] +"use strict"; // Constructors class c1 { constructor(i, ...arguments) { diff --git a/tests/baselines/reference/collisionArgumentsClassConstructor(target=es5).js b/tests/baselines/reference/collisionArgumentsClassConstructor(target=es5).js index 621d5e2382a84..4738d5d8ff59b 100644 --- a/tests/baselines/reference/collisionArgumentsClassConstructor(target=es5).js +++ b/tests/baselines/reference/collisionArgumentsClassConstructor(target=es5).js @@ -89,6 +89,7 @@ declare class c6NoError { } //// [collisionArgumentsClassConstructor.js] +"use strict"; // Constructors var c1 = /** @class */ (function () { function c1(i) { diff --git a/tests/baselines/reference/collisionArgumentsClassMethod(target=es2015).js b/tests/baselines/reference/collisionArgumentsClassMethod(target=es2015).js index a32d2e607140f..58994402bca75 100644 --- a/tests/baselines/reference/collisionArgumentsClassMethod(target=es2015).js +++ b/tests/baselines/reference/collisionArgumentsClassMethod(target=es2015).js @@ -51,6 +51,7 @@ class c3 { } //// [collisionArgumentsClassMethod.js] +"use strict"; class c1 { foo(i, ...arguments) { var arguments; // no error diff --git a/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).js b/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).js index 25f98144d1331..7808b8378fea0 100644 --- a/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).js +++ b/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).js @@ -51,6 +51,7 @@ class c3 { } //// [collisionArgumentsClassMethod.js] +"use strict"; var c1 = /** @class */ (function () { function c1() { } diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..b25325c55411d --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).js @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +//// [collisionArgumentsFunction.ts] +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error +} +function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error +} +function f1NoError(arguments: number) { // no error + var arguments = 10; // no error +} + +declare function f2(i: number, ...arguments); // no error - no code gen +declare function f21(arguments: number, ...rest); // no error - no code gen +declare function f2NoError(arguments: number); // no error + +function f3(...restParameters) { + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} + +function f4(arguments: number, ...rest); // no codegen no error +function f4(arguments: string, ...rest); // no codegen no error +function f4(arguments: any, ...rest) { // error + var arguments: any; // No error +} +function f42(i: number, ...arguments); // no codegen no error +function f42(i: string, ...arguments); // no codegen no error +function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error +} +function f4NoError(arguments: number); // no error +function f4NoError(arguments: string); // no error +function f4NoError(arguments: any) { // no error + var arguments: any; // No error +} + +declare function f5(arguments: number, ...rest); // no codegen no error +declare function f5(arguments: string, ...rest); // no codegen no error +declare function f52(i: number, ...arguments); // no codegen no error +declare function f52(i: string, ...arguments); // no codegen no error +declare function f6(arguments: number); // no codegen no error +declare function f6(arguments: string); // no codegen no error + +//// [collisionArgumentsFunction.js] +// Functions +function f1(arguments, ...restParameters) { + var arguments = 10; // no error +} +function f12(i, ...arguments) { + var arguments; // no error +} +function f1NoError(arguments) { + var arguments = 10; // no error +} +function f3(...restParameters) { + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} +function f4(arguments, ...rest) { + var arguments; // No error +} +function f42(i, ...arguments) { + var arguments; // No error +} +function f4NoError(arguments) { + var arguments; // No error +} diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).js b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..e23bb139ffca5 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).js @@ -0,0 +1,94 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +//// [collisionArgumentsFunction.ts] +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error +} +function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error +} +function f1NoError(arguments: number) { // no error + var arguments = 10; // no error +} + +declare function f2(i: number, ...arguments); // no error - no code gen +declare function f21(arguments: number, ...rest); // no error - no code gen +declare function f2NoError(arguments: number); // no error + +function f3(...restParameters) { + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} + +function f4(arguments: number, ...rest); // no codegen no error +function f4(arguments: string, ...rest); // no codegen no error +function f4(arguments: any, ...rest) { // error + var arguments: any; // No error +} +function f42(i: number, ...arguments); // no codegen no error +function f42(i: string, ...arguments); // no codegen no error +function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error +} +function f4NoError(arguments: number); // no error +function f4NoError(arguments: string); // no error +function f4NoError(arguments: any) { // no error + var arguments: any; // No error +} + +declare function f5(arguments: number, ...rest); // no codegen no error +declare function f5(arguments: string, ...rest); // no codegen no error +declare function f52(i: number, ...arguments); // no codegen no error +declare function f52(i: string, ...arguments); // no codegen no error +declare function f6(arguments: number); // no codegen no error +declare function f6(arguments: string); // no codegen no error + +//// [collisionArgumentsFunction.js] +// Functions +function f1(arguments) { + var restParameters = []; + for (var _i = 1; _i < arguments.length; _i++) { + restParameters[_i - 1] = arguments[_i]; + } + var arguments = 10; // no error +} +function f12(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // no error +} +function f1NoError(arguments) { + var arguments = 10; // no error +} +function f3() { + var restParameters = []; + for (var _i = 0; _i < arguments.length; _i++) { + restParameters[_i] = arguments[_i]; + } + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} +function f4(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + var arguments; // No error +} +function f42(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // No error +} +function f4NoError(arguments) { + var arguments; // No error +} diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..682a22ba96601 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).js @@ -0,0 +1,75 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +//// [collisionArgumentsFunction.ts] +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error +} +function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error +} +function f1NoError(arguments: number) { // no error + var arguments = 10; // no error +} + +declare function f2(i: number, ...arguments); // no error - no code gen +declare function f21(arguments: number, ...rest); // no error - no code gen +declare function f2NoError(arguments: number); // no error + +function f3(...restParameters) { + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} + +function f4(arguments: number, ...rest); // no codegen no error +function f4(arguments: string, ...rest); // no codegen no error +function f4(arguments: any, ...rest) { // error + var arguments: any; // No error +} +function f42(i: number, ...arguments); // no codegen no error +function f42(i: string, ...arguments); // no codegen no error +function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error +} +function f4NoError(arguments: number); // no error +function f4NoError(arguments: string); // no error +function f4NoError(arguments: any) { // no error + var arguments: any; // No error +} + +declare function f5(arguments: number, ...rest); // no codegen no error +declare function f5(arguments: string, ...rest); // no codegen no error +declare function f52(i: number, ...arguments); // no codegen no error +declare function f52(i: string, ...arguments); // no codegen no error +declare function f6(arguments: number); // no codegen no error +declare function f6(arguments: string); // no codegen no error + +//// [collisionArgumentsFunction.js] +"use strict"; +// Functions +function f1(arguments, ...restParameters) { + var arguments = 10; // no error +} +function f12(i, ...arguments) { + var arguments; // no error +} +function f1NoError(arguments) { + var arguments = 10; // no error +} +function f3(...restParameters) { + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} +function f4(arguments, ...rest) { + var arguments; // No error +} +function f42(i, ...arguments) { + var arguments; // No error +} +function f4NoError(arguments) { + var arguments; // No error +} diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).js b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..5690801bcde0b --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).js @@ -0,0 +1,95 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +//// [collisionArgumentsFunction.ts] +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error +} +function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error +} +function f1NoError(arguments: number) { // no error + var arguments = 10; // no error +} + +declare function f2(i: number, ...arguments); // no error - no code gen +declare function f21(arguments: number, ...rest); // no error - no code gen +declare function f2NoError(arguments: number); // no error + +function f3(...restParameters) { + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} + +function f4(arguments: number, ...rest); // no codegen no error +function f4(arguments: string, ...rest); // no codegen no error +function f4(arguments: any, ...rest) { // error + var arguments: any; // No error +} +function f42(i: number, ...arguments); // no codegen no error +function f42(i: string, ...arguments); // no codegen no error +function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error +} +function f4NoError(arguments: number); // no error +function f4NoError(arguments: string); // no error +function f4NoError(arguments: any) { // no error + var arguments: any; // No error +} + +declare function f5(arguments: number, ...rest); // no codegen no error +declare function f5(arguments: string, ...rest); // no codegen no error +declare function f52(i: number, ...arguments); // no codegen no error +declare function f52(i: string, ...arguments); // no codegen no error +declare function f6(arguments: number); // no codegen no error +declare function f6(arguments: string); // no codegen no error + +//// [collisionArgumentsFunction.js] +"use strict"; +// Functions +function f1(arguments) { + var restParameters = []; + for (var _i = 1; _i < arguments.length; _i++) { + restParameters[_i - 1] = arguments[_i]; + } + var arguments = 10; // no error +} +function f12(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // no error +} +function f1NoError(arguments) { + var arguments = 10; // no error +} +function f3() { + var restParameters = []; + for (var _i = 0; _i < arguments.length; _i++) { + restParameters[_i] = arguments[_i]; + } + var arguments = 10; // no error +} +function f3NoError() { + var arguments = 10; // no error +} +function f4(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + var arguments; // No error +} +function f42(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // No error +} +function f4NoError(arguments) { + var arguments; // No error +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..eb8d260654f32 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).js @@ -0,0 +1,65 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +//// [collisionArgumentsFunctionExpressions.ts] +function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } +} + +//// [collisionArgumentsFunctionExpressions.js] +function foo() { + function f1(arguments, ...restParameters) { + var arguments = 10; // no error + } + function f12(i, ...arguments) { + var arguments; // no error + } + function f1NoError(arguments) { + var arguments = 10; // no error + } + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + function f4(arguments, ...rest) { + var arguments; // No error + } + function f42(i, ...arguments) { + var arguments; // No error + } + function f4NoError(arguments) { + var arguments; // No error + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).js b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..85bd9f641bd4b --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).js @@ -0,0 +1,85 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +//// [collisionArgumentsFunctionExpressions.ts] +function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } +} + +//// [collisionArgumentsFunctionExpressions.js] +function foo() { + function f1(arguments) { + var restParameters = []; + for (var _i = 1; _i < arguments.length; _i++) { + restParameters[_i - 1] = arguments[_i]; + } + var arguments = 10; // no error + } + function f12(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // no error + } + function f1NoError(arguments) { + var arguments = 10; // no error + } + function f3() { + var restParameters = []; + for (var _i = 0; _i < arguments.length; _i++) { + restParameters[_i] = arguments[_i]; + } + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + function f4(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + var arguments; // No error + } + function f42(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // No error + } + function f4NoError(arguments) { + var arguments; // No error + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..56a002496f761 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).js @@ -0,0 +1,66 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +//// [collisionArgumentsFunctionExpressions.ts] +function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } +} + +//// [collisionArgumentsFunctionExpressions.js] +"use strict"; +function foo() { + function f1(arguments, ...restParameters) { + var arguments = 10; // no error + } + function f12(i, ...arguments) { + var arguments; // no error + } + function f1NoError(arguments) { + var arguments = 10; // no error + } + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + function f4(arguments, ...rest) { + var arguments; // No error + } + function f42(i, ...arguments) { + var arguments; // No error + } + function f4NoError(arguments) { + var arguments; // No error + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).js b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..c3f1ab3d7e216 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).js @@ -0,0 +1,86 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +//// [collisionArgumentsFunctionExpressions.ts] +function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } +} + +//// [collisionArgumentsFunctionExpressions.js] +"use strict"; +function foo() { + function f1(arguments) { + var restParameters = []; + for (var _i = 1; _i < arguments.length; _i++) { + restParameters[_i - 1] = arguments[_i]; + } + var arguments = 10; // no error + } + function f12(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // no error + } + function f1NoError(arguments) { + var arguments = 10; // no error + } + function f3() { + var restParameters = []; + for (var _i = 0; _i < arguments.length; _i++) { + restParameters[_i] = arguments[_i]; + } + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + function f4(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + var arguments; // No error + } + function f42(i) { + var arguments = []; + for (var _i = 1; _i < arguments.length; _i++) { + arguments[_i - 1] = arguments[_i]; + } + var arguments; // No error + } + function f4NoError(arguments) { + var arguments; // No error + } +} diff --git a/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).js b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).js new file mode 100644 index 0000000000000..751e4d3a93a3b --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/collisionArgumentsInType.ts] //// + +//// [collisionArgumentsInType.ts] +var v1: (i: number, ...arguments) => void; // no error - no code gen +var v12: (arguments: number, ...restParameters) => void; // no error - no code gen +var v2: { + (arguments: number, ...restParameters); // no error - no code gen + new (arguments: number, ...restParameters); // no error - no code gen + foo(arguments: number, ...restParameters); // no error - no code gen + prop: (arguments: number, ...restParameters) => void; // no error - no code gen +} +var v21: { + (i: number, ...arguments); // no error - no code gen + new (i: number, ...arguments); // no error - no code gen + foo(i: number, ...arguments); // no error - no code gen + prop: (i: number, ...arguments) => void; // no error - no code gen +} + +//// [collisionArgumentsInType.js] +var v1; // no error - no code gen +var v12; // no error - no code gen +var v2; +var v21; diff --git a/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).js b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).js new file mode 100644 index 0000000000000..492c227633bfb --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/collisionArgumentsInType.ts] //// + +//// [collisionArgumentsInType.ts] +var v1: (i: number, ...arguments) => void; // no error - no code gen +var v12: (arguments: number, ...restParameters) => void; // no error - no code gen +var v2: { + (arguments: number, ...restParameters); // no error - no code gen + new (arguments: number, ...restParameters); // no error - no code gen + foo(arguments: number, ...restParameters); // no error - no code gen + prop: (arguments: number, ...restParameters) => void; // no error - no code gen +} +var v21: { + (i: number, ...arguments); // no error - no code gen + new (i: number, ...arguments); // no error - no code gen + foo(i: number, ...arguments); // no error - no code gen + prop: (i: number, ...arguments) => void; // no error - no code gen +} + +//// [collisionArgumentsInType.js] +"use strict"; +var v1; // no error - no code gen +var v12; // no error - no code gen +var v2; +var v21; diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).js b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).js new file mode 100644 index 0000000000000..f0a187da57d34 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).js @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// + +//// [collisionArgumentsInterfaceMembers.ts] +// call +interface i1 { + (i: number, ...arguments); // no error - no code gen +} +interface i12 { + (arguments: number, ...rest); // no error - no code gen +} +interface i1NoError { + (arguments: number); // no error +} + +// new +interface i2 { + new (i: number, ...arguments); // no error - no code gen +} +interface i21 { + new (arguments: number, ...rest); // no error - no code gen +} +interface i2NoError { + new (arguments: number); // no error +} + +// method +interface i3 { + foo(i: number, ...arguments); // no error - no code gen + foo1(arguments: number, ...rest); // no error - no code gen + fooNoError(arguments: number); // no error +} + +//// [collisionArgumentsInterfaceMembers.js] diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).js b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).js new file mode 100644 index 0000000000000..9ad7c0a9992c8 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// + +//// [collisionArgumentsInterfaceMembers.ts] +// call +interface i1 { + (i: number, ...arguments); // no error - no code gen +} +interface i12 { + (arguments: number, ...rest); // no error - no code gen +} +interface i1NoError { + (arguments: number); // no error +} + +// new +interface i2 { + new (i: number, ...arguments); // no error - no code gen +} +interface i21 { + new (arguments: number, ...rest); // no error - no code gen +} +interface i2NoError { + new (arguments: number); // no error +} + +// method +interface i3 { + foo(i: number, ...arguments); // no error - no code gen + foo1(arguments: number, ...rest); // no error - no code gen + fooNoError(arguments: number); // no error +} + +//// [collisionArgumentsInterfaceMembers.js] +"use strict"; diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js index 35ca530dd34bb..2052250c9975b 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js @@ -48,6 +48,7 @@ namespace M { // Shouldnt be _M } //// [collisionCodeGenModuleWithAccessorChildren.js] +"use strict"; var M; (function (M_1) { M_1.x = 3; diff --git a/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js index 4fd9633de9dd9..3dee15af33c86 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js @@ -26,6 +26,7 @@ namespace M { } //// [collisionCodeGenModuleWithConstructorChildren.js] +"use strict"; var M; (function (M_1) { M_1.x = 3; diff --git a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js index bf299c3770f2d..120e53c7fbc4c 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js @@ -22,6 +22,7 @@ namespace M { } //// [collisionCodeGenModuleWithFunctionChildren.js] +"use strict"; var M; (function (M_1) { M_1.x = 3; diff --git a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js index 9fca7c5f63516..0ee348f5f98c3 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js @@ -35,6 +35,7 @@ namespace M { // Shouldnt bn _M } //// [collisionCodeGenModuleWithMethodChildren.js] +"use strict"; var M; (function (M_1) { M_1.x = 3; diff --git a/tests/baselines/reference/collisionRestParameterArrowFunctions.js b/tests/baselines/reference/collisionRestParameterArrowFunctions.js index 60a9748eb3ed1..4dd29de5cdeb3 100644 --- a/tests/baselines/reference/collisionRestParameterArrowFunctions.js +++ b/tests/baselines/reference/collisionRestParameterArrowFunctions.js @@ -16,6 +16,7 @@ var f2NoError = () => { } //// [collisionRestParameterArrowFunctions.js] +"use strict"; var f1 = (_i, ...restParameters) => { var _i = 10; // no error }; diff --git a/tests/baselines/reference/collisionRestParameterClassConstructor.js b/tests/baselines/reference/collisionRestParameterClassConstructor.js index 0a8d0efd19b49..8a3db67a8203a 100644 --- a/tests/baselines/reference/collisionRestParameterClassConstructor.js +++ b/tests/baselines/reference/collisionRestParameterClassConstructor.js @@ -69,6 +69,7 @@ declare class c6NoError { } //// [collisionRestParameterClassConstructor.js] +"use strict"; // Constructors class c1 { constructor(_i, ...restParameters) { diff --git a/tests/baselines/reference/collisionRestParameterClassMethod.js b/tests/baselines/reference/collisionRestParameterClassMethod.js index 7bd52dcb479f1..0100d47103ec9 100644 --- a/tests/baselines/reference/collisionRestParameterClassMethod.js +++ b/tests/baselines/reference/collisionRestParameterClassMethod.js @@ -41,6 +41,7 @@ class c3 { } //// [collisionRestParameterClassMethod.js] +"use strict"; class c1 { foo(_i, ...restParameters) { var _i = 10; // no error diff --git a/tests/baselines/reference/collisionRestParameterFunction.js b/tests/baselines/reference/collisionRestParameterFunction.js index 4437c9b88c11f..d82fb785aac4a 100644 --- a/tests/baselines/reference/collisionRestParameterFunction.js +++ b/tests/baselines/reference/collisionRestParameterFunction.js @@ -36,6 +36,7 @@ declare function f6(_i: number); // no codegen no error declare function f6(_i: string); // no codegen no error //// [collisionRestParameterFunction.js] +"use strict"; // Functions function f1(_i, ...restParameters) { var _i = 10; // no error diff --git a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js index 76a61a18b75c0..c0f6d68e2c250 100644 --- a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js +++ b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js @@ -27,6 +27,7 @@ function foo() { } //// [collisionRestParameterFunctionExpressions.js] +"use strict"; function foo() { function f1(_i, ...restParameters) { var _i = 10; // no error diff --git a/tests/baselines/reference/collisionRestParameterInType.js b/tests/baselines/reference/collisionRestParameterInType.js index 840a38be922b6..5d28e09fa66a7 100644 --- a/tests/baselines/reference/collisionRestParameterInType.js +++ b/tests/baselines/reference/collisionRestParameterInType.js @@ -10,5 +10,6 @@ var v2: { } //// [collisionRestParameterInType.js] +"use strict"; var v1; // no error - no code gen var v2; diff --git a/tests/baselines/reference/collisionRestParameterInterfaceMembers.js b/tests/baselines/reference/collisionRestParameterInterfaceMembers.js index 1429dbcb21370..ea5a0b92b33b9 100644 --- a/tests/baselines/reference/collisionRestParameterInterfaceMembers.js +++ b/tests/baselines/reference/collisionRestParameterInterfaceMembers.js @@ -24,3 +24,4 @@ interface i3 { } //// [collisionRestParameterInterfaceMembers.js] +"use strict"; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index fd66445aa0a94..16530528587a8 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -14,6 +14,7 @@ class Foo extends base { } //// [collisionSuperAndNameResolution.js] +"use strict"; var console; var _super = 10; // No error class base { diff --git a/tests/baselines/reference/collisionSuperAndParameter(target=es2015).js b/tests/baselines/reference/collisionSuperAndParameter(target=es2015).js index cfabd0ddfd13b..17d9b5c2f845a 100644 --- a/tests/baselines/reference/collisionSuperAndParameter(target=es2015).js +++ b/tests/baselines/reference/collisionSuperAndParameter(target=es2015).js @@ -65,6 +65,7 @@ class Foo4 extends Foo { } //// [collisionSuperAndParameter.js] +"use strict"; class Foo { a() { var lamda = (_super) => { diff --git a/tests/baselines/reference/collisionSuperAndParameter(target=es5).js b/tests/baselines/reference/collisionSuperAndParameter(target=es5).js index fc3705bbc3df2..d75b60586c65d 100644 --- a/tests/baselines/reference/collisionSuperAndParameter(target=es5).js +++ b/tests/baselines/reference/collisionSuperAndParameter(target=es5).js @@ -65,6 +65,7 @@ class Foo4 extends Foo { } //// [collisionSuperAndParameter.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index 57da6b8a16ef9..484d3a334cce0 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -12,6 +12,7 @@ class Foo2 extends Foo { } //// [collisionSuperAndParameter1.js] +"use strict"; class Foo { } class Foo2 extends Foo { diff --git a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js index 3c6ed0ff92863..7edca36388e91 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js @@ -8,6 +8,7 @@ var f = () => this; import _this = a; // Error //// [collisionThisExpressionAndAliasInGlobal.js] +"use strict"; var a; (function (a) { a.b = 10; diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js index 98b997b31d488..090ea9e8e538c 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js @@ -7,5 +7,6 @@ var f = () => this; var a = new _this(); // Error //// [collisionThisExpressionAndAmbientClassInGlobal.js] +"use strict"; var f = () => this; var a = new _this(); // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js index 8cb07e166bb23..f823d8e6197d8 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js @@ -6,5 +6,6 @@ var f = () => this; _this = 10; // Error //// [collisionThisExpressionAndAmbientVarInGlobal.js] +"use strict"; var f = () => this; _this = 10; // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js index e863abb3f1087..2eeda7bd260be 100644 --- a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js @@ -6,6 +6,7 @@ class _this { var f = () => this; //// [collisionThisExpressionAndClassInGlobal.js] +"use strict"; class _this { } var f = () => this; diff --git a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js index d5f13a790b899..d0f2c6a06b690 100644 --- a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js @@ -8,6 +8,7 @@ enum _this { // Error var f = () => this; //// [collisionThisExpressionAndEnumInGlobal.js] +"use strict"; var _this; (function (_this) { _this[_this["_thisVal1"] = 0] = "_thisVal1"; diff --git a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js index 925c25a2e0c34..9021e660d29b2 100644 --- a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js @@ -7,6 +7,7 @@ function _this() { //Error var f = () => this; //// [collisionThisExpressionAndFunctionInGlobal.js] +"use strict"; function _this() { return 10; } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es2015).js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es2015).js index 0669546ebcc55..9a58529bf6675 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es2015).js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es2015).js @@ -46,6 +46,7 @@ class class2 { } //// [collisionThisExpressionAndLocalVarInAccessors.js] +"use strict"; class class1 { get a() { var x2 = { diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).js index cf0a52a959cc1..659c60b45eb6b 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).js @@ -46,6 +46,7 @@ class class2 { } //// [collisionThisExpressionAndLocalVarInAccessors.js] +"use strict"; var class1 = /** @class */ (function () { function class1() { } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js index 09b24e1076b9a..f066e9087313a 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js @@ -24,6 +24,7 @@ class class2 { } //// [collisionThisExpressionAndLocalVarInConstructor.js] +"use strict"; class class1 { constructor() { var x2 = { diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js index 910f9012b0bb0..02632e0f3e321 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js @@ -10,6 +10,7 @@ function x() { } //// [collisionThisExpressionAndLocalVarInFunction.js] +"use strict"; var console; function x() { var _this = 5; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js index 24287136090cc..0b9858300fb4c 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js @@ -12,6 +12,7 @@ var x = { alert(x.doStuff(x => alert(x))); //// [collisionThisExpressionAndLocalVarInLambda.js] +"use strict"; var x = { doStuff: (callback) => () => { var _this = 2; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js index 5b6eb5ab35537..ff0a5c48d1466 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js @@ -21,6 +21,7 @@ class a { } //// [collisionThisExpressionAndLocalVarInMethod.js] +"use strict"; class a { method1() { return { diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js index fb70f62a99cdd..5fd745349dc93 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js @@ -22,6 +22,7 @@ class class2 { } //// [collisionThisExpressionAndLocalVarInProperty.js] +"use strict"; class class1 { constructor() { this.prop1 = { diff --git a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js index e3041a647c85f..289cc78938e5a 100644 --- a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js @@ -8,6 +8,7 @@ namespace _this { //Error var f = () => this; //// [collisionThisExpressionAndModuleInGlobal.js] +"use strict"; var _this; (function (_this) { class c { diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js index 63a5b3082cc1a..d826de863d19f 100644 --- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js +++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js @@ -15,6 +15,7 @@ class Foo { } //// [collisionThisExpressionAndNameResolution.js] +"use strict"; var console; class Foo { x() { diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.js b/tests/baselines/reference/collisionThisExpressionAndParameter.js index f81dc298b30e5..3f67820bde3b1 100644 --- a/tests/baselines/reference/collisionThisExpressionAndParameter.js +++ b/tests/baselines/reference/collisionThisExpressionAndParameter.js @@ -96,6 +96,7 @@ declare function f4(_this: number); // no code gen - no error declare function f4(_this: string); // no code gen - no error //// [collisionThisExpressionAndParameter.js] +"use strict"; class Foo { x() { var _this = 10; // Local var. No this capture in x(), so no conflict. diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js index 26ac71b32ddd8..b0ff487ecee51 100644 --- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js @@ -38,6 +38,7 @@ class Foo5 { } //// [collisionThisExpressionAndPropertyNameAsConstuctorParameter.js] +"use strict"; class Foo2 { constructor(_this) { var lambda = () => { diff --git a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js index 4be34994459e0..43f654dbd441e 100644 --- a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js @@ -5,5 +5,6 @@ var _this = 1; var f = () => this; //// [collisionThisExpressionAndVarInGlobal.js] +"use strict"; var _this = 1; var f = () => this; diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js index b552bf4383ff4..8f6f797146f17 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js @@ -40,6 +40,7 @@ var resultIsAny11 = (!BOOLEAN, x.doSomeThing()); //// [commaOperatorWithSecondOperandAnyType.js] +"use strict"; var ANY; var BOOLEAN; var NUMBER; diff --git a/tests/baselines/reference/commentLeadingCloseBrace.js b/tests/baselines/reference/commentLeadingCloseBrace.js index 9ac7b1a2d15db..78c70513721fc 100644 --- a/tests/baselines/reference/commentLeadingCloseBrace.js +++ b/tests/baselines/reference/commentLeadingCloseBrace.js @@ -14,6 +14,7 @@ function ifelse() { } //// [commentLeadingCloseBrace.js] +"use strict"; function ifelse() { if (commentedParameters(1, 2)) { /*comment1*/ diff --git a/tests/baselines/reference/commentOnAmbientModule.js b/tests/baselines/reference/commentOnAmbientModule.js index 34196ac4b84c5..4002c4c589cba 100644 --- a/tests/baselines/reference/commentOnAmbientModule.js +++ b/tests/baselines/reference/commentOnAmbientModule.js @@ -25,9 +25,11 @@ declare namespace E { } //// [a.js] +"use strict"; /*!========= Keep this pinned comment ========= */ //// [b.js] +"use strict"; /// diff --git a/tests/baselines/reference/commentOnAmbientfunction.js b/tests/baselines/reference/commentOnAmbientfunction.js index 2261323694113..c7be06e41c266 100644 --- a/tests/baselines/reference/commentOnAmbientfunction.js +++ b/tests/baselines/reference/commentOnAmbientfunction.js @@ -17,9 +17,11 @@ declare function bar(); declare function foobar(a: typeof foo): typeof bar; //// [a.js] +"use strict"; /*!========= Keep this pinned comment ========= */ //// [b.js] +"use strict"; /// diff --git a/tests/baselines/reference/commentOnParameter1.js b/tests/baselines/reference/commentOnParameter1.js index 46d99a5162004..f8655c9e95d93 100644 --- a/tests/baselines/reference/commentOnParameter1.js +++ b/tests/baselines/reference/commentOnParameter1.js @@ -12,6 +12,7 @@ b ){} //// [commentOnParameter1.js] +"use strict"; function commentedParameters( /* Parameter a */ a diff --git a/tests/baselines/reference/commentOnParameter2.js b/tests/baselines/reference/commentOnParameter2.js index 545200e12d9aa..1f4e08277b221 100644 --- a/tests/baselines/reference/commentOnParameter2.js +++ b/tests/baselines/reference/commentOnParameter2.js @@ -11,6 +11,7 @@ b ){} //// [commentOnParameter2.js] +"use strict"; function commentedParameters( /* Parameter a */ a /* End of parameter a */ diff --git a/tests/baselines/reference/commentOnParameter3.js b/tests/baselines/reference/commentOnParameter3.js index 75ce1556ff62f..9bcaf521d5bf0 100644 --- a/tests/baselines/reference/commentOnParameter3.js +++ b/tests/baselines/reference/commentOnParameter3.js @@ -8,4 +8,5 @@ b /* parameter b */, ) { } //// [commentOnParameter3.js] +"use strict"; function commentedParameters(a /* parameter a */, b /* parameter b */) { } diff --git a/tests/baselines/reference/commentOnSignature1.js b/tests/baselines/reference/commentOnSignature1.js index 637e3b25b9de5..b0ca29011b883 100644 --- a/tests/baselines/reference/commentOnSignature1.js +++ b/tests/baselines/reference/commentOnSignature1.js @@ -38,6 +38,7 @@ function foo2(a: any): void { } //// [a.js] +"use strict"; /*!================= Keep this pinned ================= @@ -51,6 +52,7 @@ class c { } } //// [b.js] +"use strict"; /// function foo2(a) { } diff --git a/tests/baselines/reference/commentsAfterCaseClauses1.js b/tests/baselines/reference/commentsAfterCaseClauses1.js index b971a1f5ce187..1e69f0d40ca77 100644 --- a/tests/baselines/reference/commentsAfterCaseClauses1.js +++ b/tests/baselines/reference/commentsAfterCaseClauses1.js @@ -17,6 +17,7 @@ function getSecurity(level) { } //// [commentsAfterCaseClauses1.js] +"use strict"; function getSecurity(level) { switch (level) { case 0: // Zero diff --git a/tests/baselines/reference/commentsAfterCaseClauses2.js b/tests/baselines/reference/commentsAfterCaseClauses2.js index d3c4ab0a42bcf..aec58bd95d3e8 100644 --- a/tests/baselines/reference/commentsAfterCaseClauses2.js +++ b/tests/baselines/reference/commentsAfterCaseClauses2.js @@ -20,6 +20,7 @@ function getSecurity(level) { } //// [commentsAfterCaseClauses2.js] +"use strict"; function getSecurity(level) { switch (level) { case 0: // Zero diff --git a/tests/baselines/reference/commentsAfterCaseClauses3.js b/tests/baselines/reference/commentsAfterCaseClauses3.js index 5e0d4c5bd57c7..d13787a8b99b5 100644 --- a/tests/baselines/reference/commentsAfterCaseClauses3.js +++ b/tests/baselines/reference/commentsAfterCaseClauses3.js @@ -19,6 +19,7 @@ function getSecurity(level) { } //// [commentsAfterCaseClauses3.js] +"use strict"; function getSecurity(level) { switch (level) { case 0: /*Zero*/ diff --git a/tests/baselines/reference/commentsAfterFunctionExpression1.js b/tests/baselines/reference/commentsAfterFunctionExpression1.js index fbf2483d40bbc..f1b66d3336953 100644 --- a/tests/baselines/reference/commentsAfterFunctionExpression1.js +++ b/tests/baselines/reference/commentsAfterFunctionExpression1.js @@ -9,6 +9,7 @@ var v = { //// [commentsAfterFunctionExpression1.js] +"use strict"; var v = { f: a => 0 /*t1*/, g: (a => 0) /*t2*/, diff --git a/tests/baselines/reference/commentsAfterSpread.js b/tests/baselines/reference/commentsAfterSpread.js index d2d9b9277cb2b..be72d255adb39 100644 --- a/tests/baselines/reference/commentsAfterSpread.js +++ b/tests/baselines/reference/commentsAfterSpread.js @@ -81,6 +81,7 @@ function k ({ } //// [commentsAfterSpread.js] +"use strict"; const identity = (a) => a; const a = { ... /*#__PURE__*/identity({ diff --git a/tests/baselines/reference/commentsBeforeFunctionExpression1.js b/tests/baselines/reference/commentsBeforeFunctionExpression1.js index ead9db1f279fc..7b07ef681f414 100644 --- a/tests/baselines/reference/commentsBeforeFunctionExpression1.js +++ b/tests/baselines/reference/commentsBeforeFunctionExpression1.js @@ -7,6 +7,7 @@ var v = { //// [commentsBeforeFunctionExpression1.js] +"use strict"; var v = { f: /**own f*/ (a) => 0 }; diff --git a/tests/baselines/reference/commentsCommentParsing(target=es2015).js b/tests/baselines/reference/commentsCommentParsing(target=es2015).js index 8ae1611e41ece..d398fea166bcc 100644 --- a/tests/baselines/reference/commentsCommentParsing(target=es2015).js +++ b/tests/baselines/reference/commentsCommentParsing(target=es2015).js @@ -156,6 +156,7 @@ class NoQuickInfoClass { } //// [commentsCommentParsing.js] +"use strict"; /// This is simple /// comments function simple() { } diff --git a/tests/baselines/reference/commentsCommentParsing(target=es5).js b/tests/baselines/reference/commentsCommentParsing(target=es5).js index 27074e85ffafd..7ecc49bffd1e5 100644 --- a/tests/baselines/reference/commentsCommentParsing(target=es5).js +++ b/tests/baselines/reference/commentsCommentParsing(target=es5).js @@ -156,6 +156,7 @@ class NoQuickInfoClass { } //// [commentsCommentParsing.js] +"use strict"; /// This is simple /// comments function simple() { } diff --git a/tests/baselines/reference/commentsInterface(target=es2015).js b/tests/baselines/reference/commentsInterface(target=es2015).js index b9c2653782936..9f495ef26171f 100644 --- a/tests/baselines/reference/commentsInterface(target=es2015).js +++ b/tests/baselines/reference/commentsInterface(target=es2015).js @@ -72,6 +72,7 @@ i3_i.nc_l(10); //// [commentsInterface.js] +"use strict"; var i1_i; var nc_i1_i; var i2_i; diff --git a/tests/baselines/reference/commentsInterface(target=es5).js b/tests/baselines/reference/commentsInterface(target=es5).js index 6ef89589c09ea..48aa5d370eeea 100644 --- a/tests/baselines/reference/commentsInterface(target=es5).js +++ b/tests/baselines/reference/commentsInterface(target=es5).js @@ -72,6 +72,7 @@ i3_i.nc_l(10); //// [commentsInterface.js] +"use strict"; var i1_i; var nc_i1_i; var i2_i; diff --git a/tests/baselines/reference/commentsOnObjectLiteral2.js b/tests/baselines/reference/commentsOnObjectLiteral2.js index 35a732210698a..2ac04dcf47b6f 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral2.js +++ b/tests/baselines/reference/commentsOnObjectLiteral2.js @@ -15,6 +15,7 @@ var Person = makeClass( ); //// [commentsOnObjectLiteral2.js] +"use strict"; var Person = makeClass({ /** This is just another way to define a constructor. diff --git a/tests/baselines/reference/commentsOverloads(target=es2015).js b/tests/baselines/reference/commentsOverloads(target=es2015).js index 841f94fce628d..fcc9b8e028920 100644 --- a/tests/baselines/reference/commentsOverloads(target=es2015).js +++ b/tests/baselines/reference/commentsOverloads(target=es2015).js @@ -177,6 +177,7 @@ var c5_i_2 = new c5("hello"); //// [commentsOverloads.js] +"use strict"; function f1(aOrb) { return 10; } diff --git a/tests/baselines/reference/commentsOverloads(target=es5).js b/tests/baselines/reference/commentsOverloads(target=es5).js index 334c809bba9c4..fecff552d39e3 100644 --- a/tests/baselines/reference/commentsOverloads(target=es5).js +++ b/tests/baselines/reference/commentsOverloads(target=es5).js @@ -177,6 +177,7 @@ var c5_i_2 = new c5("hello"); //// [commentsOverloads.js] +"use strict"; function f1(aOrb) { return 10; } diff --git a/tests/baselines/reference/commentsdoNotEmitComments(target=es2015).js b/tests/baselines/reference/commentsdoNotEmitComments(target=es2015).js index 5ece0c2831850..e74a5afde3a07 100644 --- a/tests/baselines/reference/commentsdoNotEmitComments(target=es2015).js +++ b/tests/baselines/reference/commentsdoNotEmitComments(target=es2015).js @@ -95,6 +95,7 @@ var shade: color = color.green; //// [commentsdoNotEmitComments.js] +"use strict"; var myVariable = 10; function foo(p) { } diff --git a/tests/baselines/reference/commentsdoNotEmitComments(target=es5).js b/tests/baselines/reference/commentsdoNotEmitComments(target=es5).js index 8eb367586d069..503a4071cb6c9 100644 --- a/tests/baselines/reference/commentsdoNotEmitComments(target=es5).js +++ b/tests/baselines/reference/commentsdoNotEmitComments(target=es5).js @@ -95,6 +95,7 @@ var shade: color = color.green; //// [commentsdoNotEmitComments.js] +"use strict"; var myVariable = 10; function foo(p) { } diff --git a/tests/baselines/reference/commentsemitComments(target=es2015).js b/tests/baselines/reference/commentsemitComments(target=es2015).js index e8bf5211c8edb..0015a9c5caaa0 100644 --- a/tests/baselines/reference/commentsemitComments(target=es2015).js +++ b/tests/baselines/reference/commentsemitComments(target=es2015).js @@ -90,6 +90,7 @@ declare var x; //// [commentsemitComments.js] +"use strict"; /** Variable comments*/ var myVariable = 10; /** function comments*/ diff --git a/tests/baselines/reference/commentsemitComments(target=es5).js b/tests/baselines/reference/commentsemitComments(target=es5).js index 678d8ff9dafb8..dd0fa2b04f63e 100644 --- a/tests/baselines/reference/commentsemitComments(target=es5).js +++ b/tests/baselines/reference/commentsemitComments(target=es5).js @@ -90,6 +90,7 @@ declare var x; //// [commentsemitComments.js] +"use strict"; /** Variable comments*/ var myVariable = 10; /** function comments*/ diff --git a/tests/baselines/reference/commonJSAliasedExport.js b/tests/baselines/reference/commonJSAliasedExport.js index 8612e4f80e1d3..310a2b6ce3f0a 100644 --- a/tests/baselines/reference/commonJSAliasedExport.js +++ b/tests/baselines/reference/commonJSAliasedExport.js @@ -18,6 +18,7 @@ var diddy = funky(1) //// [commonJSAliasedExport.js] +"use strict"; const donkey = (ast) => ast; function funky(declaration) { return false; @@ -25,6 +26,7 @@ function funky(declaration) { module.exports = donkey; module.exports.funky = funky; //// [bug43713.js] +"use strict"; const { funky } = require('./commonJSAliasedExport'); /** @type {boolean} */ var diddy; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 6ded99efc041e..f474c34972c36 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -81,6 +81,7 @@ var rh3 = b1 !== a1; var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] +"use strict"; class Base { } class Derived extends Base { diff --git a/tests/baselines/reference/complicatedPrivacy(target=es2015).js b/tests/baselines/reference/complicatedPrivacy(target=es2015).js index d83a150339f13..085199218c6ef 100644 --- a/tests/baselines/reference/complicatedPrivacy(target=es2015).js +++ b/tests/baselines/reference/complicatedPrivacy(target=es2015).js @@ -107,6 +107,7 @@ namespace mglo5 { //// [complicatedPrivacy.js] +"use strict"; var m1; (function (m1) { let m2; diff --git a/tests/baselines/reference/complicatedPrivacy(target=es5).js b/tests/baselines/reference/complicatedPrivacy(target=es5).js index 0b8d56d8611c1..7bd5ed9a08354 100644 --- a/tests/baselines/reference/complicatedPrivacy(target=es5).js +++ b/tests/baselines/reference/complicatedPrivacy(target=es5).js @@ -107,6 +107,7 @@ namespace mglo5 { //// [complicatedPrivacy.js] +"use strict"; var m1; (function (m1) { var m2; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsReference.js b/tests/baselines/reference/compoundAssignmentLHSIsReference.js index b828b631724f0..70937b90fcf0e 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsReference.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsReference.js @@ -37,6 +37,7 @@ function fn2(x4: number) { (x3['a']) += value; //// [compoundAssignmentLHSIsReference.js] +"use strict"; var value; // identifiers: variable and parameter var x1; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index bde07a458cd32..042bc14865bf0 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -125,6 +125,7 @@ foo() += value; (foo()) += value; //// [compoundAssignmentLHSIsValue.js] +"use strict"; // expected error for all the LHS of compound assignments (arithmetic and addition) var value; // this diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index 9610f25b58ce0..41d3f079f71a3 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -88,6 +88,7 @@ foo() **= value; (foo()) **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] +"use strict"; // expected error for all the LHS of compound assignments (arithmetic and addition) var value; // this diff --git a/tests/baselines/reference/computedPropertyNames11_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames11_ES5(target=es2015).js index fb24a97a34b26..82fba237cdbe2 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames11_ES5(target=es2015).js @@ -19,6 +19,7 @@ var v = { } //// [computedPropertyNames11_ES5.js] +"use strict"; var s; var n; var a; diff --git a/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).js index c856cec1f87fb..67d54e10c131d 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).js @@ -19,6 +19,7 @@ var v = { } //// [computedPropertyNames11_ES5.js] +"use strict"; var _a; var s; var n; diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.js b/tests/baselines/reference/computedPropertyNames11_ES6.js index 7535bc8d563ee..d278b6de647c5 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.js +++ b/tests/baselines/reference/computedPropertyNames11_ES6.js @@ -19,6 +19,7 @@ var v = { } //// [computedPropertyNames11_ES6.js] +"use strict"; var s; var n; var a; diff --git a/tests/baselines/reference/computedPropertyNames16_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames16_ES5(target=es2015).js index 542d1615cca68..a11a50b4ab97b 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames16_ES5(target=es2015).js @@ -19,6 +19,7 @@ class C { } //// [computedPropertyNames16_ES5.js] +"use strict"; var s; var n; var a; diff --git a/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).js index acabab442ced2..6ff455596590b 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).js @@ -19,6 +19,7 @@ class C { } //// [computedPropertyNames16_ES5.js] +"use strict"; var s; var n; var a; diff --git a/tests/baselines/reference/computedPropertyNames16_ES6.js b/tests/baselines/reference/computedPropertyNames16_ES6.js index 9017a6feb78de..fdf30496d6693 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES6.js +++ b/tests/baselines/reference/computedPropertyNames16_ES6.js @@ -19,6 +19,7 @@ class C { } //// [computedPropertyNames16_ES6.js] +"use strict"; var s; var n; var a; diff --git a/tests/baselines/reference/computedPropertyNames17_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames17_ES5(target=es2015).js index da59f5a575ff2..75e1c4e2a07d0 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames17_ES5(target=es2015).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames17_ES5.js] +"use strict"; var b; class C { get [b]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).js index 0d6e549d5bb42..559ad1c39a703 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames17_ES5.js] +"use strict"; var b; var C = /** @class */ (function () { function C() { diff --git a/tests/baselines/reference/computedPropertyNames17_ES6.js b/tests/baselines/reference/computedPropertyNames17_ES6.js index f3b9d31756c8d..4b0b296282711 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES6.js +++ b/tests/baselines/reference/computedPropertyNames17_ES6.js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames17_ES6.js] +"use strict"; var b; class C { get [b]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNames20_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames20_ES5(target=es2015).js index 8f654f3f3a76f..ae098b7e30f9f 100644 --- a/tests/baselines/reference/computedPropertyNames20_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames20_ES5(target=es2015).js @@ -6,6 +6,7 @@ var obj = { } //// [computedPropertyNames20_ES5.js] +"use strict"; var obj = { [this.bar]: 0 }; diff --git a/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).js index 1b85ac6da761e..d9ba8b5832a59 100644 --- a/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).js @@ -6,6 +6,7 @@ var obj = { } //// [computedPropertyNames20_ES5.js] +"use strict"; var _a; var obj = (_a = {}, _a[this.bar] = 0, diff --git a/tests/baselines/reference/computedPropertyNames20_ES6.js b/tests/baselines/reference/computedPropertyNames20_ES6.js index aa6387c17536f..c5bf75210a465 100644 --- a/tests/baselines/reference/computedPropertyNames20_ES6.js +++ b/tests/baselines/reference/computedPropertyNames20_ES6.js @@ -6,6 +6,7 @@ var obj = { } //// [computedPropertyNames20_ES6.js] +"use strict"; var obj = { [this.bar]: 0 }; diff --git a/tests/baselines/reference/computedPropertyNames2_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames2_ES5(target=es2015).js index 2af28cda81d3c..5e1a5849f3ebe 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames2_ES5(target=es2015).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames2_ES5.js] +"use strict"; var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).js index 45419aa3fc4bc..620c302972c79 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames2_ES5.js] +"use strict"; var methodName = "method"; var accessorName = "accessor"; var C = /** @class */ (function () { diff --git a/tests/baselines/reference/computedPropertyNames2_ES6.js b/tests/baselines/reference/computedPropertyNames2_ES6.js index 8a1cf475b636f..0574efabca9a5 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES6.js +++ b/tests/baselines/reference/computedPropertyNames2_ES6.js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames2_ES6.js] +"use strict"; var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/baselines/reference/computedPropertyNames36_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames36_ES5(target=es2015).js index 6cdb46e204fcc..e43c108277596 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames36_ES5(target=es2015).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames36_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).js index 0b511af7605ba..d4f6c71567366 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames36_ES5.js] +"use strict"; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames36_ES6.js b/tests/baselines/reference/computedPropertyNames36_ES6.js index 03a026c0c1b9f..82657054d6775 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES6.js +++ b/tests/baselines/reference/computedPropertyNames36_ES6.js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames36_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames37_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames37_ES5(target=es2015).js index 5a1635fe3207b..d774f40f0f7bf 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames37_ES5(target=es2015).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames37_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).js index 13b1d0ade0515..f9f88f3922bb1 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames37_ES5.js] +"use strict"; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames37_ES6.js b/tests/baselines/reference/computedPropertyNames37_ES6.js index 6e1f6242d205d..e5ae4e15f4ffa 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES6.js +++ b/tests/baselines/reference/computedPropertyNames37_ES6.js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames37_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames38_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames38_ES5(target=es2015).js index 05613dc4cd61e..80378c4b441b4 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames38_ES5(target=es2015).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames38_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).js index 8daec73bff09b..d78e829f7b593 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames38_ES5.js] +"use strict"; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames38_ES6.js b/tests/baselines/reference/computedPropertyNames38_ES6.js index 805c81bc24f22..3315299dbe191 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES6.js +++ b/tests/baselines/reference/computedPropertyNames38_ES6.js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames38_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames39_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames39_ES5(target=es2015).js index b203e11def7b5..e10b53e12aeef 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames39_ES5(target=es2015).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames39_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).js index f90979b888f9e..d13d1afc0663f 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames39_ES5.js] +"use strict"; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames39_ES6.js b/tests/baselines/reference/computedPropertyNames39_ES6.js index e8a7b8cd7d293..55d88b7597c1c 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES6.js +++ b/tests/baselines/reference/computedPropertyNames39_ES6.js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames39_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames3_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames3_ES5(target=es2015).js index 9ce0d476a48be..3a80e83dde7d5 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames3_ES5(target=es2015).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames3_ES5.js] +"use strict"; var id; class C { [0 + 1]() { } diff --git a/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).js index 704185c43934f..f57e5bd3fe8b1 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames3_ES5.js] +"use strict"; var id; var C = /** @class */ (function () { function C() { diff --git a/tests/baselines/reference/computedPropertyNames3_ES6.js b/tests/baselines/reference/computedPropertyNames3_ES6.js index 47f74c659daf4..d1db482b80b13 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES6.js +++ b/tests/baselines/reference/computedPropertyNames3_ES6.js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames3_ES6.js] +"use strict"; var id; class C { [0 + 1]() { } diff --git a/tests/baselines/reference/computedPropertyNames40_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames40_ES5(target=es2015).js index 665b22af28ff3..ae8dc4b5f884c 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames40_ES5(target=es2015).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames40_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).js index f0195986a8ec1..6cca0b5e8a502 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames40_ES5.js] +"use strict"; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames40_ES6.js b/tests/baselines/reference/computedPropertyNames40_ES6.js index 1d5ed8cfd221e..21ad19a1953a7 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES6.js +++ b/tests/baselines/reference/computedPropertyNames40_ES6.js @@ -13,6 +13,7 @@ class C { } //// [computedPropertyNames40_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames41_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames41_ES5(target=es2015).js index d88d39f21d1ef..7e1990c4f7876 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames41_ES5(target=es2015).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames41_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).js index 176c71ea25da3..9b81465e3aed9 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames41_ES5.js] +"use strict"; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames41_ES6.js b/tests/baselines/reference/computedPropertyNames41_ES6.js index f8ebfaf75d4c6..441e9522349de 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES6.js +++ b/tests/baselines/reference/computedPropertyNames41_ES6.js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames41_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames42_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames42_ES5(target=es2015).js index 0a6fc7fdb9849..c28b9414b35d7 100644 --- a/tests/baselines/reference/computedPropertyNames42_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames42_ES5(target=es2015).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames42_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).js index 52210d8559c4d..0a5bea745bc34 100644 --- a/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames42_ES5.js] +"use strict"; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames42_ES6.js b/tests/baselines/reference/computedPropertyNames42_ES6.js index 16617edbf3790..e8234920f35bb 100644 --- a/tests/baselines/reference/computedPropertyNames42_ES6.js +++ b/tests/baselines/reference/computedPropertyNames42_ES6.js @@ -12,6 +12,7 @@ class C { } //// [computedPropertyNames42_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames43_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames43_ES5(target=es2015).js index c362d71605aed..a1c1dcb450771 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames43_ES5(target=es2015).js @@ -15,6 +15,7 @@ class D extends C { } //// [computedPropertyNames43_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).js index 5a5ff015ebb0e..1264fa10bcfac 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).js @@ -15,6 +15,7 @@ class D extends C { } //// [computedPropertyNames43_ES5.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/computedPropertyNames43_ES6.js b/tests/baselines/reference/computedPropertyNames43_ES6.js index ba36972d1babb..6ee01281b746d 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES6.js +++ b/tests/baselines/reference/computedPropertyNames43_ES6.js @@ -15,6 +15,7 @@ class D extends C { } //// [computedPropertyNames43_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames44_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames44_ES5(target=es2015).js index 4810f3cb29970..26bb7e519ccdb 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames44_ES5(target=es2015).js @@ -14,6 +14,7 @@ class D extends C { } //// [computedPropertyNames44_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).js index a0db5485d62b7..7dd045b667dd1 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).js @@ -14,6 +14,7 @@ class D extends C { } //// [computedPropertyNames44_ES5.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/computedPropertyNames44_ES6.js b/tests/baselines/reference/computedPropertyNames44_ES6.js index 3cc2451317c19..dce10a58bafbf 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES6.js +++ b/tests/baselines/reference/computedPropertyNames44_ES6.js @@ -14,6 +14,7 @@ class D extends C { } //// [computedPropertyNames44_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames45_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames45_ES5(target=es2015).js index 72c19390ec333..60e45f39d1612 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames45_ES5(target=es2015).js @@ -15,6 +15,7 @@ class D extends C { } //// [computedPropertyNames45_ES5.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).js index 19b8fdacbcdfd..c2e55ca6931bb 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).js @@ -15,6 +15,7 @@ class D extends C { } //// [computedPropertyNames45_ES5.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/computedPropertyNames45_ES6.js b/tests/baselines/reference/computedPropertyNames45_ES6.js index 23849240b51f5..df49aa6b0aee3 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES6.js +++ b/tests/baselines/reference/computedPropertyNames45_ES6.js @@ -15,6 +15,7 @@ class D extends C { } //// [computedPropertyNames45_ES6.js] +"use strict"; class Foo { } class Foo2 { diff --git a/tests/baselines/reference/computedPropertyNames49_ES5.js b/tests/baselines/reference/computedPropertyNames49_ES5.js index cf8abfebafcc6..323740da4abe1 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES5.js +++ b/tests/baselines/reference/computedPropertyNames49_ES5.js @@ -27,6 +27,7 @@ var x = { } //// [computedPropertyNames49_ES5.js] +"use strict"; var x = { p1: 10, get [1 + 1]() { diff --git a/tests/baselines/reference/computedPropertyNames49_ES6.js b/tests/baselines/reference/computedPropertyNames49_ES6.js index 3dec94ce1d9aa..b9a838526e48e 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES6.js +++ b/tests/baselines/reference/computedPropertyNames49_ES6.js @@ -27,6 +27,7 @@ var x = { } //// [computedPropertyNames49_ES6.js] +"use strict"; var x = { p1: 10, get [1 + 1]() { diff --git a/tests/baselines/reference/computedPropertyNames50_ES5.js b/tests/baselines/reference/computedPropertyNames50_ES5.js index 58d296a4f7680..167e55cac0ede 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES5.js +++ b/tests/baselines/reference/computedPropertyNames50_ES5.js @@ -27,6 +27,7 @@ var x = { } //// [computedPropertyNames50_ES5.js] +"use strict"; var x = { p1: 10, get foo() { diff --git a/tests/baselines/reference/computedPropertyNames50_ES6.js b/tests/baselines/reference/computedPropertyNames50_ES6.js index 64d7c8d8e9c94..eb3e781f55dd9 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES6.js +++ b/tests/baselines/reference/computedPropertyNames50_ES6.js @@ -27,6 +27,7 @@ var x = { } //// [computedPropertyNames50_ES6.js] +"use strict"; var x = { p1: 10, get foo() { diff --git a/tests/baselines/reference/computedPropertyNames5_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames5_ES5(target=es2015).js index 14931b10c5c00..de281f53be23c 100644 --- a/tests/baselines/reference/computedPropertyNames5_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames5_ES5(target=es2015).js @@ -12,6 +12,7 @@ var v = { } //// [computedPropertyNames5_ES5.js] +"use strict"; var v = { [b]: 0, [true]: 1, diff --git a/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).js index c39dc301a05eb..e0896fa4eb2e0 100644 --- a/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).js @@ -12,6 +12,7 @@ var v = { } //// [computedPropertyNames5_ES5.js] +"use strict"; var _a; var v = (_a = {}, _a[b] = 0, diff --git a/tests/baselines/reference/computedPropertyNames5_ES6.js b/tests/baselines/reference/computedPropertyNames5_ES6.js index 97b0076dc43cd..a803274745b22 100644 --- a/tests/baselines/reference/computedPropertyNames5_ES6.js +++ b/tests/baselines/reference/computedPropertyNames5_ES6.js @@ -12,6 +12,7 @@ var v = { } //// [computedPropertyNames5_ES6.js] +"use strict"; var v = { [b]: 0, [true]: 1, diff --git a/tests/baselines/reference/computedPropertyNames9_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNames9_ES5(target=es2015).js index 7a5ec5dd1ba49..68fd40cd0031c 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNames9_ES5(target=es2015).js @@ -13,6 +13,7 @@ var v = { } //// [computedPropertyNames9_ES5.js] +"use strict"; function f(x) { } var v = { [f("")]: 0, diff --git a/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).js index 5cbd14985e98a..66e5aa0c216fa 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).js @@ -13,6 +13,7 @@ var v = { } //// [computedPropertyNames9_ES5.js] +"use strict"; var _a; function f(x) { } var v = (_a = {}, diff --git a/tests/baselines/reference/computedPropertyNames9_ES6.js b/tests/baselines/reference/computedPropertyNames9_ES6.js index 4220f3f90c280..9b032db4cd706 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES6.js +++ b/tests/baselines/reference/computedPropertyNames9_ES6.js @@ -13,6 +13,7 @@ var v = { } //// [computedPropertyNames9_ES6.js] +"use strict"; function f(x) { } var v = { [f("")]: 0, diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es2015).js index 1e68dfc072995..8c1fcc2823c13 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [computedPropertyNamesDeclarationEmit1_ES5.js] +"use strict"; class C { ["" + ""]() { } get ["" + ""]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).js index 7b191d399503d..8ca9a7694d6df 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [computedPropertyNamesDeclarationEmit1_ES5.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js index 325ccb7b5ce4a..9c1b6ddbe9d92 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js @@ -8,6 +8,7 @@ class C { } //// [computedPropertyNamesDeclarationEmit1_ES6.js] +"use strict"; class C { ["" + ""]() { } get ["" + ""]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es2015).js index e4b4554dbc4cc..830dfa3b1fe2d 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [computedPropertyNamesDeclarationEmit2_ES5.js] +"use strict"; class C { static ["" + ""]() { } static get ["" + ""]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).js index 6bfa2b01e02dc..5864b07166692 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [computedPropertyNamesDeclarationEmit2_ES5.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js index 27c5f938e6584..eae137ac171c4 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js @@ -8,6 +8,7 @@ class C { } //// [computedPropertyNamesDeclarationEmit2_ES6.js] +"use strict"; class C { static ["" + ""]() { } static get ["" + ""]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es2015).js index 5eaf8ede3475e..83f02707fff0d 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es2015).js @@ -9,6 +9,7 @@ var v = { } //// [computedPropertyNamesDeclarationEmit5_ES5.js] +"use strict"; var v = { ["" + ""]: 0, ["" + ""]() { }, diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).js index f377ed3bd476c..2fa252cd8c68a 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).js @@ -9,6 +9,7 @@ var v = { } //// [computedPropertyNamesDeclarationEmit5_ES5.js] +"use strict"; var _a; var v = (_a = {}, _a["" + ""] = 0, diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js index 9c8910cd0ff08..43b7945df3cae 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js @@ -9,6 +9,7 @@ var v = { } //// [computedPropertyNamesDeclarationEmit5_ES6.js] +"use strict"; var v = { ["" + ""]: 0, ["" + ""]() { }, diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es2015).js b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es2015).js index 993cb11ae4bd6..e35ec25e91271 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es2015).js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es2015).js @@ -10,6 +10,7 @@ class C { } //// [computedPropertyNamesOnOverloads_ES5.js] +"use strict"; var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es5).js b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es5).js index e0f77f33b6a2f..93802f9a1942b 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es5).js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es5).js @@ -10,6 +10,7 @@ class C { } //// [computedPropertyNamesOnOverloads_ES5.js] +"use strict"; var methodName = "method"; var accessorName = "accessor"; var C = /** @class */ (function () { diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js index 5017aff67babb..5489d60921588 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js @@ -10,6 +10,7 @@ class C { } //// [computedPropertyNamesOnOverloads_ES6.js] +"use strict"; var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es2015).js b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es2015).js index c595aa7eab959..6f964ca86ea51 100644 --- a/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es2015).js +++ b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es2015).js @@ -4,4 +4,5 @@ const b = ({ [`key`]: renamed }) => renamed; //// [computerPropertiesInES5ShouldBeTransformed.js] +"use strict"; const b = ({ [`key`]: renamed }) => renamed; diff --git a/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).js b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).js index 5de7313f00b1b..5c9d680aa9dd5 100644 --- a/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).js +++ b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).js @@ -4,6 +4,7 @@ const b = ({ [`key`]: renamed }) => renamed; //// [computerPropertiesInES5ShouldBeTransformed.js] +"use strict"; var b = function (_a) { var _b = "key", renamed = _a[_b]; return renamed; diff --git a/tests/baselines/reference/conditionalExpressions2.js b/tests/baselines/reference/conditionalExpressions2.js index 6bc156d2d2958..4613366f2c46c 100644 --- a/tests/baselines/reference/conditionalExpressions2.js +++ b/tests/baselines/reference/conditionalExpressions2.js @@ -12,6 +12,7 @@ var h = [{h:5}, null]; function i() { if (true) { return { x: 5 }; } else { return null; } } //// [conditionalExpressions2.js] +"use strict"; var a = false ? 1 : null; var b = false ? undefined : 0; var c = false ? 1 : 0; diff --git a/tests/baselines/reference/constDeclarations-access.js b/tests/baselines/reference/constDeclarations-access.js index dd5624bcf4c8a..be8dbeec38de6 100644 --- a/tests/baselines/reference/constDeclarations-access.js +++ b/tests/baselines/reference/constDeclarations-access.js @@ -7,6 +7,8 @@ const x = 0 x++; //// [file1.js] +"use strict"; const x = 0; //// [file2.js] +"use strict"; x++; diff --git a/tests/baselines/reference/constDeclarations-access2.js b/tests/baselines/reference/constDeclarations-access2.js index 173398b3601ca..bb139c1c6528f 100644 --- a/tests/baselines/reference/constDeclarations-access2.js +++ b/tests/baselines/reference/constDeclarations-access2.js @@ -42,6 +42,7 @@ x.toString(); //// [constDeclarations-access2.js] +"use strict"; const x = 0; // Errors x = 1; diff --git a/tests/baselines/reference/constDeclarations-access3.js b/tests/baselines/reference/constDeclarations-access3.js index a6f967bb8cd06..2072785fad8c8 100644 --- a/tests/baselines/reference/constDeclarations-access3.js +++ b/tests/baselines/reference/constDeclarations-access3.js @@ -46,6 +46,7 @@ M.x.toString(); //// [constDeclarations-access3.js] +"use strict"; var M; (function (M) { M.x = 0; diff --git a/tests/baselines/reference/constDeclarations-access4.js b/tests/baselines/reference/constDeclarations-access4.js index 1cfd9e19262c1..d6414a8cb7c6e 100644 --- a/tests/baselines/reference/constDeclarations-access4.js +++ b/tests/baselines/reference/constDeclarations-access4.js @@ -46,6 +46,7 @@ M.x.toString(); //// [constDeclarations-access4.js] +"use strict"; // Errors M.x = 1; M.x += 2; diff --git a/tests/baselines/reference/constDeclarations-ambient-errors.js b/tests/baselines/reference/constDeclarations-ambient-errors.js index a1ded5492565b..220913caa9814 100644 --- a/tests/baselines/reference/constDeclarations-ambient-errors.js +++ b/tests/baselines/reference/constDeclarations-ambient-errors.js @@ -12,3 +12,4 @@ declare namespace M { } //// [constDeclarations-ambient-errors.js] +"use strict"; diff --git a/tests/baselines/reference/constDeclarations-ambient.js b/tests/baselines/reference/constDeclarations-ambient.js index 92b46de553337..db93a7a09d1f3 100644 --- a/tests/baselines/reference/constDeclarations-ambient.js +++ b/tests/baselines/reference/constDeclarations-ambient.js @@ -12,3 +12,4 @@ declare namespace M { } //// [constDeclarations-ambient.js] +"use strict"; diff --git a/tests/baselines/reference/constDeclarations-errors.js b/tests/baselines/reference/constDeclarations-errors.js index 2ee1bbec2b90e..425366ad0c897 100644 --- a/tests/baselines/reference/constDeclarations-errors.js +++ b/tests/baselines/reference/constDeclarations-errors.js @@ -18,6 +18,7 @@ for(const c9; c9 < 1;) { } for(const c10 = 0, c11; c10 < 1;) { } //// [constDeclarations-errors.js] +"use strict"; // error, missing intialicer const c1; const c2; diff --git a/tests/baselines/reference/constDeclarations-es5(target=es2015).js b/tests/baselines/reference/constDeclarations-es5(target=es2015).js index a6d2705865672..6883cd80b4e7f 100644 --- a/tests/baselines/reference/constDeclarations-es5(target=es2015).js +++ b/tests/baselines/reference/constDeclarations-es5(target=es2015).js @@ -7,6 +7,7 @@ const z9 = 0, z10 :string = "", z11 = null; //// [constDeclarations-es5.js] +"use strict"; const z7 = false; const z8 = 23; const z9 = 0, z10 = "", z11 = null; diff --git a/tests/baselines/reference/constDeclarations-es5(target=es5).js b/tests/baselines/reference/constDeclarations-es5(target=es5).js index 755f47517b9dd..e8b10ff87685b 100644 --- a/tests/baselines/reference/constDeclarations-es5(target=es5).js +++ b/tests/baselines/reference/constDeclarations-es5(target=es5).js @@ -7,6 +7,7 @@ const z9 = 0, z10 :string = "", z11 = null; //// [constDeclarations-es5.js] +"use strict"; var z7 = false; var z8 = 23; var z9 = 0, z10 = "", z11 = null; diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).js b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).js new file mode 100644 index 0000000000000..89f0d6d18cc27 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).js @@ -0,0 +1,58 @@ +//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// + +//// [constDeclarations-invalidContexts.ts] +// Errors, const must be defined inside a block +if (true) + const c1 = 0; +else + const c2 = 0; + +while (true) + const c3 = 0; + +do + const c4 = 0; +while (true); + +var obj; +with (obj) + const c5 = 0; // No Error will be reported here since we turn off all type checking + +for (var i = 0; i < 10; i++) + const c6 = 0; + +for (var i2 in {}) + const c7 = 0; + +if (true) + label: const c8 = 0; + +while (false) + label2: label3: label4: const c9 = 0; + + + + + +//// [constDeclarations-invalidContexts.js] +// Errors, const must be defined inside a block +if (true) + const c1 = 0; +else + const c2 = 0; +while (true) + const c3 = 0; +do + const c4 = 0; +while (true); +var obj; +with (obj) + const c5 = 0; // No Error will be reported here since we turn off all type checking +for (var i = 0; i < 10; i++) + const c6 = 0; +for (var i2 in {}) + const c7 = 0; +if (true) + label: const c8 = 0; +while (false) + label2: label3: label4: const c9 = 0; diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).js b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).js new file mode 100644 index 0000000000000..8510795993652 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).js @@ -0,0 +1,59 @@ +//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// + +//// [constDeclarations-invalidContexts.ts] +// Errors, const must be defined inside a block +if (true) + const c1 = 0; +else + const c2 = 0; + +while (true) + const c3 = 0; + +do + const c4 = 0; +while (true); + +var obj; +with (obj) + const c5 = 0; // No Error will be reported here since we turn off all type checking + +for (var i = 0; i < 10; i++) + const c6 = 0; + +for (var i2 in {}) + const c7 = 0; + +if (true) + label: const c8 = 0; + +while (false) + label2: label3: label4: const c9 = 0; + + + + + +//// [constDeclarations-invalidContexts.js] +"use strict"; +// Errors, const must be defined inside a block +if (true) + const c1 = 0; +else + const c2 = 0; +while (true) + const c3 = 0; +do + const c4 = 0; +while (true); +var obj; +with (obj) + const c5 = 0; // No Error will be reported here since we turn off all type checking +for (var i = 0; i < 10; i++) + const c6 = 0; +for (var i2 in {}) + const c7 = 0; +if (true) + label: const c8 = 0; +while (false) + label2: label3: label4: const c9 = 0; diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).js b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).js new file mode 100644 index 0000000000000..b7fbe9021102f --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).js @@ -0,0 +1,275 @@ +//// [tests/cases/compiler/constDeclarations-scopes.ts] //// + +//// [constDeclarations-scopes.ts] +// global +const c = "string"; + +var n: number; + +// Control flow statements with blocks +if (true) { + const c = 0; + n = c; +} +else { + const c = 0; + n = c; +} + +while (true) { + const c = 0; + n = c; +} + +do { + const c = 0; + n = c; +} while (true); + +var obj; +with (obj) { + const c = 0; + n = c; +} + +for (var i = 0; i < 10; i++) { + const c = 0; + n = c; +} + +for (var i2 in {}) { + const c = 0; + n = c; +} + +if (true) { + label: const c = 0; + n = c; +} + +while (false) { + label2: label3: label4: const c = 0; + n = c; +} + +// Try/catch/finally +try { + const c = 0; + n = c; +} +catch (e) { + const c = 0; + n = c; +} +finally { + const c = 0; + n = c; +} + +// Switch +switch (0) { + case 0: + const c = 0; + n = c; + break; +} + +// blocks +{ + const c = 0; + n = c; + { + const c = false; + var b: boolean = c; + } +} + +// functions + +function F() { + const c = 0; + n = c; +} + +var F2 = () => { + const c = 0; + n = c; +}; + +var F3 = function () { + const c = 0; + n = c; +}; + +// modules +namespace m { + const c = 0; + n = c; + + { + const c = false; + var b2: boolean = c; + } +} + +// methods +class C { + constructor() { + const c = 0; + n = c; + } + + method() { + const c = 0; + n = c; + } + + get v() { + const c = 0; + n = c; + return n; + } + + set v(value) { + const c = 0; + n = c; + } +} + +// object literals +var o = { + f() { + const c = 0; + n = c; + }, + f2: () => { + const c = 0; + n = c; + } +} + +//// [constDeclarations-scopes.js] +// global +const c = "string"; +var n; +// Control flow statements with blocks +if (true) { + const c = 0; + n = c; +} +else { + const c = 0; + n = c; +} +while (true) { + const c = 0; + n = c; +} +do { + const c = 0; + n = c; +} while (true); +var obj; +with (obj) { + const c = 0; + n = c; +} +for (var i = 0; i < 10; i++) { + const c = 0; + n = c; +} +for (var i2 in {}) { + const c = 0; + n = c; +} +if (true) { + label: const c = 0; + n = c; +} +while (false) { + label2: label3: label4: const c = 0; + n = c; +} +// Try/catch/finally +try { + const c = 0; + n = c; +} +catch (e) { + const c = 0; + n = c; +} +finally { + const c = 0; + n = c; +} +// Switch +switch (0) { + case 0: + const c = 0; + n = c; + break; +} +// blocks +{ + const c = 0; + n = c; + { + const c = false; + var b = c; + } +} +// functions +function F() { + const c = 0; + n = c; +} +var F2 = () => { + const c = 0; + n = c; +}; +var F3 = function () { + const c = 0; + n = c; +}; +// modules +var m; +(function (m) { + const c = 0; + n = c; + { + const c = false; + var b2 = c; + } +})(m || (m = {})); +// methods +class C { + constructor() { + const c = 0; + n = c; + } + method() { + const c = 0; + n = c; + } + get v() { + const c = 0; + n = c; + return n; + } + set v(value) { + const c = 0; + n = c; + } +} +// object literals +var o = { + f() { + const c = 0; + n = c; + }, + f2: () => { + const c = 0; + n = c; + } +}; diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).js b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).js new file mode 100644 index 0000000000000..0bf8f857d7772 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).js @@ -0,0 +1,276 @@ +//// [tests/cases/compiler/constDeclarations-scopes.ts] //// + +//// [constDeclarations-scopes.ts] +// global +const c = "string"; + +var n: number; + +// Control flow statements with blocks +if (true) { + const c = 0; + n = c; +} +else { + const c = 0; + n = c; +} + +while (true) { + const c = 0; + n = c; +} + +do { + const c = 0; + n = c; +} while (true); + +var obj; +with (obj) { + const c = 0; + n = c; +} + +for (var i = 0; i < 10; i++) { + const c = 0; + n = c; +} + +for (var i2 in {}) { + const c = 0; + n = c; +} + +if (true) { + label: const c = 0; + n = c; +} + +while (false) { + label2: label3: label4: const c = 0; + n = c; +} + +// Try/catch/finally +try { + const c = 0; + n = c; +} +catch (e) { + const c = 0; + n = c; +} +finally { + const c = 0; + n = c; +} + +// Switch +switch (0) { + case 0: + const c = 0; + n = c; + break; +} + +// blocks +{ + const c = 0; + n = c; + { + const c = false; + var b: boolean = c; + } +} + +// functions + +function F() { + const c = 0; + n = c; +} + +var F2 = () => { + const c = 0; + n = c; +}; + +var F3 = function () { + const c = 0; + n = c; +}; + +// modules +namespace m { + const c = 0; + n = c; + + { + const c = false; + var b2: boolean = c; + } +} + +// methods +class C { + constructor() { + const c = 0; + n = c; + } + + method() { + const c = 0; + n = c; + } + + get v() { + const c = 0; + n = c; + return n; + } + + set v(value) { + const c = 0; + n = c; + } +} + +// object literals +var o = { + f() { + const c = 0; + n = c; + }, + f2: () => { + const c = 0; + n = c; + } +} + +//// [constDeclarations-scopes.js] +"use strict"; +// global +const c = "string"; +var n; +// Control flow statements with blocks +if (true) { + const c = 0; + n = c; +} +else { + const c = 0; + n = c; +} +while (true) { + const c = 0; + n = c; +} +do { + const c = 0; + n = c; +} while (true); +var obj; +with (obj) { + const c = 0; + n = c; +} +for (var i = 0; i < 10; i++) { + const c = 0; + n = c; +} +for (var i2 in {}) { + const c = 0; + n = c; +} +if (true) { + label: const c = 0; + n = c; +} +while (false) { + label2: label3: label4: const c = 0; + n = c; +} +// Try/catch/finally +try { + const c = 0; + n = c; +} +catch (e) { + const c = 0; + n = c; +} +finally { + const c = 0; + n = c; +} +// Switch +switch (0) { + case 0: + const c = 0; + n = c; + break; +} +// blocks +{ + const c = 0; + n = c; + { + const c = false; + var b = c; + } +} +// functions +function F() { + const c = 0; + n = c; +} +var F2 = () => { + const c = 0; + n = c; +}; +var F3 = function () { + const c = 0; + n = c; +}; +// modules +var m; +(function (m) { + const c = 0; + n = c; + { + const c = false; + var b2 = c; + } +})(m || (m = {})); +// methods +class C { + constructor() { + const c = 0; + n = c; + } + method() { + const c = 0; + n = c; + } + get v() { + const c = 0; + n = c; + return n; + } + set v(value) { + const c = 0; + n = c; + } +} +// object literals +var o = { + f() { + const c = 0; + n = c; + }, + f2: () => { + const c = 0; + n = c; + } +}; diff --git a/tests/baselines/reference/constDeclarations-scopes2.js b/tests/baselines/reference/constDeclarations-scopes2.js index bb026f76290f9..5ecbbb061b8ff 100644 --- a/tests/baselines/reference/constDeclarations-scopes2.js +++ b/tests/baselines/reference/constDeclarations-scopes2.js @@ -17,6 +17,7 @@ for (const c = 0; c < 10; n = c ) { //// [constDeclarations-scopes2.js] +"use strict"; // global const c = "string"; var n; diff --git a/tests/baselines/reference/constDeclarations-useBeforeDefinition.js b/tests/baselines/reference/constDeclarations-useBeforeDefinition.js index e5b5656f4c126..624d4999bd14b 100644 --- a/tests/baselines/reference/constDeclarations-useBeforeDefinition.js +++ b/tests/baselines/reference/constDeclarations-useBeforeDefinition.js @@ -14,6 +14,7 @@ var v1; //// [constDeclarations-useBeforeDefinition.js] +"use strict"; { c1; const c1 = 0; diff --git a/tests/baselines/reference/constDeclarations-useBeforeDefinition2.js b/tests/baselines/reference/constDeclarations-useBeforeDefinition2.js index f75ec813d65f2..6d6488085677b 100644 --- a/tests/baselines/reference/constDeclarations-useBeforeDefinition2.js +++ b/tests/baselines/reference/constDeclarations-useBeforeDefinition2.js @@ -8,5 +8,6 @@ const c = 0; //// [out.js] +"use strict"; c; const c = 0; diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).js b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).js new file mode 100644 index 0000000000000..138e4828780c8 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).js @@ -0,0 +1,227 @@ +//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// + +//// [constDeclarations-validContexts.ts] +// Control flow statements with blocks +if (true) { + const c1 = 0; +} +else { + const c2 = 0; +} + +while (true) { + const c3 = 0; +} + +do { + const c4 = 0; +} while (true); + +var obj; +with (obj) { + const c5 = 0; +} + +for (var i = 0; i < 10; i++) { + const c6 = 0; +} + +for (var i2 in {}) { + const c7 = 0; +} + +if (true) { + label: const c8 = 0; +} + +while (false) { + label2: label3: label4: const c9 = 0; +} + +// Try/catch/finally +try { + const c10 = 0; +} +catch (e) { + const c11 = 0; +} +finally { + const c12 = 0; +} + +// Switch +switch (0) { + case 0: + const c13 = 0; + break; + default: + const c14 = 0; + break; +} + +// blocks +{ + const c15 = 0; + { + const c16 = 0 + label17: const c17 = 0; + } +} + +// global +const c18 = 0; + +// functions +function F() { + const c19 = 0; +} + +var F2 = () => { + const c20 = 0; +}; + +var F3 = function () { + const c21 = 0; +}; + +// modules +namespace m { + const c22 = 0; + + { + const c23 = 0; + } +} + +// methods +class C { + constructor() { + const c24 = 0; + } + + method() { + const c25 = 0; + } + + get v() { + const c26 = 0; + return c26; + } + + set v(value) { + const c27 = value; + } +} + +// object literals +var o = { + f() { + const c28 = 0; + }, + f2: () => { + const c29 = 0; + } +} + +//// [constDeclarations-validContexts.js] +// Control flow statements with blocks +if (true) { + const c1 = 0; +} +else { + const c2 = 0; +} +while (true) { + const c3 = 0; +} +do { + const c4 = 0; +} while (true); +var obj; +with (obj) { + const c5 = 0; +} +for (var i = 0; i < 10; i++) { + const c6 = 0; +} +for (var i2 in {}) { + const c7 = 0; +} +if (true) { + label: const c8 = 0; +} +while (false) { + label2: label3: label4: const c9 = 0; +} +// Try/catch/finally +try { + const c10 = 0; +} +catch (e) { + const c11 = 0; +} +finally { + const c12 = 0; +} +// Switch +switch (0) { + case 0: + const c13 = 0; + break; + default: + const c14 = 0; + break; +} +// blocks +{ + const c15 = 0; + { + const c16 = 0; + label17: const c17 = 0; + } +} +// global +const c18 = 0; +// functions +function F() { + const c19 = 0; +} +var F2 = () => { + const c20 = 0; +}; +var F3 = function () { + const c21 = 0; +}; +// modules +var m; +(function (m) { + const c22 = 0; + { + const c23 = 0; + } +})(m || (m = {})); +// methods +class C { + constructor() { + const c24 = 0; + } + method() { + const c25 = 0; + } + get v() { + const c26 = 0; + return c26; + } + set v(value) { + const c27 = value; + } +} +// object literals +var o = { + f() { + const c28 = 0; + }, + f2: () => { + const c29 = 0; + } +}; diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).js b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).js new file mode 100644 index 0000000000000..c2a6bb9b3cae0 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).js @@ -0,0 +1,228 @@ +//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// + +//// [constDeclarations-validContexts.ts] +// Control flow statements with blocks +if (true) { + const c1 = 0; +} +else { + const c2 = 0; +} + +while (true) { + const c3 = 0; +} + +do { + const c4 = 0; +} while (true); + +var obj; +with (obj) { + const c5 = 0; +} + +for (var i = 0; i < 10; i++) { + const c6 = 0; +} + +for (var i2 in {}) { + const c7 = 0; +} + +if (true) { + label: const c8 = 0; +} + +while (false) { + label2: label3: label4: const c9 = 0; +} + +// Try/catch/finally +try { + const c10 = 0; +} +catch (e) { + const c11 = 0; +} +finally { + const c12 = 0; +} + +// Switch +switch (0) { + case 0: + const c13 = 0; + break; + default: + const c14 = 0; + break; +} + +// blocks +{ + const c15 = 0; + { + const c16 = 0 + label17: const c17 = 0; + } +} + +// global +const c18 = 0; + +// functions +function F() { + const c19 = 0; +} + +var F2 = () => { + const c20 = 0; +}; + +var F3 = function () { + const c21 = 0; +}; + +// modules +namespace m { + const c22 = 0; + + { + const c23 = 0; + } +} + +// methods +class C { + constructor() { + const c24 = 0; + } + + method() { + const c25 = 0; + } + + get v() { + const c26 = 0; + return c26; + } + + set v(value) { + const c27 = value; + } +} + +// object literals +var o = { + f() { + const c28 = 0; + }, + f2: () => { + const c29 = 0; + } +} + +//// [constDeclarations-validContexts.js] +"use strict"; +// Control flow statements with blocks +if (true) { + const c1 = 0; +} +else { + const c2 = 0; +} +while (true) { + const c3 = 0; +} +do { + const c4 = 0; +} while (true); +var obj; +with (obj) { + const c5 = 0; +} +for (var i = 0; i < 10; i++) { + const c6 = 0; +} +for (var i2 in {}) { + const c7 = 0; +} +if (true) { + label: const c8 = 0; +} +while (false) { + label2: label3: label4: const c9 = 0; +} +// Try/catch/finally +try { + const c10 = 0; +} +catch (e) { + const c11 = 0; +} +finally { + const c12 = 0; +} +// Switch +switch (0) { + case 0: + const c13 = 0; + break; + default: + const c14 = 0; + break; +} +// blocks +{ + const c15 = 0; + { + const c16 = 0; + label17: const c17 = 0; + } +} +// global +const c18 = 0; +// functions +function F() { + const c19 = 0; +} +var F2 = () => { + const c20 = 0; +}; +var F3 = function () { + const c21 = 0; +}; +// modules +var m; +(function (m) { + const c22 = 0; + { + const c23 = 0; + } +})(m || (m = {})); +// methods +class C { + constructor() { + const c24 = 0; + } + method() { + const c25 = 0; + } + get v() { + const c26 = 0; + return c26; + } + set v(value) { + const c27 = value; + } +} +// object literals +var o = { + f() { + const c28 = 0; + }, + f2: () => { + const c29 = 0; + } +}; diff --git a/tests/baselines/reference/constDeclarations.js b/tests/baselines/reference/constDeclarations.js index 1f75520e56e4e..f1f4481fadefc 100644 --- a/tests/baselines/reference/constDeclarations.js +++ b/tests/baselines/reference/constDeclarations.js @@ -13,6 +13,7 @@ for(const c4 = 0; c4 < 9; ) { break; } for(const c5 = 0, c6 = 0; c5 < c6; ) { break; } //// [constDeclarations.js] +"use strict"; // No error const c1 = false; const c2 = 23; diff --git a/tests/baselines/reference/constDeclarations2.js b/tests/baselines/reference/constDeclarations2.js index f95a4755c655a..6f245f4a3b84a 100644 --- a/tests/baselines/reference/constDeclarations2.js +++ b/tests/baselines/reference/constDeclarations2.js @@ -10,6 +10,7 @@ namespace M { //// [constDeclarations2.js] +"use strict"; // No error var M; (function (M) { diff --git a/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.js b/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.js index e918a9ea7299d..7326098f65e36 100644 --- a/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.js +++ b/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.js @@ -27,6 +27,7 @@ function foo(v: V) => void>() { //// [constraintReferencingTypeParameterFromSameTypeParameterList.js] +"use strict"; // used to be valid, now an error to do this function f() { } diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.js b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.js index b4bfa44f542d7..3252c54bf7af1 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.js +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.js @@ -32,6 +32,7 @@ var b: { } //// [constructSignatureWithAccessibilityModifiersOnParameters.js] +"use strict"; // Parameter properties are only valid in constructor definitions, not even in other forms of construct signatures class C { constructor(x, y) { diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.js b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.js index 6dd1aefb6b11c..d158c6f634850 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.js +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.js @@ -39,6 +39,7 @@ var b: { } //// [constructSignatureWithAccessibilityModifiersOnParameters2.js] +"use strict"; // Parameter properties are not valid in overloads of constructors class C { constructor(x, y) { diff --git a/tests/baselines/reference/constructorImplementationWithDefaultValues.js b/tests/baselines/reference/constructorImplementationWithDefaultValues.js index 40ff1b101f0b1..a5bc4cd2fece5 100644 --- a/tests/baselines/reference/constructorImplementationWithDefaultValues.js +++ b/tests/baselines/reference/constructorImplementationWithDefaultValues.js @@ -23,6 +23,7 @@ class E { } //// [constructorImplementationWithDefaultValues.js] +"use strict"; class C { constructor(x = 1) { var y = x; diff --git a/tests/baselines/reference/constructorImplementationWithDefaultValues2.js b/tests/baselines/reference/constructorImplementationWithDefaultValues2.js index f8424b301ed22..0a15b17966917 100644 --- a/tests/baselines/reference/constructorImplementationWithDefaultValues2.js +++ b/tests/baselines/reference/constructorImplementationWithDefaultValues2.js @@ -23,6 +23,7 @@ class E { } //// [constructorImplementationWithDefaultValues2.js] +"use strict"; class C { constructor(x = 1) { this.x = x; diff --git a/tests/baselines/reference/constructorOverloads7.js b/tests/baselines/reference/constructorOverloads7.js index 3b20c4827a236..7fb4d1101949d 100644 --- a/tests/baselines/reference/constructorOverloads7.js +++ b/tests/baselines/reference/constructorOverloads7.js @@ -28,6 +28,7 @@ function EF1(a,b) { return a+b; } //// [constructorOverloads7.js] +"use strict"; // Type provided by extern declaration // Because Point is a constructor function, this is inferred // to be Point and return type is inferred to be void diff --git a/tests/baselines/reference/constructorOverloads8.js b/tests/baselines/reference/constructorOverloads8.js index b88f2680b90eb..4299b72fd6616 100644 --- a/tests/baselines/reference/constructorOverloads8.js +++ b/tests/baselines/reference/constructorOverloads8.js @@ -18,6 +18,7 @@ interface I { } //// [constructorOverloads8.js] +"use strict"; class C { constructor(x) { } constructor(y, x) { } // illegal, 2 constructor implementations diff --git a/tests/baselines/reference/constructorOverloadsWithOptionalParameters.js b/tests/baselines/reference/constructorOverloadsWithOptionalParameters.js index 5486695d084e0..731497d497bc0 100644 --- a/tests/baselines/reference/constructorOverloadsWithOptionalParameters.js +++ b/tests/baselines/reference/constructorOverloadsWithOptionalParameters.js @@ -16,6 +16,7 @@ class D { } //// [constructorOverloadsWithOptionalParameters.js] +"use strict"; class C { constructor() { } diff --git a/tests/baselines/reference/constructorStaticParamName.js b/tests/baselines/reference/constructorStaticParamName.js index 09611679fc579..c306e643b9308 100644 --- a/tests/baselines/reference/constructorStaticParamName.js +++ b/tests/baselines/reference/constructorStaticParamName.js @@ -9,6 +9,7 @@ class test { //// [constructorStaticParamName.js] +"use strict"; // static as constructor parameter name should only give error if 'use strict' class test { constructor(static) { } diff --git a/tests/baselines/reference/constructorsWithSpecializedSignatures.js b/tests/baselines/reference/constructorsWithSpecializedSignatures.js index 725a802243e8c..bdbd1c2e0c7a9 100644 --- a/tests/baselines/reference/constructorsWithSpecializedSignatures.js +++ b/tests/baselines/reference/constructorsWithSpecializedSignatures.js @@ -46,6 +46,7 @@ interface I2 { } //// [constructorsWithSpecializedSignatures.js] +"use strict"; // errors class D { constructor(x) { } diff --git a/tests/baselines/reference/contextualSignatureInstatiationContravariance.js b/tests/baselines/reference/contextualSignatureInstatiationContravariance.js index 271c9c7aaa79d..5396b2485308b 100644 --- a/tests/baselines/reference/contextualSignatureInstatiationContravariance.js +++ b/tests/baselines/reference/contextualSignatureInstatiationContravariance.js @@ -14,5 +14,6 @@ declare var h2: (g1: Giraffe, g2: Giraffe) => void; h2 = f2; // valid because Giraffe satisfies the constraint. It is safe in the traditional contravariant fashion. //// [contextualSignatureInstatiationContravariance.js] +"use strict"; g2 = f2; // error because Giraffe and Elephant are disjoint types h2 = f2; // valid because Giraffe satisfies the constraint. It is safe in the traditional contravariant fashion. diff --git a/tests/baselines/reference/contextualSignatureInstatiationCovariance.js b/tests/baselines/reference/contextualSignatureInstatiationCovariance.js index 5755b200e57d6..f6a0f67b21bda 100644 --- a/tests/baselines/reference/contextualSignatureInstatiationCovariance.js +++ b/tests/baselines/reference/contextualSignatureInstatiationCovariance.js @@ -14,6 +14,7 @@ var h2: (a1: Animal, a2: Animal) => void; h2 = f2; // Animal does not satisfy the constraint, but T is at worst a Giraffe and compatible with Animal via covariance. //// [contextualSignatureInstatiationCovariance.js] +"use strict"; var f2; var g2; g2 = f2; // While neither Animal nor TallThing satisfy the constraint, T is at worst a Giraffe and compatible with both via covariance. diff --git a/tests/baselines/reference/contextualTyping.js b/tests/baselines/reference/contextualTyping.js index 08f09977057b3..545dc63a43c99 100644 --- a/tests/baselines/reference/contextualTyping.js +++ b/tests/baselines/reference/contextualTyping.js @@ -227,6 +227,7 @@ var x: B = { }; //// [contextualTyping.js] +"use strict"; // CONTEXT: Class property declaration class C1T5 { constructor() { diff --git a/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.js b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.js index 72ac904059dc9..5f0af4ac0ffce 100644 --- a/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.js +++ b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.js @@ -14,6 +14,7 @@ function foo() { //// [contextualTypingArrayDestructuringWithDefaults.js] +"use strict"; let [c0 = { a: "a" }] = []; let [x1, c1 = { a: "a" }] = [1]; let [c_ = { a: "a" }] = []; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 83aadf77a898f..c26171d5f89ec 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -17,6 +17,7 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/contextualTypingFunctionReturningFunction.js b/tests/baselines/reference/contextualTypingFunctionReturningFunction.js index 3dbed6a04b3e0..ff151cb60f7a7 100644 --- a/tests/baselines/reference/contextualTypingFunctionReturningFunction.js +++ b/tests/baselines/reference/contextualTypingFunctionReturningFunction.js @@ -15,6 +15,7 @@ f({ //// [contextualTypingFunctionReturningFunction.js] +"use strict"; f({ a: s => { }, b: () => n => { }, diff --git a/tests/baselines/reference/contextualTypingFunctionReturningFunction2.js b/tests/baselines/reference/contextualTypingFunctionReturningFunction2.js index 9a5aea3688971..b5c2ab2a02735 100644 --- a/tests/baselines/reference/contextualTypingFunctionReturningFunction2.js +++ b/tests/baselines/reference/contextualTypingFunctionReturningFunction2.js @@ -8,4 +8,5 @@ f(() => n => n); //// [contextualTypingFunctionReturningFunction2.js] +"use strict"; f(() => n => n); diff --git a/tests/baselines/reference/contextualTypingOfAccessors.js b/tests/baselines/reference/contextualTypingOfAccessors.js index b24ae1ff3e47c..ba5d2d596df8f 100644 --- a/tests/baselines/reference/contextualTypingOfAccessors.js +++ b/tests/baselines/reference/contextualTypingOfAccessors.js @@ -16,6 +16,7 @@ x = { //// [contextualTypingOfAccessors.js] +"use strict"; // not contextually typing accessors var x; x = { diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.js b/tests/baselines/reference/contextualTypingOfArrayLiterals1.js index 2b416b8d4d568..838eb6d007d4f 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.js +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.js @@ -11,6 +11,7 @@ r2.getDate(); //// [contextualTypingOfArrayLiterals1.js] +"use strict"; var x3 = [new Date(), 1]; var r2 = x3[1]; r2.getDate(); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index b42116639ce3b..2d914a2530b44 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -17,6 +17,7 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] +"use strict"; var x = true ? (a) => a.toExponential() : (b) => b.toFixed(); class A { } diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 2ba72d3490358..23b61bf908086 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -15,6 +15,7 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js index c2654930399bf..9e4b907119f3d 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js @@ -21,6 +21,7 @@ var r6 = _.forEach(c2, (x) => { return x.toFixed() }); //// [contextualTypingOfGenericFunctionTypedArguments1.js] +"use strict"; // errors on all 3 lines, bug was that r5 was the only line with errors var f = (x) => { return x.toFixed(); }; var r5 = _.forEach(c2, f); diff --git a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js index a89c2747f4bd8..fc89ec21d8820 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js +++ b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js @@ -9,6 +9,7 @@ callb((a) => a.length); // Ok, we choose the second overload because the first o callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body //// [contextualTypingOfLambdaReturnExpression.js] +"use strict"; function callb(a) { } callb((a) => a.length); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body diff --git a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js index 28dba3086e09c..e218f17f2f086 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js +++ b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js @@ -10,5 +10,6 @@ var foo: Foo; foo.getFoo = bar => { }; //// [contextualTypingOfLambdaWithMultipleSignatures.js] +"use strict"; var foo; foo.getFoo = bar => { }; diff --git a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js index 4b9e303df39f7..852c0b0e7c97c 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js +++ b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js @@ -9,5 +9,6 @@ var f: { f = (a) => { return a.asdf } //// [contextualTypingOfLambdaWithMultipleSignatures2.js] +"use strict"; var f; f = (a) => { return a.asdf; }; diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.js b/tests/baselines/reference/contextualTypingOfObjectLiterals.js index f7894b4958263..e8b9bb6244b5e 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.js @@ -13,6 +13,7 @@ f(obj1); // Ok f(obj2); // Error - indexer doesn't match //// [contextualTypingOfObjectLiterals.js] +"use strict"; var obj1; var obj2 = { x: "" }; obj1 = {}; // Ok diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js index 1334d82ae44b2..491d1bccaa05f 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js @@ -8,5 +8,6 @@ function f2(args: Foo) { } f2({ foo: s => s.hmm }) // 's' should be 'string', so this should be an error //// [contextualTypingOfObjectLiterals2.js] +"use strict"; function f2(args) { } f2({ foo: s => s.hmm }); // 's' should be 'string', so this should be an error diff --git a/tests/baselines/reference/contextualTypingOfTooShortOverloads.js b/tests/baselines/reference/contextualTypingOfTooShortOverloads.js index 952c628201c9f..569698b7701f1 100644 --- a/tests/baselines/reference/contextualTypingOfTooShortOverloads.js +++ b/tests/baselines/reference/contextualTypingOfTooShortOverloads.js @@ -53,6 +53,7 @@ interface NextFunction { //// [contextualTypingOfTooShortOverloads.js] +"use strict"; // small repro from #11875 var use; use((req, res) => { }); diff --git a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js index 35b173ddba6ae..d908cf5b85980 100644 --- a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js +++ b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js @@ -7,6 +7,7 @@ function f6(x: (a: T) => T) { f6(x => f6(y => x = y)); //// [contextualTypingTwoInstancesOfSameTypeParameter.js] +"use strict"; function f6(x) { return null; } diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js index 4435fed448104..fc7175b2e0c57 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js @@ -6,5 +6,6 @@ f10('', () => a => a.foo, ''); // a is "" var r9 = f10('', () => (a => a.foo), 1); // error //// [contextualTypingWithFixedTypeParameters1.js] +"use strict"; f10('', () => a => a.foo, ''); // a is "" var r9 = f10('', () => (a => a.foo), 1); // error diff --git a/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js index 3a8abf0da50c4..9729ab8e66c9d 100644 --- a/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js +++ b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js @@ -17,6 +17,7 @@ foo((y: string) => { }); //// [contextuallyTypedFunctionExpressionsAndReturnAnnotations.js] +"use strict"; // Contextually type the parameter even if there is a return annotation foo((y) => { var z = y.charAt(0); // Should be string diff --git a/tests/baselines/reference/contextuallyTypedIife.js b/tests/baselines/reference/contextuallyTypedIife.js index e62c2fb85cbb1..1600afc79c29a 100644 --- a/tests/baselines/reference/contextuallyTypedIife.js +++ b/tests/baselines/reference/contextuallyTypedIife.js @@ -36,6 +36,7 @@ let eleven = (o => o.a(11))({ a: function(n) { return n; } }); //// [contextuallyTypedIife.js] +"use strict"; // arrow (jake => { })("build"); // function expression diff --git a/tests/baselines/reference/contextuallyTypingOrOperator.js b/tests/baselines/reference/contextuallyTypingOrOperator.js index a568a48b4483f..a2530fae9ecab 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator.js +++ b/tests/baselines/reference/contextuallyTypingOrOperator.js @@ -9,6 +9,7 @@ var v3 = (s: string) => s.length || function (s: number) { return 1 }; var v4 = (s: number) => 1 || function (s: string) { return s.length }; //// [contextuallyTypingOrOperator.js] +"use strict"; var v = { a: s => s.length } || { a: s => 1 }; var v2 = (s) => s.length || function (s) { s.length; }; var v3 = (s) => s.length || function (s) { return 1; }; diff --git a/tests/baselines/reference/contextuallyTypingOrOperator2.js b/tests/baselines/reference/contextuallyTypingOrOperator2.js index 635b4548ba654..bf398e56fb24f 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator2.js +++ b/tests/baselines/reference/contextuallyTypingOrOperator2.js @@ -6,5 +6,6 @@ var v: { a: (_: string) => number } = { a: s => s.length } || { a: s => 1 }; var v2 = (s: string) => s.length || function (s) { s.aaa }; //// [contextuallyTypingOrOperator2.js] +"use strict"; var v = { a: s => s.length } || { a: s => 1 }; var v2 = (s) => s.length || function (s) { s.aaa; }; diff --git a/tests/baselines/reference/contextuallyTypingOrOperator3.js b/tests/baselines/reference/contextuallyTypingOrOperator3.js index 172de1b180492..561fc01f0612e 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator3.js +++ b/tests/baselines/reference/contextuallyTypingOrOperator3.js @@ -6,6 +6,7 @@ function foo(u: U) { } //// [contextuallyTypingOrOperator3.js] +"use strict"; function foo(u) { var x3 = u || u; } diff --git a/tests/baselines/reference/controlFlowCaching.js b/tests/baselines/reference/controlFlowCaching.js index c6e523456ca4b..0cba7b0289b4b 100644 --- a/tests/baselines/reference/controlFlowCaching.js +++ b/tests/baselines/reference/controlFlowCaching.js @@ -70,6 +70,7 @@ function f(dim, offsets, arr, acommon, centerAnchorLimit, g, has, lin) { //// [controlFlowCaching.js] +"use strict"; // Repro for #8401 function f(dim, offsets, arr, acommon, centerAnchorLimit, g, has, lin) { var isRtl = this._isRtl(); // chart mirroring diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).js b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).js new file mode 100644 index 0000000000000..4eef6bc0316b2 --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).js @@ -0,0 +1,532 @@ +//// [tests/cases/compiler/convertKeywordsYes.ts] //// + +//// [convertKeywordsYes.ts] +// reserved ES5 future in strict mode + +var constructor = 0; +var any = 0; +var boolean = 0; +var implements = 0; +var interface = 0; +var let = 0; +var module = 0; +var number = 0; +var package = 0; +var private = 0; +var protected = 0; +var public = 0; +var set = 0; +var static = 0; +var string = 0; +var get = 0; +var yield = 0; +var declare = 0; + +function bigGeneric< + constructor, + implements , + interface , + let, + module , + package, + private , + protected, + public , + set , + static , + get , + yield, + declare + >(c: constructor, + a: any, + b2: boolean, + i: implements , + i2: interface , + l: let, + m: module , + n: number, + p: package, + p2: private , + p3: protected, + p4: public , + s: set , + s2: static , + s3: string, + g: get , + y: yield, + d: declare ) { } + +var bigObject = { + constructor: 0, + any: 0, + boolean: 0, + implements: 0, + interface: 0, + let: 0, + module: 0, + number: 0, + package: 0, + private: 0, + protected: 0, + public: 0, + set: 0, + static: 0, + string: 0, + get: 0, + yield: 0, + break: 0, + case: 0, + catch: 0, + class: 0, + continue: 0, + const: 0, + + debugger: 0, + declare: 0, + default: 0, + delete: 0, + do: 0, + else: 0, + enum: 0, + export: 0, + extends: 0, + false: 0, + finally: 0, + for: 0, + function: 0, + if: 0, + + import: 0, + in: 0, + instanceof: 0, + new: 0, + null: 0, + return: 0, + super: 0, + switch: 0, + this: 0, + throw: 0, + true: 0, + try: 0, + typeof: 0, + var: 0, + void: 0, + while: 0, + with: 0, +}; + +interface bigInterface { + constructor; + any; + boolean; + implements; + interface; + let; + module; + number; + package; + private; + protected; + public; + set; + static; + string; + get; + yield; + break; + case; + catch; + class; + continue; + const; + + debugger; + declare; + default; + delete; + do; + else; + enum; + export; + extends; + false; + finally; + for; + function; + if; + + import; + in; + instanceof; + new; + null; + return; + super; + switch; + this; + throw; + true; + try; + typeof; + var; + void; + while; + with; +} + +class bigClass { + public "constructor" = 0; + public any = 0; + public boolean = 0; + public implements = 0; + public interface = 0; + public let = 0; + public module = 0; + public number = 0; + public package = 0; + public private = 0; + public protected = 0; + public public = 0; + public set = 0; + public static = 0; + public string = 0; + public get = 0; + public yield = 0; + public break = 0; + public case = 0; + public catch = 0; + public class = 0; + public continue = 0; + public const = 0; + public debugger = 0; + public declare = 0; + public default = 0; + public delete = 0; + public do = 0; + public else = 0; + public enum = 0; + public export = 0; + public extends = 0; + public false = 0; + public finally = 0; + public for = 0; + public function = 0; + public if = 0; + public import = 0; + public in = 0; + public instanceof = 0; + public new = 0; + public null = 0; + public return = 0; + public super = 0; + public switch = 0; + public this = 0; + public throw = 0; + public true = 0; + public try = 0; + public typeof = 0; + public var = 0; + public void = 0; + public while = 0; + public with = 0; +} + +enum bigEnum { + constructor, + any, + boolean, + implements, + interface, + let, + module, + number, + package, + private, + protected, + public, + set, + static, + string, + get, + yield, + break, + case, + catch, + class, + continue, + const, + + debugger, + declare, + default, + delete, + do, + else, + enum, + export, + extends, + false, + finally, + for, + function, + if, + + import, + in, + instanceof, + new, + null, + return, + super, + switch, + this, + throw, + true, + try, + typeof, + var, + void, + while, + with, +} + +namespace bigModule { + class constructor { } + class implements { } + class interface { } + class let { } + class module { } + class package { } + class private { } + class protected { } + class public { } + class set { } + class static { } + class get { } + class yield { } + class declare { } +} + +//// [convertKeywordsYes.js] +// reserved ES5 future in strict mode +var constructor = 0; +var any = 0; +var boolean = 0; +var implements = 0; +var interface = 0; +var let = 0; +var module = 0; +var number = 0; +var package = 0; +var private = 0; +var protected = 0; +var public = 0; +var set = 0; +var static = 0; +var string = 0; +var get = 0; +var yield = 0; +var declare = 0; +function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { } +var bigObject = { + constructor: 0, + any: 0, + boolean: 0, + implements: 0, + interface: 0, + let: 0, + module: 0, + number: 0, + package: 0, + private: 0, + protected: 0, + public: 0, + set: 0, + static: 0, + string: 0, + get: 0, + yield: 0, + break: 0, + case: 0, + catch: 0, + class: 0, + continue: 0, + const: 0, + debugger: 0, + declare: 0, + default: 0, + delete: 0, + do: 0, + else: 0, + enum: 0, + export: 0, + extends: 0, + false: 0, + finally: 0, + for: 0, + function: 0, + if: 0, + import: 0, + in: 0, + instanceof: 0, + new: 0, + null: 0, + return: 0, + super: 0, + switch: 0, + this: 0, + throw: 0, + true: 0, + try: 0, + typeof: 0, + var: 0, + void: 0, + while: 0, + with: 0, +}; +class bigClass { + constructor() { + this["constructor"] = 0; + this.any = 0; + this.boolean = 0; + this.implements = 0; + this.interface = 0; + this.let = 0; + this.module = 0; + this.number = 0; + this.package = 0; + this.private = 0; + this.protected = 0; + this.public = 0; + this.set = 0; + this.static = 0; + this.string = 0; + this.get = 0; + this.yield = 0; + this.break = 0; + this.case = 0; + this.catch = 0; + this.class = 0; + this.continue = 0; + this.const = 0; + this.debugger = 0; + this.declare = 0; + this.default = 0; + this.delete = 0; + this.do = 0; + this.else = 0; + this.enum = 0; + this.export = 0; + this.extends = 0; + this.false = 0; + this.finally = 0; + this.for = 0; + this.function = 0; + this.if = 0; + this.import = 0; + this.in = 0; + this.instanceof = 0; + this.new = 0; + this.null = 0; + this.return = 0; + this.super = 0; + this.switch = 0; + this.this = 0; + this.throw = 0; + this.true = 0; + this.try = 0; + this.typeof = 0; + this.var = 0; + this.void = 0; + this.while = 0; + this.with = 0; + } +} +var bigEnum; +(function (bigEnum) { + bigEnum[bigEnum["constructor"] = 0] = "constructor"; + bigEnum[bigEnum["any"] = 1] = "any"; + bigEnum[bigEnum["boolean"] = 2] = "boolean"; + bigEnum[bigEnum["implements"] = 3] = "implements"; + bigEnum[bigEnum["interface"] = 4] = "interface"; + bigEnum[bigEnum["let"] = 5] = "let"; + bigEnum[bigEnum["module"] = 6] = "module"; + bigEnum[bigEnum["number"] = 7] = "number"; + bigEnum[bigEnum["package"] = 8] = "package"; + bigEnum[bigEnum["private"] = 9] = "private"; + bigEnum[bigEnum["protected"] = 10] = "protected"; + bigEnum[bigEnum["public"] = 11] = "public"; + bigEnum[bigEnum["set"] = 12] = "set"; + bigEnum[bigEnum["static"] = 13] = "static"; + bigEnum[bigEnum["string"] = 14] = "string"; + bigEnum[bigEnum["get"] = 15] = "get"; + bigEnum[bigEnum["yield"] = 16] = "yield"; + bigEnum[bigEnum["break"] = 17] = "break"; + bigEnum[bigEnum["case"] = 18] = "case"; + bigEnum[bigEnum["catch"] = 19] = "catch"; + bigEnum[bigEnum["class"] = 20] = "class"; + bigEnum[bigEnum["continue"] = 21] = "continue"; + bigEnum[bigEnum["const"] = 22] = "const"; + bigEnum[bigEnum["debugger"] = 23] = "debugger"; + bigEnum[bigEnum["declare"] = 24] = "declare"; + bigEnum[bigEnum["default"] = 25] = "default"; + bigEnum[bigEnum["delete"] = 26] = "delete"; + bigEnum[bigEnum["do"] = 27] = "do"; + bigEnum[bigEnum["else"] = 28] = "else"; + bigEnum[bigEnum["enum"] = 29] = "enum"; + bigEnum[bigEnum["export"] = 30] = "export"; + bigEnum[bigEnum["extends"] = 31] = "extends"; + bigEnum[bigEnum["false"] = 32] = "false"; + bigEnum[bigEnum["finally"] = 33] = "finally"; + bigEnum[bigEnum["for"] = 34] = "for"; + bigEnum[bigEnum["function"] = 35] = "function"; + bigEnum[bigEnum["if"] = 36] = "if"; + bigEnum[bigEnum["import"] = 37] = "import"; + bigEnum[bigEnum["in"] = 38] = "in"; + bigEnum[bigEnum["instanceof"] = 39] = "instanceof"; + bigEnum[bigEnum["new"] = 40] = "new"; + bigEnum[bigEnum["null"] = 41] = "null"; + bigEnum[bigEnum["return"] = 42] = "return"; + bigEnum[bigEnum["super"] = 43] = "super"; + bigEnum[bigEnum["switch"] = 44] = "switch"; + bigEnum[bigEnum["this"] = 45] = "this"; + bigEnum[bigEnum["throw"] = 46] = "throw"; + bigEnum[bigEnum["true"] = 47] = "true"; + bigEnum[bigEnum["try"] = 48] = "try"; + bigEnum[bigEnum["typeof"] = 49] = "typeof"; + bigEnum[bigEnum["var"] = 50] = "var"; + bigEnum[bigEnum["void"] = 51] = "void"; + bigEnum[bigEnum["while"] = 52] = "while"; + bigEnum[bigEnum["with"] = 53] = "with"; +})(bigEnum || (bigEnum = {})); +var bigModule; +(function (bigModule) { + class constructor { + } + class implements { + } + class interface { + } + class let { + } + class module { + } + class package { + } + class private { + } + class protected { + } + class public { + } + class set { + } + class static { + } + class get { + } + class yield { + } + class declare { + } +})(bigModule || (bigModule = {})); diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).js b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).js new file mode 100644 index 0000000000000..e9f5ced54b202 --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).js @@ -0,0 +1,533 @@ +//// [tests/cases/compiler/convertKeywordsYes.ts] //// + +//// [convertKeywordsYes.ts] +// reserved ES5 future in strict mode + +var constructor = 0; +var any = 0; +var boolean = 0; +var implements = 0; +var interface = 0; +var let = 0; +var module = 0; +var number = 0; +var package = 0; +var private = 0; +var protected = 0; +var public = 0; +var set = 0; +var static = 0; +var string = 0; +var get = 0; +var yield = 0; +var declare = 0; + +function bigGeneric< + constructor, + implements , + interface , + let, + module , + package, + private , + protected, + public , + set , + static , + get , + yield, + declare + >(c: constructor, + a: any, + b2: boolean, + i: implements , + i2: interface , + l: let, + m: module , + n: number, + p: package, + p2: private , + p3: protected, + p4: public , + s: set , + s2: static , + s3: string, + g: get , + y: yield, + d: declare ) { } + +var bigObject = { + constructor: 0, + any: 0, + boolean: 0, + implements: 0, + interface: 0, + let: 0, + module: 0, + number: 0, + package: 0, + private: 0, + protected: 0, + public: 0, + set: 0, + static: 0, + string: 0, + get: 0, + yield: 0, + break: 0, + case: 0, + catch: 0, + class: 0, + continue: 0, + const: 0, + + debugger: 0, + declare: 0, + default: 0, + delete: 0, + do: 0, + else: 0, + enum: 0, + export: 0, + extends: 0, + false: 0, + finally: 0, + for: 0, + function: 0, + if: 0, + + import: 0, + in: 0, + instanceof: 0, + new: 0, + null: 0, + return: 0, + super: 0, + switch: 0, + this: 0, + throw: 0, + true: 0, + try: 0, + typeof: 0, + var: 0, + void: 0, + while: 0, + with: 0, +}; + +interface bigInterface { + constructor; + any; + boolean; + implements; + interface; + let; + module; + number; + package; + private; + protected; + public; + set; + static; + string; + get; + yield; + break; + case; + catch; + class; + continue; + const; + + debugger; + declare; + default; + delete; + do; + else; + enum; + export; + extends; + false; + finally; + for; + function; + if; + + import; + in; + instanceof; + new; + null; + return; + super; + switch; + this; + throw; + true; + try; + typeof; + var; + void; + while; + with; +} + +class bigClass { + public "constructor" = 0; + public any = 0; + public boolean = 0; + public implements = 0; + public interface = 0; + public let = 0; + public module = 0; + public number = 0; + public package = 0; + public private = 0; + public protected = 0; + public public = 0; + public set = 0; + public static = 0; + public string = 0; + public get = 0; + public yield = 0; + public break = 0; + public case = 0; + public catch = 0; + public class = 0; + public continue = 0; + public const = 0; + public debugger = 0; + public declare = 0; + public default = 0; + public delete = 0; + public do = 0; + public else = 0; + public enum = 0; + public export = 0; + public extends = 0; + public false = 0; + public finally = 0; + public for = 0; + public function = 0; + public if = 0; + public import = 0; + public in = 0; + public instanceof = 0; + public new = 0; + public null = 0; + public return = 0; + public super = 0; + public switch = 0; + public this = 0; + public throw = 0; + public true = 0; + public try = 0; + public typeof = 0; + public var = 0; + public void = 0; + public while = 0; + public with = 0; +} + +enum bigEnum { + constructor, + any, + boolean, + implements, + interface, + let, + module, + number, + package, + private, + protected, + public, + set, + static, + string, + get, + yield, + break, + case, + catch, + class, + continue, + const, + + debugger, + declare, + default, + delete, + do, + else, + enum, + export, + extends, + false, + finally, + for, + function, + if, + + import, + in, + instanceof, + new, + null, + return, + super, + switch, + this, + throw, + true, + try, + typeof, + var, + void, + while, + with, +} + +namespace bigModule { + class constructor { } + class implements { } + class interface { } + class let { } + class module { } + class package { } + class private { } + class protected { } + class public { } + class set { } + class static { } + class get { } + class yield { } + class declare { } +} + +//// [convertKeywordsYes.js] +"use strict"; +// reserved ES5 future in strict mode +var constructor = 0; +var any = 0; +var boolean = 0; +var implements = 0; +var interface = 0; +var let = 0; +var module = 0; +var number = 0; +var package = 0; +var private = 0; +var protected = 0; +var public = 0; +var set = 0; +var static = 0; +var string = 0; +var get = 0; +var yield = 0; +var declare = 0; +function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { } +var bigObject = { + constructor: 0, + any: 0, + boolean: 0, + implements: 0, + interface: 0, + let: 0, + module: 0, + number: 0, + package: 0, + private: 0, + protected: 0, + public: 0, + set: 0, + static: 0, + string: 0, + get: 0, + yield: 0, + break: 0, + case: 0, + catch: 0, + class: 0, + continue: 0, + const: 0, + debugger: 0, + declare: 0, + default: 0, + delete: 0, + do: 0, + else: 0, + enum: 0, + export: 0, + extends: 0, + false: 0, + finally: 0, + for: 0, + function: 0, + if: 0, + import: 0, + in: 0, + instanceof: 0, + new: 0, + null: 0, + return: 0, + super: 0, + switch: 0, + this: 0, + throw: 0, + true: 0, + try: 0, + typeof: 0, + var: 0, + void: 0, + while: 0, + with: 0, +}; +class bigClass { + constructor() { + this["constructor"] = 0; + this.any = 0; + this.boolean = 0; + this.implements = 0; + this.interface = 0; + this.let = 0; + this.module = 0; + this.number = 0; + this.package = 0; + this.private = 0; + this.protected = 0; + this.public = 0; + this.set = 0; + this.static = 0; + this.string = 0; + this.get = 0; + this.yield = 0; + this.break = 0; + this.case = 0; + this.catch = 0; + this.class = 0; + this.continue = 0; + this.const = 0; + this.debugger = 0; + this.declare = 0; + this.default = 0; + this.delete = 0; + this.do = 0; + this.else = 0; + this.enum = 0; + this.export = 0; + this.extends = 0; + this.false = 0; + this.finally = 0; + this.for = 0; + this.function = 0; + this.if = 0; + this.import = 0; + this.in = 0; + this.instanceof = 0; + this.new = 0; + this.null = 0; + this.return = 0; + this.super = 0; + this.switch = 0; + this.this = 0; + this.throw = 0; + this.true = 0; + this.try = 0; + this.typeof = 0; + this.var = 0; + this.void = 0; + this.while = 0; + this.with = 0; + } +} +var bigEnum; +(function (bigEnum) { + bigEnum[bigEnum["constructor"] = 0] = "constructor"; + bigEnum[bigEnum["any"] = 1] = "any"; + bigEnum[bigEnum["boolean"] = 2] = "boolean"; + bigEnum[bigEnum["implements"] = 3] = "implements"; + bigEnum[bigEnum["interface"] = 4] = "interface"; + bigEnum[bigEnum["let"] = 5] = "let"; + bigEnum[bigEnum["module"] = 6] = "module"; + bigEnum[bigEnum["number"] = 7] = "number"; + bigEnum[bigEnum["package"] = 8] = "package"; + bigEnum[bigEnum["private"] = 9] = "private"; + bigEnum[bigEnum["protected"] = 10] = "protected"; + bigEnum[bigEnum["public"] = 11] = "public"; + bigEnum[bigEnum["set"] = 12] = "set"; + bigEnum[bigEnum["static"] = 13] = "static"; + bigEnum[bigEnum["string"] = 14] = "string"; + bigEnum[bigEnum["get"] = 15] = "get"; + bigEnum[bigEnum["yield"] = 16] = "yield"; + bigEnum[bigEnum["break"] = 17] = "break"; + bigEnum[bigEnum["case"] = 18] = "case"; + bigEnum[bigEnum["catch"] = 19] = "catch"; + bigEnum[bigEnum["class"] = 20] = "class"; + bigEnum[bigEnum["continue"] = 21] = "continue"; + bigEnum[bigEnum["const"] = 22] = "const"; + bigEnum[bigEnum["debugger"] = 23] = "debugger"; + bigEnum[bigEnum["declare"] = 24] = "declare"; + bigEnum[bigEnum["default"] = 25] = "default"; + bigEnum[bigEnum["delete"] = 26] = "delete"; + bigEnum[bigEnum["do"] = 27] = "do"; + bigEnum[bigEnum["else"] = 28] = "else"; + bigEnum[bigEnum["enum"] = 29] = "enum"; + bigEnum[bigEnum["export"] = 30] = "export"; + bigEnum[bigEnum["extends"] = 31] = "extends"; + bigEnum[bigEnum["false"] = 32] = "false"; + bigEnum[bigEnum["finally"] = 33] = "finally"; + bigEnum[bigEnum["for"] = 34] = "for"; + bigEnum[bigEnum["function"] = 35] = "function"; + bigEnum[bigEnum["if"] = 36] = "if"; + bigEnum[bigEnum["import"] = 37] = "import"; + bigEnum[bigEnum["in"] = 38] = "in"; + bigEnum[bigEnum["instanceof"] = 39] = "instanceof"; + bigEnum[bigEnum["new"] = 40] = "new"; + bigEnum[bigEnum["null"] = 41] = "null"; + bigEnum[bigEnum["return"] = 42] = "return"; + bigEnum[bigEnum["super"] = 43] = "super"; + bigEnum[bigEnum["switch"] = 44] = "switch"; + bigEnum[bigEnum["this"] = 45] = "this"; + bigEnum[bigEnum["throw"] = 46] = "throw"; + bigEnum[bigEnum["true"] = 47] = "true"; + bigEnum[bigEnum["try"] = 48] = "try"; + bigEnum[bigEnum["typeof"] = 49] = "typeof"; + bigEnum[bigEnum["var"] = 50] = "var"; + bigEnum[bigEnum["void"] = 51] = "void"; + bigEnum[bigEnum["while"] = 52] = "while"; + bigEnum[bigEnum["with"] = 53] = "with"; +})(bigEnum || (bigEnum = {})); +var bigModule; +(function (bigModule) { + class constructor { + } + class implements { + } + class interface { + } + class let { + } + class module { + } + class package { + } + class private { + } + class protected { + } + class public { + } + class set { + } + class static { + } + class get { + } + class yield { + } + class declare { + } +})(bigModule || (bigModule = {})); diff --git a/tests/baselines/reference/crashInEmitTokenWithComment.js b/tests/baselines/reference/crashInEmitTokenWithComment.js index db944d850451f..a176b085eed57 100644 --- a/tests/baselines/reference/crashInEmitTokenWithComment.js +++ b/tests/baselines/reference/crashInEmitTokenWithComment.js @@ -8,6 +8,7 @@ const foo = {bar: 'a'}; fn(({[foo.bar]: c}) => undefined); //// [crashInEmitTokenWithComment.js] +"use strict"; // GH#32358 const fn = (param) => undefined; const foo = { bar: 'a' }; diff --git a/tests/baselines/reference/crashInresolveReturnStatement.js b/tests/baselines/reference/crashInresolveReturnStatement.js index 12bcfe716aaef..261135f3298bc 100644 --- a/tests/baselines/reference/crashInresolveReturnStatement.js +++ b/tests/baselines/reference/crashInresolveReturnStatement.js @@ -21,6 +21,7 @@ class WITDialogs { //// [crashInresolveReturnStatement.js] +"use strict"; class WorkItemToolbar { onToolbarItemClick() { WITDialogs.createCopyOfWorkItem(); diff --git a/tests/baselines/reference/createArray.js b/tests/baselines/reference/createArray.js index 271e9453f5860..40d3f4da8dbf1 100644 --- a/tests/baselines/reference/createArray.js +++ b/tests/baselines/reference/createArray.js @@ -18,6 +18,7 @@ if (ba[14]) { new C[1]; // not an error //// [createArray.js] +"use strict"; var na = new number[]; class C { } diff --git a/tests/baselines/reference/declFileConstructSignatures(target=es2015).js b/tests/baselines/reference/declFileConstructSignatures(target=es2015).js index f3b38442381fe..6ef499d15df3e 100644 --- a/tests/baselines/reference/declFileConstructSignatures(target=es2015).js +++ b/tests/baselines/reference/declFileConstructSignatures(target=es2015).js @@ -68,6 +68,7 @@ interface IGlobalConstructSignatureWithOwnTypeParametes { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //// [declFileConstructSignatures_1.js] +"use strict"; //// [declFileConstructSignatures_0.d.ts] diff --git a/tests/baselines/reference/declFileConstructSignatures(target=es5).js b/tests/baselines/reference/declFileConstructSignatures(target=es5).js index f3b38442381fe..6ef499d15df3e 100644 --- a/tests/baselines/reference/declFileConstructSignatures(target=es5).js +++ b/tests/baselines/reference/declFileConstructSignatures(target=es5).js @@ -68,6 +68,7 @@ interface IGlobalConstructSignatureWithOwnTypeParametes { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //// [declFileConstructSignatures_1.js] +"use strict"; //// [declFileConstructSignatures_0.d.ts] diff --git a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js index 5205af977a8ae..4dc90e6ff4935 100644 --- a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js +++ b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js @@ -29,6 +29,7 @@ interface I extends A, B { } //// [declFileForClassWithMultipleBaseClasses.js] +"use strict"; class A { foo() { } } diff --git a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js index 0ae32a99b4a10..b338e5532c1f6 100644 --- a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js +++ b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js @@ -8,6 +8,7 @@ class C { } //// [declFileForClassWithPrivateOverloadedFunction.js] +"use strict"; class C { foo(x) { } } diff --git a/tests/baselines/reference/declFileForInterfaceWithOptionalFunction.js b/tests/baselines/reference/declFileForInterfaceWithOptionalFunction.js index 4d7425fb9c4db..07efdf824b27d 100644 --- a/tests/baselines/reference/declFileForInterfaceWithOptionalFunction.js +++ b/tests/baselines/reference/declFileForInterfaceWithOptionalFunction.js @@ -7,6 +7,7 @@ interface I { } //// [declFileForInterfaceWithOptionalFunction.js] +"use strict"; //// [declFileForInterfaceWithOptionalFunction.d.ts] diff --git a/tests/baselines/reference/declFileForInterfaceWithRestParams.js b/tests/baselines/reference/declFileForInterfaceWithRestParams.js index 48221281d3b3d..1cf559fa70b26 100644 --- a/tests/baselines/reference/declFileForInterfaceWithRestParams.js +++ b/tests/baselines/reference/declFileForInterfaceWithRestParams.js @@ -8,6 +8,7 @@ interface I { } //// [declFileForInterfaceWithRestParams.js] +"use strict"; //// [declFileForInterfaceWithRestParams.d.ts] diff --git a/tests/baselines/reference/declFileFunctions(target=es2015).js b/tests/baselines/reference/declFileFunctions(target=es2015).js index 6409d6c32ad60..1d25e5865d578 100644 --- a/tests/baselines/reference/declFileFunctions(target=es2015).js +++ b/tests/baselines/reference/declFileFunctions(target=es2015).js @@ -134,6 +134,7 @@ function nonExportedFooWithOverloads(a) { return a; } //// [declFileFunctions_1.js] +"use strict"; /** This comment should appear for foo*/ function globalfoo() { } diff --git a/tests/baselines/reference/declFileFunctions(target=es5).js b/tests/baselines/reference/declFileFunctions(target=es5).js index 0f9c7e00450c5..ea2ebb85171c5 100644 --- a/tests/baselines/reference/declFileFunctions(target=es5).js +++ b/tests/baselines/reference/declFileFunctions(target=es5).js @@ -146,6 +146,7 @@ function nonExportedFooWithOverloads(a) { return a; } //// [declFileFunctions_1.js] +"use strict"; /** This comment should appear for foo*/ function globalfoo() { } diff --git a/tests/baselines/reference/declFileOptionalInterfaceMethod.js b/tests/baselines/reference/declFileOptionalInterfaceMethod.js index e0a9e095a482c..180a7a27463f7 100644 --- a/tests/baselines/reference/declFileOptionalInterfaceMethod.js +++ b/tests/baselines/reference/declFileOptionalInterfaceMethod.js @@ -7,6 +7,7 @@ interface X { //// [declFileOptionalInterfaceMethod.js] +"use strict"; //// [declFileOptionalInterfaceMethod.d.ts] diff --git a/tests/baselines/reference/declFilePrivateMethodOverloads.js b/tests/baselines/reference/declFilePrivateMethodOverloads.js index 4ab210d1497e7..c89822e9a0ad4 100644 --- a/tests/baselines/reference/declFilePrivateMethodOverloads.js +++ b/tests/baselines/reference/declFilePrivateMethodOverloads.js @@ -25,6 +25,7 @@ declare class c2 { } //// [declFilePrivateMethodOverloads.js] +"use strict"; class c1 { _forEachBindingContext(context, fn) { // Function here diff --git a/tests/baselines/reference/declFilePrivateStatic(target=es2015).js b/tests/baselines/reference/declFilePrivateStatic(target=es2015).js index 381c592f21428..a4557ac443c7d 100644 --- a/tests/baselines/reference/declFilePrivateStatic(target=es2015).js +++ b/tests/baselines/reference/declFilePrivateStatic(target=es2015).js @@ -16,6 +16,7 @@ class C { } //// [declFilePrivateStatic.js] +"use strict"; class C { static a() { } static b() { } diff --git a/tests/baselines/reference/declFilePrivateStatic(target=es5).js b/tests/baselines/reference/declFilePrivateStatic(target=es5).js index 888f7014c6d25..ecd87027f0d28 100644 --- a/tests/baselines/reference/declFilePrivateStatic(target=es5).js +++ b/tests/baselines/reference/declFilePrivateStatic(target=es5).js @@ -16,6 +16,7 @@ class C { } //// [declFilePrivateStatic.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/declFileRegressionTests.js b/tests/baselines/reference/declFileRegressionTests.js index faaf025a56a25..d81ecc7b871df 100644 --- a/tests/baselines/reference/declFileRegressionTests.js +++ b/tests/baselines/reference/declFileRegressionTests.js @@ -8,6 +8,7 @@ var n = { w: null, x: '', y: () => { }, z: 32 }; //// [declFileRegressionTests.js] +"use strict"; // 'null' not converted to 'any' in d.ts // function types not piped through correctly var n = { w: null, x: '', y: () => { }, z: 32 }; diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js index 61cef49b6ee2a..4a59abdb3bbe2 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js @@ -12,6 +12,7 @@ var f6 = () => { return [10]; } //// [declFileRestParametersOfFunctionAndFunctionType.js] +"use strict"; function f1(...args) { } function f2(x) { } function f3(x) { } diff --git a/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es2015).js b/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es2015).js index f81cd5bd69c5c..b27dc51778eaf 100644 --- a/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es2015).js +++ b/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es2015).js @@ -42,6 +42,7 @@ function foo10() { } //// [declFileTypeAnnotationBuiltInType.js] +"use strict"; // string function foo() { return ""; diff --git a/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es5).js b/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es5).js index f81cd5bd69c5c..b27dc51778eaf 100644 --- a/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es5).js +++ b/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es5).js @@ -42,6 +42,7 @@ function foo10() { } //// [declFileTypeAnnotationBuiltInType.js] +"use strict"; // string function foo() { return ""; diff --git a/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es2015).js b/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es2015).js index e1707ccf65b96..df191bcf17f50 100644 --- a/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es2015).js +++ b/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es2015).js @@ -33,6 +33,7 @@ namespace M { } //// [declFileTypeAnnotationTypeAlias.js] +"use strict"; var M; (function (M) { class c { diff --git a/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es5).js b/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es5).js index e3a93bda3283b..6e2654ffae996 100644 --- a/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es5).js +++ b/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es5).js @@ -33,6 +33,7 @@ namespace M { } //// [declFileTypeAnnotationTypeAlias.js] +"use strict"; var M; (function (M) { var c = /** @class */ (function () { diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es2015).js b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es2015).js index 723db2c161d2f..54e5583398e3f 100644 --- a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es2015).js +++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es2015).js @@ -43,6 +43,7 @@ namespace M2 { //// [declFileTypeAnnotationVisibilityErrorTypeAlias.js] +"use strict"; var M; (function (M) { let N; diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es5).js b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es5).js index 4eeac635d81c1..22b224385d689 100644 --- a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es5).js +++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es5).js @@ -43,6 +43,7 @@ namespace M2 { //// [declFileTypeAnnotationVisibilityErrorTypeAlias.js] +"use strict"; var M; (function (M) { var N; diff --git a/tests/baselines/reference/declFileTypeofFunction.js b/tests/baselines/reference/declFileTypeofFunction.js index 91b5a81ff6891..6a0c032be1d71 100644 --- a/tests/baselines/reference/declFileTypeofFunction.js +++ b/tests/baselines/reference/declFileTypeofFunction.js @@ -35,6 +35,7 @@ function foo5(x: number) { } //// [declFileTypeofFunction.js] +"use strict"; function f() { return undefined; } function g() { return undefined; } var b; diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js index 8efe2ad37a503..4a6b5fa3d9d94 100644 --- a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFile.js @@ -16,6 +16,7 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors //// [client.js] +"use strict"; /// var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js index 083bbf465580b..6469886bb9967 100644 --- a/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js +++ b/tests/baselines/reference/declFileWithErrorsInInputDeclarationFileWithOut.js @@ -16,6 +16,7 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors //// [out.js] +"use strict"; /// var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file diff --git a/tests/baselines/reference/declInput-2.js b/tests/baselines/reference/declInput-2.js index fcca7226cfd39..27f049e31f397 100644 --- a/tests/baselines/reference/declInput-2.js +++ b/tests/baselines/reference/declInput-2.js @@ -24,6 +24,7 @@ namespace M { } //// [declInput-2.js] +"use strict"; var M; (function (M) { class C { diff --git a/tests/baselines/reference/declInput.js b/tests/baselines/reference/declInput.js index 97e866ece9b5c..d1db859fbf252 100644 --- a/tests/baselines/reference/declInput.js +++ b/tests/baselines/reference/declInput.js @@ -13,6 +13,7 @@ class bar { //// [declInput.js] +"use strict"; class bar { f() { return ''; } g() { return { a: null, b: undefined, c: void 4 }; } diff --git a/tests/baselines/reference/declInput3.js b/tests/baselines/reference/declInput3.js index b7fecb42623b4..b575283da014f 100644 --- a/tests/baselines/reference/declInput3.js +++ b/tests/baselines/reference/declInput3.js @@ -13,6 +13,7 @@ class bar { //// [declInput3.js] +"use strict"; class bar { f() { return ''; } g() { return { a: null, b: undefined, c: void 4 }; } diff --git a/tests/baselines/reference/declInput4.js b/tests/baselines/reference/declInput4.js index a4f87d44f9bfe..1454444ddcaa6 100644 --- a/tests/baselines/reference/declInput4.js +++ b/tests/baselines/reference/declInput4.js @@ -18,6 +18,7 @@ namespace M { } //// [declInput4.js] +"use strict"; var M; (function (M) { class C { diff --git a/tests/baselines/reference/declarationEmitBindingPatterns.js b/tests/baselines/reference/declarationEmitBindingPatterns.js index 5a421f7ccf396..0a786524560ba 100644 --- a/tests/baselines/reference/declarationEmitBindingPatterns.js +++ b/tests/baselines/reference/declarationEmitBindingPatterns.js @@ -8,6 +8,7 @@ function f({} = a, [] = a, { p: {} = a} = a) { } //// [declarationEmitBindingPatterns.js] +"use strict"; const k = ({ x: z = 'y' }) => { }; var a; function f({} = a, [] = a, { p: {} = a } = a) { diff --git a/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.js b/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.js index cb2a774fe5036..63b46cfc5fa9e 100644 --- a/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.js +++ b/tests/baselines/reference/declarationEmitBindingPatternsFunctionExpr.js @@ -17,6 +17,7 @@ let value = ""; const shadowedVariable = ({ value: alias }: { value: string }): typeof value => value; //// [declarationEmitBindingPatternsFunctionExpr.js] +"use strict"; // Tempting to remove alias if unused let notReferenced = ({ name: alias }) => { }; // Resons we can't remove aliases that are not used in the function signature: diff --git a/tests/baselines/reference/declarationEmitBindingPatternsUnused.js b/tests/baselines/reference/declarationEmitBindingPatternsUnused.js index 3452e6cc8b0e8..a81027c2f78ee 100644 --- a/tests/baselines/reference/declarationEmitBindingPatternsUnused.js +++ b/tests/baselines/reference/declarationEmitBindingPatternsUnused.js @@ -124,6 +124,7 @@ interface ReferencedInSignartureInterface { } //// [declarationEmitBindingPatternsUnused.js] +"use strict"; // Resons we can't remove aliases that are not used in the function signature: // 1.Causes duplicate identifier if we remove alias function duplicateIndetifiers({ name: alias, name: alias2 }) { } diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es2015).js b/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es2015).js index 9eca0f9da8930..aa47dc27ac7a1 100644 --- a/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es2015).js +++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es2015).js @@ -23,6 +23,7 @@ class Foo { } //// [declarationEmitClassMemberNameConflict2.js] +"use strict"; const Bar = 'bar'; var Hello; (function (Hello) { diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es5).js b/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es5).js index 8ecf384c0b594..a4913821c46c9 100644 --- a/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es5).js +++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es5).js @@ -23,6 +23,7 @@ class Foo { } //// [declarationEmitClassMemberNameConflict2.js] +"use strict"; var Bar = 'bar'; var Hello; (function (Hello) { diff --git a/tests/baselines/reference/declarationEmitDestructuring2.js b/tests/baselines/reference/declarationEmitDestructuring2.js index 941340c3cba64..2eec0284d8c90 100644 --- a/tests/baselines/reference/declarationEmitDestructuring2.js +++ b/tests/baselines/reference/declarationEmitDestructuring2.js @@ -7,6 +7,7 @@ function h([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]){ } function h1([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]){ } //// [declarationEmitDestructuring2.js] +"use strict"; function f({ x = 10, y: [a, b, c, d] = [1, 2, 3, 4] } = { x: 10, y: [2, 4, 6, 8] }) { } function g([a, b, c, d] = [1, 2, 3, 4]) { } function h([a, [b], [[c]], { x = 10, y: [a, b, c], z: { a1, b1 } }]) { } diff --git a/tests/baselines/reference/declarationEmitDestructuring3.js b/tests/baselines/reference/declarationEmitDestructuring3.js index c554f343aaa6a..187091d4b2a2a 100644 --- a/tests/baselines/reference/declarationEmitDestructuring3.js +++ b/tests/baselines/reference/declarationEmitDestructuring3.js @@ -7,6 +7,7 @@ function foo([x, ...y] = [1, "string", true]) { } //// [declarationEmitDestructuring3.js] +"use strict"; function bar([x, z, ...w]) { } function foo([x, ...y] = [1, "string", true]) { } diff --git a/tests/baselines/reference/declarationEmitDestructuring5.js b/tests/baselines/reference/declarationEmitDestructuring5.js index 660a3a73252cf..4f06d9f354b11 100644 --- a/tests/baselines/reference/declarationEmitDestructuring5.js +++ b/tests/baselines/reference/declarationEmitDestructuring5.js @@ -8,6 +8,7 @@ function bar1([z, , , ] = [1, 3, 4, 6, 7]) { } function bar2([,,z, , , ]) { } //// [declarationEmitDestructuring5.js] +"use strict"; function baz([, z, ,]) { } function foo([, b,]) { } function bar([z, , ,]) { } diff --git a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js index a5b076e1d226a..76aaf7bc1b507 100644 --- a/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js +++ b/tests/baselines/reference/declarationEmitDestructuringOptionalBindingParametersInOverloads.js @@ -11,6 +11,7 @@ function foo2(...rest: any[]) { } //// [declarationEmitDestructuringOptionalBindingParametersInOverloads.js] +"use strict"; function foo(...rest) { } function foo2(...rest) { diff --git a/tests/baselines/reference/declarationEmitNameConflicts2.js b/tests/baselines/reference/declarationEmitNameConflicts2.js index a273d5b9e2f1c..0fb13f86469fe 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts2.js +++ b/tests/baselines/reference/declarationEmitNameConflicts2.js @@ -18,6 +18,7 @@ namespace X.Y.base.Z { } //// [declarationEmitNameConflicts2.js] +"use strict"; var X; (function (X) { var Y; diff --git a/tests/baselines/reference/declarationEmitProtectedMembers(target=es2015).js b/tests/baselines/reference/declarationEmitProtectedMembers(target=es2015).js index ea860c1137f3b..c2264fb925ca8 100644 --- a/tests/baselines/reference/declarationEmitProtectedMembers(target=es2015).js +++ b/tests/baselines/reference/declarationEmitProtectedMembers(target=es2015).js @@ -52,6 +52,7 @@ class C4 { } //// [declarationEmitProtectedMembers.js] +"use strict"; // Class with protected members class C1 { f() { diff --git a/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).js b/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).js index 9dd015afe0272..91f036a3b15de 100644 --- a/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).js +++ b/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).js @@ -52,6 +52,7 @@ class C4 { } //// [declarationEmitProtectedMembers.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/declarationInAmbientContext.js b/tests/baselines/reference/declarationInAmbientContext.js index 28abbd967468c..c975e00656b14 100644 --- a/tests/baselines/reference/declarationInAmbientContext.js +++ b/tests/baselines/reference/declarationInAmbientContext.js @@ -6,3 +6,4 @@ declare var {c, d}; // Error, destructuring declaration not allowed in ambient //// [declarationInAmbientContext.js] +"use strict"; diff --git a/tests/baselines/reference/declarationMapsOutFile2.js b/tests/baselines/reference/declarationMapsOutFile2.js index 54ab81e4a0ad8..d3d8d53308e6d 100644 --- a/tests/baselines/reference/declarationMapsOutFile2.js +++ b/tests/baselines/reference/declarationMapsOutFile2.js @@ -17,6 +17,7 @@ let x = c.doThing({a: 12}); //// [bundle.js] +"use strict"; class Foo { doThing(x) { return { b: x.a }; diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.js b/tests/baselines/reference/declarationMapsWithSourceMap.js index 14d262b012c6a..a21d32ec69c21 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.js +++ b/tests/baselines/reference/declarationMapsWithSourceMap.js @@ -17,6 +17,7 @@ let x = c.doThing({a: 12}); //// [bundle.js] +"use strict"; class Foo { doThing(x) { return { b: x.a }; diff --git a/tests/baselines/reference/declarationMerging1.js b/tests/baselines/reference/declarationMerging1.js index 5c36402981220..bef52ac777fce 100644 --- a/tests/baselines/reference/declarationMerging1.js +++ b/tests/baselines/reference/declarationMerging1.js @@ -12,7 +12,9 @@ interface A { } //// [file1.js] +"use strict"; class A { getF() { return this._f; } } //// [file2.js] +"use strict"; diff --git a/tests/baselines/reference/declarationWithNoInitializer.js b/tests/baselines/reference/declarationWithNoInitializer.js index b7e8a08ec7c74..e2b10dbeeba11 100644 --- a/tests/baselines/reference/declarationWithNoInitializer.js +++ b/tests/baselines/reference/declarationWithNoInitializer.js @@ -6,5 +6,6 @@ var {c, d}; // Error, no initializer //// [declarationWithNoInitializer.js] +"use strict"; var [a, b]; // Error, no initializer var { c, d }; // Error, no initializer diff --git a/tests/baselines/reference/declarationsAndAssignments.js b/tests/baselines/reference/declarationsAndAssignments.js index babf00bdb83b4..e86ae66a9ecd9 100644 --- a/tests/baselines/reference/declarationsAndAssignments.js +++ b/tests/baselines/reference/declarationsAndAssignments.js @@ -189,6 +189,7 @@ function f21(v: [number, string, boolean]) { //// [declarationsAndAssignments.js] +"use strict"; function f0() { var [] = [1, "hello"]; var [x] = [1, "hello"]; diff --git a/tests/baselines/reference/declareAlreadySeen.js b/tests/baselines/reference/declareAlreadySeen.js index 0c1d8dd5a01b6..d2b82a32d774f 100644 --- a/tests/baselines/reference/declareAlreadySeen.js +++ b/tests/baselines/reference/declareAlreadySeen.js @@ -11,6 +11,7 @@ namespace M { } //// [declareAlreadySeen.js] +"use strict"; var M; (function (M) { })(M || (M = {})); diff --git a/tests/baselines/reference/declaredExternalModule.js b/tests/baselines/reference/declaredExternalModule.js index fc798b2ded6ee..79dc7c56275b8 100644 --- a/tests/baselines/reference/declaredExternalModule.js +++ b/tests/baselines/reference/declaredExternalModule.js @@ -30,3 +30,4 @@ declare module 'connect' { //// [declaredExternalModule.js] +"use strict"; diff --git a/tests/baselines/reference/declaredExternalModuleWithExportAssignment.js b/tests/baselines/reference/declaredExternalModuleWithExportAssignment.js index b278d0d86522f..64bacf33fb7f4 100644 --- a/tests/baselines/reference/declaredExternalModuleWithExportAssignment.js +++ b/tests/baselines/reference/declaredExternalModuleWithExportAssignment.js @@ -21,3 +21,4 @@ declare module 'connect' { //// [declaredExternalModuleWithExportAssignment.js] +"use strict"; diff --git a/tests/baselines/reference/decoratorMetadataNoStrictNull.js b/tests/baselines/reference/decoratorMetadataNoStrictNull.js index c1f90e8a9d891..9a101475b7eaf 100644 --- a/tests/baselines/reference/decoratorMetadataNoStrictNull.js +++ b/tests/baselines/reference/decoratorMetadataNoStrictNull.js @@ -9,6 +9,7 @@ class Foo { } //// [decoratorMetadataNoStrictNull.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassAccessor3(target=es2015).js b/tests/baselines/reference/decoratorOnClassAccessor3(target=es2015).js index 081982d81a671..9be5a4b4caf79 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor3(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassAccessor3(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassAccessor3.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).js b/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).js index 9bb8376c3309d..c89fb9ada5974 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassAccessor3.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassAccessor6(target=es2015).js b/tests/baselines/reference/decoratorOnClassAccessor6(target=es2015).js index 5c137c3bda745..28156aa55a641 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor6(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassAccessor6(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassAccessor6.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).js b/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).js index 189fa1a2d9421..3712eeaef4712 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassAccessor6.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es2015).js b/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es2015).js index d91c86a334c40..63ba592e97ecb 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassConstructorParameter4.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es5).js b/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es5).js index 2e2d1e8e45d0d..a6ebb1ddef720 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassConstructorParameter4.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod16.js b/tests/baselines/reference/decoratorOnClassMethod16.js index 18281f9c3cf02..01ad66d44efd2 100644 --- a/tests/baselines/reference/decoratorOnClassMethod16.js +++ b/tests/baselines/reference/decoratorOnClassMethod16.js @@ -13,6 +13,7 @@ class Foo { //// [decoratorOnClassMethod16.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod17.js b/tests/baselines/reference/decoratorOnClassMethod17.js index af2ded6420c95..2fb6061f827f5 100644 --- a/tests/baselines/reference/decoratorOnClassMethod17.js +++ b/tests/baselines/reference/decoratorOnClassMethod17.js @@ -12,6 +12,7 @@ class Foo { //// [decoratorOnClassMethod17.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod18.js b/tests/baselines/reference/decoratorOnClassMethod18.js index 8e2f974c9aeaf..924e738454334 100644 --- a/tests/baselines/reference/decoratorOnClassMethod18.js +++ b/tests/baselines/reference/decoratorOnClassMethod18.js @@ -12,6 +12,7 @@ class Foo { //// [decoratorOnClassMethod18.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod19(target=es2015).js b/tests/baselines/reference/decoratorOnClassMethod19(target=es2015).js index 8358cbad96df6..8db0675a0fcfe 100644 --- a/tests/baselines/reference/decoratorOnClassMethod19(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassMethod19(target=es2015).js @@ -19,6 +19,7 @@ class C2 { //// [decoratorOnClassMethod19.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod19(target=es2022).js b/tests/baselines/reference/decoratorOnClassMethod19(target=es2022).js index e74282afbb747..3b7ac9b4b64bc 100644 --- a/tests/baselines/reference/decoratorOnClassMethod19(target=es2022).js +++ b/tests/baselines/reference/decoratorOnClassMethod19(target=es2022).js @@ -19,6 +19,7 @@ class C2 { //// [decoratorOnClassMethod19.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod19(target=esnext).js b/tests/baselines/reference/decoratorOnClassMethod19(target=esnext).js index e74282afbb747..3b7ac9b4b64bc 100644 --- a/tests/baselines/reference/decoratorOnClassMethod19(target=esnext).js +++ b/tests/baselines/reference/decoratorOnClassMethod19(target=esnext).js @@ -19,6 +19,7 @@ class C2 { //// [decoratorOnClassMethod19.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod3(target=es2015).js b/tests/baselines/reference/decoratorOnClassMethod3(target=es2015).js index b4467f7989baf..5deba24d9a5e6 100644 --- a/tests/baselines/reference/decoratorOnClassMethod3(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassMethod3(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassMethod3.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethod3(target=es5).js b/tests/baselines/reference/decoratorOnClassMethod3(target=es5).js index de036b9b2a926..b415e3aec2b83 100644 --- a/tests/baselines/reference/decoratorOnClassMethod3(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassMethod3(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassMethod3.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es2015).js b/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es2015).js index 1310d4e46a5da..4e019c2574eea 100644 --- a/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es2015).js @@ -10,6 +10,7 @@ class C { } //// [decoratorOnClassMethodOverload1.js] +"use strict"; class C { method() { } } diff --git a/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es5).js b/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es5).js index f37d3a37e6172..f58ddd4b89f68 100644 --- a/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassMethodOverload1(target=es5).js @@ -10,6 +10,7 @@ class C { } //// [decoratorOnClassMethodOverload1.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es2015).js b/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es2015).js index 325875d3e94ce..a7c8e5ed7f41d 100644 --- a/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es2015).js @@ -10,6 +10,7 @@ class C { } //// [decoratorOnClassMethodOverload2.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es5).js b/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es5).js index fd8b171306727..b44e851a9fd0a 100644 --- a/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassMethodOverload2(target=es5).js @@ -10,6 +10,7 @@ class C { } //// [decoratorOnClassMethodOverload2.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty1(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty1(target=es2015).js index 0674d7b412c78..4423968770c56 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty1(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty1.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty1(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty1(target=es5).js index 2998a5857670a..3f07a29b8911d 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty1(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty1.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty10(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty10(target=es2015).js index 3d6988e0890b5..fde85c01913c1 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty10(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty10.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty10(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty10(target=es5).js index 89dcd0b326442..35d037d2ebb15 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty10(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty10.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty11(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty11(target=es2015).js index b866c71b932ce..bc8d72dc85a5a 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty11(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty11.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty11(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty11(target=es5).js index b593cc9061bbe..269fb70885cb6 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty11(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty11.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty12(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty12(target=es2015).js index 7390e476d809c..2667e91b4b5b4 100644 --- a/tests/baselines/reference/decoratorOnClassProperty12(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty12(target=es2015).js @@ -10,6 +10,7 @@ class A { //// [decoratorOnClassProperty12.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty12(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty12(target=es5).js index 6e9998684ec0a..d43d1e3e7539c 100644 --- a/tests/baselines/reference/decoratorOnClassProperty12(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty12(target=es5).js @@ -10,6 +10,7 @@ class A { //// [decoratorOnClassProperty12.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty13.js b/tests/baselines/reference/decoratorOnClassProperty13.js index 7cdcc17daac53..f763615e0a9f6 100644 --- a/tests/baselines/reference/decoratorOnClassProperty13.js +++ b/tests/baselines/reference/decoratorOnClassProperty13.js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty13.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty2(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty2(target=es2015).js index f82ff19e353a0..c595fc740f2d7 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty2(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty2.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty2(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty2(target=es5).js index dabb4abddcf37..a7f5f1117b9a9 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty2(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty2.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty3(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty3(target=es2015).js index 240ee0916a39f..e823a50b05a2e 100644 --- a/tests/baselines/reference/decoratorOnClassProperty3(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty3(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty3.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty3(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty3(target=es5).js index 08b9f8ee0965a..f7123f0ac9f61 100644 --- a/tests/baselines/reference/decoratorOnClassProperty3(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty3(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty3.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty6(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty6(target=es2015).js index d2b6580681d45..0c6aa9fcf9e9e 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty6(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty6.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty6(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty6(target=es5).js index 76cfcadc28381..b26bd20718a79 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty6(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty6.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty7(target=es2015).js b/tests/baselines/reference/decoratorOnClassProperty7(target=es2015).js index 3ccfd882d077f..7aac68a9c830d 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7(target=es2015).js +++ b/tests/baselines/reference/decoratorOnClassProperty7(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty7.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnClassProperty7(target=es5).js b/tests/baselines/reference/decoratorOnClassProperty7(target=es5).js index 6b6106be96879..3c4feb4ee99ad 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7(target=es5).js +++ b/tests/baselines/reference/decoratorOnClassProperty7(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [decoratorOnClassProperty7.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decoratorOnUsing.js b/tests/baselines/reference/decoratorOnUsing.js index 47b470c658d9b..895b28dfe6956 100644 --- a/tests/baselines/reference/decoratorOnUsing.js +++ b/tests/baselines/reference/decoratorOnUsing.js @@ -11,6 +11,7 @@ using x //// [decoratorOnUsing.js] +"use strict"; using ; 1; using x; diff --git a/tests/baselines/reference/decoratorReferences.js b/tests/baselines/reference/decoratorReferences.js index c47712e49ba69..4bf18ba3a6ca3 100644 --- a/tests/baselines/reference/decoratorReferences.js +++ b/tests/baselines/reference/decoratorReferences.js @@ -10,6 +10,7 @@ class C { } //// [decoratorReferences.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/decrementAndIncrementOperators.js b/tests/baselines/reference/decrementAndIncrementOperators.js index 4b26b013eca19..01c2b2ce55ee5 100644 --- a/tests/baselines/reference/decrementAndIncrementOperators.js +++ b/tests/baselines/reference/decrementAndIncrementOperators.js @@ -41,6 +41,7 @@ x[x++]++; //// [decrementAndIncrementOperators.js] +"use strict"; var x = 0; // errors 1++; diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherType.js b/tests/baselines/reference/decrementOperatorWithAnyOtherType.js index 3029a27a80a3f..7bf58f9d293c4 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherType.js @@ -51,6 +51,7 @@ objA.a--; M.n--; //// [decrementOperatorWithAnyOtherType.js] +"use strict"; // -- operator on any type var ANY; var ANY1; diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js index 6deb4be451e77..2185a3e838941 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -75,6 +75,7 @@ ANY2--; ++ANY2[0]--; //// [decrementOperatorWithAnyOtherTypeInvalidOperations.js] +"use strict"; var ANY2 = ["", ""]; var obj1 = { x: "", y: () => { } }; function foo() { diff --git a/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.js index 1db9adc4173e2..77f519b1ee18f 100644 --- a/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.js @@ -25,6 +25,7 @@ ENUM--; ENUM1--; //// [decrementOperatorWithEnumTypeInvalidOperations.js] +"use strict"; // -- operator on enum type var ENUM; (function (ENUM) { diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.js b/tests/baselines/reference/defaultArgsInFunctionExpressions.js index 10f331f63d206..b08fe2b15d79e 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.js +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.js @@ -34,6 +34,7 @@ var f7 = (t = U) => { return t; }; f7().x; //// [defaultArgsInFunctionExpressions.js] +"use strict"; var f = function (a = 3) { return a; }; // Type should be (a?: number) => number var n = f(4); n = f(); diff --git a/tests/baselines/reference/defaultArgsInOverloads.js b/tests/baselines/reference/defaultArgsInOverloads.js index 394764494530a..9a638b59ddc83 100644 --- a/tests/baselines/reference/defaultArgsInOverloads.js +++ b/tests/baselines/reference/defaultArgsInOverloads.js @@ -22,6 +22,7 @@ interface I { var f: (a = 3) => number; //// [defaultArgsInOverloads.js] +"use strict"; function fun(a = null) { } class C { fun(a = null) { } diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js index 38ab65c01385e..e47e094b749a0 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js @@ -18,6 +18,7 @@ var elementCount2 = result.length; //// [defaultBestCommonTypesHaveDecls.js] +"use strict"; var obj1; obj1.length; var obj2; diff --git a/tests/baselines/reference/defaultIndexProps2.js b/tests/baselines/reference/defaultIndexProps2.js index f4be68c741da6..f32b12331e1f9 100644 --- a/tests/baselines/reference/defaultIndexProps2.js +++ b/tests/baselines/reference/defaultIndexProps2.js @@ -18,6 +18,7 @@ var q = "s"[0]; //// [defaultIndexProps2.js] +"use strict"; class Foo { constructor() { this.v = "Yo"; diff --git a/tests/baselines/reference/defaultValueInFunctionOverload1.js b/tests/baselines/reference/defaultValueInFunctionOverload1.js index a701f2a0edf81..fd359d3c82cc8 100644 --- a/tests/baselines/reference/defaultValueInFunctionOverload1.js +++ b/tests/baselines/reference/defaultValueInFunctionOverload1.js @@ -5,4 +5,5 @@ function foo(x: string = ''); function foo(x = '') { } //// [defaultValueInFunctionOverload1.js] +"use strict"; function foo(x = '') { } diff --git a/tests/baselines/reference/defineProperty(target=es5).js b/tests/baselines/reference/defineProperty(target=es5).js index 6df924e66a672..160c56c08ec70 100644 --- a/tests/baselines/reference/defineProperty(target=es5).js +++ b/tests/baselines/reference/defineProperty(target=es5).js @@ -27,6 +27,7 @@ class C extends B { //// [defineProperty.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/defineProperty(target=esnext).js b/tests/baselines/reference/defineProperty(target=esnext).js index 69d2e99c75937..5ec0da699bbac 100644 --- a/tests/baselines/reference/defineProperty(target=esnext).js +++ b/tests/baselines/reference/defineProperty(target=esnext).js @@ -27,6 +27,7 @@ class C extends B { //// [defineProperty.js] +"use strict"; var x = "p"; class A { y; diff --git a/tests/baselines/reference/defineVariables_useDefineForClassFields.js b/tests/baselines/reference/defineVariables_useDefineForClassFields.js index 486f993dd8c07..1700b9af6010e 100644 --- a/tests/baselines/reference/defineVariables_useDefineForClassFields.js +++ b/tests/baselines/reference/defineVariables_useDefineForClassFields.js @@ -6,6 +6,7 @@ const b = () => null a() //// [defineVariables_useDefineForClassFields.js] +"use strict"; const a = () => b(); const b = () => null; a(); diff --git a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js index 1397a0197c1c8..2bada5c1c9cd7 100644 --- a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js +++ b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.js @@ -6,6 +6,7 @@ class C { } //// [definiteAssignmentWithErrorStillStripped.js] +"use strict"; class C { p; } diff --git a/tests/baselines/reference/deleteExpressionMustBeOptional(strict=false).js b/tests/baselines/reference/deleteExpressionMustBeOptional(strict=false).js index 35c06230fe171..262eac63738f9 100644 --- a/tests/baselines/reference/deleteExpressionMustBeOptional(strict=false).js +++ b/tests/baselines/reference/deleteExpressionMustBeOptional(strict=false).js @@ -44,6 +44,7 @@ delete b.b //// [deleteExpressionMustBeOptional.js] +"use strict"; delete f.a; delete f.b; delete f.c; diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).js b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).js new file mode 100644 index 0000000000000..d5e86519b2e76 --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).js @@ -0,0 +1,117 @@ +//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// + +//// [deleteOperatorWithAnyOtherType.ts] +// delete operator on any type + +declare var ANY: any; +declare var ANY1; +var ANY2: any[] = ["", ""]; +declare var obj: () => {}; +var obj1 = { x: "", y: () => { }}; +function foo(): any { + var a; + return a; +} +class A { + public a: any; + static foo() { + var a; + return a; + } +} +namespace M { + export var n: any; +} +var objA = new A(); + +// any type var +var ResultIsBoolean1 = delete ANY1; +var ResultIsBoolean2 = delete ANY2; +var ResultIsBoolean3 = delete A; +var ResultIsBoolean4 = delete M; +var ResultIsBoolean5 = delete obj; +var ResultIsBoolean6 = delete obj1; + +// any type literal +var ResultIsBoolean7 = delete undefined; +var ResultIsBoolean8 = delete null; + +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +var ResultIsBoolean10 = delete obj1.x; +var ResultIsBoolean11 = delete obj1.y; +var ResultIsBoolean12 = delete objA.a; +var ResultIsBoolean13 = delete M.n; +var ResultIsBoolean14 = delete foo(); +var ResultIsBoolean15 = delete A.foo(); +var ResultIsBoolean16 = delete (ANY + ANY1); +var ResultIsBoolean17 = delete (null + undefined); +var ResultIsBoolean18 = delete (null + null); +var ResultIsBoolean19 = delete (undefined + undefined); + +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); + +// miss assignment operators +delete ANY; +delete ANY1; +delete ANY2[0]; +delete ANY, ANY1; +delete obj1.x; +delete obj1.y; +delete objA.a; +delete M.n; + +//// [deleteOperatorWithAnyOtherType.js] +// delete operator on any type +var ANY2 = ["", ""]; +var obj1 = { x: "", y: () => { } }; +function foo() { + var a; + return a; +} +class A { + static foo() { + var a; + return a; + } +} +var M; +(function (M) { +})(M || (M = {})); +var objA = new A(); +// any type var +var ResultIsBoolean1 = delete ANY1; +var ResultIsBoolean2 = delete ANY2; +var ResultIsBoolean3 = delete A; +var ResultIsBoolean4 = delete M; +var ResultIsBoolean5 = delete obj; +var ResultIsBoolean6 = delete obj1; +// any type literal +var ResultIsBoolean7 = delete undefined; +var ResultIsBoolean8 = delete null; +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +var ResultIsBoolean10 = delete obj1.x; +var ResultIsBoolean11 = delete obj1.y; +var ResultIsBoolean12 = delete objA.a; +var ResultIsBoolean13 = delete M.n; +var ResultIsBoolean14 = delete foo(); +var ResultIsBoolean15 = delete A.foo(); +var ResultIsBoolean16 = delete (ANY + ANY1); +var ResultIsBoolean17 = delete (null + undefined); +var ResultIsBoolean18 = delete (null + null); +var ResultIsBoolean19 = delete (undefined + undefined); +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); +// miss assignment operators +delete ANY; +delete ANY1; +delete ANY2[0]; +delete ANY, ANY1; +delete obj1.x; +delete obj1.y; +delete objA.a; +delete M.n; diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).js b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).js new file mode 100644 index 0000000000000..64afd0a391fc7 --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).js @@ -0,0 +1,118 @@ +//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// + +//// [deleteOperatorWithAnyOtherType.ts] +// delete operator on any type + +declare var ANY: any; +declare var ANY1; +var ANY2: any[] = ["", ""]; +declare var obj: () => {}; +var obj1 = { x: "", y: () => { }}; +function foo(): any { + var a; + return a; +} +class A { + public a: any; + static foo() { + var a; + return a; + } +} +namespace M { + export var n: any; +} +var objA = new A(); + +// any type var +var ResultIsBoolean1 = delete ANY1; +var ResultIsBoolean2 = delete ANY2; +var ResultIsBoolean3 = delete A; +var ResultIsBoolean4 = delete M; +var ResultIsBoolean5 = delete obj; +var ResultIsBoolean6 = delete obj1; + +// any type literal +var ResultIsBoolean7 = delete undefined; +var ResultIsBoolean8 = delete null; + +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +var ResultIsBoolean10 = delete obj1.x; +var ResultIsBoolean11 = delete obj1.y; +var ResultIsBoolean12 = delete objA.a; +var ResultIsBoolean13 = delete M.n; +var ResultIsBoolean14 = delete foo(); +var ResultIsBoolean15 = delete A.foo(); +var ResultIsBoolean16 = delete (ANY + ANY1); +var ResultIsBoolean17 = delete (null + undefined); +var ResultIsBoolean18 = delete (null + null); +var ResultIsBoolean19 = delete (undefined + undefined); + +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); + +// miss assignment operators +delete ANY; +delete ANY1; +delete ANY2[0]; +delete ANY, ANY1; +delete obj1.x; +delete obj1.y; +delete objA.a; +delete M.n; + +//// [deleteOperatorWithAnyOtherType.js] +"use strict"; +// delete operator on any type +var ANY2 = ["", ""]; +var obj1 = { x: "", y: () => { } }; +function foo() { + var a; + return a; +} +class A { + static foo() { + var a; + return a; + } +} +var M; +(function (M) { +})(M || (M = {})); +var objA = new A(); +// any type var +var ResultIsBoolean1 = delete ANY1; +var ResultIsBoolean2 = delete ANY2; +var ResultIsBoolean3 = delete A; +var ResultIsBoolean4 = delete M; +var ResultIsBoolean5 = delete obj; +var ResultIsBoolean6 = delete obj1; +// any type literal +var ResultIsBoolean7 = delete undefined; +var ResultIsBoolean8 = delete null; +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +var ResultIsBoolean10 = delete obj1.x; +var ResultIsBoolean11 = delete obj1.y; +var ResultIsBoolean12 = delete objA.a; +var ResultIsBoolean13 = delete M.n; +var ResultIsBoolean14 = delete foo(); +var ResultIsBoolean15 = delete A.foo(); +var ResultIsBoolean16 = delete (ANY + ANY1); +var ResultIsBoolean17 = delete (null + undefined); +var ResultIsBoolean18 = delete (null + null); +var ResultIsBoolean19 = delete (undefined + undefined); +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); +// miss assignment operators +delete ANY; +delete ANY1; +delete ANY2[0]; +delete ANY, ANY1; +delete obj1.x; +delete obj1.y; +delete objA.a; +delete M.n; diff --git a/tests/baselines/reference/deleteReadonly.js b/tests/baselines/reference/deleteReadonly.js index e0e7062b81d5e..1de9f69e09f3f 100644 --- a/tests/baselines/reference/deleteReadonly.js +++ b/tests/baselines/reference/deleteReadonly.js @@ -24,6 +24,7 @@ delete ((((b['test'])))); //// [deleteReadonly.js] +"use strict"; var a = { b: 123 }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 64af662181143..b2af84372e71d 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -43,6 +43,7 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] +"use strict"; class Base { b() { } get c() { return ''; } diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 0e39593bbc375..0dfd4e6093a70 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -31,6 +31,7 @@ class Derived4 extends Base { } //// [derivedClassSuperCallsWithThisArg.js] +"use strict"; class Base { constructor(a) { } } diff --git a/tests/baselines/reference/derivedClassSuperProperties(target=es2015).js b/tests/baselines/reference/derivedClassSuperProperties(target=es2015).js index 80859dbca418f..59905e8ba8106 100644 --- a/tests/baselines/reference/derivedClassSuperProperties(target=es2015).js +++ b/tests/baselines/reference/derivedClassSuperProperties(target=es2015).js @@ -404,6 +404,7 @@ const DerivedWithLoops = [ //// [derivedClassSuperProperties.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/derivedClassSuperProperties(target=es5).js b/tests/baselines/reference/derivedClassSuperProperties(target=es5).js index 7a2f83b3f0108..c33dcb42c8d59 100644 --- a/tests/baselines/reference/derivedClassSuperProperties(target=es5).js +++ b/tests/baselines/reference/derivedClassSuperProperties(target=es5).js @@ -404,6 +404,7 @@ const DerivedWithLoops = [ //// [derivedClassSuperProperties.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.js b/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.js index 2dad325d5a9fb..d1975bc26d966 100644 --- a/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.js +++ b/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.js @@ -16,6 +16,7 @@ var y: MyClass = new MyClass(); y.myMethod(); // error //// [derivedTypeCallingBaseImplWithOptionalParams.js] +"use strict"; class MyClass { myMethod(myList) { } diff --git a/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=false).js b/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=false).js index 9c1e7d2ea8d50..01a1a8e680349 100644 --- a/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=false).js +++ b/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=false).js @@ -39,6 +39,7 @@ try {} catch ({ a: { b: { c: { x }} }}: unknown) { x } //// [destructureCatchClause.js] +"use strict"; // These are okay with useUnknownInCatchVariables=false, but not okay with useUnknownInCatchVariables=true. try { } catch ({ x }) { diff --git a/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=true).js b/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=true).js index 9c1e7d2ea8d50..01a1a8e680349 100644 --- a/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=true).js +++ b/tests/baselines/reference/destructureCatchClause(strict=false,useunknownincatchvariables=true).js @@ -39,6 +39,7 @@ try {} catch ({ a: { b: { c: { x }} }}: unknown) { x } //// [destructureCatchClause.js] +"use strict"; // These are okay with useUnknownInCatchVariables=false, but not okay with useUnknownInCatchVariables=true. try { } catch ({ x }) { diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment3.js b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment3.js index 968d2636bc904..8c72979a029a3 100644 --- a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment3.js +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment3.js @@ -14,6 +14,7 @@ const [f, g = f, h = i, i = f] = [1]; // error for h = i //// [destructuringArrayBindingPatternAndAssignment3.js] +"use strict"; const [a, b = a] = [1]; // ok const [c, d = c, e = e] = [1]; // error for e = e const [f, g = f, h = i, i = f] = [1]; // error for h = i diff --git a/tests/baselines/reference/destructuringControlFlowNoCrash.js b/tests/baselines/reference/destructuringControlFlowNoCrash.js index 70f0e7561352d..d04dba0beff7d 100644 --- a/tests/baselines/reference/destructuringControlFlowNoCrash.js +++ b/tests/baselines/reference/destructuringControlFlowNoCrash.js @@ -20,6 +20,7 @@ const { constructor } = async () => {}; //// [destructuringControlFlowNoCrash.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -36,4 +37,4 @@ date.toISOString(); const { date2, } = (inspectedElement) => , props; date2.toISOString(); // It could also be an async function -const { constructor } = () => __awaiter(this, void 0, void 0, function* () { }); +const { constructor } = () => __awaiter(void 0, void 0, void 0, function* () { }); diff --git a/tests/baselines/reference/destructuringInFunctionType.js b/tests/baselines/reference/destructuringInFunctionType.js index b6c801cccfb87..b99aebb73e199 100644 --- a/tests/baselines/reference/destructuringInFunctionType.js +++ b/tests/baselines/reference/destructuringInFunctionType.js @@ -24,6 +24,7 @@ var v2: ([a, b, c]) => string; //// [destructuringInFunctionType.js] +"use strict"; var v1 = ([a, b, c]) => "hello"; var v2; diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.js b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.js index f1bcf8257917a..d07af0c290ff1 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.js +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.js @@ -57,6 +57,7 @@ var {"prop1": d1} = foo1(); var {"prop2": d1} = foo1(); //// [destructuringObjectBindingPatternAndAssignment1ES5.js] +"use strict"; // In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left. // An expression of type S is considered assignable to an assignment target V if one of the following is true // V is an object assignment pattern and, for each assignment property P in V, diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.js b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.js index 181858d7d58d4..6a3ecd9219594 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.js +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.js @@ -57,6 +57,7 @@ var {"prop1": d1} = foo1(); var {"prop2": d1} = foo1(); //// [destructuringObjectBindingPatternAndAssignment1ES6.js] +"use strict"; // In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left. // An expression of type S is considered assignable to an assignment target V if one of the following is true // V is an object assignment pattern and, for each assignment property P in V, diff --git a/tests/baselines/reference/destructuringWithLiteralInitializers.js b/tests/baselines/reference/destructuringWithLiteralInitializers.js index 736c5bb80012f..c76356d188d89 100644 --- a/tests/baselines/reference/destructuringWithLiteralInitializers.js +++ b/tests/baselines/reference/destructuringWithLiteralInitializers.js @@ -69,6 +69,7 @@ g5([1, 1]); //// [destructuringWithLiteralInitializers.js] +"use strict"; // (arg: { x: any, y: any }) => void function f1({ x, y }) { } f1({ x: 1, y: 1 }); diff --git a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js index b71f155dee743..9e98fc0c08a6f 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js +++ b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js @@ -13,6 +13,7 @@ class TestFile { } //// [detachedCommentAtStartOfConstructor1.js] +"use strict"; class TestFile { constructor(message) { /// Test summary diff --git a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js index bfacaed0662cb..d27b8555ddb8a 100644 --- a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js +++ b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js @@ -77,6 +77,7 @@ namespace m { //// [disallowLineTerminatorBeforeArrow.js] +"use strict"; var f1 = () => { }; var f2 = (x, y) => { }; var f3 = (x, y, ...rest) => { }; diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js index 59c721988bf43..ab4f332ae0dd0 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNode.js @@ -13,6 +13,7 @@ var x = 10; declare var OData: any; //// [doNotEmitPinnedCommentOnNotEmittedNode.js] +"use strict"; class C { foo(x, y) { } } diff --git a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNodets.js b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNodets.js index 4b055e2b65a7f..7aecd3e3a9dcc 100644 --- a/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNodets.js +++ b/tests/baselines/reference/doNotEmitPinnedCommentOnNotEmittedNodets.js @@ -11,6 +11,7 @@ class C { declare var OData: any; //// [doNotEmitPinnedCommentOnNotEmittedNodets.js] +"use strict"; class C { foo(x, y) { } } diff --git a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js index 3a71633d909bb..cf4c6cddd8698 100644 --- a/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js +++ b/tests/baselines/reference/doYouNeedToChangeYourTargetLibraryES2016Plus.js @@ -50,6 +50,7 @@ const testStringReplaceAll = "".replaceAll(); //// [doYouNeedToChangeYourTargetLibraryES2016Plus.js] +"use strict"; // es2016 const testIncludes = ["hello"].includes("world"); // es2017 diff --git a/tests/baselines/reference/dontShowCompilerGeneratedMembers.js b/tests/baselines/reference/dontShowCompilerGeneratedMembers.js index 362947e5b7caa..17a57f9a911b9 100644 --- a/tests/baselines/reference/dontShowCompilerGeneratedMembers.js +++ b/tests/baselines/reference/dontShowCompilerGeneratedMembers.js @@ -7,6 +7,7 @@ var f: { }; //// [dontShowCompilerGeneratedMembers.js] +"use strict"; var f; -; ; diff --git a/tests/baselines/reference/dottedModuleName.js b/tests/baselines/reference/dottedModuleName.js index 2225f3bbb7746..f9bb1182876f8 100644 --- a/tests/baselines/reference/dottedModuleName.js +++ b/tests/baselines/reference/dottedModuleName.js @@ -22,6 +22,7 @@ namespace M.N { //// [dottedModuleName.js] +"use strict"; var M; (function (M) { let N; diff --git a/tests/baselines/reference/dottedModuleName2.js b/tests/baselines/reference/dottedModuleName2.js index e396e0752bfbe..fc360e59048ca 100644 --- a/tests/baselines/reference/dottedModuleName2.js +++ b/tests/baselines/reference/dottedModuleName2.js @@ -46,6 +46,7 @@ namespace M //// [dottedModuleName2.js] +"use strict"; var A; (function (A) { var B; diff --git a/tests/baselines/reference/duplicateClassElements.js b/tests/baselines/reference/duplicateClassElements.js index 939600fad6fe1..13f89c4139998 100644 --- a/tests/baselines/reference/duplicateClassElements.js +++ b/tests/baselines/reference/duplicateClassElements.js @@ -47,6 +47,7 @@ class a { } //// [duplicateClassElements.js] +"use strict"; class a { b() { } diff --git a/tests/baselines/reference/duplicateIdentifierDifferentModifiers.js b/tests/baselines/reference/duplicateIdentifierDifferentModifiers.js index 55de8cf0b35b9..da10b7bec1223 100644 --- a/tests/baselines/reference/duplicateIdentifierDifferentModifiers.js +++ b/tests/baselines/reference/duplicateIdentifierDifferentModifiers.js @@ -25,6 +25,7 @@ interface C { //// [duplicateIdentifierDifferentModifiers.js] +"use strict"; // OK class A { } diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js index 506e6badade63..836ed0935a387 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js @@ -55,6 +55,7 @@ declare namespace N { //// [duplicateIdentifiersAcrossContainerBoundaries.js] +"use strict"; var M; (function (M) { class I { diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js index a833e53f30931..404364d4cd31a 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.js @@ -34,6 +34,7 @@ declare namespace N { //// [file1.js] +"use strict"; class C1 { } class C2 { @@ -50,6 +51,7 @@ var N; })(F = N.F || (N.F = {})); })(N || (N = {})); //// [file2.js] +"use strict"; class I { } // error -- cannot merge interface with non-ambient class function C2() { } // error -- cannot merge function with non-ambient class diff --git a/tests/baselines/reference/duplicatePropertyNames.js b/tests/baselines/reference/duplicatePropertyNames.js index 14782ff591d20..c1f43cbfb6df5 100644 --- a/tests/baselines/reference/duplicatePropertyNames.js +++ b/tests/baselines/reference/duplicatePropertyNames.js @@ -51,6 +51,7 @@ var b = { //// [duplicatePropertyNames.js] +"use strict"; // duplicate property names are an error in all types class C { constructor() { diff --git a/tests/baselines/reference/elementAccessChain.2.js b/tests/baselines/reference/elementAccessChain.2.js index f2a5c526e8d4c..e09cb1e90a510 100644 --- a/tests/baselines/reference/elementAccessChain.2.js +++ b/tests/baselines/reference/elementAccessChain.2.js @@ -14,6 +14,7 @@ o3.b?.["c"]; //// [elementAccessChain.2.js] +"use strict"; var _a, _b; o1 === null || o1 === void 0 ? void 0 : o1["b"]; o2 === null || o2 === void 0 ? void 0 : o2["b"].c; diff --git a/tests/baselines/reference/elidedEmbeddedStatementsReplacedWithSemicolon.js b/tests/baselines/reference/elidedEmbeddedStatementsReplacedWithSemicolon.js index 5adb3c5b2c468..0e5557e7f93b6 100644 --- a/tests/baselines/reference/elidedEmbeddedStatementsReplacedWithSemicolon.js +++ b/tests/baselines/reference/elidedEmbeddedStatementsReplacedWithSemicolon.js @@ -27,6 +27,7 @@ with (window) const enum H {} //// [elidedEmbeddedStatementsReplacedWithSemicolon.js] +"use strict"; if (1) ; else diff --git a/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es2015).js b/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es2015).js index fb88052a8e31a..be4582a917f9a 100644 --- a/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es2015).js +++ b/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es2015).js @@ -5,5 +5,6 @@ (x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x; //// [emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js] +"use strict"; (x) => ({ "1": "one", "2": "two" }[x]); (x) => ({ "1": "one", "2": "two" }.x); diff --git a/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es5).js b/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es5).js index 74e4d8c3c36ba..f683a70663ca7 100644 --- a/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es5).js +++ b/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5(target=es5).js @@ -5,5 +5,6 @@ (x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x; //// [emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js] +"use strict"; (function (x) { return ({ "1": "one", "2": "two" }[x]); }); (function (x) { return ({ "1": "one", "2": "two" }.x); }); diff --git a/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.js b/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.js index 185e21e87b2d7..9dd8f60cf1bfa 100644 --- a/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.js +++ b/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.js @@ -5,5 +5,6 @@ (x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x; //// [emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.js] +"use strict"; (x) => ({ "1": "one", "2": "two" }[x]); (x) => ({ "1": "one", "2": "two" }.x); diff --git a/tests/baselines/reference/emitArrowFunction(target=es2015).js b/tests/baselines/reference/emitArrowFunction(target=es2015).js index fec63650ae977..80067e13628e4 100644 --- a/tests/baselines/reference/emitArrowFunction(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunction(target=es2015).js @@ -10,6 +10,7 @@ foo(() => true); foo(() => { return false; }); //// [emitArrowFunction.js] +"use strict"; var f1 = () => { }; var f2 = (x, y) => { }; var f3 = (x, y, ...rest) => { }; diff --git a/tests/baselines/reference/emitArrowFunction(target=es5).js b/tests/baselines/reference/emitArrowFunction(target=es5).js index c069222e03ff7..2b2024ed6bfdc 100644 --- a/tests/baselines/reference/emitArrowFunction(target=es5).js +++ b/tests/baselines/reference/emitArrowFunction(target=es5).js @@ -10,6 +10,7 @@ foo(() => true); foo(() => { return false; }); //// [emitArrowFunction.js] +"use strict"; var f1 = function () { }; var f2 = function (x, y) { }; var f3 = function (x, y) { diff --git a/tests/baselines/reference/emitArrowFunctionAsIs(target=es2015).js b/tests/baselines/reference/emitArrowFunctionAsIs(target=es2015).js index a948fba3e582b..03107de0c9823 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIs(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionAsIs(target=es2015).js @@ -7,6 +7,7 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIs.js] +"use strict"; var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; diff --git a/tests/baselines/reference/emitArrowFunctionAsIs(target=es5).js b/tests/baselines/reference/emitArrowFunctionAsIs(target=es5).js index f974e6e6a78e5..55e68d85000e5 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIs(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionAsIs(target=es5).js @@ -7,6 +7,7 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIs.js] +"use strict"; var arrow1 = function (a) { }; var arrow2 = function (a) { }; var arrow3 = function (a, b) { }; diff --git a/tests/baselines/reference/emitArrowFunctionAsIsES6.js b/tests/baselines/reference/emitArrowFunctionAsIsES6.js index 2c43d82906e2b..6c7b924920a19 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionAsIsES6.js @@ -7,6 +7,7 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIsES6.js] +"use strict"; var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; diff --git a/tests/baselines/reference/emitArrowFunctionES6.js b/tests/baselines/reference/emitArrowFunctionES6.js index cda6fdf374427..0fe57438f036b 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.js +++ b/tests/baselines/reference/emitArrowFunctionES6.js @@ -23,6 +23,7 @@ var p10 = ([{ value, done }]) => { }; //// [emitArrowFunctionES6.js] +"use strict"; var f1 = () => { }; var f2 = (x, y) => { }; var f3 = (x, y, ...rest) => { }; diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es2015).js b/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es2015).js index 5a97b988f08a7..67c30d3905ad9 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es2015).js @@ -17,6 +17,7 @@ foo(() => { //// [emitArrowFunctionThisCapturing.js] +"use strict"; var f1 = () => { this.age = 10; }; diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es5).js b/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es5).js index f103641b9ab86..23ab81aaa5d6c 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturing(target=es5).js @@ -17,6 +17,7 @@ foo(() => { //// [emitArrowFunctionThisCapturing.js] +"use strict"; var _this = this; var f1 = function () { _this.age = 10; diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js index 06e5a98a65265..5a36dcc7b824e 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js @@ -17,6 +17,7 @@ foo(() => { //// [emitArrowFunctionThisCapturingES6.js] +"use strict"; var f1 = () => { this.age = 10; }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es2015).js index 94fa1d7d39424..0dd79c913e37e 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es2015).js @@ -34,6 +34,7 @@ function bar() { } //// [emitArrowFunctionWhenUsingArguments01.js] +"use strict"; var a = () => { var arg = arguments[0]; // error }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es5).js index d86abb682e33c..e4f5762a02c20 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01(target=es5).js @@ -34,6 +34,7 @@ function bar() { } //// [emitArrowFunctionWhenUsingArguments01.js] +"use strict"; var a = function () { var arg = arguments[0]; // error }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01_ES6.js index af775ae5a35d2..a6a688d957abb 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01_ES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments01_ES6.js @@ -34,6 +34,7 @@ function bar() { } //// [emitArrowFunctionWhenUsingArguments01_ES6.js] +"use strict"; var a = () => { var arg = arguments[0]; // error }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es2015).js index 02fa80384338b..e936edb141fdf 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es2015).js @@ -4,4 +4,5 @@ var a = () => arguments; //// [emitArrowFunctionWhenUsingArguments02.js] +"use strict"; var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es5).js index d430a2a170f54..660dfafe0e509 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02(target=es5).js @@ -4,4 +4,5 @@ var a = () => arguments; //// [emitArrowFunctionWhenUsingArguments02.js] +"use strict"; var a = function () { return arguments; }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02_ES6.js index 88b19b2bd41b7..7accc4874594f 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02_ES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments02_ES6.js @@ -4,4 +4,5 @@ var a = () => arguments; //// [emitArrowFunctionWhenUsingArguments02_ES6.js] +"use strict"; var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..2f4e914f53e4f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).js @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +//// [emitArrowFunctionWhenUsingArguments03.ts] +var arguments; +var a = () => arguments; + +//// [emitArrowFunctionWhenUsingArguments03.js] +var arguments; +var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..4db9f4458466b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).js @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +//// [emitArrowFunctionWhenUsingArguments03.ts] +var arguments; +var a = () => arguments; + +//// [emitArrowFunctionWhenUsingArguments03.js] +var arguments; +var a = function () { return arguments; }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..271ba917a3ca4 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).js @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +//// [emitArrowFunctionWhenUsingArguments03.ts] +var arguments; +var a = () => arguments; + +//// [emitArrowFunctionWhenUsingArguments03.js] +"use strict"; +var arguments; +var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..2d7fcdd50b577 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).js @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +//// [emitArrowFunctionWhenUsingArguments03.ts] +var arguments; +var a = () => arguments; + +//// [emitArrowFunctionWhenUsingArguments03.js] +"use strict"; +var arguments; +var a = function () { return arguments; }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..35b1f55d59aff --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).js @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments03_ES6.ts] +var arguments; +var a = () => arguments; + +//// [emitArrowFunctionWhenUsingArguments03_ES6.js] +var arguments; +var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..c2ffd90be1159 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).js @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments03_ES6.ts] +var arguments; +var a = () => arguments; + +//// [emitArrowFunctionWhenUsingArguments03_ES6.js] +"use strict"; +var arguments; +var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..58bab00c79850 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +//// [emitArrowFunctionWhenUsingArguments04.ts] +function f() { + var arguments; + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments04.js] +function f() { + var arguments; + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..bd1afafa0ce85 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +//// [emitArrowFunctionWhenUsingArguments04.ts] +function f() { + var arguments; + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments04.js] +function f() { + var arguments; + var a = function () { return arguments; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..a3668d06e1d05 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +//// [emitArrowFunctionWhenUsingArguments04.ts] +function f() { + var arguments; + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments04.js] +"use strict"; +function f() { + var arguments; + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..203c90ae32b6d --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +//// [emitArrowFunctionWhenUsingArguments04.ts] +function f() { + var arguments; + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments04.js] +"use strict"; +function f() { + var arguments; + var a = function () { return arguments; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..47904c4522437 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments04_ES6.ts] +function f() { + var arguments; + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments04_ES6.js] +function f() { + var arguments; + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..fcd2776bb88bd --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments04_ES6.ts] +function f() { + var arguments; + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments04_ES6.js] +"use strict"; +function f() { + var arguments; + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..40a8871a27ebb --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +//// [emitArrowFunctionWhenUsingArguments05.ts] +function f(arguments) { + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments05.js] +function f(arguments) { + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..79c891f4409e9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +//// [emitArrowFunctionWhenUsingArguments05.ts] +function f(arguments) { + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments05.js] +function f(arguments) { + var a = function () { return arguments; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..656127f274537 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +//// [emitArrowFunctionWhenUsingArguments05.ts] +function f(arguments) { + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments05.js] +"use strict"; +function f(arguments) { + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..ef6e08a80410f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +//// [emitArrowFunctionWhenUsingArguments05.ts] +function f(arguments) { + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments05.js] +"use strict"; +function f(arguments) { + var a = function () { return arguments; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..8ba62e67f2e6a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments05_ES6.ts] +function f(arguments) { + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments05_ES6.js] +function f(arguments) { + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..8357771c23ea6 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments05_ES6.ts] +function f(arguments) { + var a = () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments05_ES6.js] +"use strict"; +function f(arguments) { + var a = () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..93ab665ea5d62 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +//// [emitArrowFunctionWhenUsingArguments06.ts] +function f(arguments) { + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments06.js] +function f(arguments) { + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..5492bb1d00e34 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +//// [emitArrowFunctionWhenUsingArguments06.ts] +function f(arguments) { + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments06.js] +function f(arguments) { + var a = function () { return function () { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..b41886064e54f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +//// [emitArrowFunctionWhenUsingArguments06.ts] +function f(arguments) { + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments06.js] +"use strict"; +function f(arguments) { + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..e41ba32657a2b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +//// [emitArrowFunctionWhenUsingArguments06.ts] +function f(arguments) { + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments06.js] +"use strict"; +function f(arguments) { + var a = function () { return function () { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..4e9e45b715a5e --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments06_ES6.ts] +function f(arguments) { + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments06_ES6.js] +function f(arguments) { + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..021c69f13be19 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments06_ES6.ts] +function f(arguments) { + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments06_ES6.js] +"use strict"; +function f(arguments) { + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..8371f0eca726c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +//// [emitArrowFunctionWhenUsingArguments07.ts] +function f(arguments) { + var a = (arguments) => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments07.js] +function f(arguments) { + var a = (arguments) => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..75ca5939bccd2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +//// [emitArrowFunctionWhenUsingArguments07.ts] +function f(arguments) { + var a = (arguments) => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments07.js] +function f(arguments) { + var a = function (arguments) { return function () { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..cbaa3d748b858 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +//// [emitArrowFunctionWhenUsingArguments07.ts] +function f(arguments) { + var a = (arguments) => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments07.js] +"use strict"; +function f(arguments) { + var a = (arguments) => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..659821b4f9f65 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +//// [emitArrowFunctionWhenUsingArguments07.ts] +function f(arguments) { + var a = (arguments) => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments07.js] +"use strict"; +function f(arguments) { + var a = function (arguments) { return function () { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..e9ffad32a6d6a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments07_ES6.ts] +function f(arguments) { + var a = (arguments) => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments07_ES6.js] +function f(arguments) { + var a = (arguments) => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..0b952c6b19f5a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments07_ES6.ts] +function f(arguments) { + var a = (arguments) => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments07_ES6.js] +"use strict"; +function f(arguments) { + var a = (arguments) => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..750d98ae7853b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +//// [emitArrowFunctionWhenUsingArguments08.ts] +function f(arguments) { + var a = () => (arguments) => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments08.js] +function f(arguments) { + var a = () => (arguments) => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..51f14ad3f5ab1 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +//// [emitArrowFunctionWhenUsingArguments08.ts] +function f(arguments) { + var a = () => (arguments) => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments08.js] +function f(arguments) { + var a = function () { return function (arguments) { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..89337e3c47681 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +//// [emitArrowFunctionWhenUsingArguments08.ts] +function f(arguments) { + var a = () => (arguments) => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments08.js] +"use strict"; +function f(arguments) { + var a = () => (arguments) => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..4ff696bd8c1e9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +//// [emitArrowFunctionWhenUsingArguments08.ts] +function f(arguments) { + var a = () => (arguments) => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments08.js] +"use strict"; +function f(arguments) { + var a = function () { return function (arguments) { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..63b6b875386c4 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments08_ES6.ts] +function f(arguments) { + var a = () => (arguments) => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments08_ES6.js] +function f(arguments) { + var a = () => (arguments) => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..7e5f8d3d2bece --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).js @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments08_ES6.ts] +function f(arguments) { + var a = () => (arguments) => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments08_ES6.js] +"use strict"; +function f(arguments) { + var a = () => (arguments) => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es2015).js index 33e4f14d1385d..9d17542dfd507 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es2015).js @@ -6,6 +6,7 @@ function f(_arguments) { } //// [emitArrowFunctionWhenUsingArguments09.js] +"use strict"; function f(_arguments) { var a = () => () => arguments; } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es5).js index 2615031b664aa..5de38e757c78e 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09(target=es5).js @@ -6,6 +6,7 @@ function f(_arguments) { } //// [emitArrowFunctionWhenUsingArguments09.js] +"use strict"; function f(_arguments) { var a = function () { return function () { return arguments; }; }; } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09_ES6.js index 06571f42c5292..8da3756a4e67e 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09_ES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments09_ES6.js @@ -6,6 +6,7 @@ function f(_arguments) { } //// [emitArrowFunctionWhenUsingArguments09_ES6.js] +"use strict"; function f(_arguments) { var a = () => () => arguments; } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es2015).js index 0ccae4da3e3d2..a0e9eab8084a8 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es2015).js @@ -7,6 +7,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments10.js] +"use strict"; function f() { var _arguments = 10; var a = () => () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es5).js index 6175674a658c2..8dcc7215d5d2e 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10(target=es5).js @@ -7,6 +7,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments10.js] +"use strict"; function f() { var _arguments = 10; var a = function () { return function () { return arguments; }; }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10_ES6.js index e426e0e3e5214..b917f4e163bff 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10_ES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments10_ES6.js @@ -7,6 +7,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments10_ES6.js] +"use strict"; function f() { var _arguments = 10; var a = () => () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..d6919f26aa88e --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +//// [emitArrowFunctionWhenUsingArguments11.ts] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments11.js] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..85de56283837c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +//// [emitArrowFunctionWhenUsingArguments11.ts] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments11.js] +function f(arguments) { + var _arguments = 10; + var a = function () { return function () { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..4849446076eda --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +//// [emitArrowFunctionWhenUsingArguments11.ts] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments11.js] +"use strict"; +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..d8bbafb7a7c7f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +//// [emitArrowFunctionWhenUsingArguments11.ts] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments11.js] +"use strict"; +function f(arguments) { + var _arguments = 10; + var a = function () { return function () { return arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..2d8a1f65a34e7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments11_ES6.ts] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments11_ES6.js] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..4fc5e40566e2b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments11_ES6.ts] +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} + +//// [emitArrowFunctionWhenUsingArguments11_ES6.js] +"use strict"; +function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es2015).js index de013b2e50b13..264a0bf2063cb 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es2015).js @@ -8,6 +8,7 @@ class C { } //// [emitArrowFunctionWhenUsingArguments12.js] +"use strict"; class C { f(arguments) { var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es5).js index 62d6badacb523..58a60be7a02a9 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12(target=es5).js @@ -8,6 +8,7 @@ class C { } //// [emitArrowFunctionWhenUsingArguments12.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12_ES6.js index 19e18f97f4cc5..5d3fef1cf6173 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12_ES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments12_ES6.js @@ -8,6 +8,7 @@ class C { } //// [emitArrowFunctionWhenUsingArguments12_ES6.js] +"use strict"; class C { f(arguments) { var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..5ca8028ea71b2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +//// [emitArrowFunctionWhenUsingArguments13.ts] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} + +//// [emitArrowFunctionWhenUsingArguments13.js] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..0f80793d82cbf --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +//// [emitArrowFunctionWhenUsingArguments13.ts] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} + +//// [emitArrowFunctionWhenUsingArguments13.js] +function f() { + var _arguments = 10; + var a = function (arguments) { return function () { return _arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..2c84f294f13dd --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +//// [emitArrowFunctionWhenUsingArguments13.ts] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} + +//// [emitArrowFunctionWhenUsingArguments13.js] +"use strict"; +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..f7b6ac2e8f70c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +//// [emitArrowFunctionWhenUsingArguments13.ts] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} + +//// [emitArrowFunctionWhenUsingArguments13.js] +"use strict"; +function f() { + var _arguments = 10; + var a = function (arguments) { return function () { return _arguments; }; }; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..8182b097389d4 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments13_ES6.ts] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} + +//// [emitArrowFunctionWhenUsingArguments13_ES6.js] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..4e96874003a5f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments13_ES6.ts] +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} + +//// [emitArrowFunctionWhenUsingArguments13_ES6.js] +"use strict"; +function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..4150c6c440a08 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).js @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +//// [emitArrowFunctionWhenUsingArguments14.ts] +function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments14.js] +function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..4685edabaa3c0 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).js @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +//// [emitArrowFunctionWhenUsingArguments14.ts] +function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments14.js] +function f() { + if (Math.random()) { + var arguments_1 = 100; + return function () { return arguments; }; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..e48890ab9aa91 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).js @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +//// [emitArrowFunctionWhenUsingArguments14.ts] +function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments14.js] +"use strict"; +function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..d8200a73918fc --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).js @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +//// [emitArrowFunctionWhenUsingArguments14.ts] +function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments14.js] +"use strict"; +function f() { + if (Math.random()) { + var arguments_1 = 100; + return function () { return arguments; }; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..1fd80c55f2070 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).js @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments14_ES6.ts] +function f() { + if (Math.random()) { + let arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments14_ES6.js] +function f() { + if (Math.random()) { + let arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..730059243dc90 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).js @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments14_ES6.ts] +function f() { + if (Math.random()) { + let arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments14_ES6.js] +"use strict"; +function f() { + if (Math.random()) { + let arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..3c7ae3d1d047d --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +//// [emitArrowFunctionWhenUsingArguments15.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments15.js] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..8e320e0253202 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +//// [emitArrowFunctionWhenUsingArguments15.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments15.js] +function f() { + var arguments = "hello"; + if (Math.random()) { + var arguments_1 = 100; + return function () { return arguments; }; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..949e59af25d68 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +//// [emitArrowFunctionWhenUsingArguments15.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments15.js] +"use strict"; +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..a07b7d592d2c6 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +//// [emitArrowFunctionWhenUsingArguments15.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments15.js] +"use strict"; +function f() { + var arguments = "hello"; + if (Math.random()) { + var arguments_1 = 100; + return function () { return arguments; }; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..5927b5a452f51 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments15_ES6.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments15_ES6.js] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..8dae6ba71bedd --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments15_ES6.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} + +//// [emitArrowFunctionWhenUsingArguments15_ES6.js] +"use strict"; +function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..5ac3f2f5b157a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +//// [emitArrowFunctionWhenUsingArguments16.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments16.js] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..15fcfde8676ca --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +//// [emitArrowFunctionWhenUsingArguments16.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments16.js] +function f() { + var arguments = "hello"; + if (Math.random()) { + return function () { return arguments[0]; }; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..a62cf5c08be04 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +//// [emitArrowFunctionWhenUsingArguments16.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments16.js] +"use strict"; +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..d176c79d86165 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +//// [emitArrowFunctionWhenUsingArguments16.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments16.js] +"use strict"; +function f() { + var arguments = "hello"; + if (Math.random()) { + return function () { return arguments[0]; }; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..143355efe1f2b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments16_ES6.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments16_ES6.js] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..9bd1fb8c890dc --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments16_ES6.ts] +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments16_ES6.js] +"use strict"; +function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..e64cdc282d316 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +//// [emitArrowFunctionWhenUsingArguments17.ts] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments17.js] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..9d5574d864de9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +//// [emitArrowFunctionWhenUsingArguments17.ts] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments17.js] +function f() { + var arguments = { arguments: "hello" }.arguments; + if (Math.random()) { + return function () { return arguments[0]; }; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..8503cfb7b3bf7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +//// [emitArrowFunctionWhenUsingArguments17.ts] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments17.js] +"use strict"; +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..e1396e00995a9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +//// [emitArrowFunctionWhenUsingArguments17.ts] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments17.js] +"use strict"; +function f() { + var arguments = { arguments: "hello" }.arguments; + if (Math.random()) { + return function () { return arguments[0]; }; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).js new file mode 100644 index 0000000000000..1abdb2a0c4049 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments17_ES6.ts] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments17_ES6.js] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).js new file mode 100644 index 0000000000000..893bfb2b40e38 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).js @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// + +//// [emitArrowFunctionWhenUsingArguments17_ES6.ts] +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} + +//// [emitArrowFunctionWhenUsingArguments17_ES6.js] +"use strict"; +function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es2015).js index 1acf66d7ea184..2acb63084ddff 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es2015).js @@ -9,6 +9,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments18.js] +"use strict"; function f() { var { arguments: args } = { arguments }; if (Math.random()) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es5).js index 72f14692b93ea..a362028915386 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18(target=es5).js @@ -9,6 +9,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments18.js] +"use strict"; function f() { var args = { arguments: arguments }.arguments; if (Math.random()) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.js index 7741f12192cba..7f60891ab91d0 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.js @@ -9,6 +9,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments18_ES6.js] +"use strict"; function f() { var { arguments: args } = { arguments }; if (Math.random()) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es2015).js index b40be9afa8bbe..70bdf90fe84c1 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es2015).js @@ -16,6 +16,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments19.js] +"use strict"; function f() { function g() { var _arguments = 10; // No capture in 'g', so no conflict. diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es5).js index 040c7c20d6d8a..7c7369bce223b 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19(target=es5).js @@ -16,6 +16,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments19.js] +"use strict"; function f() { function g() { var _arguments = 10; // No capture in 'g', so no conflict. diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19_ES6.js index 23e9cfbdd2837..69a963ee77593 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19_ES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments19_ES6.js @@ -16,6 +16,7 @@ function f() { } //// [emitArrowFunctionWhenUsingArguments19_ES6.js] +"use strict"; function f() { function g() { var _arguments = 10; // No capture in 'g', so no conflict. diff --git a/tests/baselines/reference/emitArrowFunctionsAsIs(target=es2015).js b/tests/baselines/reference/emitArrowFunctionsAsIs(target=es2015).js index 6feb13709dbd1..8c71af402f550 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIs(target=es2015).js +++ b/tests/baselines/reference/emitArrowFunctionsAsIs(target=es2015).js @@ -7,6 +7,7 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIs.js] +"use strict"; var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; diff --git a/tests/baselines/reference/emitArrowFunctionsAsIs(target=es5).js b/tests/baselines/reference/emitArrowFunctionsAsIs(target=es5).js index 99cfd84c94894..307d45cbfba3a 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIs(target=es5).js +++ b/tests/baselines/reference/emitArrowFunctionsAsIs(target=es5).js @@ -7,6 +7,7 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIs.js] +"use strict"; var arrow1 = function (a) { }; var arrow2 = function (a) { }; var arrow3 = function (a, b) { }; diff --git a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js index 5719cfbb94319..1d9aa8a48f6a9 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js @@ -7,6 +7,7 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIsES6.js] +"use strict"; var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; diff --git a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.js b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.js index 8b8c9438ff4e7..2c858197cc3bd 100644 --- a/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.js +++ b/tests/baselines/reference/emitClassDeclarationWithConstructorInES6.js @@ -27,6 +27,7 @@ class B { //// [emitClassDeclarationWithConstructorInES6.js] +"use strict"; class A { constructor(x) { } diff --git a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.js b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.js index 07c80d4cb86d1..04d0a03e21d69 100644 --- a/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.js +++ b/tests/baselines/reference/emitClassDeclarationWithTypeArgumentAndOverloadInES6.js @@ -25,6 +25,7 @@ class B { } //// [emitClassDeclarationWithTypeArgumentAndOverloadInES6.js] +"use strict"; class B { constructor(a) { this.B = a; } foo() { diff --git a/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es2015).js b/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es2015).js index 59d81c22c744d..3acd2e1df0d4e 100644 --- a/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es2015).js +++ b/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es2015).js @@ -20,6 +20,7 @@ class B { //// [emitDecoratorMetadata_restArgs.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es5).js b/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es5).js index 1a2837f035bc4..8bdef1cf36379 100644 --- a/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es5).js +++ b/tests/baselines/reference/emitDecoratorMetadata_restArgs(target=es5).js @@ -20,6 +20,7 @@ class B { //// [emitDecoratorMetadata_restArgs.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/emitDefaultParametersFunction(target=es2015).js b/tests/baselines/reference/emitDefaultParametersFunction(target=es2015).js index 1dec03d49d0f4..3a63bfee2e2ef 100644 --- a/tests/baselines/reference/emitDefaultParametersFunction(target=es2015).js +++ b/tests/baselines/reference/emitDefaultParametersFunction(target=es2015).js @@ -7,6 +7,7 @@ function bar(y = 10) { } function bar1(y = 10, ...rest) { } //// [emitDefaultParametersFunction.js] +"use strict"; function foo(x, y = 10) { } function baz(x, y = 5, ...rest) { } function bar(y = 10) { } diff --git a/tests/baselines/reference/emitDefaultParametersFunction(target=es5).js b/tests/baselines/reference/emitDefaultParametersFunction(target=es5).js index f57380fb50ab7..f225b38de1ffa 100644 --- a/tests/baselines/reference/emitDefaultParametersFunction(target=es5).js +++ b/tests/baselines/reference/emitDefaultParametersFunction(target=es5).js @@ -7,6 +7,7 @@ function bar(y = 10) { } function bar1(y = 10, ...rest) { } //// [emitDefaultParametersFunction.js] +"use strict"; function foo(x, y) { if (y === void 0) { y = 10; } } diff --git a/tests/baselines/reference/emitDefaultParametersFunctionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionES6.js index 84f7ecb99fc97..f4578b88cd54a 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionES6.js @@ -7,6 +7,7 @@ function bar(y = 10) { } function bar1(y = 10, ...rest) { } //// [emitDefaultParametersFunctionES6.js] +"use strict"; function foo(x, y = 10) { } function baz(x, y = 5, ...rest) { } function bar(y = 10) { } diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es2015).js b/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es2015).js index b914e91e21da6..df73bd5eebb3c 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es2015).js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es2015).js @@ -12,6 +12,7 @@ var z = (function (num: number, boo = false, ...rest) { })(10) //// [emitDefaultParametersFunctionExpression.js] +"use strict"; var lambda1 = (y = "hello") => { }; var lambda2 = (x, y = "hello") => { }; var lambda3 = (x, y = "hello", ...rest) => { }; diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es5).js b/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es5).js index 74de81f45ad9c..79f3174f1daf8 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es5).js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpression(target=es5).js @@ -12,6 +12,7 @@ var z = (function (num: number, boo = false, ...rest) { })(10) //// [emitDefaultParametersFunctionExpression.js] +"use strict"; var lambda1 = function (y) { if (y === void 0) { y = "hello"; } }; diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js index 1f8a35357c9e1..a8faff6ff498f 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js @@ -11,6 +11,7 @@ var y = (function (num = 10, boo = false, ...rest) { })() var z = (function (num: number, boo = false, ...rest) { })(10) //// [emitDefaultParametersFunctionExpressionES6.js] +"use strict"; var lambda1 = (y = "hello") => { }; var lambda2 = (x, y = "hello") => { }; var lambda3 = (x, y = "hello", ...rest) => { }; diff --git a/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es2015).js b/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es2015).js index 778428f329765..7222aa6cd84d1 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es2015).js +++ b/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es2015).js @@ -10,6 +10,7 @@ var obj2 = { //// [emitDefaultParametersFunctionProperty.js] +"use strict"; var obj2 = { func1(y = 10, ...rest) { }, func2(x = "hello") { }, diff --git a/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es5).js b/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es5).js index 103ff165ee32a..b5e4030395c61 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es5).js +++ b/tests/baselines/reference/emitDefaultParametersFunctionProperty(target=es5).js @@ -10,6 +10,7 @@ var obj2 = { //// [emitDefaultParametersFunctionProperty.js] +"use strict"; var obj2 = { func1: function (y) { if (y === void 0) { y = 10; } diff --git a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js index d4b742d685b38..d2c52c03dc3dd 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js @@ -9,6 +9,7 @@ var obj2 = { } //// [emitDefaultParametersFunctionPropertyES6.js] +"use strict"; var obj2 = { func1(y = 10, ...rest) { }, func2(x = "hello") { }, diff --git a/tests/baselines/reference/emitDefaultParametersMethod(target=es2015).js b/tests/baselines/reference/emitDefaultParametersMethod(target=es2015).js index 979b9955b1c02..304ce2c84e81b 100644 --- a/tests/baselines/reference/emitDefaultParametersMethod(target=es2015).js +++ b/tests/baselines/reference/emitDefaultParametersMethod(target=es2015).js @@ -20,6 +20,7 @@ class E { //// [emitDefaultParametersMethod.js] +"use strict"; class C { constructor(t, z, x, y = "hello") { } foo(x, t = false) { } diff --git a/tests/baselines/reference/emitDefaultParametersMethod(target=es5).js b/tests/baselines/reference/emitDefaultParametersMethod(target=es5).js index 17cb0765abe47..73857390c2b73 100644 --- a/tests/baselines/reference/emitDefaultParametersMethod(target=es5).js +++ b/tests/baselines/reference/emitDefaultParametersMethod(target=es5).js @@ -20,6 +20,7 @@ class E { //// [emitDefaultParametersMethod.js] +"use strict"; var C = /** @class */ (function () { function C(t, z, x, y) { if (y === void 0) { y = "hello"; } diff --git a/tests/baselines/reference/emitDefaultParametersMethodES6.js b/tests/baselines/reference/emitDefaultParametersMethodES6.js index 58d27659307ad..e5b2b840be3b1 100644 --- a/tests/baselines/reference/emitDefaultParametersMethodES6.js +++ b/tests/baselines/reference/emitDefaultParametersMethodES6.js @@ -19,6 +19,7 @@ class E { } //// [emitDefaultParametersMethodES6.js] +"use strict"; class C { constructor(t, z, x, y = "hello") { } foo(x, t = false) { } diff --git a/tests/baselines/reference/emitRestParametersFunction(target=es2015).js b/tests/baselines/reference/emitRestParametersFunction(target=es2015).js index 5f2d5f2ab1f2d..df6a83dcfa50d 100644 --- a/tests/baselines/reference/emitRestParametersFunction(target=es2015).js +++ b/tests/baselines/reference/emitRestParametersFunction(target=es2015).js @@ -5,5 +5,6 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunction.js] +"use strict"; function bar(...rest) { } function foo(x, y, ...rest) { } diff --git a/tests/baselines/reference/emitRestParametersFunction(target=es5).js b/tests/baselines/reference/emitRestParametersFunction(target=es5).js index ca31cd6fd0dba..c10704f6f7009 100644 --- a/tests/baselines/reference/emitRestParametersFunction(target=es5).js +++ b/tests/baselines/reference/emitRestParametersFunction(target=es5).js @@ -5,6 +5,7 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunction.js] +"use strict"; function bar() { var rest = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/emitRestParametersFunctionES6.js b/tests/baselines/reference/emitRestParametersFunctionES6.js index e4718f6c88661..0685a4c8e2fd3 100644 --- a/tests/baselines/reference/emitRestParametersFunctionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionES6.js @@ -5,5 +5,6 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunctionES6.js] +"use strict"; function bar(...rest) { } function foo(x, y, ...rest) { } diff --git a/tests/baselines/reference/emitRestParametersFunctionExpression(target=es2015).js b/tests/baselines/reference/emitRestParametersFunctionExpression(target=es2015).js index ee95a162437cb..0779b89101964 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpression(target=es2015).js +++ b/tests/baselines/reference/emitRestParametersFunctionExpression(target=es2015).js @@ -8,6 +8,7 @@ var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpression.js] +"use strict"; var funcExp = (...rest) => { }; var funcExp1 = (X, ...rest) => { }; var funcExp2 = function (...rest) { }; diff --git a/tests/baselines/reference/emitRestParametersFunctionExpression(target=es5).js b/tests/baselines/reference/emitRestParametersFunctionExpression(target=es5).js index d765a0bc6ae53..fdf3426a99ebe 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpression(target=es5).js +++ b/tests/baselines/reference/emitRestParametersFunctionExpression(target=es5).js @@ -8,6 +8,7 @@ var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpression.js] +"use strict"; var funcExp = function () { var rest = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js index 40236cac0765d..cff7aebc38316 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js @@ -7,6 +7,7 @@ var funcExp2 = function (...rest) { } var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpressionES6.js] +"use strict"; var funcExp = (...rest) => { }; var funcExp1 = (X, ...rest) => { }; var funcExp2 = function (...rest) { }; diff --git a/tests/baselines/reference/emitRestParametersFunctionProperty(target=es2015).js b/tests/baselines/reference/emitRestParametersFunctionProperty(target=es2015).js index 5b70da167a5fe..68885c61fd57e 100644 --- a/tests/baselines/reference/emitRestParametersFunctionProperty(target=es2015).js +++ b/tests/baselines/reference/emitRestParametersFunctionProperty(target=es2015).js @@ -10,6 +10,7 @@ var obj2 = { } //// [emitRestParametersFunctionProperty.js] +"use strict"; var obj; var obj2 = { func(...rest) { } diff --git a/tests/baselines/reference/emitRestParametersFunctionProperty(target=es5).js b/tests/baselines/reference/emitRestParametersFunctionProperty(target=es5).js index e2732ba246e98..b07f2ebd5a1ad 100644 --- a/tests/baselines/reference/emitRestParametersFunctionProperty(target=es5).js +++ b/tests/baselines/reference/emitRestParametersFunctionProperty(target=es5).js @@ -10,6 +10,7 @@ var obj2 = { } //// [emitRestParametersFunctionProperty.js] +"use strict"; var obj; var obj2 = { func: function () { diff --git a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js index fedc5dbaf58cb..a40ae951654ec 100644 --- a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js @@ -10,6 +10,7 @@ var obj2 = { } //// [emitRestParametersFunctionPropertyES6.js] +"use strict"; var obj; var obj2 = { func(...rest) { } diff --git a/tests/baselines/reference/emitRestParametersMethod(target=es2015).js b/tests/baselines/reference/emitRestParametersMethod(target=es2015).js index 5b71fd8221509..0ea1eece6c675 100644 --- a/tests/baselines/reference/emitRestParametersMethod(target=es2015).js +++ b/tests/baselines/reference/emitRestParametersMethod(target=es2015).js @@ -16,6 +16,7 @@ class D { } //// [emitRestParametersMethod.js] +"use strict"; class C { constructor(name, ...rest) { } bar(...rest) { } diff --git a/tests/baselines/reference/emitRestParametersMethod(target=es5).js b/tests/baselines/reference/emitRestParametersMethod(target=es5).js index b174b4e6edfac..6e1ba82e5642e 100644 --- a/tests/baselines/reference/emitRestParametersMethod(target=es5).js +++ b/tests/baselines/reference/emitRestParametersMethod(target=es5).js @@ -16,6 +16,7 @@ class D { } //// [emitRestParametersMethod.js] +"use strict"; var C = /** @class */ (function () { function C(name) { var rest = []; diff --git a/tests/baselines/reference/emitRestParametersMethodES6.js b/tests/baselines/reference/emitRestParametersMethodES6.js index f5196ae629137..dc00ac6bfe9ac 100644 --- a/tests/baselines/reference/emitRestParametersMethodES6.js +++ b/tests/baselines/reference/emitRestParametersMethodES6.js @@ -17,6 +17,7 @@ class D { //// [emitRestParametersMethodES6.js] +"use strict"; class C { constructor(name, ...rest) { } bar(...rest) { } diff --git a/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es2015).js b/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es2015).js index 828cedf64b3a6..cc48a410cc9eb 100644 --- a/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es2015).js +++ b/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es2015).js @@ -9,6 +9,7 @@ const example = { //// [emitThisInObjectLiteralGetter.js] +"use strict"; const example = { get foo() { return item => this.bar(item); diff --git a/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es5).js b/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es5).js index 6823d39e252bd..0c2812b8a1adf 100644 --- a/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es5).js +++ b/tests/baselines/reference/emitThisInObjectLiteralGetter(target=es5).js @@ -9,6 +9,7 @@ const example = { //// [emitThisInObjectLiteralGetter.js] +"use strict"; var example = { get foo() { var _this = this; diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js index 34333f4d0bc8e..e41b71de25975 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js @@ -61,6 +61,7 @@ class C9 extends B9 { //// [C1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -81,6 +82,7 @@ class C1 { } } //// [C2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -102,6 +104,7 @@ class C2 { } } //// [C3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -123,6 +126,7 @@ class C3 { } } //// [C4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -156,6 +160,7 @@ class C4 { } } //// [C5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -189,6 +194,7 @@ class C5 { } } //// [C6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -210,6 +216,7 @@ class C6 { } } //// [C7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -231,6 +238,7 @@ class C7 { } } //// [C8.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -254,6 +262,7 @@ class C8 { } } //// [C9.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.js b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.js index 6fcebafdd45ac..819c7c8b56696 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.js +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.js @@ -61,47 +61,55 @@ class C9 extends B9 { //// [C1.js] +"use strict"; class C1 { async *f() { } } //// [C2.js] +"use strict"; class C2 { async *f() { const x = yield; } } //// [C3.js] +"use strict"; class C3 { async *f() { const x = yield 1; } } //// [C4.js] +"use strict"; class C4 { async *f() { const x = yield* [1]; } } //// [C5.js] +"use strict"; class C5 { async *f() { const x = yield* (async function* () { yield 1; })(); } } //// [C6.js] +"use strict"; class C6 { async *f() { const x = await 1; } } //// [C7.js] +"use strict"; class C7 { async *f() { return 1; } } //// [C8.js] +"use strict"; class C8 { g() { } @@ -110,6 +118,7 @@ class C8 { } } //// [C9.js] +"use strict"; class B9 { g() { } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es2015).js b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es2015).js index 1f3c979593917..ba7870835fd3e 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es2015).js +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es2015).js @@ -61,6 +61,7 @@ class C9 extends B9 { //// [C1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -81,6 +82,7 @@ class C1 { } } //// [C2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -102,6 +104,7 @@ class C2 { } } //// [C3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -123,6 +126,7 @@ class C3 { } } //// [C4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -156,6 +160,7 @@ class C4 { } } //// [C5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -189,6 +194,7 @@ class C5 { } } //// [C6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -210,6 +216,7 @@ class C6 { } } //// [C7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -231,6 +238,7 @@ class C7 { } } //// [C8.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -254,6 +262,7 @@ class C8 { } } //// [C9.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es5).js b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es5).js index d39903e283504..23a3065261b9a 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es5).js +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5(target=es5).js @@ -61,6 +61,7 @@ class C9 extends B9 { //// [C1.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -114,6 +115,7 @@ var C1 = /** @class */ (function () { return C1; }()); //// [C2.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -174,6 +176,7 @@ var C2 = /** @class */ (function () { return C2; }()); //// [C3.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -234,6 +237,7 @@ var C3 = /** @class */ (function () { return C3; }()); //// [C4.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -317,6 +321,7 @@ var C4 = /** @class */ (function () { return C4; }()); //// [C5.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -408,6 +413,7 @@ var C5 = /** @class */ (function () { return C5; }()); //// [C6.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -467,6 +473,7 @@ var C6 = /** @class */ (function () { return C6; }()); //// [C7.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -523,6 +530,7 @@ var C7 = /** @class */ (function () { return C7; }()); //// [C8.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -579,6 +587,7 @@ var C8 = /** @class */ (function () { return C8; }()); //// [C9.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js index 2271510771807..e608bbdc760ba 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js @@ -30,6 +30,7 @@ async function * f7() { //// [F1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -48,6 +49,7 @@ function f1() { }); } //// [F2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -67,6 +69,7 @@ function f2() { }); } //// [F3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -86,6 +89,7 @@ function f3() { }); } //// [F4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -117,6 +121,7 @@ function f4() { }); } //// [F5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -148,6 +153,7 @@ function f5() { }); } //// [F6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -167,6 +173,7 @@ function f6() { }); } //// [F7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.js b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.js index 6937d84f276c9..97750cd2e167b 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.js @@ -30,29 +30,36 @@ async function * f7() { //// [F1.js] +"use strict"; async function* f1() { } //// [F2.js] +"use strict"; async function* f2() { const x = yield; } //// [F3.js] +"use strict"; async function* f3() { const x = yield 1; } //// [F4.js] +"use strict"; async function* f4() { const x = yield* [1]; } //// [F5.js] +"use strict"; async function* f5() { const x = yield* (async function* () { yield 1; })(); } //// [F6.js] +"use strict"; async function* f6() { const x = await 1; } //// [F7.js] +"use strict"; async function* f7() { return 1; } diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es2015).js b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es2015).js index fd56ad962e917..fd386d8d3d525 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es2015).js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es2015).js @@ -30,6 +30,7 @@ async function * f7() { //// [F1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -48,6 +49,7 @@ function f1() { }); } //// [F2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -67,6 +69,7 @@ function f2() { }); } //// [F3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -86,6 +89,7 @@ function f3() { }); } //// [F4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -117,6 +121,7 @@ function f4() { }); } //// [F5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -148,6 +153,7 @@ function f5() { }); } //// [F6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -167,6 +173,7 @@ function f6() { }); } //// [F7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es5).js b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es5).js index a129d13003af0..ba085d7ae90df 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es5).js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5(target=es5).js @@ -30,6 +30,7 @@ async function * f7() { //// [F1.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -78,6 +79,7 @@ function f1() { }); } //// [F2.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -133,6 +135,7 @@ function f2() { }); } //// [F3.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -188,6 +191,7 @@ function f3() { }); } //// [F4.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -266,6 +270,7 @@ function f4() { }); } //// [F5.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -352,6 +357,7 @@ function f5() { }); } //// [F6.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -406,6 +412,7 @@ function f6() { }); } //// [F7.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js index 88ae6f0e40597..881c8e9aada04 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js @@ -30,6 +30,7 @@ const f7 = async function * () { //// [F1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -48,6 +49,7 @@ const f1 = function () { }); }; //// [F2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -67,6 +69,7 @@ const f2 = function () { }); }; //// [F3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -86,6 +89,7 @@ const f3 = function () { }); }; //// [F4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -117,6 +121,7 @@ const f4 = function () { }); }; //// [F5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -148,6 +153,7 @@ const f5 = function () { }); }; //// [F6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -167,6 +173,7 @@ const f6 = function () { }); }; //// [F7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.js b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.js index f9be141c5b2d3..51f7a2f65966d 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.js @@ -30,29 +30,36 @@ const f7 = async function * () { //// [F1.js] +"use strict"; const f1 = async function* () { }; //// [F2.js] +"use strict"; const f2 = async function* () { const x = yield; }; //// [F3.js] +"use strict"; const f3 = async function* () { const x = yield 1; }; //// [F4.js] +"use strict"; const f4 = async function* () { const x = yield* [1]; }; //// [F5.js] +"use strict"; const f5 = async function* () { const x = yield* (async function* () { yield 1; })(); }; //// [F6.js] +"use strict"; const f6 = async function* () { const x = await 1; }; //// [F7.js] +"use strict"; const f7 = async function* () { return 1; }; diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es2015).js b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es2015).js index 2891ae8e91416..7a3aed6c4424b 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es2015).js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es2015).js @@ -30,6 +30,7 @@ const f7 = async function * () { //// [F1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -48,6 +49,7 @@ const f1 = function () { }); }; //// [F2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -67,6 +69,7 @@ const f2 = function () { }); }; //// [F3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -86,6 +89,7 @@ const f3 = function () { }); }; //// [F4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -117,6 +121,7 @@ const f4 = function () { }); }; //// [F5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -148,6 +153,7 @@ const f5 = function () { }); }; //// [F6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -167,6 +173,7 @@ const f6 = function () { }); }; //// [F7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es5).js b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es5).js index e4076be6c7a0b..94653f74a81a2 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es5).js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5(target=es5).js @@ -30,6 +30,7 @@ const f7 = async function * () { //// [F1.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -78,6 +79,7 @@ var f1 = function () { }); }; //// [F2.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -133,6 +135,7 @@ var f2 = function () { }); }; //// [F3.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -188,6 +191,7 @@ var f3 = function () { }); }; //// [F4.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -266,6 +270,7 @@ var f4 = function () { }); }; //// [F5.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -352,6 +357,7 @@ var f5 = function () { }); }; //// [F6.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -406,6 +412,7 @@ var f6 = function () { }); }; //// [F7.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js index e24410353e555..61a512b686800 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js @@ -44,6 +44,7 @@ const o7 = { //// [O1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -64,6 +65,7 @@ const o1 = { } }; //// [O2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -85,6 +87,7 @@ const o2 = { } }; //// [O3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -106,6 +109,7 @@ const o3 = { } }; //// [O4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -139,6 +143,7 @@ const o4 = { } }; //// [O5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -172,6 +177,7 @@ const o5 = { } }; //// [O6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -193,6 +199,7 @@ const o6 = { } }; //// [O7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.js b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.js index 765e6a2fdfaa1..9b1700ba8b756 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.js +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.js @@ -44,41 +44,48 @@ const o7 = { //// [O1.js] +"use strict"; const o1 = { async *f() { } }; //// [O2.js] +"use strict"; const o2 = { async *f() { const x = yield; } }; //// [O3.js] +"use strict"; const o3 = { async *f() { const x = yield 1; } }; //// [O4.js] +"use strict"; const o4 = { async *f() { const x = yield* [1]; } }; //// [O5.js] +"use strict"; const o5 = { async *f() { const x = yield* (async function* () { yield 1; })(); } }; //// [O6.js] +"use strict"; const o6 = { async *f() { const x = await 1; } }; //// [O7.js] +"use strict"; const o7 = { async *f() { return 1; diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es2015).js b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es2015).js index 9af6b6d99cd43..aacd5be868925 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es2015).js +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es2015).js @@ -44,6 +44,7 @@ const o7 = { //// [O1.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -64,6 +65,7 @@ const o1 = { } }; //// [O2.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -85,6 +87,7 @@ const o2 = { } }; //// [O3.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -106,6 +109,7 @@ const o3 = { } }; //// [O4.js] +"use strict"; var __asyncValues = (this && this.__asyncValues) || function (o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; @@ -139,6 +143,7 @@ const o4 = { } }; //// [O5.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -172,6 +177,7 @@ const o5 = { } }; //// [O6.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -193,6 +199,7 @@ const o6 = { } }; //// [O7.js] +"use strict"; var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es5).js b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es5).js index 194c26f59da1f..4cf06b6c773a4 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es5).js +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5(target=es5).js @@ -44,6 +44,7 @@ const o7 = { //// [O1.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -94,6 +95,7 @@ var o1 = { } }; //// [O2.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -151,6 +153,7 @@ var o2 = { } }; //// [O3.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -208,6 +211,7 @@ var o3 = { } }; //// [O4.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -288,6 +292,7 @@ var o4 = { } }; //// [O5.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -376,6 +381,7 @@ var o5 = { } }; //// [O6.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; @@ -432,6 +438,7 @@ var o6 = { } }; //// [O7.js] +"use strict"; var __generator = (this && this.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; diff --git a/tests/baselines/reference/emptyArgumentsListComment.js b/tests/baselines/reference/emptyArgumentsListComment.js index 49cb562b57bc7..6863a5dcce5d9 100644 --- a/tests/baselines/reference/emptyArgumentsListComment.js +++ b/tests/baselines/reference/emptyArgumentsListComment.js @@ -14,6 +14,7 @@ a( //// [emptyArgumentsListComment.js] +"use strict"; a( /*1*/); a( /*first*/ diff --git a/tests/baselines/reference/emptyArrayBindingPatternParameter02.js b/tests/baselines/reference/emptyArrayBindingPatternParameter02.js index 47a7df6848696..3589724fec0cf 100644 --- a/tests/baselines/reference/emptyArrayBindingPatternParameter02.js +++ b/tests/baselines/reference/emptyArrayBindingPatternParameter02.js @@ -6,6 +6,7 @@ function f(a, []) { } //// [emptyArrayBindingPatternParameter02.js] +"use strict"; function f(a, []) { var x, y, z; } diff --git a/tests/baselines/reference/emptyArrayBindingPatternParameter03.js b/tests/baselines/reference/emptyArrayBindingPatternParameter03.js index c1d80a100214f..c0fa732352480 100644 --- a/tests/baselines/reference/emptyArrayBindingPatternParameter03.js +++ b/tests/baselines/reference/emptyArrayBindingPatternParameter03.js @@ -6,6 +6,7 @@ function f(a, []) { } //// [emptyArrayBindingPatternParameter03.js] +"use strict"; function f(a, []) { var x, y, z; } diff --git a/tests/baselines/reference/emptyObjectBindingPatternParameter02.js b/tests/baselines/reference/emptyObjectBindingPatternParameter02.js index 991fdfd05e2ff..1a2c2cace1e74 100644 --- a/tests/baselines/reference/emptyObjectBindingPatternParameter02.js +++ b/tests/baselines/reference/emptyObjectBindingPatternParameter02.js @@ -6,6 +6,7 @@ function f(a, {}) { } //// [emptyObjectBindingPatternParameter02.js] +"use strict"; function f(a, {}) { var x, y, z; } diff --git a/tests/baselines/reference/emptyObjectBindingPatternParameter03.js b/tests/baselines/reference/emptyObjectBindingPatternParameter03.js index d07cda0dcf15e..131a26c85fbda 100644 --- a/tests/baselines/reference/emptyObjectBindingPatternParameter03.js +++ b/tests/baselines/reference/emptyObjectBindingPatternParameter03.js @@ -6,6 +6,7 @@ function f({}, a) { } //// [emptyObjectBindingPatternParameter03.js] +"use strict"; function f({}, a) { var x, y, z; } diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.js b/tests/baselines/reference/enumAssignabilityInInheritance.js index b7b8f674fbe20..fabd0a0bcfb9c 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.js +++ b/tests/baselines/reference/enumAssignabilityInInheritance.js @@ -112,6 +112,7 @@ declare function foo17(x: E): E; var r4 = foo16(E.A); //// [enumAssignabilityInInheritance.js] +"use strict"; // enum is only a subtype of number, no types are subtypes of enum, all of these except the first are errors var E; (function (E) { diff --git a/tests/baselines/reference/enumBasics.js b/tests/baselines/reference/enumBasics.js index b1b0ba8a415bb..88cac58f505d3 100644 --- a/tests/baselines/reference/enumBasics.js +++ b/tests/baselines/reference/enumBasics.js @@ -83,6 +83,7 @@ var doPropagate = [ //// [enumBasics.js] +"use strict"; // Enum without initializers have first member = 0 and successive members = N + 1 var E1; (function (E1) { diff --git a/tests/baselines/reference/enumBasics1.js b/tests/baselines/reference/enumBasics1.js index 6b930276ffb6d..28745713c2691 100644 --- a/tests/baselines/reference/enumBasics1.js +++ b/tests/baselines/reference/enumBasics1.js @@ -40,6 +40,7 @@ enum E2 { // should error for continued autonumbering } //// [enumBasics1.js] +"use strict"; var E; (function (E) { E[E["A"] = 1] = "A"; diff --git a/tests/baselines/reference/enumBasics2.js b/tests/baselines/reference/enumBasics2.js index dae06d0378b41..f4de098ca8efb 100644 --- a/tests/baselines/reference/enumBasics2.js +++ b/tests/baselines/reference/enumBasics2.js @@ -18,6 +18,7 @@ enum Bar { //// [enumBasics2.js] +"use strict"; var Foo; (function (Foo) { Foo[Foo["a"] = 2] = "a"; diff --git a/tests/baselines/reference/enumBasics3.js b/tests/baselines/reference/enumBasics3.js index c0cfa7e7b44b7..dff7c2c11afdd 100644 --- a/tests/baselines/reference/enumBasics3.js +++ b/tests/baselines/reference/enumBasics3.js @@ -21,6 +21,7 @@ namespace M { //// [enumBasics3.js] +"use strict"; var M; (function (M) { let N; diff --git a/tests/baselines/reference/enumIndexer.js b/tests/baselines/reference/enumIndexer.js index 93555b4b38e80..0a9c5be7746c7 100644 --- a/tests/baselines/reference/enumIndexer.js +++ b/tests/baselines/reference/enumIndexer.js @@ -10,6 +10,7 @@ var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same ty //// [enumIndexer.js] +"use strict"; var MyEnumType; (function (MyEnumType) { MyEnumType[MyEnumType["foo"] = 0] = "foo"; diff --git a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js index 37563adfc5e40..ddbdcfcdf71b0 100644 --- a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js +++ b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js @@ -133,6 +133,7 @@ interface I20 { } //// [enumIsNotASubtypeOfAnythingButNumber.js] +"use strict"; // enums are only subtypes of number, any and no other types var E; (function (E) { diff --git a/tests/baselines/reference/equalityWithtNullishCoalescingAssignment(strict=false).js b/tests/baselines/reference/equalityWithtNullishCoalescingAssignment(strict=false).js index e409ee7bfb955..74e54505d9083 100644 --- a/tests/baselines/reference/equalityWithtNullishCoalescingAssignment(strict=false).js +++ b/tests/baselines/reference/equalityWithtNullishCoalescingAssignment(strict=false).js @@ -20,6 +20,7 @@ function f2() { //// [equalityWithtNullishCoalescingAssignment.js] +"use strict"; function f1(a) { a !== null && a !== void 0 ? a : (a = true); if (a === false) { diff --git a/tests/baselines/reference/errorElaboration.js b/tests/baselines/reference/errorElaboration.js index feaf7bc199871..35493d21d0420 100644 --- a/tests/baselines/reference/errorElaboration.js +++ b/tests/baselines/reference/errorElaboration.js @@ -27,6 +27,7 @@ const x = ({ [foo.bar]: c }) => undefined; //// [errorElaboration.js] +"use strict"; // Repro for #5712 foo(a); // Repro for #25498 diff --git a/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.js b/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.js index 5a1df25cde0a9..7e6f8487f2a19 100644 --- a/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.js +++ b/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.js @@ -15,6 +15,7 @@ function baz(x: T) { //// [errorElaborationDivesIntoApparentlyPresentPropsOnly.js] +"use strict"; function foo(x) { x = { a: "abc", b: 20, c: 30 }; } diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes03.js b/tests/baselines/reference/errorMessagesIntersectionTypes03.js index ed3af89a79c8c..f0ad3a6a6b3e5 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes03.js +++ b/tests/baselines/reference/errorMessagesIntersectionTypes03.js @@ -27,6 +27,7 @@ function f(): void { } //// [errorMessagesIntersectionTypes03.js] +"use strict"; function f() { let t; let u; diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes04.js b/tests/baselines/reference/errorMessagesIntersectionTypes04.js index 2bfb96a8dea1b..ba3d6be8702da 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes04.js +++ b/tests/baselines/reference/errorMessagesIntersectionTypes04.js @@ -25,6 +25,7 @@ function f(): void { } //// [errorMessagesIntersectionTypes04.js] +"use strict"; function f() { let num; let bool; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index deb072983227c..ca95fe7494f45 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -77,6 +77,7 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] +"use strict"; var _a; //super call in class constructor with no base type class NoBase { diff --git a/tests/baselines/reference/errorSuperPropertyAccess(target=es2015).js b/tests/baselines/reference/errorSuperPropertyAccess(target=es2015).js index 1d7e951c9330f..c4369cdc496b1 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess(target=es2015).js +++ b/tests/baselines/reference/errorSuperPropertyAccess(target=es2015).js @@ -131,6 +131,7 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] +"use strict"; //super property access in constructor of class with no base type //super property access in instance member function of class with no base type //super property access in instance member accessor(get and set) of class with no base type diff --git a/tests/baselines/reference/errorSuperPropertyAccess(target=es5).js b/tests/baselines/reference/errorSuperPropertyAccess(target=es5).js index 02b8ddb5fa5e0..5ca95d7ab0ea4 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess(target=es5).js +++ b/tests/baselines/reference/errorSuperPropertyAccess(target=es5).js @@ -131,6 +131,7 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 62a2500b3f290..30b975f755970 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -74,6 +74,7 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] +"use strict"; class Foo { } // in call type arguments diff --git a/tests/baselines/reference/es5-asyncFunction(target=es2015).js b/tests/baselines/reference/es5-asyncFunction(target=es2015).js index 249d9c9754ef3..f224d1e1cfe11 100644 --- a/tests/baselines/reference/es5-asyncFunction(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunction(target=es2015).js @@ -11,6 +11,7 @@ async function singleAwait() { } //// [es5-asyncFunction.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/es5-asyncFunction(target=es5).js b/tests/baselines/reference/es5-asyncFunction(target=es5).js index 9b262e16c8844..aea68ba0b26f8 100644 --- a/tests/baselines/reference/es5-asyncFunction(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunction(target=es5).js @@ -11,6 +11,7 @@ async function singleAwait() { } //// [es5-asyncFunction.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es2015).js index 20025376121a3..6f64d4cfc1ec3 100644 --- a/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es2015).js @@ -36,6 +36,7 @@ async function arrayLiteral7() { } //// [es5-asyncFunctionArrayLiterals.js] +"use strict"; function arrayLiteral0() { return __awaiter(this, void 0, void 0, function* () { x = [yield y, z]; diff --git a/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es5).js b/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es5).js index a881bb1e428c0..7332ca4d3b4a1 100644 --- a/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionArrayLiterals(target=es5).js @@ -36,6 +36,7 @@ async function arrayLiteral7() { } //// [es5-asyncFunctionArrayLiterals.js] +"use strict"; function arrayLiteral0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es2015).js index a3cf356733269..1faff5806b614 100644 --- a/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es2015).js @@ -125,6 +125,7 @@ async function binaryComma1(): Promise { } //// [es5-asyncFunctionBinaryExpressions.js] +"use strict"; function binaryPlus0() { return __awaiter(this, void 0, void 0, function* () { (yield x) + y; diff --git a/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es5).js b/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es5).js index 3af7498b43f54..71c7782d9baea 100644 --- a/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionBinaryExpressions(target=es5).js @@ -125,6 +125,7 @@ async function binaryComma1(): Promise { } //// [es5-asyncFunctionBinaryExpressions.js] +"use strict"; function binaryPlus0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es2015).js index 40d232e130cf6..bb6f480b2f48f 100644 --- a/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es2015).js @@ -89,6 +89,7 @@ async function callExpression20() { //// [es5-asyncFunctionCallExpressions.js] +"use strict"; function callExpression0() { return __awaiter(this, void 0, void 0, function* () { yield x(y, z); diff --git a/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es5).js b/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es5).js index baebdfb38f045..17a1aece238c2 100644 --- a/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionCallExpressions(target=es5).js @@ -89,6 +89,7 @@ async function callExpression20() { //// [es5-asyncFunctionCallExpressions.js] +"use strict"; function callExpression0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionConditionals(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionConditionals(target=es2015).js index 4a5ea0cda4bb6..4557226b6d5c4 100644 --- a/tests/baselines/reference/es5-asyncFunctionConditionals(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionConditionals(target=es2015).js @@ -16,6 +16,7 @@ async function conditional2() { } //// [es5-asyncFunctionConditionals.js] +"use strict"; function conditional0() { return __awaiter(this, void 0, void 0, function* () { a = (yield x) ? y : z; diff --git a/tests/baselines/reference/es5-asyncFunctionConditionals(target=es5).js b/tests/baselines/reference/es5-asyncFunctionConditionals(target=es5).js index 2d5d7ab4fe7f5..1e77010d794c2 100644 --- a/tests/baselines/reference/es5-asyncFunctionConditionals(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionConditionals(target=es5).js @@ -16,6 +16,7 @@ async function conditional2() { } //// [es5-asyncFunctionConditionals.js] +"use strict"; function conditional0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es2015).js index 9c19b7c9c8816..25151895729cf 100644 --- a/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es2015).js @@ -80,6 +80,7 @@ async function doStatement18() { } //// [es5-asyncFunctionDoStatements.js] +"use strict"; function doStatement0() { return __awaiter(this, void 0, void 0, function* () { do { diff --git a/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es5).js index d6fa2bb6141f9..10471dd71ccef 100644 --- a/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionDoStatements(target=es5).js @@ -80,6 +80,7 @@ async function doStatement18() { } //// [es5-asyncFunctionDoStatements.js] +"use strict"; function doStatement0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es2015).js index 6b73b7978ae6d..d4f3ed5e6288b 100644 --- a/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es2015).js @@ -17,6 +17,7 @@ async function elementAccess2() { //// [es5-asyncFunctionElementAccess.js] +"use strict"; function elementAccess0() { return __awaiter(this, void 0, void 0, function* () { z = yield x[y]; diff --git a/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es5).js b/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es5).js index 19a92f57e1c03..742e2586f8f30 100644 --- a/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionElementAccess(target=es5).js @@ -17,6 +17,7 @@ async function elementAccess2() { //// [es5-asyncFunctionElementAccess.js] +"use strict"; function elementAccess0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es2015).js index d626402530381..44b4da4dd1631 100644 --- a/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es2015).js @@ -40,6 +40,7 @@ async function forInStatement8() { } //// [es5-asyncFunctionForInStatements.js] +"use strict"; function forInStatement0() { return __awaiter(this, void 0, void 0, function* () { for (x in y) { diff --git a/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es5).js index 0f846ee83e895..10365ecfa39c1 100644 --- a/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionForInStatements(target=es5).js @@ -40,6 +40,7 @@ async function forInStatement8() { } //// [es5-asyncFunctionForInStatements.js] +"use strict"; function forInStatement0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es2015).js index 402ae9dd690b1..bd5391bdc3075 100644 --- a/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es2015).js @@ -80,6 +80,7 @@ async function forOfStatement18() { } //// [es5-asyncFunctionForOfStatements.js] +"use strict"; function forOfStatement0() { return __awaiter(this, void 0, void 0, function* () { for (x of y) { diff --git a/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es5).js index f7e23714c2030..4f4c9fee0c25d 100644 --- a/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionForOfStatements(target=es5).js @@ -80,6 +80,7 @@ async function forOfStatement18() { } //// [es5-asyncFunctionForOfStatements.js] +"use strict"; function forOfStatement0() { return __awaiter(this, void 0, void 0, function () { var _i, y_1; diff --git a/tests/baselines/reference/es5-asyncFunctionForStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionForStatements(target=es2015).js index 9ef597574aab9..51d14c188f478 100644 --- a/tests/baselines/reference/es5-asyncFunctionForStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionForStatements(target=es2015).js @@ -32,6 +32,7 @@ async function forStatement6() { } //// [es5-asyncFunctionForStatements.js] +"use strict"; function forStatement0() { return __awaiter(this, void 0, void 0, function* () { for (x; y; z) { diff --git a/tests/baselines/reference/es5-asyncFunctionForStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionForStatements(target=es5).js index 8c7ff9d73c3d0..b46adcfd7d945 100644 --- a/tests/baselines/reference/es5-asyncFunctionForStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionForStatements(target=es5).js @@ -32,6 +32,7 @@ async function forStatement6() { } //// [es5-asyncFunctionForStatements.js] +"use strict"; function forStatement0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionHoisting(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionHoisting(target=es2015).js index 4b412202704d1..7ebbedc19b071 100644 --- a/tests/baselines/reference/es5-asyncFunctionHoisting(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionHoisting(target=es2015).js @@ -55,6 +55,7 @@ async function hoistingWithAwait() { //// [es5-asyncFunctionHoisting.js] +"use strict"; function hoisting() { return __awaiter(this, void 0, void 0, function* () { var a0, a1 = 1; diff --git a/tests/baselines/reference/es5-asyncFunctionHoisting(target=es5).js b/tests/baselines/reference/es5-asyncFunctionHoisting(target=es5).js index 2c2045ac2e0c1..29c5892113cef 100644 --- a/tests/baselines/reference/es5-asyncFunctionHoisting(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionHoisting(target=es5).js @@ -55,6 +55,7 @@ async function hoistingWithAwait() { //// [es5-asyncFunctionHoisting.js] +"use strict"; function hoisting() { return __awaiter(this, void 0, void 0, function () { function z() { diff --git a/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es2015).js index e1a6e2eb97c85..b0d73a5140e36 100644 --- a/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es2015).js @@ -16,6 +16,7 @@ async function ifStatement3() { } //// [es5-asyncFunctionIfStatements.js] +"use strict"; function ifStatement1() { return __awaiter(this, void 0, void 0, function* () { if (yield x) { diff --git a/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es5).js index 91e6741befe45..adc9e7eccf21c 100644 --- a/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionIfStatements(target=es5).js @@ -16,6 +16,7 @@ async function ifStatement3() { } //// [es5-asyncFunctionIfStatements.js] +"use strict"; function ifStatement1() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es2015).js index 2fb3cb9c667e0..9e342b8b15436 100644 --- a/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es2015).js @@ -30,6 +30,7 @@ const fooLong = async () => { //// [es5-asyncFunctionLongObjectLiteral.js] +"use strict"; // the generated code from both should be similar var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -40,7 +41,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -const fooShort = () => __awaiter(this, void 0, void 0, function* () { +const fooShort = () => __awaiter(void 0, void 0, void 0, function* () { return { a: yield Promise.resolve(0), b: yield Promise.resolve(1), @@ -49,7 +50,7 @@ const fooShort = () => __awaiter(this, void 0, void 0, function* () { e: yield Promise.resolve(4), }; }); -const fooLong = () => __awaiter(this, void 0, void 0, function* () { +const fooLong = () => __awaiter(void 0, void 0, void 0, function* () { return { a: yield Promise.resolve(0), b: yield Promise.resolve(1), diff --git a/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es5).js b/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es5).js index 48fdc5eb3600e..3a895d4d3f3d6 100644 --- a/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral(target=es5).js @@ -30,6 +30,7 @@ const fooLong = async () => { //// [es5-asyncFunctionLongObjectLiteral.js] +"use strict"; // the generated code from both should be similar var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -67,8 +68,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; -var _this = this; -var fooShort = function () { return __awaiter(_this, void 0, void 0, function () { +var fooShort = function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { @@ -92,7 +92,7 @@ var fooShort = function () { return __awaiter(_this, void 0, void 0, function () } }); }); }; -var fooLong = function () { return __awaiter(_this, void 0, void 0, function () { +var fooLong = function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) { switch (_b.label) { diff --git a/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es2015).js index 7afa8b249a0e6..564544040f77f 100644 --- a/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es2015).js @@ -16,6 +16,7 @@ async function nestedLoops() { } //// [es5-asyncFunctionNestedLoops.js] +"use strict"; function nestedLoops() { return __awaiter(this, void 0, void 0, function* () { A: while (x) { diff --git a/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es5).js b/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es5).js index 06340cf3306fd..3bf48d870cde1 100644 --- a/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionNestedLoops(target=es5).js @@ -16,6 +16,7 @@ async function nestedLoops() { } //// [es5-asyncFunctionNestedLoops.js] +"use strict"; function nestedLoops() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es2015).js index 285125d2d1478..5f680cd546534 100644 --- a/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es2015).js @@ -88,6 +88,7 @@ async function newExpression20() { } //// [es5-asyncFunctionNewExpressions.js] +"use strict"; function newExpression0() { return __awaiter(this, void 0, void 0, function* () { yield new x(y, z); diff --git a/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es5).js b/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es5).js index edb0beebd7509..03a9162945512 100644 --- a/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionNewExpressions(target=es5).js @@ -88,6 +88,7 @@ async function newExpression20() { } //// [es5-asyncFunctionNewExpressions.js] +"use strict"; function newExpression0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es2015).js index 2ba65e0e743ae..f57bcc8676926 100644 --- a/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es2015).js @@ -53,6 +53,7 @@ async function objectLiteral6() { } //// [es5-asyncFunctionObjectLiterals.js] +"use strict"; function objectLiteral0() { return __awaiter(this, void 0, void 0, function* () { x = { diff --git a/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es5).js b/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es5).js index 3d2a34d03bafb..c630238a4579c 100644 --- a/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionObjectLiterals(target=es5).js @@ -53,6 +53,7 @@ async function objectLiteral6() { } //// [es5-asyncFunctionObjectLiterals.js] +"use strict"; function objectLiteral0() { return __awaiter(this, void 0, void 0, function () { var _a; diff --git a/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es2015).js index d54d5de94b873..a29f7cd3dc6c3 100644 --- a/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es2015).js @@ -16,6 +16,7 @@ async function callExpression0() { } //// [es5-asyncFunctionPropertyAccess.js] +"use strict"; function propertyAccess0() { return __awaiter(this, void 0, void 0, function* () { y = yield x.a; diff --git a/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es5).js b/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es5).js index 83199fe158a56..624c637719aff 100644 --- a/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionPropertyAccess(target=es5).js @@ -16,6 +16,7 @@ async function callExpression0() { } //// [es5-asyncFunctionPropertyAccess.js] +"use strict"; function propertyAccess0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es2015).js index e215f5633c807..06e8401bd7be8 100644 --- a/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es2015).js @@ -29,6 +29,7 @@ async function returnStatement5(): Promise{ } //// [es5-asyncFunctionReturnStatements.js] +"use strict"; function returnStatement0() { return __awaiter(this, void 0, void 0, function* () { return; diff --git a/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es5).js index 1f089b8afa866..f8e2c2fe3fac1 100644 --- a/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionReturnStatements(target=es5).js @@ -29,6 +29,7 @@ async function returnStatement5(): Promise{ } //// [es5-asyncFunctionReturnStatements.js] +"use strict"; function returnStatement0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es2015).js index 9a35eeaaa6e6b..4a01f96b52fde 100644 --- a/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es2015).js @@ -70,6 +70,7 @@ async function switchStatement8() { } //// [es5-asyncFunctionSwitchStatements.js] +"use strict"; function switchStatement0() { return __awaiter(this, void 0, void 0, function* () { switch (x) { diff --git a/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es5).js index 1e08b821bc1a3..b53a1217663d8 100644 --- a/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionSwitchStatements(target=es5).js @@ -70,6 +70,7 @@ async function switchStatement8() { } //// [es5-asyncFunctionSwitchStatements.js] +"use strict"; function switchStatement0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es2015).js index 96868533cfcb7..040f39d77fc0e 100644 --- a/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es2015).js @@ -125,6 +125,7 @@ async function tryCatchFinally3() { } //// [es5-asyncFunctionTryStatements.js] +"use strict"; function tryCatch0() { return __awaiter(this, void 0, void 0, function* () { var x, y; diff --git a/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es5).js index cd6e63fe53d45..08556135b3e52 100644 --- a/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionTryStatements(target=es5).js @@ -125,6 +125,7 @@ async function tryCatchFinally3() { } //// [es5-asyncFunctionTryStatements.js] +"use strict"; function tryCatch0() { return __awaiter(this, void 0, void 0, function () { var x, y; diff --git a/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es2015).js index 387f3c62b3c5e..e6aa7d32e55db 100644 --- a/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es2015).js +++ b/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es2015).js @@ -80,6 +80,7 @@ async function whileStatement18() { } //// [es5-asyncFunctionWhileStatements.js] +"use strict"; function whileStatement0() { return __awaiter(this, void 0, void 0, function* () { while (x) { diff --git a/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es5).js index 939fdd521eff4..0f43540637b64 100644 --- a/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es5).js +++ b/tests/baselines/reference/es5-asyncFunctionWhileStatements(target=es5).js @@ -80,6 +80,7 @@ async function whileStatement18() { } //// [es5-asyncFunctionWhileStatements.js] +"use strict"; function whileStatement0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).js b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).js new file mode 100644 index 0000000000000..4f6e75aeff5ed --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).js @@ -0,0 +1,70 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +//// [es5-asyncFunctionWithStatements.ts] +declare var x, y, z, a, b, c; + +async function withStatement0() { + with (x) { + y; + } +} + +async function withStatement1() { + with (await x) { + y; + } +} + +async function withStatement2() { + with (x) { + a; + await y; + b; + } +} + +async function withStatement3() { + with (x) { + with (z) { + a; + await y; + b; + } + } +} + +//// [es5-asyncFunctionWithStatements.js] +function withStatement0() { + return __awaiter(this, void 0, void 0, function* () { + with (x) { + y; + } + }); +} +function withStatement1() { + return __awaiter(this, void 0, void 0, function* () { + with (yield x) { + y; + } + }); +} +function withStatement2() { + return __awaiter(this, void 0, void 0, function* () { + with (x) { + a; + yield y; + b; + } + }); +} +function withStatement3() { + return __awaiter(this, void 0, void 0, function* () { + with (x) { + with (z) { + a; + yield y; + b; + } + } + }); +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).js b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).js new file mode 100644 index 0000000000000..efa005107e9b2 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).js @@ -0,0 +1,120 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +//// [es5-asyncFunctionWithStatements.ts] +declare var x, y, z, a, b, c; + +async function withStatement0() { + with (x) { + y; + } +} + +async function withStatement1() { + with (await x) { + y; + } +} + +async function withStatement2() { + with (x) { + a; + await y; + b; + } +} + +async function withStatement3() { + with (x) { + with (z) { + a; + await y; + b; + } + } +} + +//// [es5-asyncFunctionWithStatements.js] +function withStatement0() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + with (x) { + y; + } + return [2 /*return*/]; + }); + }); +} +function withStatement1() { + return __awaiter(this, void 0, void 0, function () { + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, x]; + case 1: + _a = _b.sent(); + _b.label = 2; + case 2: + with (_a) { + y; + } + _b.label = 3; + case 3: return [2 /*return*/]; + } + }); + }); +} +function withStatement2() { + return __awaiter(this, void 0, void 0, function () { + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = x; + _b.label = 1; + case 1: with (_a) { + a; + return [4 /*yield*/, y]; + } + case 2: + with (_a) { + _b.sent(); + b; + } + _b.label = 3; + case 3: return [2 /*return*/]; + } + }); + }); +} +function withStatement3() { + return __awaiter(this, void 0, void 0, function () { + var _a, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _a = x; + _c.label = 1; + case 1: + with (_a) { + _b = z; + } + _c.label = 2; + case 2: with (_a) { + with (_b) { + a; + return [4 /*yield*/, y]; + } + } + case 3: + with (_a) { + with (_b) { + _c.sent(); + b; + } + } + _c.label = 4; + case 4: return [2 /*return*/]; + } + }); + }); +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).js b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).js new file mode 100644 index 0000000000000..90882039ccd20 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).js @@ -0,0 +1,71 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +//// [es5-asyncFunctionWithStatements.ts] +declare var x, y, z, a, b, c; + +async function withStatement0() { + with (x) { + y; + } +} + +async function withStatement1() { + with (await x) { + y; + } +} + +async function withStatement2() { + with (x) { + a; + await y; + b; + } +} + +async function withStatement3() { + with (x) { + with (z) { + a; + await y; + b; + } + } +} + +//// [es5-asyncFunctionWithStatements.js] +"use strict"; +function withStatement0() { + return __awaiter(this, void 0, void 0, function* () { + with (x) { + y; + } + }); +} +function withStatement1() { + return __awaiter(this, void 0, void 0, function* () { + with (yield x) { + y; + } + }); +} +function withStatement2() { + return __awaiter(this, void 0, void 0, function* () { + with (x) { + a; + yield y; + b; + } + }); +} +function withStatement3() { + return __awaiter(this, void 0, void 0, function* () { + with (x) { + with (z) { + a; + yield y; + b; + } + } + }); +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).js b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).js new file mode 100644 index 0000000000000..887de23be9c9f --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).js @@ -0,0 +1,121 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +//// [es5-asyncFunctionWithStatements.ts] +declare var x, y, z, a, b, c; + +async function withStatement0() { + with (x) { + y; + } +} + +async function withStatement1() { + with (await x) { + y; + } +} + +async function withStatement2() { + with (x) { + a; + await y; + b; + } +} + +async function withStatement3() { + with (x) { + with (z) { + a; + await y; + b; + } + } +} + +//// [es5-asyncFunctionWithStatements.js] +"use strict"; +function withStatement0() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + with (x) { + y; + } + return [2 /*return*/]; + }); + }); +} +function withStatement1() { + return __awaiter(this, void 0, void 0, function () { + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, x]; + case 1: + _a = _b.sent(); + _b.label = 2; + case 2: + with (_a) { + y; + } + _b.label = 3; + case 3: return [2 /*return*/]; + } + }); + }); +} +function withStatement2() { + return __awaiter(this, void 0, void 0, function () { + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = x; + _b.label = 1; + case 1: with (_a) { + a; + return [4 /*yield*/, y]; + } + case 2: + with (_a) { + _b.sent(); + b; + } + _b.label = 3; + case 3: return [2 /*return*/]; + } + }); + }); +} +function withStatement3() { + return __awaiter(this, void 0, void 0, function () { + var _a, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _a = x; + _c.label = 1; + case 1: + with (_a) { + _b = z; + } + _c.label = 2; + case 2: with (_a) { + with (_b) { + a; + return [4 /*yield*/, y]; + } + } + case 3: + with (_a) { + with (_b) { + _c.sent(); + b; + } + } + _c.label = 4; + case 4: return [2 /*return*/]; + } + }); + }); +} diff --git a/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es2015).js b/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es2015).js index a37425c853524..d9541070c2419 100644 --- a/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es2015).js +++ b/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es2015).js @@ -65,6 +65,7 @@ function* objectLiteral7() { //// [es5-yieldFunctionObjectLiterals.js] +"use strict"; // mainly to verify indentation of emitted code function g() { return "g"; } function* objectLiteral1() { diff --git a/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es5).js b/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es5).js index 799b3332aeae5..e7a828f76ccef 100644 --- a/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es5).js +++ b/tests/baselines/reference/es5-yieldFunctionObjectLiterals(target=es5).js @@ -65,6 +65,7 @@ function* objectLiteral7() { //// [es5-yieldFunctionObjectLiterals.js] +"use strict"; // mainly to verify indentation of emitted code function g() { return "g"; } function objectLiteral1() { diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 6b3820eed2b26..9426e53d50cb9 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -87,6 +87,7 @@ declare namespace AmbientMod { //// [es6ClassTest.js] +"use strict"; class Bar { prop1(x) { return x; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index e6f1f2911f596..5c1d4809909dd 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -161,6 +161,7 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] +"use strict"; class BasicMonster { constructor(name, health) { this.name = name; diff --git a/tests/baselines/reference/es6ClassTest3.js b/tests/baselines/reference/es6ClassTest3.js index c2928d134cf23..38b5f76ac076a 100644 --- a/tests/baselines/reference/es6ClassTest3.js +++ b/tests/baselines/reference/es6ClassTest3.js @@ -17,6 +17,7 @@ namespace M { } //// [es6ClassTest3.js] +"use strict"; var M; (function (M) { class Visibility { diff --git a/tests/baselines/reference/es6ClassTest4.js b/tests/baselines/reference/es6ClassTest4.js index de71a0477104e..e5f664a3830f2 100644 --- a/tests/baselines/reference/es6ClassTest4.js +++ b/tests/baselines/reference/es6ClassTest4.js @@ -13,3 +13,4 @@ declare class Point //// [es6ClassTest4.js] +"use strict"; diff --git a/tests/baselines/reference/es6ClassTest5.js b/tests/baselines/reference/es6ClassTest5.js index e4c84ea0c7ba8..de5b735cf0972 100644 --- a/tests/baselines/reference/es6ClassTest5.js +++ b/tests/baselines/reference/es6ClassTest5.js @@ -15,6 +15,7 @@ class bigClass { //// [es6ClassTest5.js] +"use strict"; class C1T5 { constructor() { this.foo = (i) => { diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 8a444b04603ee..2a8efb64d0a93 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -11,5 +11,6 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] +"use strict"; class Bar extends M.Foo { } diff --git a/tests/baselines/reference/es6ClassTest8.js b/tests/baselines/reference/es6ClassTest8.js index 32a548780af33..9c8f156547513 100644 --- a/tests/baselines/reference/es6ClassTest8.js +++ b/tests/baselines/reference/es6ClassTest8.js @@ -43,6 +43,7 @@ class Camera { //// [es6ClassTest8.js] +"use strict"; function f1(x) { return x; } class C { constructor() { diff --git a/tests/baselines/reference/es6ClassTest9.js b/tests/baselines/reference/es6ClassTest9.js index 3d9a142500331..50354c13f5b5a 100644 --- a/tests/baselines/reference/es6ClassTest9.js +++ b/tests/baselines/reference/es6ClassTest9.js @@ -6,5 +6,6 @@ function foo() {} //// [es6ClassTest9.js] +"use strict"; (); function foo() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-exportModifier.2.js b/tests/baselines/reference/esDecorators-classDeclaration-exportModifier.2.js index ce8468d988d17..627c8b7f0a3a4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-exportModifier.2.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-exportModifier.2.js @@ -66,6 +66,7 @@ export default abstract @dec class C15 {} //// [global.js] +"use strict"; /** @type {*} */ var dec; //// [file1.js] @@ -111,6 +112,7 @@ export default class C7 { } //// [file8.js] +"use strict"; // ok @dec class C8 { @@ -138,12 +140,14 @@ export default class C12 { } //// [file13.js] +"use strict"; // error abstract; @dec class C13 { } //// [file14.js] +"use strict"; abstract; @dec class C14 { diff --git a/tests/baselines/reference/esDecorators-privateFieldAccess.js b/tests/baselines/reference/esDecorators-privateFieldAccess.js index d8cf63be70edd..4a1676019c691 100644 --- a/tests/baselines/reference/esDecorators-privateFieldAccess.js +++ b/tests/baselines/reference/esDecorators-privateFieldAccess.js @@ -27,6 +27,7 @@ class C { //// [esDecorators-privateFieldAccess.js] +"use strict"; @dec(x => x.#foo) // error class A { #foo = 3; diff --git a/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js index 6d142d2a4d8d7..d75d0ac2850ef 100644 --- a/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js @@ -18,6 +18,7 @@ C[Symbol.metadata].b; // 'y' //// [foo.js] +"use strict"; var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { diff --git a/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js index 89829ed23d352..ba62c0060c1ce 100644 --- a/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js @@ -18,6 +18,7 @@ C[Symbol.metadata].b; // 'y' //// [foo.js] +"use strict"; var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js index c40e77507058f..7cba1db397a63 100644 --- a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js @@ -26,6 +26,7 @@ D[Symbol.metadata].b; // 'z' //// [foo.js] +"use strict"; var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js index 426bcfa0ef112..669c5fed386c6 100644 --- a/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js @@ -26,6 +26,7 @@ D[Symbol.metadata].b; // 'z' //// [foo.js] +"use strict"; var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js index f0d3e6727ca67..220847f12023e 100644 --- a/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js @@ -21,6 +21,7 @@ D[Symbol.metadata].a; // ['x', 'z'] //// [foo.js] +"use strict"; var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js index d838170cd6a61..b4d39bd35594d 100644 --- a/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js @@ -21,6 +21,7 @@ D[Symbol.metadata].a; // ['x', 'z'] //// [foo.js] +"use strict"; var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; diff --git a/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js index bad3be6e96a61..933833089c6af 100644 --- a/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js @@ -27,6 +27,7 @@ PRIVATE_METADATA.get(C[Symbol.metadata]).b; // 'y' //// [foo.js] +"use strict"; var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { diff --git a/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js index 587292e9250a1..c913510f78277 100644 --- a/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js @@ -27,6 +27,7 @@ PRIVATE_METADATA.get(C[Symbol.metadata]).b; // 'y' //// [foo.js] +"use strict"; var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { diff --git a/tests/baselines/reference/evalAfter0.js b/tests/baselines/reference/evalAfter0.js index 4fdc390f2d02e..5964ef1c0dda9 100644 --- a/tests/baselines/reference/evalAfter0.js +++ b/tests/baselines/reference/evalAfter0.js @@ -7,5 +7,6 @@ declare var eva; (0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something) //// [evalAfter0.js] +"use strict"; (0, eval)("10"); // fine: special case for eval (0, eva)("10"); // error: no side effect left of comma (suspect of missing method name or something) diff --git a/tests/baselines/reference/everyTypeWithInitializer.js b/tests/baselines/reference/everyTypeWithInitializer.js index 603231136b62a..77165215d90e5 100644 --- a/tests/baselines/reference/everyTypeWithInitializer.js +++ b/tests/baselines/reference/everyTypeWithInitializer.js @@ -52,6 +52,7 @@ var x; //// [everyTypeWithInitializer.js] +"use strict"; class C { } class D { diff --git a/tests/baselines/reference/excessPropertyCheckWithSpread.js b/tests/baselines/reference/excessPropertyCheckWithSpread.js index a5de2298a1bea..b5166634d1c0f 100644 --- a/tests/baselines/reference/excessPropertyCheckWithSpread.js +++ b/tests/baselines/reference/excessPropertyCheckWithSpread.js @@ -20,5 +20,6 @@ f({ a: 1, ...l, ...r }); //// [excessPropertyCheckWithSpread.js] +"use strict"; f(Object.assign({ a: 1 }, i)); f(Object.assign(Object.assign({ a: 1 }, l), r)); diff --git a/tests/baselines/reference/expandoFunctionNestedAssigments.js b/tests/baselines/reference/expandoFunctionNestedAssigments.js index 423ee00a2796c..fe3a3feec8a6a 100644 --- a/tests/baselines/reference/expandoFunctionNestedAssigments.js +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.js @@ -54,6 +54,7 @@ for(let f in (Foo.forIn = []) ){ } //// [expandoFunctionNestedAssigments.js] +"use strict"; function Foo() { } let d = (Foo.inVariableInit = 1); diff --git a/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js index d79bd1e0ea41d..32bbc21b86730 100644 --- a/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js +++ b/tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js @@ -74,6 +74,7 @@ for(let f in (Foo.forIn = []) ){ } //// [expandoFunctionNestedAssigmentsDeclared.js] +"use strict"; function Foo() { } (Foo.bla = { foo: 1 }).foo = (Foo.baz = 1) + (Foo.bar = 0); diff --git a/tests/baselines/reference/exportAlreadySeen.js b/tests/baselines/reference/exportAlreadySeen.js index a92b338d854cd..684c14c54fa1a 100644 --- a/tests/baselines/reference/exportAlreadySeen.js +++ b/tests/baselines/reference/exportAlreadySeen.js @@ -22,6 +22,7 @@ declare namespace A { } //// [exportAlreadySeen.js] +"use strict"; var M; (function (M) { M.x = 1; diff --git a/tests/baselines/reference/exportSpecifierAndExportedMemberDeclaration.js b/tests/baselines/reference/exportSpecifierAndExportedMemberDeclaration.js index 0647cbc006222..4ffd287e1f57f 100644 --- a/tests/baselines/reference/exportSpecifierAndExportedMemberDeclaration.js +++ b/tests/baselines/reference/exportSpecifierAndExportedMemberDeclaration.js @@ -15,3 +15,4 @@ declare module "m2" { } //// [exportSpecifierAndExportedMemberDeclaration.js] +"use strict"; diff --git a/tests/baselines/reference/exportSpecifierAndLocalMemberDeclaration.js b/tests/baselines/reference/exportSpecifierAndLocalMemberDeclaration.js index 71a14cd5ec587..4a26ead7bf58d 100644 --- a/tests/baselines/reference/exportSpecifierAndLocalMemberDeclaration.js +++ b/tests/baselines/reference/exportSpecifierAndLocalMemberDeclaration.js @@ -15,3 +15,4 @@ declare module "m2" { } //// [exportSpecifierAndLocalMemberDeclaration.js] +"use strict"; diff --git a/tests/baselines/reference/exportStarFromEmptyModule(target=es2015).js b/tests/baselines/reference/exportStarFromEmptyModule(target=es2015).js index 8912cb90e7f8e..bc5fecd4b61bd 100644 --- a/tests/baselines/reference/exportStarFromEmptyModule(target=es2015).js +++ b/tests/baselines/reference/exportStarFromEmptyModule(target=es2015).js @@ -30,6 +30,7 @@ class A { } exports.A = A; //// [exportStarFromEmptyModule_module2.js] +"use strict"; // empty //// [exportStarFromEmptyModule_module3.js] "use strict"; diff --git a/tests/baselines/reference/exportStarFromEmptyModule(target=es5).js b/tests/baselines/reference/exportStarFromEmptyModule(target=es5).js index 2f33395a35257..592bc2b55fb8a 100644 --- a/tests/baselines/reference/exportStarFromEmptyModule(target=es5).js +++ b/tests/baselines/reference/exportStarFromEmptyModule(target=es5).js @@ -33,6 +33,7 @@ var A = /** @class */ (function () { }()); exports.A = A; //// [exportStarFromEmptyModule_module2.js] +"use strict"; // empty //// [exportStarFromEmptyModule_module3.js] "use strict"; diff --git a/tests/baselines/reference/expressionTypeNodeShouldError.js b/tests/baselines/reference/expressionTypeNodeShouldError.js index 48a8d28ced91c..b9b8e9205ba6f 100644 --- a/tests/baselines/reference/expressionTypeNodeShouldError.js +++ b/tests/baselines/reference/expressionTypeNodeShouldError.js @@ -48,6 +48,7 @@ type ItemType3 = true.typeof(nodes.item(0)); //// [string.js] +"use strict"; class C { foo() { const x; @@ -57,6 +58,7 @@ class C { const nodes = document.getElementsByTagName("li"); typeof (nodes.item(0)); //// [number.js] +"use strict"; class C2 { foo() { const x; @@ -66,6 +68,7 @@ class C2 { const nodes2 = document.getElementsByTagName("li"); typeof (nodes.item(0)); //// [boolean.js] +"use strict"; class C3 { foo() { const x; diff --git a/tests/baselines/reference/extendArray.js b/tests/baselines/reference/extendArray.js index 07176dcbf653c..8ab6dc5fcdf32 100644 --- a/tests/baselines/reference/extendArray.js +++ b/tests/baselines/reference/extendArray.js @@ -26,6 +26,7 @@ arr.collect = function (fn) { //// [extendArray.js] +"use strict"; var a = [1, 2]; a.forEach(function (v, i, a) { }); var arr = Array.prototype; diff --git a/tests/baselines/reference/extendGlobalThis2.js b/tests/baselines/reference/extendGlobalThis2.js index 057ef3dc34aab..5ced750ab04ec 100644 --- a/tests/baselines/reference/extendGlobalThis2.js +++ b/tests/baselines/reference/extendGlobalThis2.js @@ -7,6 +7,7 @@ namespace globalThis { //// [extendGlobalThis2.js] +"use strict"; var globalThis; (function (globalThis) { function foo() { console.log("x"); } diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index f12d139f503fa..6fed2489d5aa1 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -8,6 +8,7 @@ var x = new Foo(); // legal, considered a constructor function class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] +"use strict"; function Foo() { this.x = 1; } diff --git a/tests/baselines/reference/extension.js b/tests/baselines/reference/extension.js index 232533b28c4a3..13d7aa06957ee 100644 --- a/tests/baselines/reference/extension.js +++ b/tests/baselines/reference/extension.js @@ -31,6 +31,7 @@ i.y; //// [extension.js] +"use strict"; var c = new M.C(); c.pe; c.p; diff --git a/tests/baselines/reference/externSemantics.js b/tests/baselines/reference/externSemantics.js index 5fc8dc4d37021..9e460a0734dc5 100644 --- a/tests/baselines/reference/externSemantics.js +++ b/tests/baselines/reference/externSemantics.js @@ -7,3 +7,4 @@ declare var y:number=3; //// [externSemantics.js] +"use strict"; diff --git a/tests/baselines/reference/externSyntax.js b/tests/baselines/reference/externSyntax.js index e35cb9574e8ff..51ce687a0bb58 100644 --- a/tests/baselines/reference/externSyntax.js +++ b/tests/baselines/reference/externSyntax.js @@ -17,3 +17,4 @@ declare namespace M { //// [externSyntax.js] +"use strict"; diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js index ad51bf7dbeecb..fbdf59f7dda3f 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js @@ -18,6 +18,7 @@ file1.bar(); //// [externalModuleRefernceResolutionOrderInImportDeclaration_file2.js] +"use strict"; //// [externalModuleRefernceResolutionOrderInImportDeclaration_file1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/fallFromLastCase1.js b/tests/baselines/reference/fallFromLastCase1.js index 7303905029b80..10bae8698cd32 100644 --- a/tests/baselines/reference/fallFromLastCase1.js +++ b/tests/baselines/reference/fallFromLastCase1.js @@ -25,6 +25,7 @@ function foo2(a: number) { } //// [fallFromLastCase1.js] +"use strict"; function foo1(a) { switch (a) { case 1: diff --git a/tests/baselines/reference/fallFromLastCase2.js b/tests/baselines/reference/fallFromLastCase2.js index 2e2ce19f09470..1ff18cdab6fc5 100644 --- a/tests/baselines/reference/fallFromLastCase2.js +++ b/tests/baselines/reference/fallFromLastCase2.js @@ -29,6 +29,7 @@ function foo2(a: number) { } //// [fallFromLastCase2.js] +"use strict"; function foo1(a) { switch (a) { case 1: diff --git a/tests/baselines/reference/fatarrowfunctions.js b/tests/baselines/reference/fatarrowfunctions.js index 2919d9b3c67e9..f6dc77f8a56a0 100644 --- a/tests/baselines/reference/fatarrowfunctions.js +++ b/tests/baselines/reference/fatarrowfunctions.js @@ -47,6 +47,7 @@ var messenger = { //// [fatarrowfunctions.js] +"use strict"; function foo(x) { return x(); } diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index db05956c2b5b4..994a0c5727a1f 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -15,6 +15,7 @@ var x3 = (a:number) {}; var x4= (...a: any[]) { }; //// [fatarrowfunctionsErrors.js] +"use strict"; foo((...Far) => { return 0; }); foo((1), { return: 0 }); foo((x) => { return x; }); diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js index 0675b4d7a3a6f..ebf488f958062 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js +++ b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js @@ -12,6 +12,7 @@ fn.call(4); // Should be 4 //// [fatarrowfunctionsInFunctionParameterDefaults.js] +"use strict"; function fn(x = () => this, y = x()) { // should be 4 return y; diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctions.js b/tests/baselines/reference/fatarrowfunctionsInFunctions.js index 6350233b2cfa4..0a983eda4ce04 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctions.js +++ b/tests/baselines/reference/fatarrowfunctionsInFunctions.js @@ -16,6 +16,7 @@ messenger.start(); //// [fatarrowfunctionsInFunctions.js] +"use strict"; var messenger = { message: "Hello World", start: function () { diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js index 7b19b33e41a64..fa9c2ed380f29 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js @@ -10,6 +10,7 @@ (arg1 = 1, arg2) => 1; //// [fatarrowfunctionsOptionalArgsErrors1.js] +"use strict"; (arg1, arg2) => 101; (...arg) => 102; (...arg) => 103; diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.js index acc1768e28599..3f5496192e33e 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.js @@ -7,6 +7,7 @@ var tt2 = ((a), b, c) => a+b+c; var tt3 = ((a)) => a; //// [fatarrowfunctionsOptionalArgsErrors2.js] +"use strict"; var tt1 = (a, (b, c)); a + b + c; var tt2 = ((a), b, c); diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js index a0a4e6dd43cf6..76ae0cb9ed510 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors3.js @@ -5,4 +5,5 @@ //// [fatarrowfunctionsOptionalArgsErrors3.js] +"use strict"; (...) => 105; diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js index f34977e1bf0c7..79ab44efcf58e 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js @@ -25,6 +25,7 @@ ); //// [fatarrowfunctionsOptionalArgsErrors4.js] +"use strict"; false ? (arg = 0) => 47 : null; false ? ((arg = 0) => 57) : null; false ? null : (arg = 0) => 67; diff --git a/tests/baselines/reference/findLast(target=es2022).js b/tests/baselines/reference/findLast(target=es2022).js index 4add0a0f0fe98..5d1412d8924e3 100644 --- a/tests/baselines/reference/findLast(target=es2022).js +++ b/tests/baselines/reference/findLast(target=es2022).js @@ -31,6 +31,7 @@ new BigUint64Array().findLastIndex((item) => item === BigInt(0)); //// [findLast.js] +"use strict"; const itemNumber = [0].findLast((item) => item === 0); const itemString = ["string"].findLast((item) => item === "string"); new Int8Array().findLast((item) => item === 0); diff --git a/tests/baselines/reference/findLast(target=esnext).js b/tests/baselines/reference/findLast(target=esnext).js index 4add0a0f0fe98..5d1412d8924e3 100644 --- a/tests/baselines/reference/findLast(target=esnext).js +++ b/tests/baselines/reference/findLast(target=esnext).js @@ -31,6 +31,7 @@ new BigUint64Array().findLastIndex((item) => item === BigInt(0)); //// [findLast.js] +"use strict"; const itemNumber = [0].findLast((item) => item === 0); const itemString = ["string"].findLast((item) => item === "string"); new Int8Array().findLast((item) => item === 0); diff --git a/tests/baselines/reference/fixSignatureCaching.js b/tests/baselines/reference/fixSignatureCaching.js index 20b4ebeb2eb31..0296e4d897bb1 100644 --- a/tests/baselines/reference/fixSignatureCaching.js +++ b/tests/baselines/reference/fixSignatureCaching.js @@ -992,6 +992,7 @@ define(function () { //// [fixSignatureCaching.js] +"use strict"; // Repro from #10697 (function (define, undefined) { define(function () { diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly1.js b/tests/baselines/reference/fixingTypeParametersRepeatedly1.js index 3cb9f450299f9..31f9b28b632a5 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly1.js +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly1.js @@ -10,5 +10,6 @@ declare function g(); g("", x => null, x => x.toLowerCase()); //// [fixingTypeParametersRepeatedly1.js] +"use strict"; f("", x => null, x => x.toLowerCase()); g("", x => null, x => x.toLowerCase()); diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly2.js b/tests/baselines/reference/fixingTypeParametersRepeatedly2.js index 6150cf4893822..f3ab2ec0b70b2 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly2.js +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly2.js @@ -20,5 +20,6 @@ declare function bar(x: T, func: (p: T) => T): T; var result = bar(derived, d => d.toBase()); //// [fixingTypeParametersRepeatedly2.js] +"use strict"; var result = foo(derived, d => d.toBase()); var result = bar(derived, d => d.toBase()); diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly3.js b/tests/baselines/reference/fixingTypeParametersRepeatedly3.js index 16ea1e20cc38c..7e4c1997d6d3d 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly3.js +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly3.js @@ -20,6 +20,7 @@ declare function bar(x: T, func: (p: T) => T): T; var result2 = bar(derived, d => d.toBase()); //// [fixingTypeParametersRepeatedly3.js] +"use strict"; var derived; var result = foo(derived, d => d.toBase()); var result2 = bar(derived, d => d.toBase()); diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index c39454e0a1e69..9a616713e84f1 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -83,6 +83,7 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] +"use strict"; var aString; for (aString in {}) { } var anAny; diff --git a/tests/baselines/reference/for-inStatementsArray.js b/tests/baselines/reference/for-inStatementsArray.js index 26d3fbda0d54e..0572177bb1335 100644 --- a/tests/baselines/reference/for-inStatementsArray.js +++ b/tests/baselines/reference/for-inStatementsArray.js @@ -42,6 +42,7 @@ for (s in a) { //// [for-inStatementsArray.js] +"use strict"; let a; let b; for (let x in a) { diff --git a/tests/baselines/reference/for-inStatementsAsyncIdentifier.js b/tests/baselines/reference/for-inStatementsAsyncIdentifier.js index 0970f0cc0667b..489578d874b8e 100644 --- a/tests/baselines/reference/for-inStatementsAsyncIdentifier.js +++ b/tests/baselines/reference/for-inStatementsAsyncIdentifier.js @@ -6,5 +6,6 @@ for (async in { a: 1, b: 2 }) {} //// [for-inStatementsAsyncIdentifier.js] +"use strict"; var async; for (async in { a: 1, b: 2 }) { } diff --git a/tests/baselines/reference/for-inStatementsDestructuring3.js b/tests/baselines/reference/for-inStatementsDestructuring3.js index fc2fa49c69b7d..de6f9adff95de 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring3.js +++ b/tests/baselines/reference/for-inStatementsDestructuring3.js @@ -5,5 +5,6 @@ var a, b; for ([a, b] in []) { } //// [for-inStatementsDestructuring3.js] +"use strict"; var a, b; for ([a, b] in []) { } diff --git a/tests/baselines/reference/for-inStatementsDestructuring4.js b/tests/baselines/reference/for-inStatementsDestructuring4.js index f477e4164432a..4e10344024bad 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring4.js +++ b/tests/baselines/reference/for-inStatementsDestructuring4.js @@ -5,5 +5,6 @@ var a, b; for ({a, b} in []) { } //// [for-inStatementsDestructuring4.js] +"use strict"; var a, b; for ({ a, b } in []) { } diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index a2e9038f382f5..1133a785527f6 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -66,6 +66,7 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] +"use strict"; var aNumber; for (aNumber in {}) { } var aBoolean; diff --git a/tests/baselines/reference/for-of56(alwaysstrict=false).js b/tests/baselines/reference/for-of56(alwaysstrict=false).js new file mode 100644 index 0000000000000..02c44effd6dfe --- /dev/null +++ b/tests/baselines/reference/for-of56(alwaysstrict=false).js @@ -0,0 +1,7 @@ +//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// + +//// [for-of56.ts] +for (var let of []) {} + +//// [for-of56.js] +for (var let of []) { } diff --git a/tests/baselines/reference/for-of56(alwaysstrict=true).js b/tests/baselines/reference/for-of56(alwaysstrict=true).js new file mode 100644 index 0000000000000..53cb67e67e2d8 --- /dev/null +++ b/tests/baselines/reference/for-of56(alwaysstrict=true).js @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// + +//// [for-of56.ts] +for (var let of []) {} + +//// [for-of56.js] +"use strict"; +for (var let of []) { } diff --git a/tests/baselines/reference/forIn.js b/tests/baselines/reference/forIn.js index f2828c0a08684..cb72dd72164cd 100644 --- a/tests/baselines/reference/forIn.js +++ b/tests/baselines/reference/forIn.js @@ -24,6 +24,7 @@ for (var l in arr) { } //// [forIn.js] +"use strict"; var arr = null; for (var i in arr) { // error var x1 = arr[i]; diff --git a/tests/baselines/reference/forIn2.js b/tests/baselines/reference/forIn2.js index cba414ded51fc..8f3dcb8224f23 100644 --- a/tests/baselines/reference/forIn2.js +++ b/tests/baselines/reference/forIn2.js @@ -5,5 +5,6 @@ for (var i in 1) { } //// [forIn2.js] +"use strict"; for (var i in 1) { } diff --git a/tests/baselines/reference/forInBreakStatements.js b/tests/baselines/reference/forInBreakStatements.js index 9b3f7d875a207..a00a737cd8548 100644 --- a/tests/baselines/reference/forInBreakStatements.js +++ b/tests/baselines/reference/forInBreakStatements.js @@ -40,6 +40,7 @@ for (var x in {}){ //// [forInBreakStatements.js] +"use strict"; for (var x in {}) { break; } diff --git a/tests/baselines/reference/forInContinueStatements.js b/tests/baselines/reference/forInContinueStatements.js index ddcb46caab2f7..4fb18ba8c2e2f 100644 --- a/tests/baselines/reference/forInContinueStatements.js +++ b/tests/baselines/reference/forInContinueStatements.js @@ -40,6 +40,7 @@ for (var x in {}){ //// [forInContinueStatements.js] +"use strict"; for (var x in {}) { continue; } diff --git a/tests/baselines/reference/forInModule.js b/tests/baselines/reference/forInModule.js index de658b57e6d58..e2f659ef50961 100644 --- a/tests/baselines/reference/forInModule.js +++ b/tests/baselines/reference/forInModule.js @@ -8,6 +8,7 @@ namespace Foo { } //// [forInModule.js] +"use strict"; var Foo; (function (Foo) { for (var i = 0; i < 1; i++) { diff --git a/tests/baselines/reference/forInStatement1.js b/tests/baselines/reference/forInStatement1.js index cd0794506b4c0..eb5f92a8eb1f8 100644 --- a/tests/baselines/reference/forInStatement1.js +++ b/tests/baselines/reference/forInStatement1.js @@ -6,6 +6,7 @@ for (var a in expr) { } //// [forInStatement1.js] +"use strict"; var expr; for (var a in expr) { } diff --git a/tests/baselines/reference/forInStatement2.js b/tests/baselines/reference/forInStatement2.js index add41eb72115e..44cd00be8eb90 100644 --- a/tests/baselines/reference/forInStatement2.js +++ b/tests/baselines/reference/forInStatement2.js @@ -6,5 +6,6 @@ for (var a in expr) { } //// [forInStatement2.js] +"use strict"; for (var a in expr) { } diff --git a/tests/baselines/reference/forInStatement3.js b/tests/baselines/reference/forInStatement3.js index bd1c7dd374ef2..c0fd38ffb1590 100644 --- a/tests/baselines/reference/forInStatement3.js +++ b/tests/baselines/reference/forInStatement3.js @@ -8,6 +8,7 @@ function F() { } //// [forInStatement3.js] +"use strict"; function F() { var expr; for (var a in expr) { diff --git a/tests/baselines/reference/forInStatement4.js b/tests/baselines/reference/forInStatement4.js index 293aff7587025..5fb4990c9834f 100644 --- a/tests/baselines/reference/forInStatement4.js +++ b/tests/baselines/reference/forInStatement4.js @@ -6,6 +6,7 @@ for (var a: number in expr) { } //// [forInStatement4.js] +"use strict"; var expr; for (var a in expr) { } diff --git a/tests/baselines/reference/forInStatement5.js b/tests/baselines/reference/forInStatement5.js index 2fd3e03d19776..f0ed36ea39a32 100644 --- a/tests/baselines/reference/forInStatement5.js +++ b/tests/baselines/reference/forInStatement5.js @@ -7,6 +7,7 @@ for (a in expr) { } //// [forInStatement5.js] +"use strict"; var a; var expr; for (a in expr) { diff --git a/tests/baselines/reference/forInStatement6.js b/tests/baselines/reference/forInStatement6.js index 67b43e3bb651c..f3f71021d3ede 100644 --- a/tests/baselines/reference/forInStatement6.js +++ b/tests/baselines/reference/forInStatement6.js @@ -7,6 +7,7 @@ for (a in expr) { } //// [forInStatement6.js] +"use strict"; var a; var expr; for (a in expr) { diff --git a/tests/baselines/reference/forInStatement7.js b/tests/baselines/reference/forInStatement7.js index 323b2397b137f..c216136577ac3 100644 --- a/tests/baselines/reference/forInStatement7.js +++ b/tests/baselines/reference/forInStatement7.js @@ -7,6 +7,7 @@ for (a in expr) { } //// [forInStatement7.js] +"use strict"; var a; var expr; for (a in expr) { diff --git a/tests/baselines/reference/forStatementInnerComments.js b/tests/baselines/reference/forStatementInnerComments.js index 0fab068fd3e24..fdc211448fdbc 100644 --- a/tests/baselines/reference/forStatementInnerComments.js +++ b/tests/baselines/reference/forStatementInnerComments.js @@ -10,6 +10,7 @@ declare var a; //// [forStatementInnerComments.js] +"use strict"; /*0*/ for /*1*/ ( /*2*/var /*3*/ x /*4*/ in /*5*/ a /*6*/) /*7*/ { } /*0*/ for /*1*/ ( /*2*/var /*3*/ y /*4*/ of /*5*/ a /*6*/) /*7*/ { } /*0*/ for /*1*/ ( /*2*/x /*3*/ in /*4*/ a /*5*/) /*6*/ { } diff --git a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).js b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).js index df8bb48968216..3c4cd12a0406f 100644 --- a/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).js +++ b/tests/baselines/reference/forwardRefInTypeDeclaration(strict=false).js @@ -30,6 +30,7 @@ const obj2 = { d: 'd' } as const //// [forwardRefInTypeDeclaration.js] +"use strict"; const s1 = "x"; const s2 = "x"; const s3 = "x"; diff --git a/tests/baselines/reference/funClodule.js b/tests/baselines/reference/funClodule.js index e73f5ac324459..5dc40d45e4063 100644 --- a/tests/baselines/reference/funClodule.js +++ b/tests/baselines/reference/funClodule.js @@ -22,6 +22,7 @@ namespace foo3 { class foo3 { } // Should error //// [funClodule.js] +"use strict"; function foo3() { } (function (foo3) { function x() { } diff --git a/tests/baselines/reference/funcdecl.js b/tests/baselines/reference/funcdecl.js index a1948fd39b8e8..10dbe019f8b3b 100644 --- a/tests/baselines/reference/funcdecl.js +++ b/tests/baselines/reference/funcdecl.js @@ -74,6 +74,7 @@ var f2 = () => { } //// [funcdecl.js] +"use strict"; function simpleFunc() { return "this is my simple func"; } diff --git a/tests/baselines/reference/functionAssignabilityWithArrayLike01(strict=false).js b/tests/baselines/reference/functionAssignabilityWithArrayLike01(strict=false).js index 4cad442684ab5..3be1c66499ed8 100644 --- a/tests/baselines/reference/functionAssignabilityWithArrayLike01(strict=false).js +++ b/tests/baselines/reference/functionAssignabilityWithArrayLike01(strict=false).js @@ -5,5 +5,6 @@ function func() {} const array: ArrayLike = func; //// [functionAssignabilityWithArrayLike01.js] +"use strict"; function func() { } const array = func; diff --git a/tests/baselines/reference/functionAssignment.js b/tests/baselines/reference/functionAssignment.js index d430e73cbc304..cc3107f228a51 100644 --- a/tests/baselines/reference/functionAssignment.js +++ b/tests/baselines/reference/functionAssignment.js @@ -40,6 +40,7 @@ callb((a) =>{ a.length; }); //// [functionAssignment.js] +"use strict"; function f(n) { } f(function () { }); test.get(function (param) { diff --git a/tests/baselines/reference/functionAssignmentError.js b/tests/baselines/reference/functionAssignmentError.js index abcac4476a231..feaea86a20cbd 100644 --- a/tests/baselines/reference/functionAssignmentError.js +++ b/tests/baselines/reference/functionAssignmentError.js @@ -5,5 +5,6 @@ var func = function (){return "ONE";}; func = function (){return "ONE";}; //// [functionAssignmentError.js] +"use strict"; var func = function () { return "ONE"; }; func = function () { return "ONE"; }; diff --git a/tests/baselines/reference/functionCall18.js b/tests/baselines/reference/functionCall18.js index 19209b72a14b2..0df4ba215f0c8 100644 --- a/tests/baselines/reference/functionCall18.js +++ b/tests/baselines/reference/functionCall18.js @@ -8,4 +8,5 @@ foo("hello"); //// [functionCall18.js] +"use strict"; foo("hello"); diff --git a/tests/baselines/reference/functionCall5.js b/tests/baselines/reference/functionCall5.js index c48aaabfb0096..c4835af6da424 100644 --- a/tests/baselines/reference/functionCall5.js +++ b/tests/baselines/reference/functionCall5.js @@ -6,6 +6,7 @@ function foo():m1.c1{return new m1.c1();}; var x = foo(); //// [functionCall5.js] +"use strict"; var m1; (function (m1) { class c1 { diff --git a/tests/baselines/reference/functionCall7.js b/tests/baselines/reference/functionCall7.js index 20a3a0671d14a..38cb9bb083126 100644 --- a/tests/baselines/reference/functionCall7.js +++ b/tests/baselines/reference/functionCall7.js @@ -11,6 +11,7 @@ foo(); //// [functionCall7.js] +"use strict"; var m1; (function (m1) { class c1 { diff --git a/tests/baselines/reference/functionConstraintSatisfaction.js b/tests/baselines/reference/functionConstraintSatisfaction.js index fba115ecb8bd4..ae67733d6b23b 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction.js +++ b/tests/baselines/reference/functionConstraintSatisfaction.js @@ -64,6 +64,7 @@ function foo2(x: T, y: U) { //} //// [functionConstraintSatisfaction.js] +"use strict"; // satisfaction of a constraint to Function, no errors expected function foo(x) { return x; } var i; diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.js b/tests/baselines/reference/functionConstraintSatisfaction2.js index 3af5c9f86d529..90afeb6f56673 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.js +++ b/tests/baselines/reference/functionConstraintSatisfaction2.js @@ -43,6 +43,7 @@ function fff(x: T, y: U) { //// [functionConstraintSatisfaction2.js] +"use strict"; // satisfaction of a constraint to Function, all of these invocations are errors unless otherwise noted function foo(x) { return x; } foo(1); diff --git a/tests/baselines/reference/functionConstraintSatisfaction3.js b/tests/baselines/reference/functionConstraintSatisfaction3.js index 8590b384dd96f..d39dbba4a6440 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction3.js +++ b/tests/baselines/reference/functionConstraintSatisfaction3.js @@ -44,6 +44,7 @@ var r12 = foo(i2); var r15 = foo(c2); //// [functionConstraintSatisfaction3.js] +"use strict"; // satisfaction of a constraint to Function, no errors expected function foo(x) { return x; } var i; diff --git a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.js b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.js index 542ef9a96476d..155633cb04e42 100644 --- a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.js +++ b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.js @@ -7,6 +7,7 @@ function foo(args: { (x): number }[]) { //// [functionDeclarationWithArgumentOfTypeFunctionTypeArray.js] +"use strict"; function foo(args) { return args.length; } diff --git a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js index 890613b93a922..ec75c3a31aa9c 100644 --- a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js +++ b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js @@ -12,6 +12,7 @@ class CDoc { //// [functionExpressionAndLambdaMatchesFunction.js] +"use strict"; class CDoc { constructor() { function doSomething(a) { diff --git a/tests/baselines/reference/functionExpressionContextualTyping1.js b/tests/baselines/reference/functionExpressionContextualTyping1.js index 369f0c0a737b0..adf2e28343502 100644 --- a/tests/baselines/reference/functionExpressionContextualTyping1.js +++ b/tests/baselines/reference/functionExpressionContextualTyping1.js @@ -59,6 +59,7 @@ class C { } //// [functionExpressionContextualTyping1.js] +"use strict"; // When a function expression with no type parameters and no parameter type annotations // is contextually typed (section 4.19) by a type T and a contextual signature S can be extracted from T var E; diff --git a/tests/baselines/reference/functionImplementationErrors(target=es2015).js b/tests/baselines/reference/functionImplementationErrors(target=es2015).js index a777264805be7..3b885c435621d 100644 --- a/tests/baselines/reference/functionImplementationErrors(target=es2015).js +++ b/tests/baselines/reference/functionImplementationErrors(target=es2015).js @@ -76,6 +76,7 @@ var f13 = () => { //// [functionImplementationErrors.js] +"use strict"; // FunctionExpression with no return type annotation with multiple return statements with unrelated types var f1 = function () { return ''; diff --git a/tests/baselines/reference/functionImplementationErrors(target=es5).js b/tests/baselines/reference/functionImplementationErrors(target=es5).js index 455ee411b1d88..4e5b69d4197e7 100644 --- a/tests/baselines/reference/functionImplementationErrors(target=es5).js +++ b/tests/baselines/reference/functionImplementationErrors(target=es5).js @@ -76,6 +76,7 @@ var f13 = () => { //// [functionImplementationErrors.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 3ebc98ae0f700..612e7b2ce931a 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -159,6 +159,7 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC } //// [functionImplementations.js] +"use strict"; // FunctionExpression with no return type annotation and no return statement returns void var v = function () { }(); // FunctionExpression f with no return type annotation and directly references f in its body returns any diff --git a/tests/baselines/reference/functionInIfStatementInModule.js b/tests/baselines/reference/functionInIfStatementInModule.js index 6afcd6efe7c85..b6a0c88a1f800 100644 --- a/tests/baselines/reference/functionInIfStatementInModule.js +++ b/tests/baselines/reference/functionInIfStatementInModule.js @@ -13,6 +13,7 @@ namespace Midori //// [functionInIfStatementInModule.js] +"use strict"; var Midori; (function (Midori) { if (false) { diff --git a/tests/baselines/reference/functionLiteralForOverloads.js b/tests/baselines/reference/functionLiteralForOverloads.js index 44e54341522aa..905aee0791c78 100644 --- a/tests/baselines/reference/functionLiteralForOverloads.js +++ b/tests/baselines/reference/functionLiteralForOverloads.js @@ -24,6 +24,7 @@ var f4: { } = (x) => x; //// [functionLiteralForOverloads.js] +"use strict"; // basic uses of function literals with overloads var f = (x) => x; var f2 = (x) => x; diff --git a/tests/baselines/reference/functionLiteralForOverloads2.js b/tests/baselines/reference/functionLiteralForOverloads2.js index 9e80b0383b0cf..f6c80e16b32c5 100644 --- a/tests/baselines/reference/functionLiteralForOverloads2.js +++ b/tests/baselines/reference/functionLiteralForOverloads2.js @@ -31,6 +31,7 @@ var f3: { } = D; //// [functionLiteralForOverloads2.js] +"use strict"; // basic uses of function literals with constructor overloads class C { constructor(x) { } diff --git a/tests/baselines/reference/functionNameConflicts.js b/tests/baselines/reference/functionNameConflicts.js index ad5f82edc0d90..c92492c626957 100644 --- a/tests/baselines/reference/functionNameConflicts.js +++ b/tests/baselines/reference/functionNameConflicts.js @@ -30,6 +30,7 @@ function overrr() { //// [functionNameConflicts.js] +"use strict"; //Function and variable of the same name in same declaration space //Function overload with different name from implementation signature var M; diff --git a/tests/baselines/reference/functionOverloadAmbiguity1.js b/tests/baselines/reference/functionOverloadAmbiguity1.js index b24e06dc93579..748b62f911963 100644 --- a/tests/baselines/reference/functionOverloadAmbiguity1.js +++ b/tests/baselines/reference/functionOverloadAmbiguity1.js @@ -13,6 +13,7 @@ callb2((a) => { a.length; } ); // ok, chose first overload //// [functionOverloadAmbiguity1.js] +"use strict"; function callb(a) { } callb((a) => { a.length; }); // error, chose first overload function callb2(a) { } diff --git a/tests/baselines/reference/functionOverloadErrors.js b/tests/baselines/reference/functionOverloadErrors.js index 53cf336dd3b42..6004cdac790cc 100644 --- a/tests/baselines/reference/functionOverloadErrors.js +++ b/tests/baselines/reference/functionOverloadErrors.js @@ -121,6 +121,7 @@ function initExpr() { } //// [functionOverloadErrors.js] +"use strict"; function fn1() { } function fn2a() { } diff --git a/tests/baselines/reference/functionOverloadErrorsSyntax.js b/tests/baselines/reference/functionOverloadErrorsSyntax.js index a4e4e41d9fd80..cec24615a1e88 100644 --- a/tests/baselines/reference/functionOverloadErrorsSyntax.js +++ b/tests/baselines/reference/functionOverloadErrorsSyntax.js @@ -14,6 +14,7 @@ function fn5() { } //// [functionOverloadErrorsSyntax.js] +"use strict"; function fn4a() { } function fn4b() { } function fn5() { } diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js index 66dfdee848174..d3ca8c6e243eb 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js @@ -6,4 +6,5 @@ function foo(x, y); function bar() { } //// [functionOverloadImplementationOfWrongName.js] +"use strict"; function bar() { } diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js index 8a69f1aa96ffa..5e855ea87f817 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js @@ -6,4 +6,5 @@ function bar() { } function foo(x, y); //// [functionOverloadImplementationOfWrongName2.js] +"use strict"; function bar() { } diff --git a/tests/baselines/reference/functionOverloads1.js b/tests/baselines/reference/functionOverloads1.js index f0f237930bbe0..0cbb57fca2df1 100644 --- a/tests/baselines/reference/functionOverloads1.js +++ b/tests/baselines/reference/functionOverloads1.js @@ -6,5 +6,6 @@ function foo(); function foo():string { return "a" } //// [functionOverloads1.js] +"use strict"; 1 + 1; function foo() { return "a"; } diff --git a/tests/baselines/reference/functionOverloads10.js b/tests/baselines/reference/functionOverloads10.js index cc6ad2ad38e13..d1d758310c287 100644 --- a/tests/baselines/reference/functionOverloads10.js +++ b/tests/baselines/reference/functionOverloads10.js @@ -7,4 +7,5 @@ function foo(foo:any){ } //// [functionOverloads10.js] +"use strict"; function foo(foo) { } diff --git a/tests/baselines/reference/functionOverloads11.js b/tests/baselines/reference/functionOverloads11.js index d072fa463329d..8d58c0390632d 100644 --- a/tests/baselines/reference/functionOverloads11.js +++ b/tests/baselines/reference/functionOverloads11.js @@ -6,4 +6,5 @@ function foo():string { return "" } //// [functionOverloads11.js] +"use strict"; function foo() { return ""; } diff --git a/tests/baselines/reference/functionOverloads12.js b/tests/baselines/reference/functionOverloads12.js index 592ef329439ba..ef56ac3bc5497 100644 --- a/tests/baselines/reference/functionOverloads12.js +++ b/tests/baselines/reference/functionOverloads12.js @@ -7,6 +7,7 @@ function foo():any { if (true) return ""; else return 0;} //// [functionOverloads12.js] +"use strict"; function foo() { if (true) return ""; else diff --git a/tests/baselines/reference/functionOverloads13.js b/tests/baselines/reference/functionOverloads13.js index 1732845e9e071..3bb40c84e61e2 100644 --- a/tests/baselines/reference/functionOverloads13.js +++ b/tests/baselines/reference/functionOverloads13.js @@ -7,4 +7,5 @@ function foo(bar?:number):any { return "" } //// [functionOverloads13.js] +"use strict"; function foo(bar) { return ""; } diff --git a/tests/baselines/reference/functionOverloads14.js b/tests/baselines/reference/functionOverloads14.js index 276d012d5e38c..362798a8803e4 100644 --- a/tests/baselines/reference/functionOverloads14.js +++ b/tests/baselines/reference/functionOverloads14.js @@ -7,4 +7,5 @@ function foo():{a:any;} { return {a:1} } //// [functionOverloads14.js] +"use strict"; function foo() { return { a: 1 }; } diff --git a/tests/baselines/reference/functionOverloads15.js b/tests/baselines/reference/functionOverloads15.js index 8a7272cd12c18..784f865430168 100644 --- a/tests/baselines/reference/functionOverloads15.js +++ b/tests/baselines/reference/functionOverloads15.js @@ -7,4 +7,5 @@ function foo(foo:{a:string; b?:number;}):any { return "" } //// [functionOverloads15.js] +"use strict"; function foo(foo) { return ""; } diff --git a/tests/baselines/reference/functionOverloads16.js b/tests/baselines/reference/functionOverloads16.js index 1d5ed77c97ee2..095b45ca764e3 100644 --- a/tests/baselines/reference/functionOverloads16.js +++ b/tests/baselines/reference/functionOverloads16.js @@ -7,4 +7,5 @@ function foo(foo:{a:string; b?:number;}):any { return "" } //// [functionOverloads16.js] +"use strict"; function foo(foo) { return ""; } diff --git a/tests/baselines/reference/functionOverloads17.js b/tests/baselines/reference/functionOverloads17.js index f5c42e3e8c2b4..e673e0e784f1e 100644 --- a/tests/baselines/reference/functionOverloads17.js +++ b/tests/baselines/reference/functionOverloads17.js @@ -6,4 +6,5 @@ function foo():{a:string;} { return {a:""} } //// [functionOverloads17.js] +"use strict"; function foo() { return { a: "" }; } diff --git a/tests/baselines/reference/functionOverloads18.js b/tests/baselines/reference/functionOverloads18.js index 02d1512d06396..825311a920ac3 100644 --- a/tests/baselines/reference/functionOverloads18.js +++ b/tests/baselines/reference/functionOverloads18.js @@ -6,4 +6,5 @@ function foo(bar:{a:string;}) { return {a:""} } //// [functionOverloads18.js] +"use strict"; function foo(bar) { return { a: "" }; } diff --git a/tests/baselines/reference/functionOverloads19.js b/tests/baselines/reference/functionOverloads19.js index 066e5fbe63aed..a1540b9f7c4a3 100644 --- a/tests/baselines/reference/functionOverloads19.js +++ b/tests/baselines/reference/functionOverloads19.js @@ -7,4 +7,5 @@ function foo(bar:{a:any;}) { return {a:""} } //// [functionOverloads19.js] +"use strict"; function foo(bar) { return { a: "" }; } diff --git a/tests/baselines/reference/functionOverloads21.js b/tests/baselines/reference/functionOverloads21.js index b611cbaabfb53..777a0605cbeb8 100644 --- a/tests/baselines/reference/functionOverloads21.js +++ b/tests/baselines/reference/functionOverloads21.js @@ -7,4 +7,5 @@ function foo(bar:{a:any; b?:string;}[]) { return 0 } //// [functionOverloads21.js] +"use strict"; function foo(bar) { return 0; } diff --git a/tests/baselines/reference/functionOverloads23.js b/tests/baselines/reference/functionOverloads23.js index 0ad808f2dd20d..0688cc2cf7afe 100644 --- a/tests/baselines/reference/functionOverloads23.js +++ b/tests/baselines/reference/functionOverloads23.js @@ -7,4 +7,5 @@ function foo(bar:(a?)=>void) { return 0 } //// [functionOverloads23.js] +"use strict"; function foo(bar) { return 0; } diff --git a/tests/baselines/reference/functionOverloads24.js b/tests/baselines/reference/functionOverloads24.js index b49ae9a5a11d0..d3d29b3d51556 100644 --- a/tests/baselines/reference/functionOverloads24.js +++ b/tests/baselines/reference/functionOverloads24.js @@ -7,4 +7,5 @@ function foo(bar:any):(a)=>void { return function(){} } //// [functionOverloads24.js] +"use strict"; function foo(bar) { return function () { }; } diff --git a/tests/baselines/reference/functionOverloads44.js b/tests/baselines/reference/functionOverloads44.js index 08a3333681672..49753f799ba24 100644 --- a/tests/baselines/reference/functionOverloads44.js +++ b/tests/baselines/reference/functionOverloads44.js @@ -25,6 +25,7 @@ var x2 = foo2([{a: "str"}]); var y2 = foo2([{a: 100}]); //// [functionOverloads44.js] +"use strict"; function foo1([x]) { return undefined; } diff --git a/tests/baselines/reference/functionOverloads45.js b/tests/baselines/reference/functionOverloads45.js index a59ada5da6ba7..d5be07b3388cc 100644 --- a/tests/baselines/reference/functionOverloads45.js +++ b/tests/baselines/reference/functionOverloads45.js @@ -25,6 +25,7 @@ var x2 = foo2([{a: "str"}]); var y2 = foo2([{a: 100}]); //// [functionOverloads45.js] +"use strict"; function foo1([x]) { return undefined; } diff --git a/tests/baselines/reference/functionOverloads5.js b/tests/baselines/reference/functionOverloads5.js index 08f0d7f61ccb0..af0653ba700f0 100644 --- a/tests/baselines/reference/functionOverloads5.js +++ b/tests/baselines/reference/functionOverloads5.js @@ -8,6 +8,7 @@ class baz { //// [functionOverloads5.js] +"use strict"; class baz { foo(bar) { } } diff --git a/tests/baselines/reference/functionOverloads6.js b/tests/baselines/reference/functionOverloads6.js index 32eae9cbaa730..5e95b4674fe77 100644 --- a/tests/baselines/reference/functionOverloads6.js +++ b/tests/baselines/reference/functionOverloads6.js @@ -9,6 +9,7 @@ class foo { //// [functionOverloads6.js] +"use strict"; class foo { static fnOverload(foo) { } } diff --git a/tests/baselines/reference/functionOverloads7.js b/tests/baselines/reference/functionOverloads7.js index e4626a726247d..5f6a039bbe104 100644 --- a/tests/baselines/reference/functionOverloads7.js +++ b/tests/baselines/reference/functionOverloads7.js @@ -13,6 +13,7 @@ class foo { //// [functionOverloads7.js] +"use strict"; class foo { bar(foo) { return "foo"; } n() { diff --git a/tests/baselines/reference/functionOverloads8.js b/tests/baselines/reference/functionOverloads8.js index 9b1518c589555..23a10faf0549c 100644 --- a/tests/baselines/reference/functionOverloads8.js +++ b/tests/baselines/reference/functionOverloads8.js @@ -7,4 +7,5 @@ function foo(foo?:any){ return '' } //// [functionOverloads8.js] +"use strict"; function foo(foo) { return ''; } diff --git a/tests/baselines/reference/functionOverloads9.js b/tests/baselines/reference/functionOverloads9.js index 30cf95fc24c30..4f32952b1077a 100644 --- a/tests/baselines/reference/functionOverloads9.js +++ b/tests/baselines/reference/functionOverloads9.js @@ -7,6 +7,7 @@ var x = foo('foo'); //// [functionOverloads9.js] +"use strict"; function foo(foo) { return ''; } ; var x = foo('foo'); diff --git a/tests/baselines/reference/functionParameterArityMismatch.js b/tests/baselines/reference/functionParameterArityMismatch.js index 9153a5c976c08..88536c47cf232 100644 --- a/tests/baselines/reference/functionParameterArityMismatch.js +++ b/tests/baselines/reference/functionParameterArityMismatch.js @@ -19,6 +19,7 @@ f2(1, 2, 3, 4, 5, ...[6, 7]); //// [functionParameterArityMismatch.js] +"use strict"; f1(); f1(1, 2); f1(1, 2, 3, 4); diff --git a/tests/baselines/reference/functionParameterObjectRestAndInitializers.js b/tests/baselines/reference/functionParameterObjectRestAndInitializers.js index 0e88a1ecfd80e..55edd5034415d 100644 --- a/tests/baselines/reference/functionParameterObjectRestAndInitializers.js +++ b/tests/baselines/reference/functionParameterObjectRestAndInitializers.js @@ -13,6 +13,7 @@ function g({a, ...x}, b = ({a}, b = a) => {}) { //// [functionParameterObjectRestAndInitializers.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/47079 var __rest = (this && this.__rest) || function (s, e) { var t = {}; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index ca0d7c61bf40c..ac26d88708dfb 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -17,6 +17,7 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] +"use strict"; class EventBase { constructor() { this._listeners = []; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index f510d62db32a7..6a2cf2892ef6c 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -17,6 +17,7 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] +"use strict"; class EventBase { constructor() { this._listeners = []; diff --git a/tests/baselines/reference/functionTypeArgumentArityErrors.js b/tests/baselines/reference/functionTypeArgumentArityErrors.js index 0c33d9ce31cdb..8c4dba2fa6a0d 100644 --- a/tests/baselines/reference/functionTypeArgumentArityErrors.js +++ b/tests/baselines/reference/functionTypeArgumentArityErrors.js @@ -30,6 +30,7 @@ f5(); //// [functionTypeArgumentArityErrors.js] +"use strict"; f1(); f1(); f2(); diff --git a/tests/baselines/reference/functionTypesLackingReturnTypes.js b/tests/baselines/reference/functionTypesLackingReturnTypes.js index e97f34ef83bbd..d7a00b4d9f1ea 100644 --- a/tests/baselines/reference/functionTypesLackingReturnTypes.js +++ b/tests/baselines/reference/functionTypesLackingReturnTypes.js @@ -15,6 +15,7 @@ var h: { () } var i: { new () } //// [functionTypesLackingReturnTypes.js] +"use strict"; // Error (no '=>') function f(x) { } diff --git a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements8.js b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements8.js index 0f72f33f04989..ec1a892261b15 100644 --- a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements8.js +++ b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements8.js @@ -7,6 +7,7 @@ function bar(a = undefined) { } //// [functionWithDefaultParameterWithNoStatements8.js] +"use strict"; function foo(a = undefined) { } function bar(a = undefined) { } diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index e6589f7d370d9..8caff18aaf190 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -357,6 +357,7 @@ var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; retur var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); //// [generatedContextualTyping.js] +"use strict"; class Base { } class Derived1 extends Base { diff --git a/tests/baselines/reference/generatorES6_1.js b/tests/baselines/reference/generatorES6_1.js index 4a948eed6a1dc..1ff957ce2e8e8 100644 --- a/tests/baselines/reference/generatorES6_1.js +++ b/tests/baselines/reference/generatorES6_1.js @@ -6,6 +6,7 @@ function* foo() { } //// [generatorES6_1.js] +"use strict"; function* foo() { yield; } diff --git a/tests/baselines/reference/generatorES6_6.js b/tests/baselines/reference/generatorES6_6.js index 4e0954e14632a..e355655ff9a68 100644 --- a/tests/baselines/reference/generatorES6_6.js +++ b/tests/baselines/reference/generatorES6_6.js @@ -8,6 +8,7 @@ class C { } //// [generatorES6_6.js] +"use strict"; class C { *[Symbol.iterator]() { let a = yield 1; diff --git a/tests/baselines/reference/generatorTypeCheck31.js b/tests/baselines/reference/generatorTypeCheck31.js index 22cc465a75155..b2da4f02b694d 100644 --- a/tests/baselines/reference/generatorTypeCheck31.js +++ b/tests/baselines/reference/generatorTypeCheck31.js @@ -8,6 +8,7 @@ function* g2(): Iterator<() => Iterable<(x: string) => number>> { } //// [generatorTypeCheck31.js] +"use strict"; function* g2() { yield function* () { yield x => x.length; diff --git a/tests/baselines/reference/generatorTypeCheck36.js b/tests/baselines/reference/generatorTypeCheck36.js index fd18ba4ada86b..8641fb136aeab 100644 --- a/tests/baselines/reference/generatorTypeCheck36.js +++ b/tests/baselines/reference/generatorTypeCheck36.js @@ -6,6 +6,7 @@ function* g() { } //// [generatorTypeCheck36.js] +"use strict"; function* g() { yield yield 0; } diff --git a/tests/baselines/reference/generatorTypeCheck37.js b/tests/baselines/reference/generatorTypeCheck37.js index 44881af6534eb..602a60f93e990 100644 --- a/tests/baselines/reference/generatorTypeCheck37.js +++ b/tests/baselines/reference/generatorTypeCheck37.js @@ -6,6 +6,7 @@ function* g() { } //// [generatorTypeCheck37.js] +"use strict"; function* g() { return yield yield 0; } diff --git a/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).js b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).js new file mode 100644 index 0000000000000..c682bf9566561 --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).js @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// + +//// [generatorTypeCheck38.ts] +var yield; +function* g() { + yield 0; + var v: typeof yield; +} + +//// [generatorTypeCheck38.js] +var yield; +function* g() { + yield 0; + var v; +} diff --git a/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).js b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).js new file mode 100644 index 0000000000000..8b557f5fd8d9a --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).js @@ -0,0 +1,16 @@ +//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// + +//// [generatorTypeCheck38.ts] +var yield; +function* g() { + yield 0; + var v: typeof yield; +} + +//// [generatorTypeCheck38.js] +"use strict"; +var yield; +function* g() { + yield 0; + var v; +} diff --git a/tests/baselines/reference/generatorTypeCheck39.js b/tests/baselines/reference/generatorTypeCheck39.js index a391fe5dfbd3c..1118f535e4655 100644 --- a/tests/baselines/reference/generatorTypeCheck39.js +++ b/tests/baselines/reference/generatorTypeCheck39.js @@ -12,6 +12,7 @@ function* g() { } //// [generatorTypeCheck39.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/generatorTypeCheck40.js b/tests/baselines/reference/generatorTypeCheck40.js index 0840710ac119f..2206a6bd5eb25 100644 --- a/tests/baselines/reference/generatorTypeCheck40.js +++ b/tests/baselines/reference/generatorTypeCheck40.js @@ -6,6 +6,7 @@ function* g() { } //// [generatorTypeCheck40.js] +"use strict"; function* g() { class C extends (yield 0) { } diff --git a/tests/baselines/reference/generatorTypeCheck41.js b/tests/baselines/reference/generatorTypeCheck41.js index f9a3194ceb69e..6159d01de9a04 100644 --- a/tests/baselines/reference/generatorTypeCheck41.js +++ b/tests/baselines/reference/generatorTypeCheck41.js @@ -8,6 +8,7 @@ function* g() { } //// [generatorTypeCheck41.js] +"use strict"; function* g() { let x = { [yield 0]: 0 diff --git a/tests/baselines/reference/generatorTypeCheck43.js b/tests/baselines/reference/generatorTypeCheck43.js index cc4f9c1948fe2..6dd8c39182ab5 100644 --- a/tests/baselines/reference/generatorTypeCheck43.js +++ b/tests/baselines/reference/generatorTypeCheck43.js @@ -10,6 +10,7 @@ function* g() { } //// [generatorTypeCheck43.js] +"use strict"; function* g() { let x = { *[yield 0]() { diff --git a/tests/baselines/reference/generatorTypeCheck45.js b/tests/baselines/reference/generatorTypeCheck45.js index b67f7ffad1fa1..ddbc46ccdd075 100644 --- a/tests/baselines/reference/generatorTypeCheck45.js +++ b/tests/baselines/reference/generatorTypeCheck45.js @@ -6,4 +6,5 @@ declare function foo(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) foo("", function* () { yield x => x.length }, p => undefined); // T is fixed, should be string //// [generatorTypeCheck45.js] +"use strict"; foo("", function* () { yield x => x.length; }, p => undefined); // T is fixed, should be string diff --git a/tests/baselines/reference/generatorTypeCheck46.js b/tests/baselines/reference/generatorTypeCheck46.js index 6d34ed511415a..7dbc2d90ee449 100644 --- a/tests/baselines/reference/generatorTypeCheck46.js +++ b/tests/baselines/reference/generatorTypeCheck46.js @@ -12,6 +12,7 @@ foo("", function* () { }, p => undefined); // T is fixed, should be string //// [generatorTypeCheck46.js] +"use strict"; foo("", function* () { yield* { *[Symbol.iterator]() { diff --git a/tests/baselines/reference/generatorTypeCheck55.js b/tests/baselines/reference/generatorTypeCheck55.js index 003973e33ea42..93e37045a22ec 100644 --- a/tests/baselines/reference/generatorTypeCheck55.js +++ b/tests/baselines/reference/generatorTypeCheck55.js @@ -6,6 +6,7 @@ function* g() { } //// [generatorTypeCheck55.js] +"use strict"; function* g() { var x = class C extends (yield) { }; diff --git a/tests/baselines/reference/generatorTypeCheck56.js b/tests/baselines/reference/generatorTypeCheck56.js index dfe4fc6e35322..f679da77602a7 100644 --- a/tests/baselines/reference/generatorTypeCheck56.js +++ b/tests/baselines/reference/generatorTypeCheck56.js @@ -10,6 +10,7 @@ function* g() { } //// [generatorTypeCheck56.js] +"use strict"; function* g() { var x = class C { *[yield 0]() { diff --git a/tests/baselines/reference/generatorTypeCheck57.js b/tests/baselines/reference/generatorTypeCheck57.js index d4ae1cbe7c634..90a248c84d694 100644 --- a/tests/baselines/reference/generatorTypeCheck57.js +++ b/tests/baselines/reference/generatorTypeCheck57.js @@ -8,6 +8,7 @@ function* g() { } //// [generatorTypeCheck57.js] +"use strict"; function* g() { class C { constructor() { diff --git a/tests/baselines/reference/generatorTypeCheck58.js b/tests/baselines/reference/generatorTypeCheck58.js index 35ee74a1d1336..25882c6a6f36b 100644 --- a/tests/baselines/reference/generatorTypeCheck58.js +++ b/tests/baselines/reference/generatorTypeCheck58.js @@ -8,6 +8,7 @@ function* g() { } //// [generatorTypeCheck58.js] +"use strict"; function* g() { class C { } diff --git a/tests/baselines/reference/generatorTypeCheck60.js b/tests/baselines/reference/generatorTypeCheck60.js index 7fabd94a1bec5..8a428a217bfcc 100644 --- a/tests/baselines/reference/generatorTypeCheck60.js +++ b/tests/baselines/reference/generatorTypeCheck60.js @@ -6,6 +6,7 @@ function* g() { } //// [generatorTypeCheck60.js] +"use strict"; function* g() { class C extends (yield) { } diff --git a/tests/baselines/reference/genericCallTypeArgumentInference.js b/tests/baselines/reference/genericCallTypeArgumentInference.js index c20c80dc90f49..aac0c8bb8af84 100644 --- a/tests/baselines/reference/genericCallTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallTypeArgumentInference.js @@ -94,6 +94,7 @@ var r10 = i.foo7(''); // {} var r11 = i.foo8(); // {} //// [genericCallTypeArgumentInference.js] +"use strict"; // Basic type inference with generic calls, no errors expected function foo(t) { return t; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index 449d8e0b0e708..cead6ffbbac88 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -110,6 +110,7 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] +"use strict"; // Basic type inference with generic calls and constraints, no errors expected class Base { } diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js index bc591ac360cbe..bea70a6d3f15c 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.js @@ -15,6 +15,7 @@ var r4 = foo(1); // error var r5 = foo(new Date()); // no error //// [genericCallWithConstraintsTypeArgumentInference2.js] +"use strict"; // Generic call with parameters of T and U, U extends T, no parameter of type U function foo(t) { var u; diff --git a/tests/baselines/reference/genericCallWithFixedArguments.js b/tests/baselines/reference/genericCallWithFixedArguments.js index 61d86d3f40fed..d068d7b2ab8fc 100644 --- a/tests/baselines/reference/genericCallWithFixedArguments.js +++ b/tests/baselines/reference/genericCallWithFixedArguments.js @@ -10,6 +10,7 @@ g(7) // the parameter list is fixed, so this should not error //// [genericCallWithFixedArguments.js] +"use strict"; class A { foo() { } } diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js index 5788c37057766..bc1a244248f4b 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js @@ -45,6 +45,7 @@ function other3(x: T) { } //// [genericCallWithGenericSignatureArguments.js] +"use strict"; // When a function expression is inferentially typed (section 4.9.3) and a type assigned to a parameter in that expression references type parameters for which inferences are being made, // the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them. function foo(a, b) { diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js index f589e0ec50aef..ed6b6575254f4 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js @@ -76,6 +76,7 @@ namespace TU { } //// [genericCallWithGenericSignatureArguments2.js] +"use strict"; // When a function expression is inferentially typed (section 4.9.3) and a type assigned to a parameter in that expression references type parameters for which inferences are being made, // the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them. var onlyT; diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js index 5edd067d89d63..1e90c965633c5 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js @@ -36,6 +36,7 @@ var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: stri var r12 = foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2); // error //// [genericCallWithGenericSignatureArguments3.js] +"use strict"; // When a function expression is inferentially typed (section 4.9.3) and a type assigned to a parameter in that expression references type parameters for which inferences are being made, // the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them. function foo(x, a, b) { diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js index 794217c18bc0a..f8d17a802b842 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js @@ -47,6 +47,7 @@ namespace GenericParameter { } //// [genericCallWithOverloadedFunctionTypedArguments.js] +"use strict"; // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets var NonGenericParameter; diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js index 3384532e1a8fd..884145da89a1a 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js @@ -40,6 +40,7 @@ namespace GenericParameter { } //// [genericCallWithOverloadedFunctionTypedArguments2.js] +"use strict"; // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets var NonGenericParameter; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 6b98dd086c401..ee9f7e37f5577 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -78,6 +78,7 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] +"use strict"; var Portal; (function (Portal) { var Controls; diff --git a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js index 8e4518f8dbf33..a15ae31e629a6 100644 --- a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js +++ b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js @@ -20,6 +20,7 @@ class Foo { //// [genericClassWithStaticsUsingTypeArguments.js] +"use strict"; // Should be error to use 'T' in all declarations within Foo. class Foo { static f(xs) { diff --git a/tests/baselines/reference/genericConstraint2.js b/tests/baselines/reference/genericConstraint2.js index 1321717df0f82..2a07163092fc4 100644 --- a/tests/baselines/reference/genericConstraint2.js +++ b/tests/baselines/reference/genericConstraint2.js @@ -24,6 +24,7 @@ var b = new ComparableString("b"); var c = compare(a, b); //// [genericConstraint2.js] +"use strict"; function compare(x, y) { if (x == null) return y == null ? 0 : -1; diff --git a/tests/baselines/reference/genericConstructSignatureInInterface.js b/tests/baselines/reference/genericConstructSignatureInInterface.js index 1e7caf08aafd6..efeeaf8c159a0 100644 --- a/tests/baselines/reference/genericConstructSignatureInInterface.js +++ b/tests/baselines/reference/genericConstructSignatureInInterface.js @@ -9,5 +9,6 @@ var v: C; var r = new v(1); //// [genericConstructSignatureInInterface.js] +"use strict"; var v; var r = new v(1); diff --git a/tests/baselines/reference/genericFunctionSpecializations1.js b/tests/baselines/reference/genericFunctionSpecializations1.js index f455ace016e73..9a7fb6970c30e 100644 --- a/tests/baselines/reference/genericFunctionSpecializations1.js +++ b/tests/baselines/reference/genericFunctionSpecializations1.js @@ -8,5 +8,6 @@ function foo4(test: string); // valid function foo4(test: T) { } //// [genericFunctionSpecializations1.js] +"use strict"; function foo3(test) { } function foo4(test) { } diff --git a/tests/baselines/reference/genericImplements.js b/tests/baselines/reference/genericImplements.js index fa5e8d4fd59f6..be0e8d7bcc871 100644 --- a/tests/baselines/reference/genericImplements.js +++ b/tests/baselines/reference/genericImplements.js @@ -23,6 +23,7 @@ class Z implements I { } // { f: () => T } //// [genericImplements.js] +"use strict"; class A { } ; diff --git a/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.js b/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.js index 01fa809840630..8e1d2d77ce872 100644 --- a/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.js +++ b/tests/baselines/reference/genericInstantiationEquivalentToObjectLiteral.js @@ -17,6 +17,7 @@ f2(x); f2(y); //// [genericInstantiationEquivalentToObjectLiteral.js] +"use strict"; var x; var y; x = y; diff --git a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js index bf96ed698a3dd..fe2f32a49a19a 100644 --- a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js +++ b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js @@ -11,6 +11,7 @@ foo((arg: Foo) => { return arg.x; }); //// [genericLambaArgWithoutTypeArguments.js] +"use strict"; function foo(a) { return null; } diff --git a/tests/baselines/reference/genericOverloadSignatures.js b/tests/baselines/reference/genericOverloadSignatures.js index 0a08e02b72f8f..fab09b28ba21f 100644 --- a/tests/baselines/reference/genericOverloadSignatures.js +++ b/tests/baselines/reference/genericOverloadSignatures.js @@ -33,6 +33,7 @@ interface D { } //// [genericOverloadSignatures.js] +"use strict"; function f(a) { } class C2 { } diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index d01952d0302cc..6cc1ec9223951 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -18,6 +18,7 @@ class MyEventWrapper extends BaseEventWrapper { } //// [genericPrototypeProperty2.js] +"use strict"; class BaseEvent { } class MyEvent extends BaseEvent { diff --git a/tests/baselines/reference/genericTypeAssertions3.js b/tests/baselines/reference/genericTypeAssertions3.js index ce656f1c7b9c9..a63ed784a97f8 100644 --- a/tests/baselines/reference/genericTypeAssertions3.js +++ b/tests/baselines/reference/genericTypeAssertions3.js @@ -6,5 +6,6 @@ var s = < (x: T) => T > ((x: any) => { return null; }); // no error //// [genericTypeAssertions3.js] +"use strict"; var r = ((x) => { return null; }); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error var s = ((x) => { return null; }); // no error diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index ae745a3c0a548..2df3fc4701742 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -27,6 +27,7 @@ declare var b: B; var c: A = >b; //// [genericTypeAssertions6.js] +"use strict"; class A { constructor(x) { var y = x; diff --git a/tests/baselines/reference/genericTypeParameterEquivalence2.js b/tests/baselines/reference/genericTypeParameterEquivalence2.js index 30570ed6f9fbc..af18ee6b1173e 100644 --- a/tests/baselines/reference/genericTypeParameterEquivalence2.js +++ b/tests/baselines/reference/genericTypeParameterEquivalence2.js @@ -61,6 +61,7 @@ function countWhere_2(pred: (a: A) => boolean): (a: A[]) => number { } //// [genericTypeParameterEquivalence2.js] +"use strict"; // compose :: (b->c) -> (a->b) -> (a->c) function compose(f, g) { return function (a) { diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.js index 6926d5f65b29e..1f94d99dc28bf 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.js @@ -29,5 +29,6 @@ declare function h(x: T); declare function i(x: T); //// [genericTypeReferenceWithoutTypeArgument3.js] +"use strict"; // it is an error to use a generic type without type arguments // all of these are errors diff --git a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js index f537849813f0f..aebc6d36a9a98 100644 --- a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js +++ b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js @@ -19,6 +19,7 @@ var m = { } //// [genericsWithDuplicateTypeParameters1.js] +"use strict"; function f() { } function f2(a, b) { return null; } class C { diff --git a/tests/baselines/reference/getAndSetAsMemberNames.js b/tests/baselines/reference/getAndSetAsMemberNames.js index e80a2d1f2d4a4..67515494a23b9 100644 --- a/tests/baselines/reference/getAndSetAsMemberNames.js +++ b/tests/baselines/reference/getAndSetAsMemberNames.js @@ -24,6 +24,7 @@ class C5 { //// [getAndSetAsMemberNames.js] +"use strict"; class C1 { constructor() { this.get = 1; diff --git a/tests/baselines/reference/getterSetterNonAccessor.js b/tests/baselines/reference/getterSetterNonAccessor.js index 973b3ba50fb0a..53a0478f0edb9 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.js +++ b/tests/baselines/reference/getterSetterNonAccessor.js @@ -12,6 +12,7 @@ Object.defineProperty({}, "0", ({ //// [getterSetterNonAccessor.js] +"use strict"; function getFunc() { return 0; } function setFunc(v) { } Object.defineProperty({}, "0", ({ diff --git a/tests/baselines/reference/globalThisCapture.js b/tests/baselines/reference/globalThisCapture.js index a6e2e2505d42c..89dd612c7faac 100644 --- a/tests/baselines/reference/globalThisCapture.js +++ b/tests/baselines/reference/globalThisCapture.js @@ -11,6 +11,7 @@ parts[0]; //// [globalThisCapture.js] +"use strict"; // Add a lambda to ensure global 'this' capture is triggered (() => this.window); var parts = []; diff --git a/tests/baselines/reference/globalThisUnknown.js b/tests/baselines/reference/globalThisUnknown.js index c313ab5e9179d..b63ba0463ac25 100644 --- a/tests/baselines/reference/globalThisUnknown.js +++ b/tests/baselines/reference/globalThisUnknown.js @@ -17,6 +17,7 @@ globalThis['hi'] //// [globalThisUnknown.js] +"use strict"; // this access should be an error win.hi; // these two should be fine, with type any diff --git a/tests/baselines/reference/grammarAmbiguities.js b/tests/baselines/reference/grammarAmbiguities.js index da67711c5364b..f74d7fa829bec 100644 --- a/tests/baselines/reference/grammarAmbiguities.js +++ b/tests/baselines/reference/grammarAmbiguities.js @@ -14,6 +14,7 @@ f(g < A, B > +(7)); // Should error //// [grammarAmbiguities.js] +"use strict"; function f(n) { return null; } function g(x) { return null; } var A, B; diff --git a/tests/baselines/reference/grammarAmbiguities1.js b/tests/baselines/reference/grammarAmbiguities1.js index 324281424e2e7..62a46ec18a4be 100644 --- a/tests/baselines/reference/grammarAmbiguities1.js +++ b/tests/baselines/reference/grammarAmbiguities1.js @@ -13,6 +13,7 @@ f(g < A, B > +(7)); //// [grammarAmbiguities1.js] +"use strict"; class A { foo() { } } diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.js b/tests/baselines/reference/heterogeneousArrayAndOverloads.js index 224bee4c3a3a6..adb4f09585610 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.js +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.js @@ -14,6 +14,7 @@ class arrTest { } //// [heterogeneousArrayAndOverloads.js] +"use strict"; class arrTest { test(arg1) { } callTest() { diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index de616bce27360..f8b081b6ae7d2 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -134,6 +134,7 @@ function foo4(t: T, u: U) { //} //// [heterogeneousArrayLiterals.js] +"use strict"; // type of an array is the best common type of its elements (plus its contextual type if it exists) var a = [1, '']; // {}[] var b = [1, null]; // number[] diff --git a/tests/baselines/reference/icomparable.js b/tests/baselines/reference/icomparable.js index 1ef199ecc8e8f..54052e986d0ce 100644 --- a/tests/baselines/reference/icomparable.js +++ b/tests/baselines/reference/icomparable.js @@ -15,5 +15,6 @@ var x = sort(sc); //// [icomparable.js] +"use strict"; var sc; var x = sort(sc); diff --git a/tests/baselines/reference/identicalCallSignatures.js b/tests/baselines/reference/identicalCallSignatures.js index 8e4fa15e762c7..d373dcd57d590 100644 --- a/tests/baselines/reference/identicalCallSignatures.js +++ b/tests/baselines/reference/identicalCallSignatures.js @@ -23,4 +23,5 @@ var a: { } //// [identicalCallSignatures.js] +"use strict"; var a; diff --git a/tests/baselines/reference/identicalCallSignatures2.js b/tests/baselines/reference/identicalCallSignatures2.js index a09765980d496..e5e4d71570aaf 100644 --- a/tests/baselines/reference/identicalCallSignatures2.js +++ b/tests/baselines/reference/identicalCallSignatures2.js @@ -13,5 +13,6 @@ interface I extends Base, Base { } interface I2 extends Base, Base { } //// [identicalCallSignatures2.js] +"use strict"; // Normally it is an error to have multiple overloads with identical signatures in a single type declaration. // Here the multiple overloads come from multiple bases. diff --git a/tests/baselines/reference/identicalCallSignatures3.js b/tests/baselines/reference/identicalCallSignatures3.js index 5d11ad0d23c90..5b1e5c2b2a3cb 100644 --- a/tests/baselines/reference/identicalCallSignatures3.js +++ b/tests/baselines/reference/identicalCallSignatures3.js @@ -21,5 +21,6 @@ interface I2 { } //// [identicalCallSignatures3.js] +"use strict"; // Normally it is an error to have multiple overloads with identical signatures in a single type declaration. // Here the multiple overloads come from multiple merged declarations, so we do not report errors. diff --git a/tests/baselines/reference/implementInterfaceAnyMemberWithVoid.js b/tests/baselines/reference/implementInterfaceAnyMemberWithVoid.js index fab1e5db128e9..4551c80ecddf9 100644 --- a/tests/baselines/reference/implementInterfaceAnyMemberWithVoid.js +++ b/tests/baselines/reference/implementInterfaceAnyMemberWithVoid.js @@ -12,6 +12,7 @@ class Bug implements I { //// [implementInterfaceAnyMemberWithVoid.js] +"use strict"; class Bug { foo(value) { } diff --git a/tests/baselines/reference/inKeywordTypeguard(strict=false).js b/tests/baselines/reference/inKeywordTypeguard(strict=false).js index ce5cdbb6369b7..c041d5d841964 100644 --- a/tests/baselines/reference/inKeywordTypeguard(strict=false).js +++ b/tests/baselines/reference/inKeywordTypeguard(strict=false).js @@ -387,6 +387,7 @@ function test3>(obj: T) { //// [inKeywordTypeguard.js] +"use strict"; class A { } class B { diff --git a/tests/baselines/reference/inOperator.js b/tests/baselines/reference/inOperator.js index cf4448af24d68..00d2778e9c913 100644 --- a/tests/baselines/reference/inOperator.js +++ b/tests/baselines/reference/inOperator.js @@ -15,6 +15,7 @@ if (y in c) { } //// [inOperator.js] +"use strict"; var a = []; for (var x in a) { } if (3 in a) { } diff --git a/tests/baselines/reference/inOperatorWithFunction.js b/tests/baselines/reference/inOperatorWithFunction.js index 1f51c7932d785..0d7028a5c5377 100644 --- a/tests/baselines/reference/inOperatorWithFunction.js +++ b/tests/baselines/reference/inOperatorWithFunction.js @@ -6,5 +6,6 @@ fn("a" in { "a": true }); //// [inOperatorWithFunction.js] +"use strict"; var fn = function (val) { return val; }; fn("a" in { "a": true }); diff --git a/tests/baselines/reference/inOperatorWithGeneric.js b/tests/baselines/reference/inOperatorWithGeneric.js index ac3caf203319f..4731b7a78fd56 100644 --- a/tests/baselines/reference/inOperatorWithGeneric.js +++ b/tests/baselines/reference/inOperatorWithGeneric.js @@ -9,6 +9,7 @@ class C { } //// [inOperatorWithGeneric.js] +"use strict"; class C { foo(x) { for (var p in x) { diff --git a/tests/baselines/reference/inOperatorWithInvalidOperands.js b/tests/baselines/reference/inOperatorWithInvalidOperands.js index 08476e394e17d..01e4f2d0e7d4e 100644 --- a/tests/baselines/reference/inOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/inOperatorWithInvalidOperands.js @@ -50,6 +50,7 @@ var rb10 = x in undefined; var rc1 = {} in ''; //// [inOperatorWithInvalidOperands.js] +"use strict"; class Foo { } var E; diff --git a/tests/baselines/reference/inOperatorWithValidOperands.js b/tests/baselines/reference/inOperatorWithValidOperands.js index d47b0a7626643..6941d181259d1 100644 --- a/tests/baselines/reference/inOperatorWithValidOperands.js +++ b/tests/baselines/reference/inOperatorWithValidOperands.js @@ -49,6 +49,7 @@ var rc2 = x in (c2 || c3); //// [inOperatorWithValidOperands.js] +"use strict"; var x; var ra1 = x in x; var ra2 = a1 in x; diff --git a/tests/baselines/reference/incompatibleTypes.js b/tests/baselines/reference/incompatibleTypes.js index 65bc88525ac4c..b44890ad63bbd 100644 --- a/tests/baselines/reference/incompatibleTypes.js +++ b/tests/baselines/reference/incompatibleTypes.js @@ -78,6 +78,7 @@ var fp1: () =>any = a => 0; //// [incompatibleTypes.js] +"use strict"; class C1 { p1() { return "s"; diff --git a/tests/baselines/reference/incorrectClassOverloadChain.js b/tests/baselines/reference/incorrectClassOverloadChain.js index b40fc442cb329..d293027b78b3a 100644 --- a/tests/baselines/reference/incorrectClassOverloadChain.js +++ b/tests/baselines/reference/incorrectClassOverloadChain.js @@ -8,6 +8,7 @@ class C { } //// [incorrectClassOverloadChain.js] +"use strict"; class C { constructor() { this.x = 1; diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherType.js b/tests/baselines/reference/incrementOperatorWithAnyOtherType.js index 1b146f16ada35..a149e7acf4b66 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherType.js @@ -51,6 +51,7 @@ objA.a++; M.n++; //// [incrementOperatorWithAnyOtherType.js] +"use strict"; // ++ operator on any type var ANY; var ANY1; diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js index 149ad789883da..4da475f22d461 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -72,6 +72,7 @@ ANY2++; ++ANY2[0]++; //// [incrementOperatorWithAnyOtherTypeInvalidOperations.js] +"use strict"; // ++ operator on any type var ANY1; var ANY2 = [1, 2]; diff --git a/tests/baselines/reference/indexClassByNumber.js b/tests/baselines/reference/indexClassByNumber.js index b83ccca8fde3d..c25202b7ba5ea 100644 --- a/tests/baselines/reference/indexClassByNumber.js +++ b/tests/baselines/reference/indexClassByNumber.js @@ -10,6 +10,7 @@ var f = new foo(); f[0] = 4; // Shouldn't be allowed //// [indexClassByNumber.js] +"use strict"; // Shouldn't be able to index a class instance by a number (unless it has declared a number index signature) class foo { } diff --git a/tests/baselines/reference/indexTypeCheck.js b/tests/baselines/reference/indexTypeCheck.js index 48e770f48cb8a..6179dbc031670 100644 --- a/tests/baselines/reference/indexTypeCheck.js +++ b/tests/baselines/reference/indexTypeCheck.js @@ -66,6 +66,7 @@ class Benchmark { } //// [indexTypeCheck.js] +"use strict"; var s = "some string"; yellow[5]; // ok yellow["hue"]; // ok diff --git a/tests/baselines/reference/indexerSignatureWithRestParam.js b/tests/baselines/reference/indexerSignatureWithRestParam.js index c032afa688357..e2965907c4f66 100644 --- a/tests/baselines/reference/indexerSignatureWithRestParam.js +++ b/tests/baselines/reference/indexerSignatureWithRestParam.js @@ -10,5 +10,6 @@ class C { } //// [indexerSignatureWithRestParam.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/indirectTypeParameterReferences.js b/tests/baselines/reference/indirectTypeParameterReferences.js index 4e66f0faa5dbc..445278fa05710 100644 --- a/tests/baselines/reference/indirectTypeParameterReferences.js +++ b/tests/baselines/reference/indirectTypeParameterReferences.js @@ -33,6 +33,7 @@ let n: number = f(2).a; //// [indirectTypeParameterReferences.js] +"use strict"; // Repro from #19043 const flowtypes = (b) => { const combined = (fn) => null; diff --git a/tests/baselines/reference/inferObjectTypeFromStringLiteralToKeyof.js b/tests/baselines/reference/inferObjectTypeFromStringLiteralToKeyof.js index d3d7aaa730477..87ffa068d1f24 100644 --- a/tests/baselines/reference/inferObjectTypeFromStringLiteralToKeyof.js +++ b/tests/baselines/reference/inferObjectTypeFromStringLiteralToKeyof.js @@ -9,5 +9,6 @@ const y = inference2({ a: 1, b: 2, c: 3, d(n) { return n } }, two); //// [inferObjectTypeFromStringLiteralToKeyof.js] +"use strict"; const x = inference1(two); const y = inference2({ a: 1, b: 2, c: 3, d(n) { return n; } }, two); diff --git a/tests/baselines/reference/inferSecondaryParameter.js b/tests/baselines/reference/inferSecondaryParameter.js index fd0f6080ea20a..761984f91d22f 100644 --- a/tests/baselines/reference/inferSecondaryParameter.js +++ b/tests/baselines/reference/inferSecondaryParameter.js @@ -12,6 +12,7 @@ b.m("test", function (bug) { }); //// [inferSecondaryParameter.js] +"use strict"; // type inference on 'bug' should give 'any' var b = { m: function (test, fn) { } }; b.m("test", function (bug) { diff --git a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js index e377b4711f961..353d433fc30bf 100644 --- a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js +++ b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js @@ -14,6 +14,7 @@ i(a); // OK //// [inferTypeArgumentsInSignatureWithRestParameters.js] +"use strict"; function f(array, ...args) { } function g(array, ...args) { } function h(nonarray, ...args) { } diff --git a/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.js b/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.js index 8fb03add5d849..a26631f8e8178 100644 --- a/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.js +++ b/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.js @@ -8,4 +8,5 @@ declare function foo(x: T, y: Int, z: Int): T; foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }); //// [inferentialTypingObjectLiteralMethod1.js] +"use strict"; foo("", { method(p1) { return p1.length; } }, { method(p2) { return undefined; } }); diff --git a/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.js b/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.js index a6d2539ed274e..a8820d88ebe5e 100644 --- a/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.js +++ b/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.js @@ -8,4 +8,5 @@ declare function foo(x: T, y: Int, z: Int): T; foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }); //// [inferentialTypingObjectLiteralMethod2.js] +"use strict"; foo("", { method(p1) { return p1.length; } }, { method(p2) { return undefined; } }); diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments8.js b/tests/baselines/reference/inferringClassMembersFromAssignments8.js index 0ae842bc4c0bc..06dd1d1e9ca80 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments8.js +++ b/tests/baselines/reference/inferringClassMembersFromAssignments8.js @@ -12,6 +12,7 @@ a //// [inferringClassMembersFromAssignments8.js] +"use strict"; // no inference in TS files, even for `this` aliases: var app = function () { var _this = this; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index 61db9754a1482..16225a144af6a 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -37,6 +37,7 @@ class Baad extends Good { //// [inheritance.js] +"use strict"; class B1 { } class B2 { diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 0212facee36ac..32b14ef49ac8c 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -64,6 +64,7 @@ l1 = sc; l1 = c; //// [inheritance1.js] +"use strict"; class Control { } class Button extends Control { diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 9d8e848cc9812..e055721a14c8b 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -13,6 +13,7 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] +"use strict"; class A { myMethod() { } } diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index cdeb1ad21889c..815d6e75be4f8 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -13,6 +13,7 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] +"use strict"; class A { myMethod() { } } diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index db63275969af4..c0b1022827f5c 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -13,6 +13,7 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] +"use strict"; class A { myMethod() { } } diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index 0d6e69f5bb781..022bd9ea741f3 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -20,6 +20,7 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingAccessor.js] +"use strict"; class a { get x() { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es2015).js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es2015).js index 902007e69e9b2..21a805f15d378 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es2015).js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es2015).js @@ -17,6 +17,7 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingMethod.js] +"use strict"; class a { x() { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es5).js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es5).js index f40bd95e04e77..9b60213d93cd7 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es5).js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod(target=es5).js @@ -17,6 +17,7 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingMethod.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 3ed0fbbef4b8e..97f9d924d9c64 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -15,6 +15,7 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingProperty.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index ca5dd6426515e..51c490dfff3c5 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -17,6 +17,7 @@ class b extends a { } //// [inheritanceMemberFuncOverridingAccessor.js] +"use strict"; class a { get x() { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index a459e03e29120..291d9b5479456 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -14,6 +14,7 @@ class b extends a { } //// [inheritanceMemberFuncOverridingMethod.js] +"use strict"; class a { x() { return "10"; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index a9a0f9ae54cd2..bcde1ee34aeaf 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -12,6 +12,7 @@ class b extends a { } //// [inheritanceMemberFuncOverridingProperty.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 04c7cdd912ccf..c1f98ff4d8c27 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -16,6 +16,7 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingAccessor.js] +"use strict"; class a { get x() { return this.__x; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index dc3a909d7e7b7..822643916207e 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -12,6 +12,7 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingMethod.js] +"use strict"; class a { x() { return "20"; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 12b0c25303628..49ad733183cab 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -10,6 +10,7 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingProperty.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index b8871d8ebf9ad..13dc6439b4901 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -10,6 +10,7 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 08a9fb7c85964..f39219bfa0ebd 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -17,6 +17,7 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] +"use strict"; var M; (function (M) { class C1 { diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index f4425686b8b08..49a71cf05ee32 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -20,6 +20,7 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingAccessor.js] +"use strict"; class a { static get x() { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 1ea5449dd0954..d64997a11558c 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -17,6 +17,7 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingMethod.js] +"use strict"; class a { static x() { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index a2d1bfeaee887..e778c5941163a 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -15,6 +15,7 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingProperty.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 7a33bdf17ca38..b37647b2ef8e3 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -17,6 +17,7 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessor.js] +"use strict"; class a { static get x() { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index 5bde50b3f268a..b3b866f458f48 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -14,6 +14,7 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] +"use strict"; class a { static get x() { return null; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index bb788cf6bae6b..951062ea3988f 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -14,6 +14,7 @@ class b extends a { } //// [inheritanceStaticFuncOverridingMethod.js] +"use strict"; class a { static x() { return "10"; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index 99403b6653164..4be6b5b0c7700 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -12,6 +12,7 @@ class b extends a { } //// [inheritanceStaticFuncOverridingProperty.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index be81f66843dc3..baa0e32723cbe 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -12,6 +12,7 @@ class b extends a { } //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index 34753387c3f28..b06f115e8ec29 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -12,6 +12,7 @@ class b extends a { } //// [inheritanceStaticFunctionOverridingInstanceProperty.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index e9f1141340e73..6ffde33155e0f 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -10,6 +10,7 @@ class b extends a { } //// [inheritanceStaticMembersCompatible.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index d28d3c3a63c54..58a940fcdffa1 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -10,6 +10,7 @@ class b extends a { } //// [inheritanceStaticMembersIncompatible.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 511d3e2ae0a5a..fbfcdfd6976bb 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -14,6 +14,7 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingAccessor.js] +"use strict"; class a { static get x() { return null; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index 00aa70c696d6c..0ece7d8b94af9 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -12,6 +12,7 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingMethod.js] +"use strict"; class a { static x() { return "20"; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index 45860babb11a7..39420502aebab 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -10,6 +10,7 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingProperty.js] +"use strict"; class a { } class b extends a { diff --git a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js index bc66ae9e1aea5..d3399e18cce6d 100644 --- a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js +++ b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js @@ -11,6 +11,7 @@ fn(function (a, b) { return true; }) //// [inheritedFunctionAssignmentCompatibility.js] +"use strict"; function fn(cb) { } fn((a, b) => true); fn(function (a, b) { return true; }); diff --git a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.js b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.js index d0ebc4198a5c1..c1d1f568aae09 100644 --- a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.js +++ b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.js @@ -30,3 +30,4 @@ interface G extends A, B, C, E { } // should only report one error interface H extends A, F { } // Should report no error at all because error is internal to F //// [inheritedMembersAndIndexSignaturesFromDifferentBases.js] +"use strict"; diff --git a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases2.js b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases2.js index 960ca5a183b21..1364c4cf95466 100644 --- a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases2.js +++ b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases2.js @@ -12,3 +12,4 @@ interface B { interface C extends B, A { } // Should succeed //// [inheritedMembersAndIndexSignaturesFromDifferentBases2.js] +"use strict"; diff --git a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.js b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.js index 7ad455a0f9e22..1ada71fa0c8f0 100644 --- a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.js +++ b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.js @@ -27,3 +27,4 @@ interface F extends A, D { } // ok because we overrode D's number index signature //// [inheritedStringIndexersFromDifferentBaseTypes2.js] +"use strict"; diff --git a/tests/baselines/reference/initializerReferencingConstructorLocals.js b/tests/baselines/reference/initializerReferencingConstructorLocals.js index 79b57874f60e1..77c372d8286c4 100644 --- a/tests/baselines/reference/initializerReferencingConstructorLocals.js +++ b/tests/baselines/reference/initializerReferencingConstructorLocals.js @@ -24,6 +24,7 @@ class D { } //// [initializerReferencingConstructorLocals.js] +"use strict"; // Initializer expressions for instance member variables are evaluated in the scope of the class constructor body but are not permitted to reference parameters or local variables of the constructor. class C { constructor(x) { diff --git a/tests/baselines/reference/initializerReferencingConstructorParameters.js b/tests/baselines/reference/initializerReferencingConstructorParameters.js index 725e7ad814994..85486299eff15 100644 --- a/tests/baselines/reference/initializerReferencingConstructorParameters.js +++ b/tests/baselines/reference/initializerReferencingConstructorParameters.js @@ -28,6 +28,7 @@ class F { } //// [initializerReferencingConstructorParameters.js] +"use strict"; // Initializer expressions for instance member variables are evaluated in the scope of the class constructor body but are not permitted to reference parameters or local variables of the constructor. class C { constructor(x) { diff --git a/tests/baselines/reference/innerExtern.js b/tests/baselines/reference/innerExtern.js index da0524e799a21..15c0f1f5fe001 100644 --- a/tests/baselines/reference/innerExtern.js +++ b/tests/baselines/reference/innerExtern.js @@ -16,6 +16,7 @@ namespace A { //// [innerExtern.js] +"use strict"; var A; (function (A) { let B; diff --git a/tests/baselines/reference/innerOverloads.js b/tests/baselines/reference/innerOverloads.js index a7b38c59cc233..fd9819ff8d122 100644 --- a/tests/baselines/reference/innerOverloads.js +++ b/tests/baselines/reference/innerOverloads.js @@ -14,6 +14,7 @@ var x = outer(); // should work //// [innerOverloads.js] +"use strict"; function outer() { function inner(a) { return a; } return inner(0); diff --git a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.js b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.js index 3bd81de477a0d..f62a452100e68 100644 --- a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.js +++ b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.js @@ -16,6 +16,7 @@ takesCallback( //// [innerTypeCheckOfLambdaArgument.js] +"use strict"; function takesCallback(callback) { } takesCallback(function inner(n) { diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index 249af04721067..053a8dfc8b482 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -92,6 +92,7 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] +"use strict"; // Derived1 is assignable to, but not a subtype of, Base class Derived1 { } diff --git a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js index 551bb760b77fa..e0da63f2aaae6 100644 --- a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js +++ b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js @@ -21,6 +21,7 @@ var a: any; var r2 = new a(); //// [instantiateNonGenericTypeWithTypeArguments.js] +"use strict"; // it is an error to provide type arguments to a non-generic call // all of these are errors class C { diff --git a/tests/baselines/reference/intTypeCheck.js b/tests/baselines/reference/intTypeCheck.js index e5ea50978f397..bb132b0bf692f 100644 --- a/tests/baselines/reference/intTypeCheck.js +++ b/tests/baselines/reference/intTypeCheck.js @@ -208,6 +208,7 @@ var obj86: i8 = new anyVar; var obj87: i8 = new {}; //// [intTypeCheck.js] +"use strict"; class Base { foo() { } } diff --git a/tests/baselines/reference/interfaceImplementation1.js b/tests/baselines/reference/interfaceImplementation1.js index 096181dd708f8..2e3bed5032184 100644 --- a/tests/baselines/reference/interfaceImplementation1.js +++ b/tests/baselines/reference/interfaceImplementation1.js @@ -49,6 +49,7 @@ c["foo"]; //// [interfaceImplementation1.js] +"use strict"; class C1 { iFn(n, s) { } } diff --git a/tests/baselines/reference/interfaceOnly.js b/tests/baselines/reference/interfaceOnly.js index 90f42084de0e6..cdc3a047a652d 100644 --- a/tests/baselines/reference/interfaceOnly.js +++ b/tests/baselines/reference/interfaceOnly.js @@ -7,6 +7,7 @@ interface foo { } //// [interfaceOnly.js] +"use strict"; //// [interfaceOnly.d.ts] diff --git a/tests/baselines/reference/interfaceWithCommaSeparators.js b/tests/baselines/reference/interfaceWithCommaSeparators.js index ea04683455fe9..d020d6e7d2eed 100644 --- a/tests/baselines/reference/interfaceWithCommaSeparators.js +++ b/tests/baselines/reference/interfaceWithCommaSeparators.js @@ -5,4 +5,5 @@ var v: { bar(): void, baz } interface Foo { bar(): void, baz } //// [interfaceWithCommaSeparators.js] +"use strict"; var v; diff --git a/tests/baselines/reference/interfacedecl.js b/tests/baselines/reference/interfacedecl.js index 4f82ed1e72118..34e5906dd71a5 100644 --- a/tests/baselines/reference/interfacedecl.js +++ b/tests/baselines/reference/interfacedecl.js @@ -49,6 +49,7 @@ class c1 implements a { var instance2 = new c1(); //// [interfacedecl.js] +"use strict"; class c1 { } var instance2 = new c1(); diff --git a/tests/baselines/reference/interfacedeclWithIndexerErrors.js b/tests/baselines/reference/interfacedeclWithIndexerErrors.js index c52da8d16a6f7..469336e82781e 100644 --- a/tests/baselines/reference/interfacedeclWithIndexerErrors.js +++ b/tests/baselines/reference/interfacedeclWithIndexerErrors.js @@ -56,6 +56,7 @@ class c1 implements a { var instance2 = new c1(); //// [interfacedeclWithIndexerErrors.js] +"use strict"; class c1 { } var instance2 = new c1(); diff --git a/tests/baselines/reference/internalAliasUninitializedModule.js b/tests/baselines/reference/internalAliasUninitializedModule.js index ec9e86912d673..1fe050161da1f 100644 --- a/tests/baselines/reference/internalAliasUninitializedModule.js +++ b/tests/baselines/reference/internalAliasUninitializedModule.js @@ -16,6 +16,7 @@ namespace c { } //// [internalAliasUninitializedModule.js] +"use strict"; var c; (function (c) { c.x.foo(); diff --git a/tests/baselines/reference/internalAliasWithDottedNameEmit.js b/tests/baselines/reference/internalAliasWithDottedNameEmit.js index 2f4c67e2dbdbf..e830e721326d9 100644 --- a/tests/baselines/reference/internalAliasWithDottedNameEmit.js +++ b/tests/baselines/reference/internalAliasWithDottedNameEmit.js @@ -10,6 +10,7 @@ namespace a.e.f { //// [internalAliasWithDottedNameEmit.js] +"use strict"; var a; (function (a) { var b; diff --git a/tests/baselines/reference/intersectionReduction.js b/tests/baselines/reference/intersectionReduction.js index 53c67063dff70..3fde1f47127ed 100644 --- a/tests/baselines/reference/intersectionReduction.js +++ b/tests/baselines/reference/intersectionReduction.js @@ -144,6 +144,7 @@ function bar(x: T & CA) { //// [intersectionReduction.js] +"use strict"; ab.kind; // Error let a = x; let r1 = f10(a1); // unknown diff --git a/tests/baselines/reference/intrinsics.js b/tests/baselines/reference/intrinsics.js index c65cf69341223..7e95b76ac6fe8 100644 --- a/tests/baselines/reference/intrinsics.js +++ b/tests/baselines/reference/intrinsics.js @@ -17,6 +17,7 @@ class Foo<__proto__> { } var foo: (__proto__: number) => void; //// [intrinsics.js] +"use strict"; var hasOwnProperty; // Error var m1; (function (m1) { diff --git a/tests/baselines/reference/invalidConstraint1.js b/tests/baselines/reference/invalidConstraint1.js index 001da9aaa36d1..313dc7192acaf 100644 --- a/tests/baselines/reference/invalidConstraint1.js +++ b/tests/baselines/reference/invalidConstraint1.js @@ -9,6 +9,7 @@ f(); // should error //// [invalidConstraint1.js] +"use strict"; function f() { return undefined; } diff --git a/tests/baselines/reference/invalidNewTarget.es5(target=es2015).js b/tests/baselines/reference/invalidNewTarget.es5(target=es2015).js index e6c3c8aa2141d..a1f9520e1bc21 100644 --- a/tests/baselines/reference/invalidNewTarget.es5(target=es2015).js +++ b/tests/baselines/reference/invalidNewTarget.es5(target=es2015).js @@ -27,6 +27,7 @@ const O = { }; //// [invalidNewTarget.es5.js] +"use strict"; const a = new.target; const b = () => new.target; class C { diff --git a/tests/baselines/reference/invalidNewTarget.es5(target=es5).js b/tests/baselines/reference/invalidNewTarget.es5(target=es5).js index 22dc973b32ec0..51685c2ef12b0 100644 --- a/tests/baselines/reference/invalidNewTarget.es5(target=es5).js +++ b/tests/baselines/reference/invalidNewTarget.es5(target=es5).js @@ -27,6 +27,7 @@ const O = { }; //// [invalidNewTarget.es5.js] +"use strict"; var _a; var a = _newTarget; var b = function () { return _newTarget; }; diff --git a/tests/baselines/reference/invalidNewTarget.es6.js b/tests/baselines/reference/invalidNewTarget.es6.js index 48e7b794bd284..eb44249d2b676 100644 --- a/tests/baselines/reference/invalidNewTarget.es6.js +++ b/tests/baselines/reference/invalidNewTarget.es6.js @@ -27,6 +27,7 @@ const O = { }; //// [invalidNewTarget.es6.js] +"use strict"; const a = new.target; const b = () => new.target; class C { diff --git a/tests/baselines/reference/isolatedModulesOut.js b/tests/baselines/reference/isolatedModulesOut.js index df65d3b55a38c..190d6429e3d6b 100644 --- a/tests/baselines/reference/isolatedModulesOut.js +++ b/tests/baselines/reference/isolatedModulesOut.js @@ -8,4 +8,5 @@ var y; //// [file1.js] export var x; //// [file2.js] +"use strict"; var y; diff --git a/tests/baselines/reference/iterableArrayPattern10.js b/tests/baselines/reference/iterableArrayPattern10.js index e3c50859db97b..8c1efeda2fc88 100644 --- a/tests/baselines/reference/iterableArrayPattern10.js +++ b/tests/baselines/reference/iterableArrayPattern10.js @@ -20,6 +20,7 @@ function fun([a, b]) { } fun(new FooIterator); //// [iterableArrayPattern10.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern11.js b/tests/baselines/reference/iterableArrayPattern11.js index cd548750a9528..b59598f791b89 100644 --- a/tests/baselines/reference/iterableArrayPattern11.js +++ b/tests/baselines/reference/iterableArrayPattern11.js @@ -21,6 +21,7 @@ fun(new FooIterator); //// [iterableArrayPattern11.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern12.js b/tests/baselines/reference/iterableArrayPattern12.js index 9f8ce78e8d14c..cdda0816ba6ee 100644 --- a/tests/baselines/reference/iterableArrayPattern12.js +++ b/tests/baselines/reference/iterableArrayPattern12.js @@ -20,6 +20,7 @@ function fun([a, ...b] = new FooIterator) { } fun(new FooIterator); //// [iterableArrayPattern12.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern13.js b/tests/baselines/reference/iterableArrayPattern13.js index 5841c6598ec59..037023ed2b981 100644 --- a/tests/baselines/reference/iterableArrayPattern13.js +++ b/tests/baselines/reference/iterableArrayPattern13.js @@ -20,6 +20,7 @@ function fun([a, ...b]) { } fun(new FooIterator); //// [iterableArrayPattern13.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern14.js b/tests/baselines/reference/iterableArrayPattern14.js index 6ae0a1f4dfc75..0b4a89160d8f3 100644 --- a/tests/baselines/reference/iterableArrayPattern14.js +++ b/tests/baselines/reference/iterableArrayPattern14.js @@ -20,6 +20,7 @@ function fun(...[a, ...b]) { } fun(new FooIterator); //// [iterableArrayPattern14.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern15.js b/tests/baselines/reference/iterableArrayPattern15.js index a079aba0f1aec..c7f1fc09de2ff 100644 --- a/tests/baselines/reference/iterableArrayPattern15.js +++ b/tests/baselines/reference/iterableArrayPattern15.js @@ -20,6 +20,7 @@ function fun(...[a, b]: Bar[]) { } fun(...new FooIterator); //// [iterableArrayPattern15.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern16.js b/tests/baselines/reference/iterableArrayPattern16.js index 712186cccca6c..cc48d4cc941f8 100644 --- a/tests/baselines/reference/iterableArrayPattern16.js +++ b/tests/baselines/reference/iterableArrayPattern16.js @@ -32,6 +32,7 @@ class FooIteratorIterator { } //// [iterableArrayPattern16.js] +"use strict"; function fun(...[a, b]) { } fun(...new FooIteratorIterator); class Bar { diff --git a/tests/baselines/reference/iterableArrayPattern17.js b/tests/baselines/reference/iterableArrayPattern17.js index d70088fd36058..94301f0bd38d1 100644 --- a/tests/baselines/reference/iterableArrayPattern17.js +++ b/tests/baselines/reference/iterableArrayPattern17.js @@ -20,6 +20,7 @@ function fun(...[a, b]: Bar[]) { } fun(new FooIterator); //// [iterableArrayPattern17.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern18.js b/tests/baselines/reference/iterableArrayPattern18.js index a88f3a7c3a320..36afdf49d8177 100644 --- a/tests/baselines/reference/iterableArrayPattern18.js +++ b/tests/baselines/reference/iterableArrayPattern18.js @@ -20,6 +20,7 @@ function fun([a, b]: Bar[]) { } fun(new FooIterator); //// [iterableArrayPattern18.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern19.js b/tests/baselines/reference/iterableArrayPattern19.js index c56cfb1bf2d4d..3d87adc808607 100644 --- a/tests/baselines/reference/iterableArrayPattern19.js +++ b/tests/baselines/reference/iterableArrayPattern19.js @@ -20,6 +20,7 @@ function fun([[a], b]: Bar[][]) { } fun(new FooArrayIterator); //// [iterableArrayPattern19.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern20.js b/tests/baselines/reference/iterableArrayPattern20.js index 6798163037ccb..d595e5a3e2491 100644 --- a/tests/baselines/reference/iterableArrayPattern20.js +++ b/tests/baselines/reference/iterableArrayPattern20.js @@ -20,6 +20,7 @@ function fun(...[[a = new Foo], b = [new Foo]]: Bar[][]) { } fun(...new FooArrayIterator); //// [iterableArrayPattern20.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern25.js b/tests/baselines/reference/iterableArrayPattern25.js index 11aa48f82cb63..e4a62542d84b0 100644 --- a/tests/baselines/reference/iterableArrayPattern25.js +++ b/tests/baselines/reference/iterableArrayPattern25.js @@ -5,5 +5,6 @@ function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]) { } takeFirstTwoEntries(new Map([["", 0], ["hello", 1]])); //// [iterableArrayPattern25.js] +"use strict"; function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]) { } takeFirstTwoEntries(new Map([["", 0], ["hello", 1]])); diff --git a/tests/baselines/reference/iterableArrayPattern3.js b/tests/baselines/reference/iterableArrayPattern3.js index c86a66800eea4..4d977a1f5adbd 100644 --- a/tests/baselines/reference/iterableArrayPattern3.js +++ b/tests/baselines/reference/iterableArrayPattern3.js @@ -20,6 +20,7 @@ var a: Bar, b: Bar; [a, b] = new FooIterator; //// [iterableArrayPattern3.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern30.js b/tests/baselines/reference/iterableArrayPattern30.js index e6a4fb86f1a35..d7dd2fae11317 100644 --- a/tests/baselines/reference/iterableArrayPattern30.js +++ b/tests/baselines/reference/iterableArrayPattern30.js @@ -4,4 +4,5 @@ const [[k1, v1], [k2, v2]] = new Map([["", true], ["hello", true]]) //// [iterableArrayPattern30.js] +"use strict"; const [[k1, v1], [k2, v2]] = new Map([["", true], ["hello", true]]); diff --git a/tests/baselines/reference/iterableArrayPattern4.js b/tests/baselines/reference/iterableArrayPattern4.js index 764dedd6f8b41..4d841aed56441 100644 --- a/tests/baselines/reference/iterableArrayPattern4.js +++ b/tests/baselines/reference/iterableArrayPattern4.js @@ -20,6 +20,7 @@ var a: Bar, b: Bar[]; [a, ...b] = new FooIterator //// [iterableArrayPattern4.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern5.js b/tests/baselines/reference/iterableArrayPattern5.js index 4fd51b670f642..2e3e431c2da59 100644 --- a/tests/baselines/reference/iterableArrayPattern5.js +++ b/tests/baselines/reference/iterableArrayPattern5.js @@ -20,6 +20,7 @@ var a: Bar, b: string; [a, b] = new FooIterator; //// [iterableArrayPattern5.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern6.js b/tests/baselines/reference/iterableArrayPattern6.js index 6db38fd5dc6cf..78ac9da0c886f 100644 --- a/tests/baselines/reference/iterableArrayPattern6.js +++ b/tests/baselines/reference/iterableArrayPattern6.js @@ -20,6 +20,7 @@ var a: Bar, b: string[]; [a, ...b] = new FooIterator; //// [iterableArrayPattern6.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern7.js b/tests/baselines/reference/iterableArrayPattern7.js index be53b6f1f97fa..59a21a2813a07 100644 --- a/tests/baselines/reference/iterableArrayPattern7.js +++ b/tests/baselines/reference/iterableArrayPattern7.js @@ -20,6 +20,7 @@ var a: Bar, b: string[]; [a, b] = new FooIterator; //// [iterableArrayPattern7.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern8.js b/tests/baselines/reference/iterableArrayPattern8.js index 5608427b49f5b..d005b213eb18d 100644 --- a/tests/baselines/reference/iterableArrayPattern8.js +++ b/tests/baselines/reference/iterableArrayPattern8.js @@ -20,6 +20,7 @@ var a: Bar, b: string; [a, ...b] = new FooIterator; //// [iterableArrayPattern8.js] +"use strict"; class Bar { } class Foo extends Bar { diff --git a/tests/baselines/reference/iterableArrayPattern9.js b/tests/baselines/reference/iterableArrayPattern9.js index 45ea88f597bdd..3ffa6bf9f7591 100644 --- a/tests/baselines/reference/iterableArrayPattern9.js +++ b/tests/baselines/reference/iterableArrayPattern9.js @@ -18,6 +18,7 @@ class FooIterator { } //// [iterableArrayPattern9.js] +"use strict"; function fun([a, b] = new FooIterator) { } class Bar { } diff --git a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.js b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.js index f5385e55bf96d..ab04e2ceca939 100644 --- a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.js +++ b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.js @@ -21,6 +21,7 @@ class ElementsArray extends Array { ElementsArray.isArray(new ElementsArray()); //// [a.js] +"use strict"; var _a, _b, _c; class Thing { } diff --git a/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es2015).js b/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es2015).js index 7be950a49fc0b..236c2fd8b8e45 100644 --- a/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es2015).js +++ b/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es2015).js @@ -18,6 +18,7 @@ function b() { module.exports = {x, b} //// [index1.js] +"use strict"; /** * const doc comment */ diff --git a/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es5).js b/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es5).js index d58406f0bd645..44d53f4d085b3 100644 --- a/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es5).js +++ b/tests/baselines/reference/jsDeclarationsDocCommentsOnConsts(target=es5).js @@ -18,6 +18,7 @@ function b() { module.exports = {x, b} //// [index1.js] +"use strict"; /** * const doc comment */ diff --git a/tests/baselines/reference/jsDeclarationsExportedClassAliases.js b/tests/baselines/reference/jsDeclarationsExportedClassAliases.js index 215bce7d9c5a9..ebc58dbb1a1af 100644 --- a/tests/baselines/reference/jsDeclarationsExportedClassAliases.js +++ b/tests/baselines/reference/jsDeclarationsExportedClassAliases.js @@ -20,6 +20,7 @@ module.exports = { }; //// [errors.js] +"use strict"; class FancyError extends Error { constructor(status) { super(`error with status ${status}`); @@ -29,6 +30,7 @@ module.exports = { FancyError }; //// [index.js] +"use strict"; // issue arises here on compilation const errors = require("./errors"); module.exports = { diff --git a/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es2015).js b/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es2015).js index c9ac98b8ada36..5b2d0163befcc 100644 --- a/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es2015).js +++ b/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es2015).js @@ -11,6 +11,7 @@ function x(x) {} function y(x) {} //// [file.js] +"use strict"; /** * @param {Array} x */ diff --git a/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es5).js b/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es5).js index c9ac98b8ada36..5b2d0163befcc 100644 --- a/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es5).js +++ b/tests/baselines/reference/jsDeclarationsMissingGenerics(target=es5).js @@ -11,6 +11,7 @@ function x(x) {} function y(x) {} //// [file.js] +"use strict"; /** * @param {Array} x */ diff --git a/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es2015).js b/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es2015).js index a596dc70fa860..1e56c2d4620a4 100644 --- a/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es2015).js +++ b/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es2015).js @@ -23,6 +23,7 @@ function z() { return null ;} function w() { return null; } //// [file.js] +"use strict"; /** * @param {Array=} y desc */ diff --git a/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es5).js b/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es5).js index a596dc70fa860..1e56c2d4620a4 100644 --- a/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es5).js +++ b/tests/baselines/reference/jsDeclarationsMissingTypeParameters(target=es5).js @@ -23,6 +23,7 @@ function z() { return null ;} function w() { return null; } //// [file.js] +"use strict"; /** * @param {Array=} y desc */ diff --git a/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.js b/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.js index 47667d08f45db..101a9f09c13e0 100644 --- a/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.js +++ b/tests/baselines/reference/jsObjectsMarkedAsOpenEnded.js @@ -36,6 +36,7 @@ getObj().a = 1; //// [output.js] +"use strict"; var variable = {}; variable.a = 0; class C { diff --git a/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.js b/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.js index 37eecc454632a..1745fc6b1287c 100644 --- a/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.js +++ b/tests/baselines/reference/jsdocAccessibilityTagsDeclarations.js @@ -41,6 +41,7 @@ class C { //// [foo.js] +"use strict"; class Protected { /** @protected */ constructor(c) { diff --git a/tests/baselines/reference/jsdocInTypeScript.js b/tests/baselines/reference/jsdocInTypeScript.js index bc3a207dce8d3..c3f38044ae263 100644 --- a/tests/baselines/reference/jsdocInTypeScript.js +++ b/tests/baselines/reference/jsdocInTypeScript.js @@ -60,6 +60,7 @@ var v = import(String()); //// [jsdocInTypeScript.js] +"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); diff --git a/tests/baselines/reference/jsdocParameterParsingInvalidName.js b/tests/baselines/reference/jsdocParameterParsingInvalidName.js index 4cf842ab3cc2b..9c02514136f41 100644 --- a/tests/baselines/reference/jsdocParameterParsingInvalidName.js +++ b/tests/baselines/reference/jsdocParameterParsingInvalidName.js @@ -10,6 +10,7 @@ class c { } //// [jsdocParameterParsingInvalidName.js] +"use strict"; class c { /** * @param {string} [`foo] diff --git a/tests/baselines/reference/jsdocReadonlyDeclarations.js b/tests/baselines/reference/jsdocReadonlyDeclarations.js index a14f54a4b416f..c16d89a53e3b1 100644 --- a/tests/baselines/reference/jsdocReadonlyDeclarations.js +++ b/tests/baselines/reference/jsdocReadonlyDeclarations.js @@ -28,6 +28,7 @@ class D { //// [foo.js] +"use strict"; class C { /** @readonly */ constructor(n) { diff --git a/tests/baselines/reference/jsdocTemplateTagDefault.js b/tests/baselines/reference/jsdocTemplateTagDefault.js index d19f73c687db5..18ac7e26cb7e2 100644 --- a/tests/baselines/reference/jsdocTemplateTagDefault.js +++ b/tests/baselines/reference/jsdocTemplateTagDefault.js @@ -69,6 +69,7 @@ function f3(a, b) {} //// [file.js] +"use strict"; /** * @template {string | number} [T=string] - ok: defaults are permitted * @typedef {[T]} A diff --git a/tests/baselines/reference/jsdocTemplateTagNameResolution.js b/tests/baselines/reference/jsdocTemplateTagNameResolution.js index bf0c9b0a58d61..64fbc58633663 100644 --- a/tests/baselines/reference/jsdocTemplateTagNameResolution.js +++ b/tests/baselines/reference/jsdocTemplateTagNameResolution.js @@ -13,6 +13,7 @@ const x = { a: 1 }; const y = "a"; //// [file.js] +"use strict"; /** * @template T * @template {keyof T} K diff --git a/tests/baselines/reference/jsxAttributeInitializer(jsx=preserve).js b/tests/baselines/reference/jsxAttributeInitializer(jsx=preserve).js index ab6d714fb80db..f044d76ee4e1f 100644 --- a/tests/baselines/reference/jsxAttributeInitializer(jsx=preserve).js +++ b/tests/baselines/reference/jsxAttributeInitializer(jsx=preserve).js @@ -12,6 +12,7 @@ declare var React: any; //// [a.jsx] +"use strict";
/>
foo
/> diff --git a/tests/baselines/reference/jsxAttributeInitializer(jsx=react).js b/tests/baselines/reference/jsxAttributeInitializer(jsx=react).js index c3794a287cfc9..b4c36da056760 100644 --- a/tests/baselines/reference/jsxAttributeInitializer(jsx=react).js +++ b/tests/baselines/reference/jsxAttributeInitializer(jsx=react).js @@ -12,6 +12,7 @@ declare var React: any; //// [a.js] +"use strict"; React.createElement("div", null, React.createElement("div", { attr: React.createElement("div", null) }), React.createElement("div", { attr: React.createElement("div", null, "foo") }), diff --git a/tests/baselines/reference/jsxParsingError4(strict=false).js b/tests/baselines/reference/jsxParsingError4(strict=false).js index 269d280ca4593..5cf4b1d0fc291 100644 --- a/tests/baselines/reference/jsxParsingError4(strict=false).js +++ b/tests/baselines/reference/jsxParsingError4(strict=false).js @@ -18,5 +18,6 @@ const b = ( //// [a.js] +"use strict"; const a = (React.createElement("public-foo", null)); const b = (React.createElement("public", null)); diff --git a/tests/baselines/reference/jsxPreserveWithJsInput.js b/tests/baselines/reference/jsxPreserveWithJsInput.js index e91d2a0c19cdf..ab6e5a844d2a4 100644 --- a/tests/baselines/reference/jsxPreserveWithJsInput.js +++ b/tests/baselines/reference/jsxPreserveWithJsInput.js @@ -17,12 +17,17 @@ var elemE = {true}; //// [a.js] +"use strict"; var elemA = 42; //// [b.jsx] +"use strict"; var elemB = {"test"}; //// [c.js] +"use strict"; var elemC = {42}; //// [d.js] +"use strict"; var elemD = 42; //// [e.jsx] +"use strict"; var elemE = {true}; diff --git a/tests/baselines/reference/jsxSpreadTag(target=es2015).js b/tests/baselines/reference/jsxSpreadTag(target=es2015).js index abcb63d30e462..96a25ca1049ee 100644 --- a/tests/baselines/reference/jsxSpreadTag(target=es2015).js +++ b/tests/baselines/reference/jsxSpreadTag(target=es2015).js @@ -24,6 +24,7 @@ const t6 = y.name.toExponential(0)); //// [lambdaParamTypes.js] +"use strict"; var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); // Below should all be OK thing.doSomething((x, y) => x.name.charAt(0)); // x.name should be string, so should be OK diff --git a/tests/baselines/reference/lambdaPropSelf.js b/tests/baselines/reference/lambdaPropSelf.js index a3f3cf37bf7d8..c91739d208f94 100644 --- a/tests/baselines/reference/lambdaPropSelf.js +++ b/tests/baselines/reference/lambdaPropSelf.js @@ -26,6 +26,7 @@ namespace M { //// [lambdaPropSelf.js] +"use strict"; class Person { constructor(name, children) { this.name = name; diff --git a/tests/baselines/reference/letConstMatchingParameterNames(target=es2015).js b/tests/baselines/reference/letConstMatchingParameterNames(target=es2015).js index 0618d0f76d2f7..986962e884206 100644 --- a/tests/baselines/reference/letConstMatchingParameterNames(target=es2015).js +++ b/tests/baselines/reference/letConstMatchingParameterNames(target=es2015).js @@ -18,6 +18,7 @@ function a() { //// [letConstMatchingParameterNames.js] +"use strict"; let parent = true; const parent2 = true; function a() { diff --git a/tests/baselines/reference/letConstMatchingParameterNames(target=es5).js b/tests/baselines/reference/letConstMatchingParameterNames(target=es5).js index 4ba24b634bafe..d2f579ee32be5 100644 --- a/tests/baselines/reference/letConstMatchingParameterNames(target=es5).js +++ b/tests/baselines/reference/letConstMatchingParameterNames(target=es5).js @@ -18,6 +18,7 @@ function a() { //// [letConstMatchingParameterNames.js] +"use strict"; var parent = true; var parent2 = true; function a() { diff --git a/tests/baselines/reference/libMembers.js b/tests/baselines/reference/libMembers.js index 36c536456d509..095f279144d73 100644 --- a/tests/baselines/reference/libMembers.js +++ b/tests/baselines/reference/libMembers.js @@ -18,6 +18,7 @@ namespace M { //// [libMembers.js] +"use strict"; var s = "hello"; s.substring(0); s.substring(3, 4); diff --git a/tests/baselines/reference/localClassesInLoop.js b/tests/baselines/reference/localClassesInLoop.js index 516313d0e19ad..654a3fd3f6be6 100644 --- a/tests/baselines/reference/localClassesInLoop.js +++ b/tests/baselines/reference/localClassesInLoop.js @@ -14,6 +14,7 @@ use(data[0]() === data[1]()); //// [localClassesInLoop.js] "use strict"; +"use strict"; var data = []; for (let x = 0; x < 2; ++x) { class C { diff --git a/tests/baselines/reference/localClassesInLoop_ES6.js b/tests/baselines/reference/localClassesInLoop_ES6.js index c471ff1a6e216..a66a5e5f64a18 100644 --- a/tests/baselines/reference/localClassesInLoop_ES6.js +++ b/tests/baselines/reference/localClassesInLoop_ES6.js @@ -14,6 +14,7 @@ use(data[0]() === data[1]()); //// [localClassesInLoop_ES6.js] "use strict"; +"use strict"; var data = []; for (let x = 0; x < 2; ++x) { class C { diff --git a/tests/baselines/reference/localTypes4.js b/tests/baselines/reference/localTypes4.js index 30accffa010ce..452289c039c2c 100644 --- a/tests/baselines/reference/localTypes4.js +++ b/tests/baselines/reference/localTypes4.js @@ -41,6 +41,7 @@ function f4() { //// [localTypes4.js] +"use strict"; function f1() { // Type parameters are in scope in parameters and return types function f(x) { diff --git a/tests/baselines/reference/logicalAndOperatorWithEveryType.js b/tests/baselines/reference/logicalAndOperatorWithEveryType.js index 6ad32731b4b56..2836489bef659 100644 --- a/tests/baselines/reference/logicalAndOperatorWithEveryType.js +++ b/tests/baselines/reference/logicalAndOperatorWithEveryType.js @@ -126,6 +126,7 @@ var rj9 = null && undefined; var rj10 = undefined && undefined; //// [logicalAndOperatorWithEveryType.js] +"use strict"; // The && operator permits the operands to be of any type and produces a result of the same // type as the second operand. var E; diff --git a/tests/baselines/reference/logicalAssignment10(target=es2015).js b/tests/baselines/reference/logicalAssignment10(target=es2015).js index a09d15a89e145..7348006ea6264 100644 --- a/tests/baselines/reference/logicalAssignment10(target=es2015).js +++ b/tests/baselines/reference/logicalAssignment10(target=es2015).js @@ -16,6 +16,7 @@ oobj["obj"][incr()] ??= incr(); //// [logicalAssignment10.js] +"use strict"; var _a, _b; var _c, _d, _e; var count = 0; diff --git a/tests/baselines/reference/logicalAssignment10(target=es2020).js b/tests/baselines/reference/logicalAssignment10(target=es2020).js index e28dd7c88a054..e5d3f71d487d8 100644 --- a/tests/baselines/reference/logicalAssignment10(target=es2020).js +++ b/tests/baselines/reference/logicalAssignment10(target=es2020).js @@ -16,6 +16,7 @@ oobj["obj"][incr()] ??= incr(); //// [logicalAssignment10.js] +"use strict"; var _a, _b, _c; var count = 0; var obj = {}; diff --git a/tests/baselines/reference/logicalAssignment10(target=es2021).js b/tests/baselines/reference/logicalAssignment10(target=es2021).js index cb427f577c69f..43e3b2e886678 100644 --- a/tests/baselines/reference/logicalAssignment10(target=es2021).js +++ b/tests/baselines/reference/logicalAssignment10(target=es2021).js @@ -16,6 +16,7 @@ oobj["obj"][incr()] ??= incr(); //// [logicalAssignment10.js] +"use strict"; var count = 0; var obj = {}; function incr() { diff --git a/tests/baselines/reference/logicalAssignment10(target=esnext).js b/tests/baselines/reference/logicalAssignment10(target=esnext).js index cb427f577c69f..43e3b2e886678 100644 --- a/tests/baselines/reference/logicalAssignment10(target=esnext).js +++ b/tests/baselines/reference/logicalAssignment10(target=esnext).js @@ -16,6 +16,7 @@ oobj["obj"][incr()] ??= incr(); //// [logicalAssignment10.js] +"use strict"; var count = 0; var obj = {}; function incr() { diff --git a/tests/baselines/reference/logicalOrOperatorWithEveryType.js b/tests/baselines/reference/logicalOrOperatorWithEveryType.js index 8cc3a145693b8..97256547fcf70 100644 --- a/tests/baselines/reference/logicalOrOperatorWithEveryType.js +++ b/tests/baselines/reference/logicalOrOperatorWithEveryType.js @@ -128,6 +128,7 @@ var rf9 = null || undefined; // null || undefined is any var rf10 = undefined || undefined; // undefined || undefined is any //// [logicalOrOperatorWithEveryType.js] +"use strict"; // The || operator permits the operands to be of any type. // If the || expression is not contextually typed, the right operand is contextually typed // by the type of the left operand and the result is of the best common type of the two diff --git a/tests/baselines/reference/mappedTypeNoTypeNoCrash.js b/tests/baselines/reference/mappedTypeNoTypeNoCrash.js index fca931ae19e7c..8eddf25695c02 100644 --- a/tests/baselines/reference/mappedTypeNoTypeNoCrash.js +++ b/tests/baselines/reference/mappedTypeNoTypeNoCrash.js @@ -4,6 +4,7 @@ type T0 = ({[K in keyof T]}) extends ({[key in K]: T[K]}) ? number : never; //// [mappedTypeNoTypeNoCrash.js] +"use strict"; //// [mappedTypeNoTypeNoCrash.d.ts] diff --git a/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.js b/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.js index 633d95e06b6d7..7fd3e8ef8b29d 100644 --- a/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.js +++ b/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.js @@ -22,6 +22,7 @@ class F { } //// [memberFunctionOverloadMixingStaticAndInstance.js] +"use strict"; class C { } class D { diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js index 58ac01e492420..f4af47c4dfba5 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js @@ -52,6 +52,7 @@ var r3 = C.foo(1); // error var r4 = D.bar(''); // error //// [memberFunctionsWithPrivateOverloads.js] +"use strict"; class C { foo(x, y) { } bar(x, y) { } diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js index 00872afa00a4a..1b5c42786d515 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js @@ -43,6 +43,7 @@ class D { } //// [memberFunctionsWithPublicOverloads.js] +"use strict"; class C { foo(x, y) { } bar(x, y) { } diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js index 250568ddc5078..28ef2c6965c79 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js @@ -65,6 +65,7 @@ declare var d: D; var r2 = d.foo(2); // error //// [memberFunctionsWithPublicPrivateOverloads.js] +"use strict"; class C { foo(x, y) { } bar(x, y) { } diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js index 46732b37f0a25..74ba02a51385c 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js @@ -11,6 +11,7 @@ namespace my.data { } //// [mergedModuleDeclarationCodeGen2.js] +"use strict"; var my; (function (my) { var data; diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js index 4eb38c889eaf6..e50e3ed063f96 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js @@ -11,6 +11,7 @@ namespace my.data.foo { } //// [mergedModuleDeclarationCodeGen3.js] +"use strict"; var my; (function (my) { var data; diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js index c52eb5fdc2dc6..af63e41bf7208 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js @@ -19,6 +19,7 @@ namespace superContain { } //// [mergedModuleDeclarationCodeGen4.js] +"use strict"; var superContain; (function (superContain) { let contain; diff --git a/tests/baselines/reference/methodContainingLocalFunction(target=es2015).js b/tests/baselines/reference/methodContainingLocalFunction(target=es2015).js index d0c76ddccf2c3..52059fa23997b 100644 --- a/tests/baselines/reference/methodContainingLocalFunction(target=es2015).js +++ b/tests/baselines/reference/methodContainingLocalFunction(target=es2015).js @@ -53,6 +53,7 @@ enum E { } //// [methodContainingLocalFunction.js] +"use strict"; // The first case here (BugExhibition) caused a crash. Try with different permutations of features. class BugExhibition { exhibitBug() { diff --git a/tests/baselines/reference/methodContainingLocalFunction(target=es5).js b/tests/baselines/reference/methodContainingLocalFunction(target=es5).js index 8603085a0b009..1aa1880c337f5 100644 --- a/tests/baselines/reference/methodContainingLocalFunction(target=es5).js +++ b/tests/baselines/reference/methodContainingLocalFunction(target=es5).js @@ -53,6 +53,7 @@ enum E { } //// [methodContainingLocalFunction.js] +"use strict"; // The first case here (BugExhibition) caused a crash. Try with different permutations of features. var BugExhibition = /** @class */ (function () { function BugExhibition() { diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).js b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).js new file mode 100644 index 0000000000000..f0e4de88167a5 --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).js @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/missingCloseParenStatements.ts] //// + +//// [missingCloseParenStatements.ts] +var a1, a2, a3 = 0; +if ( a1 && (a2 + a3 > 0) { + while( (a2 > 0) && a1 + { + do { + var i = i + 1; + a1 = a1 + i; + with ((a2 + a3 > 0) && a1 { + console.log(x); + } + } while (i < 5 && (a1 > 5); + } +} + +//// [missingCloseParenStatements.js] +var a1, a2, a3 = 0; +if (a1 && (a2 + a3 > 0)) { + while ((a2 > 0) && a1) { + do { + var i = i + 1; + a1 = a1 + i; + with ((a2 + a3 > 0) && a1) { + console.log(x); + } + } while (i < 5 && (a1 > 5)); + } +} diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).js b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).js new file mode 100644 index 0000000000000..b3efecc7024ff --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).js @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/missingCloseParenStatements.ts] //// + +//// [missingCloseParenStatements.ts] +var a1, a2, a3 = 0; +if ( a1 && (a2 + a3 > 0) { + while( (a2 > 0) && a1 + { + do { + var i = i + 1; + a1 = a1 + i; + with ((a2 + a3 > 0) && a1 { + console.log(x); + } + } while (i < 5 && (a1 > 5); + } +} + +//// [missingCloseParenStatements.js] +"use strict"; +var a1, a2, a3 = 0; +if (a1 && (a2 + a3 > 0)) { + while ((a2 > 0) && a1) { + do { + var i = i + 1; + a1 = a1 + i; + with ((a2 + a3 > 0) && a1) { + console.log(x); + } + } while (i < 5 && (a1 > 5)); + } +} diff --git a/tests/baselines/reference/missingDecoratorType(target=es2015).js b/tests/baselines/reference/missingDecoratorType(target=es2015).js index 4987fdd545af3..1486420115454 100644 --- a/tests/baselines/reference/missingDecoratorType(target=es2015).js +++ b/tests/baselines/reference/missingDecoratorType(target=es2015).js @@ -21,7 +21,9 @@ class C { //// [a.js] +"use strict"; //// [b.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/missingDecoratorType(target=es5).js b/tests/baselines/reference/missingDecoratorType(target=es5).js index cfcc301d8a67f..8b5ac3b49b560 100644 --- a/tests/baselines/reference/missingDecoratorType(target=es5).js +++ b/tests/baselines/reference/missingDecoratorType(target=es5).js @@ -21,7 +21,9 @@ class C { //// [a.js] +"use strict"; //// [b.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/missingTypeArguments3.js b/tests/baselines/reference/missingTypeArguments3.js index 7ee4cacc595b0..0b91d1d4232cc 100644 --- a/tests/baselines/reference/missingTypeArguments3.js +++ b/tests/baselines/reference/missingTypeArguments3.js @@ -44,3 +44,4 @@ declare namespace linq { //// [missingTypeArguments3.js] +"use strict"; diff --git a/tests/baselines/reference/mixedExports.js b/tests/baselines/reference/mixedExports.js index 3d8d32a78a1da..effb167c02098 100644 --- a/tests/baselines/reference/mixedExports.js +++ b/tests/baselines/reference/mixedExports.js @@ -19,3 +19,4 @@ namespace A { } //// [mixedExports.js] +"use strict"; diff --git a/tests/baselines/reference/mixedPropertyElementAccessAssignmentDeclaration.js b/tests/baselines/reference/mixedPropertyElementAccessAssignmentDeclaration.js index d11ec6a1c1891..1a1534bcc32e2 100644 --- a/tests/baselines/reference/mixedPropertyElementAccessAssignmentDeclaration.js +++ b/tests/baselines/reference/mixedPropertyElementAccessAssignmentDeclaration.js @@ -7,6 +7,7 @@ arr[0].prop[2] = {}; //// [mixedPropertyElementAccessAssignmentDeclaration.js] +"use strict"; // Should not crash: #34642 var arr = []; arr[0].prop[2] = {}; diff --git a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js index ccf125f8a0429..ab474d21f5925 100644 --- a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js +++ b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js @@ -45,6 +45,7 @@ namespace E { //// [mixingFunctionAndAmbientModule1.js] +"use strict"; var A; (function (A) { function My(s) { } diff --git a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js index b6b045abf8aa1..04889ce78253e 100644 --- a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js +++ b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js @@ -38,6 +38,7 @@ class C5 { } //// [mixingStaticAndInstanceOverloads.js] +"use strict"; class C1 { static foo1(a) { } } diff --git a/tests/baselines/reference/modFunctionCrash.js b/tests/baselines/reference/modFunctionCrash.js index 682573b41f0cc..d476d09568031 100644 --- a/tests/baselines/reference/modFunctionCrash.js +++ b/tests/baselines/reference/modFunctionCrash.js @@ -9,4 +9,5 @@ declare namespace Q { Q.f(function() {this;}); //// [modFunctionCrash.js] +"use strict"; Q.f(function () { this; }); diff --git a/tests/baselines/reference/modifierOnParameter1.js b/tests/baselines/reference/modifierOnParameter1.js index d3f32e24a2d5e..6b7613aba2f65 100644 --- a/tests/baselines/reference/modifierOnParameter1.js +++ b/tests/baselines/reference/modifierOnParameter1.js @@ -6,6 +6,7 @@ class C { } //// [modifierOnParameter1.js] +"use strict"; class C { constructor(p) { } } diff --git a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.js b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.js index 510b7ec5b7522..83d65fb6cf401 100644 --- a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.js +++ b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.js @@ -10,6 +10,7 @@ let a = ['c', 'd']; a[Symbol.isConcatSpreadable] = false; //// [modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.js] +"use strict"; function f(x, y, z) { return Array.from(arguments); } diff --git a/tests/baselines/reference/moduleAugmentationGlobal6.js b/tests/baselines/reference/moduleAugmentationGlobal6.js index ebd58c06d5229..a6666ae745898 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal6.js +++ b/tests/baselines/reference/moduleAugmentationGlobal6.js @@ -6,3 +6,4 @@ declare global { } //// [moduleAugmentationGlobal6.js] +"use strict"; diff --git a/tests/baselines/reference/moduleAugmentationGlobal6_1.js b/tests/baselines/reference/moduleAugmentationGlobal6_1.js index ab881e65f0fac..a3538ac81c2b6 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal6_1.js +++ b/tests/baselines/reference/moduleAugmentationGlobal6_1.js @@ -6,3 +6,4 @@ global { } //// [moduleAugmentationGlobal6_1.js] +"use strict"; diff --git a/tests/baselines/reference/moduleAugmentationGlobal7.js b/tests/baselines/reference/moduleAugmentationGlobal7.js index b68d022db32c3..cff0c712d38de 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal7.js +++ b/tests/baselines/reference/moduleAugmentationGlobal7.js @@ -8,3 +8,4 @@ namespace A { } //// [moduleAugmentationGlobal7.js] +"use strict"; diff --git a/tests/baselines/reference/moduleAugmentationGlobal7_1.js b/tests/baselines/reference/moduleAugmentationGlobal7_1.js index f1fe7d8a2c8e2..21692a3b10640 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal7_1.js +++ b/tests/baselines/reference/moduleAugmentationGlobal7_1.js @@ -8,3 +8,4 @@ namespace A { } //// [moduleAugmentationGlobal7_1.js] +"use strict"; diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js index 9f77a08208d88..9804adb933ca2 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js @@ -49,6 +49,7 @@ namespace TypeScript.Syntax { //// [moduleMemberWithoutTypeAnnotation1.js] +"use strict"; var TypeScript; (function (TypeScript) { var Parser; diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js index b509b35ce382f..cbf6516a60928 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js @@ -20,6 +20,7 @@ namespace TypeScript { //// [moduleMemberWithoutTypeAnnotation2.js] +"use strict"; var TypeScript; (function (TypeScript) { let CompilerDiagnostics; diff --git a/tests/baselines/reference/moduleProperty2.js b/tests/baselines/reference/moduleProperty2.js index adb49f1d1c548..3afd06f39e4dd 100644 --- a/tests/baselines/reference/moduleProperty2.js +++ b/tests/baselines/reference/moduleProperty2.js @@ -17,6 +17,7 @@ namespace N { } //// [moduleProperty2.js] +"use strict"; var M; (function (M) { function f() { diff --git a/tests/baselines/reference/moduleUnassignedVariable.js b/tests/baselines/reference/moduleUnassignedVariable.js index bf588e15c8ba5..1a68596ac1409 100644 --- a/tests/baselines/reference/moduleUnassignedVariable.js +++ b/tests/baselines/reference/moduleUnassignedVariable.js @@ -11,6 +11,7 @@ namespace Bar { //// [moduleUnassignedVariable.js] +"use strict"; var Bar; (function (Bar) { Bar.a = 1; diff --git a/tests/baselines/reference/moduleVisibilityTest1.js b/tests/baselines/reference/moduleVisibilityTest1.js index bbf80f0846125..bce4f2e4074fe 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.js +++ b/tests/baselines/reference/moduleVisibilityTest1.js @@ -68,6 +68,7 @@ c.someMethodThatCallsAnOuterMethod(); //// [moduleVisibilityTest1.js] +"use strict"; var OuterMod; (function (OuterMod) { function someExportedOuterFunc() { return -1; } diff --git a/tests/baselines/reference/moduleVisibilityTest2.js b/tests/baselines/reference/moduleVisibilityTest2.js index 9021786be655e..50451a0e556aa 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.js +++ b/tests/baselines/reference/moduleVisibilityTest2.js @@ -69,6 +69,7 @@ c.someMethodThatCallsAnOuterMethod(); //// [moduleVisibilityTest2.js] +"use strict"; var OuterMod; (function (OuterMod) { function someExportedOuterFunc() { return -1; } diff --git a/tests/baselines/reference/module_augmentUninstantiatedModule.js b/tests/baselines/reference/module_augmentUninstantiatedModule.js index 1a6798c3c3ba9..39dd80c99839d 100644 --- a/tests/baselines/reference/module_augmentUninstantiatedModule.js +++ b/tests/baselines/reference/module_augmentUninstantiatedModule.js @@ -12,3 +12,4 @@ declare module "bar" { } //// [module_augmentUninstantiatedModule.js] +"use strict"; diff --git a/tests/baselines/reference/moduledecl(target=es2015).js b/tests/baselines/reference/moduledecl(target=es2015).js index 7b75a84216b04..5c7690c5a3117 100644 --- a/tests/baselines/reference/moduledecl(target=es2015).js +++ b/tests/baselines/reference/moduledecl(target=es2015).js @@ -235,6 +235,7 @@ var m3eVar: mAmbient.m3.e; //// [moduledecl.js] +"use strict"; var m0; (function (m0) { function f1() { diff --git a/tests/baselines/reference/moduledecl(target=es5).js b/tests/baselines/reference/moduledecl(target=es5).js index f3630ba4d6b3a..cf051df15be7f 100644 --- a/tests/baselines/reference/moduledecl(target=es5).js +++ b/tests/baselines/reference/moduledecl(target=es5).js @@ -235,6 +235,7 @@ var m3eVar: mAmbient.m3.e; //// [moduledecl.js] +"use strict"; var m0; (function (m0) { function f1() { diff --git a/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js index 4f60310afe50d..5b009ae163852 100644 --- a/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js +++ b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js @@ -8,6 +8,7 @@ return this.edit(role) //// [multiLinePropertyAccessAndArrowFunctionIndent1.js] +"use strict"; return this.edit(role) .then((role) => this.roleService.add(role) .then((data) => data.data)); diff --git a/tests/baselines/reference/multiModuleFundule1.js b/tests/baselines/reference/multiModuleFundule1.js index 9a51743ec3e28..4d514e4258155 100644 --- a/tests/baselines/reference/multiModuleFundule1.js +++ b/tests/baselines/reference/multiModuleFundule1.js @@ -15,6 +15,7 @@ var r2 = new C(2); // using void returning function as constructor var r3 = C.foo(); //// [multiModuleFundule1.js] +"use strict"; function C(x) { } (function (C) { C.x = 1; diff --git a/tests/baselines/reference/multipleClassPropertyModifiers.js b/tests/baselines/reference/multipleClassPropertyModifiers.js index e9c0412469620..e8b583df22288 100644 --- a/tests/baselines/reference/multipleClassPropertyModifiers.js +++ b/tests/baselines/reference/multipleClassPropertyModifiers.js @@ -9,5 +9,6 @@ class C { } //// [multipleClassPropertyModifiers.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/multipleClassPropertyModifiersErrors.js b/tests/baselines/reference/multipleClassPropertyModifiersErrors.js index 4dfcd6b899caf..6edc6d3fdad11 100644 --- a/tests/baselines/reference/multipleClassPropertyModifiersErrors.js +++ b/tests/baselines/reference/multipleClassPropertyModifiersErrors.js @@ -12,5 +12,6 @@ class C { } //// [multipleClassPropertyModifiersErrors.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.js b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.js index 020a96bcd7974..aa3f177bdf3e8 100644 --- a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.js +++ b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.js @@ -9,3 +9,4 @@ declare module "m1" { } //// [multipleExportAssignmentsInAmbientDeclaration.js] +"use strict"; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index a69f6be9e8ea0..679ae7f09285a 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -41,6 +41,7 @@ class Baad extends Good { //// [multipleInheritance.js] +"use strict"; class B1 { } class B2 { diff --git a/tests/baselines/reference/multivar.js b/tests/baselines/reference/multivar.js index 0d3f9eaaf083a..fe77d91f0f3ec 100644 --- a/tests/baselines/reference/multivar.js +++ b/tests/baselines/reference/multivar.js @@ -49,6 +49,7 @@ for (var i = 0; i < 30; i++) { var b5 = 10; //// [multivar.js] +"use strict"; var a, b, c; var x = 1, y = 2, z = 3; var m2; diff --git a/tests/baselines/reference/namedFunctionExpressionInModule.js b/tests/baselines/reference/namedFunctionExpressionInModule.js index 80ca717335350..2368235af0562 100644 --- a/tests/baselines/reference/namedFunctionExpressionInModule.js +++ b/tests/baselines/reference/namedFunctionExpressionInModule.js @@ -9,6 +9,7 @@ namespace Variables{ //// [namedFunctionExpressionInModule.js] +"use strict"; var Variables; (function (Variables) { var x = function bar(a, b, c) { diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.js b/tests/baselines/reference/narrowExceptionVariableInCatchClause.js index d11dcb920e597..47eebeb5ed528 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.js +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.js @@ -27,6 +27,7 @@ function tryCatch() { //// [narrowExceptionVariableInCatchClause.js] +"use strict"; function tryCatch() { try { // do stuff... diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.js b/tests/baselines/reference/narrowFromAnyWithTypePredicate.js index af6d1677e879b..badccd581eeb0 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.js +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.js @@ -38,6 +38,7 @@ if (isDate(x)) { //// [narrowFromAnyWithTypePredicate.js] +"use strict"; if (isFunction(x)) { // 'any' is not narrowed when target type is 'Function' x(); x(1, 2, 3); diff --git a/tests/baselines/reference/nestedBlockScopedBindings3.js b/tests/baselines/reference/nestedBlockScopedBindings3.js index e829539211032..5d7d3868d9d86 100644 --- a/tests/baselines/reference/nestedBlockScopedBindings3.js +++ b/tests/baselines/reference/nestedBlockScopedBindings3.js @@ -71,6 +71,7 @@ function a5() { } //// [nestedBlockScopedBindings3.js] +"use strict"; function a0() { { for (let x = 0; x < 1;) { diff --git a/tests/baselines/reference/nestedBlockScopedBindings4.js b/tests/baselines/reference/nestedBlockScopedBindings4.js index abf45d9288436..9dc986e323df3 100644 --- a/tests/baselines/reference/nestedBlockScopedBindings4.js +++ b/tests/baselines/reference/nestedBlockScopedBindings4.js @@ -43,6 +43,7 @@ function a3() { } //// [nestedBlockScopedBindings4.js] +"use strict"; function a0() { for (let x; x < 1;) { x = x + 1; diff --git a/tests/baselines/reference/nestedBlockScopedBindings5.js b/tests/baselines/reference/nestedBlockScopedBindings5.js index eb4614837d64c..cd0935d23b866 100644 --- a/tests/baselines/reference/nestedBlockScopedBindings5.js +++ b/tests/baselines/reference/nestedBlockScopedBindings5.js @@ -83,6 +83,7 @@ function a5() { } //// [nestedBlockScopedBindings5.js] +"use strict"; function a0() { for (let x in []) { x = x + 1; diff --git a/tests/baselines/reference/nestedBlockScopedBindings6.js b/tests/baselines/reference/nestedBlockScopedBindings6.js index 90b34ef0a4448..8bd963f06929f 100644 --- a/tests/baselines/reference/nestedBlockScopedBindings6.js +++ b/tests/baselines/reference/nestedBlockScopedBindings6.js @@ -91,6 +91,7 @@ function a7() { } //// [nestedBlockScopedBindings6.js] +"use strict"; function a0() { for (let x of [1]) { x = x + 1; diff --git a/tests/baselines/reference/nestedIndexer.js b/tests/baselines/reference/nestedIndexer.js index e0625cbc52359..26a1ec5cf33ec 100644 --- a/tests/baselines/reference/nestedIndexer.js +++ b/tests/baselines/reference/nestedIndexer.js @@ -9,6 +9,7 @@ var match: { [index: number]: string; } //// [nestedIndexer.js] +"use strict"; function then(x) { var match; } diff --git a/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es2015).js b/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es2015).js index 8f2dc0ec12118..8a05e71569399 100644 --- a/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es2015).js +++ b/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es2015).js @@ -8,6 +8,7 @@ for (let a1 of []) doSomething(() => a2); //// [nestedLoopWithOnlyInnerLetCaptured.js] +"use strict"; for (let a1 of []) for (let a2 of a1.someArray) doSomething(() => a2); diff --git a/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es5).js b/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es5).js index 559561b713e52..9e18ba24d651c 100644 --- a/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es5).js +++ b/tests/baselines/reference/nestedLoopWithOnlyInnerLetCaptured(target=es5).js @@ -8,6 +8,7 @@ for (let a1 of []) doSomething(() => a2); //// [nestedLoopWithOnlyInnerLetCaptured.js] +"use strict"; for (var _i = 0, _a = []; _i < _a.length; _i++) { var a1 = _a[_i]; var _loop_1 = function (a2) { diff --git a/tests/baselines/reference/nestedRecursiveLambda.js b/tests/baselines/reference/nestedRecursiveLambda.js index 29c8ab6c281af..4d13c02d88048 100644 --- a/tests/baselines/reference/nestedRecursiveLambda.js +++ b/tests/baselines/reference/nestedRecursiveLambda.js @@ -9,6 +9,7 @@ void(r =>(r => r)); [(r =>(r => r))] //// [nestedRecursiveLambda.js] +"use strict"; function f(a) { void (r => (r => r)); } diff --git a/tests/baselines/reference/newNamesInGlobalAugmentations1.js b/tests/baselines/reference/newNamesInGlobalAugmentations1.js index e8e5af890a834..cea327bac9527 100644 --- a/tests/baselines/reference/newNamesInGlobalAugmentations1.js +++ b/tests/baselines/reference/newNamesInGlobalAugmentations1.js @@ -21,6 +21,7 @@ new Cls().x let c = a + b + X; //// [main.js] +"use strict"; Symbol.observable; new Cls().x; let c = a + b + X; diff --git a/tests/baselines/reference/newOperatorConformance.js b/tests/baselines/reference/newOperatorConformance.js index cc356ec592fbd..3c1298190aa4a 100644 --- a/tests/baselines/reference/newOperatorConformance.js +++ b/tests/baselines/reference/newOperatorConformance.js @@ -65,6 +65,7 @@ var n = new nested(); //// [newOperatorConformance.js] +"use strict"; class C0 { } class C1 { diff --git a/tests/baselines/reference/newOperatorErrorCases.js b/tests/baselines/reference/newOperatorErrorCases.js index 146d07b565a22..cffdabd5bec99 100644 --- a/tests/baselines/reference/newOperatorErrorCases.js +++ b/tests/baselines/reference/newOperatorErrorCases.js @@ -40,6 +40,7 @@ var s = new fnNumber(); // Error //// [newOperatorErrorCases.js] +"use strict"; class C0 { } class C1 { diff --git a/tests/baselines/reference/newWithSpread.js b/tests/baselines/reference/newWithSpread.js index 08247fcaa0aff..2ce4e92f33370 100644 --- a/tests/baselines/reference/newWithSpread.js +++ b/tests/baselines/reference/newWithSpread.js @@ -99,6 +99,7 @@ new i["a-b"][1](1, 2, ...a); new i["a-b"][1](1, 2, ...a, "string"); //// [newWithSpread.js] +"use strict"; function f(x, y, ...z) { } function f2(...x) { diff --git a/tests/baselines/reference/newWithSpreadES5(target=es2015).js b/tests/baselines/reference/newWithSpreadES5(target=es2015).js index ed45eb34d10cb..9b56c67911362 100644 --- a/tests/baselines/reference/newWithSpreadES5(target=es2015).js +++ b/tests/baselines/reference/newWithSpreadES5(target=es2015).js @@ -98,6 +98,7 @@ new i["a-b"][1](1, 2, ...a); new i["a-b"][1](1, 2, ...a, "string"); //// [newWithSpreadES5.js] +"use strict"; function f(x, y, ...z) { } function f2(...x) { } diff --git a/tests/baselines/reference/newWithSpreadES5(target=es5).js b/tests/baselines/reference/newWithSpreadES5(target=es5).js index f956aeaddfa2d..5202cc24f3122 100644 --- a/tests/baselines/reference/newWithSpreadES5(target=es5).js +++ b/tests/baselines/reference/newWithSpreadES5(target=es5).js @@ -98,6 +98,7 @@ new i["a-b"][1](1, 2, ...a); new i["a-b"][1](1, 2, ...a, "string"); //// [newWithSpreadES5.js] +"use strict"; var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { diff --git a/tests/baselines/reference/newWithSpreadES6.js b/tests/baselines/reference/newWithSpreadES6.js index 1e8bc4ee99fd9..9bdc7dac066d2 100644 --- a/tests/baselines/reference/newWithSpreadES6.js +++ b/tests/baselines/reference/newWithSpreadES6.js @@ -99,6 +99,7 @@ new i["a-b"][1](1, 2, ...a); new i["a-b"][1](1, 2, ...a, "string"); //// [newWithSpreadES6.js] +"use strict"; function f(x, y, ...z) { } function f2(...x) { diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js index 8aedf7a24f659..42466fdfdad4e 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js @@ -46,6 +46,7 @@ class class2 { } //// [noCollisionThisExpressionAndLocalVarInAccessors.js] +"use strict"; class class1 { get a() { var x2 = { diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js index 22d674ea5b6f8..9efd3402ff3af 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js @@ -24,6 +24,7 @@ class class2 { } //// [noCollisionThisExpressionAndLocalVarInConstructor.js] +"use strict"; class class1 { constructor() { var x2 = { diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js index 7c1192708114d..771e22b87a8cf 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js @@ -10,6 +10,7 @@ function x() { } //// [noCollisionThisExpressionAndLocalVarInFunction.js] +"use strict"; var console; function x() { var _this = 5; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js index 949637608e7ed..57e1f7606b847 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js @@ -11,6 +11,7 @@ var x = { alert(x.doStuff(x => alert(x))); //// [noCollisionThisExpressionAndLocalVarInLambda.js] +"use strict"; var x = { doStuff: (callback) => () => { var _this = 2; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js index 359f65d412093..68d1c9eefd058 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js @@ -22,6 +22,7 @@ class a { } //// [noCollisionThisExpressionAndLocalVarInMethod.js] +"use strict"; var _this = 2; class a { method1() { diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js index b23e73b671f8a..78599b1287cd4 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js @@ -22,6 +22,7 @@ class class2 { } //// [noCollisionThisExpressionAndLocalVarInProperty.js] +"use strict"; class class1 { constructor() { this.prop1 = { diff --git a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js index 0aba7cc54c6d5..bc26ac1f32168 100644 --- a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js +++ b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js @@ -10,6 +10,7 @@ function x() { } //// [noCollisionThisExpressionInFunctionAndVarInGlobal.js] +"use strict"; var console; var _this = 5; function x() { diff --git a/tests/baselines/reference/noCrashOnParameterNamedRequire.js b/tests/baselines/reference/noCrashOnParameterNamedRequire.js index f86cea73d0db4..a86c050e4b533 100644 --- a/tests/baselines/reference/noCrashOnParameterNamedRequire.js +++ b/tests/baselines/reference/noCrashOnParameterNamedRequire.js @@ -7,6 +7,7 @@ })(null, null, null); //// [index.js] +"use strict"; (function (require, module, exports) { const mod = require("./mod"); mod.foo; diff --git a/tests/baselines/reference/noImplicitReturnsInAsync2.js b/tests/baselines/reference/noImplicitReturnsInAsync2.js index b378a7637ab18..903d38326a328 100644 --- a/tests/baselines/reference/noImplicitReturnsInAsync2.js +++ b/tests/baselines/reference/noImplicitReturnsInAsync2.js @@ -38,6 +38,7 @@ async function test7(isError: boolean = true) { } //// [noImplicitReturnsInAsync2.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/noImplicitReturnsWithoutReturnExpression.js b/tests/baselines/reference/noImplicitReturnsWithoutReturnExpression.js index 57191333c6b07..3a2e90fb0d7ce 100644 --- a/tests/baselines/reference/noImplicitReturnsWithoutReturnExpression.js +++ b/tests/baselines/reference/noImplicitReturnsWithoutReturnExpression.js @@ -28,6 +28,7 @@ function isMissingReturnExpression5(x) { //// [noImplicitReturnsWithoutReturnExpression.js] +"use strict"; function isMissingReturnExpression() { return; } diff --git a/tests/baselines/reference/noImplicitThisFunctions.js b/tests/baselines/reference/noImplicitThisFunctions.js index 1555988e73bbc..71b4f3d5baaaa 100644 --- a/tests/baselines/reference/noImplicitThisFunctions.js +++ b/tests/baselines/reference/noImplicitThisFunctions.js @@ -25,6 +25,7 @@ let f7 = function() { return function() { return this } }; //// [noImplicitThisFunctions.js] +"use strict"; function f1(x) { // implicit any is still allowed return x + 1; diff --git a/tests/baselines/reference/noRepeatedPropertyNames.js b/tests/baselines/reference/noRepeatedPropertyNames.js index 2443f84b8c9ca..6a4f272f69154 100644 --- a/tests/baselines/reference/noRepeatedPropertyNames.js +++ b/tests/baselines/reference/noRepeatedPropertyNames.js @@ -12,6 +12,7 @@ class C { //// [noRepeatedPropertyNames.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/46815 const first = { a: 1, a: 2 }; class C { diff --git a/tests/baselines/reference/noUncheckedIndexAccess.js b/tests/baselines/reference/noUncheckedIndexAccess.js index 3f896e454f3c7..c87b6336776a1 100644 --- a/tests/baselines/reference/noUncheckedIndexAccess.js +++ b/tests/baselines/reference/noUncheckedIndexAccess.js @@ -30,6 +30,7 @@ enum Meat { const value3 = A[B.x]; //// [noUncheckedIndexAccess.js] +"use strict"; var Meat; (function (Meat) { Meat[Meat["Sausage"] = 0] = "Sausage"; diff --git a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.js b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.js index a1726d75b1564..62ebd7e104bff 100644 --- a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.js +++ b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty.js @@ -10,6 +10,7 @@ class C { //// [noUnusedLocals_writeOnlyProperty.js] +"use strict"; class C { m() { this.x = 0; diff --git a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.js b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.js index e3913689ff49b..0b0d932202aab 100644 --- a/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.js +++ b/tests/baselines/reference/noUnusedLocals_writeOnlyProperty_dynamicNames.js @@ -14,6 +14,7 @@ class C { //// [noUnusedLocals_writeOnlyProperty_dynamicNames.js] +"use strict"; const x = Symbol("x"); const y = Symbol("y"); class C { diff --git a/tests/baselines/reference/nodeResolution4.js b/tests/baselines/reference/nodeResolution4.js index d1b68a207cc6c..753dc73dae22c 100644 --- a/tests/baselines/reference/nodeResolution4.js +++ b/tests/baselines/reference/nodeResolution4.js @@ -11,6 +11,7 @@ export var y; import y = require("./a"); //// [ref.js] +"use strict"; var x = 1; //// [a.js] "use strict"; diff --git a/tests/baselines/reference/nonArrayRestArgs.js b/tests/baselines/reference/nonArrayRestArgs.js index 98442936ecff8..50982d15dc330 100644 --- a/tests/baselines/reference/nonArrayRestArgs.js +++ b/tests/baselines/reference/nonArrayRestArgs.js @@ -7,6 +7,7 @@ function foo(...rest: number) { // error } //// [nonArrayRestArgs.js] +"use strict"; function foo(...rest) { var x = rest[0]; return x; diff --git a/tests/baselines/reference/nonContextuallyTypedLogicalOr.js b/tests/baselines/reference/nonContextuallyTypedLogicalOr.js index 4ba287e6ab899..0905b612d015d 100644 --- a/tests/baselines/reference/nonContextuallyTypedLogicalOr.js +++ b/tests/baselines/reference/nonContextuallyTypedLogicalOr.js @@ -17,6 +17,7 @@ var e: Ellement; (c || e).dummy; //// [nonContextuallyTypedLogicalOr.js] +"use strict"; var c; var e; (c || e).dummy; diff --git a/tests/baselines/reference/nonExportedElementsOfMergedModules.js b/tests/baselines/reference/nonExportedElementsOfMergedModules.js index 748d9e7af8722..b924653fd9ebd 100644 --- a/tests/baselines/reference/nonExportedElementsOfMergedModules.js +++ b/tests/baselines/reference/nonExportedElementsOfMergedModules.js @@ -19,6 +19,7 @@ namespace One { //// [nonExportedElementsOfMergedModules.js] +"use strict"; var One; (function (One) { let A; diff --git a/tests/baselines/reference/nonNullableAndObjectIntersections(strict=false).js b/tests/baselines/reference/nonNullableAndObjectIntersections(strict=false).js index cc81c52b2dee9..2b8edfc4bf060 100644 --- a/tests/baselines/reference/nonNullableAndObjectIntersections(strict=false).js +++ b/tests/baselines/reference/nonNullableAndObjectIntersections(strict=false).js @@ -20,4 +20,5 @@ type TestOld = NonNullableOld; //// [nonNullableAndObjectIntersections.js] +"use strict"; // These should all resolve to never diff --git a/tests/baselines/reference/nonPrimitiveIndexingWithForIn.js b/tests/baselines/reference/nonPrimitiveIndexingWithForIn.js index 7959b20a84cb6..101e433b6189b 100644 --- a/tests/baselines/reference/nonPrimitiveIndexingWithForIn.js +++ b/tests/baselines/reference/nonPrimitiveIndexingWithForIn.js @@ -9,6 +9,7 @@ for (var key in a) { //// [nonPrimitiveIndexingWithForIn.js] +"use strict"; var a; for (var key in a) { var value = a[key]; diff --git a/tests/baselines/reference/nonPrimitiveIndexingWithForInNoImplicitAny.js b/tests/baselines/reference/nonPrimitiveIndexingWithForInNoImplicitAny.js index b447629cec0b9..cb3afb4617018 100644 --- a/tests/baselines/reference/nonPrimitiveIndexingWithForInNoImplicitAny.js +++ b/tests/baselines/reference/nonPrimitiveIndexingWithForInNoImplicitAny.js @@ -9,6 +9,7 @@ for (var key in a) { //// [nonPrimitiveIndexingWithForInNoImplicitAny.js] +"use strict"; var a = {}; for (var key in a) { var value = a[key]; // error diff --git a/tests/baselines/reference/null.js b/tests/baselines/reference/null.js index 49a6635238d82..b5c6833c7df09 100644 --- a/tests/baselines/reference/null.js +++ b/tests/baselines/reference/null.js @@ -24,6 +24,7 @@ var w:I={x:null,y:3}; //// [null.js] +"use strict"; var x = null; var y = 3 + x; var z = 3 + null; diff --git a/tests/baselines/reference/nullAssignableToEveryType.js b/tests/baselines/reference/nullAssignableToEveryType.js index cff8113abe985..07bd0baa16cda 100644 --- a/tests/baselines/reference/nullAssignableToEveryType.js +++ b/tests/baselines/reference/nullAssignableToEveryType.js @@ -46,6 +46,7 @@ function foo(x: T, y: U, z: V) { //} //// [nullAssignableToEveryType.js] +"use strict"; class C { } var ac; diff --git a/tests/baselines/reference/nullAssignedToUndefined.js b/tests/baselines/reference/nullAssignedToUndefined.js index 9be3fe1645c40..70bf68972b5e7 100644 --- a/tests/baselines/reference/nullAssignedToUndefined.js +++ b/tests/baselines/reference/nullAssignedToUndefined.js @@ -5,5 +5,6 @@ var x = undefined = null; // error var y: typeof undefined = null; // ok, widened //// [nullAssignedToUndefined.js] +"use strict"; var x = undefined = null; // error var y = null; // ok, widened diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js index 92d5d849ec379..52efe7c1c2c5c 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js @@ -94,6 +94,7 @@ var r20 = true ? null : {}; //// [nullIsSubtypeOfEverythingButUndefined.js] +"use strict"; // null is a subtype of any other types except undefined var r0 = true ? null : null; var r0 = true ? null : null; diff --git a/tests/baselines/reference/nullPropertyName.js b/tests/baselines/reference/nullPropertyName.js index 088080daf9110..69f394025995b 100644 --- a/tests/baselines/reference/nullPropertyName.js +++ b/tests/baselines/reference/nullPropertyName.js @@ -86,6 +86,7 @@ foo.of = 1; //// [nullPropertyName.js] +"use strict"; function foo() { } // properties foo.x = 1; diff --git a/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es2015).js b/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es2015).js index 4e9cf2dea6f18..9bc68ac64b8d5 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es2015).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es2015).js @@ -11,6 +11,7 @@ async function* f(a: { b?: number }) { //// [nullishCoalescingOperatorInAsyncGenerator.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/37686 function f(a) { return __asyncGenerator(this, arguments, function* f_1() { diff --git a/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es5).js b/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es5).js index d02228bac340e..78407e25d0c5d 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es5).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=es5).js @@ -11,6 +11,7 @@ async function* f(a: { b?: number }) { //// [nullishCoalescingOperatorInAsyncGenerator.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/37686 function f(a) { return __asyncGenerator(this, arguments, function f_1() { diff --git a/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=esnext).js b/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=esnext).js index 94736918948ea..5f6730d90c097 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=esnext).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInAsyncGenerator(target=esnext).js @@ -11,6 +11,7 @@ async function* f(a: { b?: number }) { //// [nullishCoalescingOperatorInAsyncGenerator.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/37686 async function* f(a) { let c = a.b ?? 10; diff --git a/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es2015).js b/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es2015).js index 0b889037b0d8d..105d69841d7b5 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es2015).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es2015).js @@ -6,6 +6,7 @@ const a = (): string | undefined => undefined; (({ [a() ?? "d"]: c = "" }) => {})(); //// [nullishCoalescingOperatorInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 const a = () => undefined; ((_a) => { var _b; var { [(_b = a()) !== null && _b !== void 0 ? _b : "d"]: c = "" } = _a; })(); diff --git a/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es5).js b/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es5).js index ce2dc3778c52f..51236a4994a9b 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es5).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=es5).js @@ -6,6 +6,7 @@ const a = (): string | undefined => undefined; (({ [a() ?? "d"]: c = "" }) => {})(); //// [nullishCoalescingOperatorInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 var a = function () { return undefined; }; (function (_a) { diff --git a/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=esnext).js b/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=esnext).js index e0e29e26da734..735eb93ffa3fd 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=esnext).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInParameterBindingPattern(target=esnext).js @@ -6,6 +6,7 @@ const a = (): string | undefined => undefined; (({ [a() ?? "d"]: c = "" }) => {})(); //// [nullishCoalescingOperatorInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 const a = () => undefined; (({ [a() ?? "d"]: c = "" }) => { })(); diff --git a/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es2015).js b/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es2015).js index 793f507743131..eb548e40bfdda 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es2015).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es2015).js @@ -6,6 +6,7 @@ const a = (): string | undefined => undefined; ((b = a() ?? "d") => {})(); //// [nullishCoalescingOperatorInParameterInitializer.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 const a = () => undefined; ((b) => { var _a; if (b === void 0) { b = (_a = a()) !== null && _a !== void 0 ? _a : "d"; } })(); diff --git a/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es5).js b/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es5).js index b80996914f2b5..8c5ddca4e092b 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es5).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=es5).js @@ -6,6 +6,7 @@ const a = (): string | undefined => undefined; ((b = a() ?? "d") => {})(); //// [nullishCoalescingOperatorInParameterInitializer.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 var a = function () { return undefined; }; (function (b) { diff --git a/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=esnext).js b/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=esnext).js index 65d23f486003e..8f1ca21f2769c 100644 --- a/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=esnext).js +++ b/tests/baselines/reference/nullishCoalescingOperatorInParameterInitializer(target=esnext).js @@ -6,6 +6,7 @@ const a = (): string | undefined => undefined; ((b = a() ?? "d") => {})(); //// [nullishCoalescingOperatorInParameterInitializer.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 const a = () => undefined; ((b = a() ?? "d") => { })(); diff --git a/tests/baselines/reference/nullishCoalescingOperator_not_strict.js b/tests/baselines/reference/nullishCoalescingOperator_not_strict.js index 33e7fbe98570d..ea4e93ecc747f 100644 --- a/tests/baselines/reference/nullishCoalescingOperator_not_strict.js +++ b/tests/baselines/reference/nullishCoalescingOperator_not_strict.js @@ -23,6 +23,7 @@ const aa8 = a8 ?? 'whatever' const aa9 = a9 ?? 'whatever' //// [nullishCoalescingOperator_not_strict.js] +"use strict"; const aa1 = a1 !== null && a1 !== void 0 ? a1 : 'whatever'; const aa2 = a2 !== null && a2 !== void 0 ? a2 : 'whatever'; const aa3 = a3 !== null && a3 !== void 0 ? a3 : 'whatever'; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js index 01d57d9fea214..1b3db6416e911 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js @@ -100,6 +100,7 @@ var b: { [x: number]: string; } = { } //// [numericIndexerConstrainsPropertyDeclarations.js] +"use strict"; // String indexer types constrain the types of named properties in their containing type class C { constructor() { } // ok diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 980b97441ba15..096888648dbb5 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -48,6 +48,7 @@ var b: { [x: number]: A } = { } //// [numericIndexerConstrainsPropertyDeclarations2.js] +"use strict"; // String indexer providing a constraint of a user defined type class A { foo() { return ''; } diff --git a/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js b/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js index 60fd54b934e0b..4345da29eb6a8 100644 --- a/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js +++ b/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js @@ -38,6 +38,7 @@ var test17 = 3. // comment time again //// [numericLiteralsWithTrailingDecimalPoints01.js] +"use strict"; 1..toString(); 1.0.toString(); 1.; diff --git a/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints02.js b/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints02.js index 9ffff33e4666d..623072c1c4c77 100644 --- a/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints02.js +++ b/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints02.js @@ -38,6 +38,7 @@ var test17 = 3. // comment time again //// [numericLiteralsWithTrailingDecimalPoints02.js] +"use strict"; 1..toString(); 1.0.toString(); 1.; diff --git a/tests/baselines/reference/objectLitArrayDeclNoNew.js b/tests/baselines/reference/objectLitArrayDeclNoNew.js index 1bbc54a193835..f53178b1fe49e 100644 --- a/tests/baselines/reference/objectLitArrayDeclNoNew.js +++ b/tests/baselines/reference/objectLitArrayDeclNoNew.js @@ -31,6 +31,7 @@ namespace Test { //// [objectLitArrayDeclNoNew.js] "use strict"; +"use strict"; var Test; (function (Test) { class Gar { diff --git a/tests/baselines/reference/objectLitIndexerContextualType.js b/tests/baselines/reference/objectLitIndexerContextualType.js index fa7063f298144..304db78e7c502 100644 --- a/tests/baselines/reference/objectLitIndexerContextualType.js +++ b/tests/baselines/reference/objectLitIndexerContextualType.js @@ -26,6 +26,7 @@ y = { //// [objectLitIndexerContextualType.js] +"use strict"; var x; var y; x = { diff --git a/tests/baselines/reference/objectLiteralArraySpecialization.js b/tests/baselines/reference/objectLiteralArraySpecialization.js index e814a74797a0c..1543eb2e4524d 100644 --- a/tests/baselines/reference/objectLiteralArraySpecialization.js +++ b/tests/baselines/reference/objectLiteralArraySpecialization.js @@ -11,5 +11,6 @@ thing.doSomething((x, y) => x.name === "bob"); // should not error //// [objectLiteralArraySpecialization.js] +"use strict"; var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); // should not error thing.doSomething((x, y) => x.name === "bob"); // should not error diff --git a/tests/baselines/reference/objectLiteralFreshnessWithSpread.js b/tests/baselines/reference/objectLiteralFreshnessWithSpread.js index 61d8aa65fbdc9..4c02fd61d7fe9 100644 --- a/tests/baselines/reference/objectLiteralFreshnessWithSpread.js +++ b/tests/baselines/reference/objectLiteralFreshnessWithSpread.js @@ -6,5 +6,6 @@ let xx: { a, b } = { a: 1, ...x, z: 3 } // error for 'z', no error for 'extra' //// [objectLiteralFreshnessWithSpread.js] +"use strict"; let x = { b: 1, extra: 2 }; let xx = Object.assign(Object.assign({ a: 1 }, x), { z: 3 }); // error for 'z', no error for 'extra' diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js index a73bb1479a74d..340b316a0db37 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js @@ -16,6 +16,7 @@ f2({ toString: (s: string) => s }) f2({ value: '', toString: (s) => s.uhhh }) //// [objectLiteralFunctionArgContextualTyping2.js] +"use strict"; function f2(args) { } f2({ hello: 1 }); f2({ value: '' }); diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.js b/tests/baselines/reference/objectLiteralGettersAndSetters.js index 70c5642db59bf..641e3ec607542 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.js +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.js @@ -86,6 +86,7 @@ var getParamType3 = { //// [objectLiteralGettersAndSetters.js] +"use strict"; // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p; } }; var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p; } }; diff --git a/tests/baselines/reference/objectLiteralShorthandProperties(target=es2015).js b/tests/baselines/reference/objectLiteralShorthandProperties(target=es2015).js index c657d5483470c..31a4949c35826 100644 --- a/tests/baselines/reference/objectLiteralShorthandProperties(target=es2015).js +++ b/tests/baselines/reference/objectLiteralShorthandProperties(target=es2015).js @@ -23,6 +23,7 @@ var x3 = { //// [objectLiteralShorthandProperties.js] +"use strict"; var a, b, c; var x1 = { a diff --git a/tests/baselines/reference/objectLiteralShorthandProperties(target=es5).js b/tests/baselines/reference/objectLiteralShorthandProperties(target=es5).js index d1e5ff2e20961..45b4bbe6826a9 100644 --- a/tests/baselines/reference/objectLiteralShorthandProperties(target=es5).js +++ b/tests/baselines/reference/objectLiteralShorthandProperties(target=es5).js @@ -23,6 +23,7 @@ var x3 = { //// [objectLiteralShorthandProperties.js] +"use strict"; var a, b, c; var x1 = { a: a diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js index 01c7832cbd40b..ea536bcbf8d86 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js @@ -23,6 +23,7 @@ var x3 = { //// [objectLiteralShorthandPropertiesES6.js] +"use strict"; var a, b, c; var x1 = { a diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js index 8e26410b038a7..56f8b8f2c0c8c 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js @@ -8,6 +8,7 @@ var x = { //// [objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js] +"use strict"; var x = { x, // OK undefinedVariable // Error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js index 699238eb7cced..e8347bacd2326 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js @@ -23,6 +23,7 @@ var x = { var v = { class }; // error //// [objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js] +"use strict"; // errors var y = { "stringLiteral": , diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorWithModule.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorWithModule.js index 60e4ff7997f86..554527295eed8 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorWithModule.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorWithModule.js @@ -18,6 +18,7 @@ m.y.x; //// [objectLiteralShorthandPropertiesErrorWithModule.js] +"use strict"; // module export var x = "Foo"; var m; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.js b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.js index acd6177669c4f..708f482d4c111 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModule.js @@ -17,6 +17,7 @@ namespace m { //// [objectLiteralShorthandPropertiesWithModule.js] +"use strict"; // module export var m; (function (m) { diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.js index f665c8e40badd..1d31d96b26eb8 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesWithModuleES6.js @@ -15,6 +15,7 @@ namespace m { //// [objectLiteralShorthandPropertiesWithModuleES6.js] +"use strict"; var m; (function (m) { })(m || (m = {})); diff --git a/tests/baselines/reference/objectLiteralWidened.js b/tests/baselines/reference/objectLiteralWidened.js index be9d638d51b44..11e4dcac557fc 100644 --- a/tests/baselines/reference/objectLiteralWidened.js +++ b/tests/baselines/reference/objectLiteralWidened.js @@ -35,6 +35,7 @@ var y2 = { } //// [objectLiteralWidened.js] +"use strict"; // object literal properties are widened to any var x1 = { foo: null, diff --git a/tests/baselines/reference/objectRest.js b/tests/baselines/reference/objectRest.js index 7fcd740a0bd57..26303baed89bc 100644 --- a/tests/baselines/reference/objectRest.js +++ b/tests/baselines/reference/objectRest.js @@ -50,6 +50,7 @@ var noContextualType = ({ aNumber = 12, ...notEmptyObject }) => aNumber + notEmp //// [objectRest.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRest2.js b/tests/baselines/reference/objectRest2.js index 84c0b98ec85e6..94b9bda94ef38 100644 --- a/tests/baselines/reference/objectRest2.js +++ b/tests/baselines/reference/objectRest2.js @@ -17,6 +17,7 @@ rootConnection('test'); //// [objectRest2.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/objectRestAssignment.js b/tests/baselines/reference/objectRestAssignment.js index d0536481c2908..8f57d844fb843 100644 --- a/tests/baselines/reference/objectRestAssignment.js +++ b/tests/baselines/reference/objectRestAssignment.js @@ -17,6 +17,7 @@ var { a: [{ ...nested2 }, ...y], b: { z, ...c }, ...rest2 } = overEmit; //// [objectRestAssignment.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestCatchES5.js b/tests/baselines/reference/objectRestCatchES5.js index 5a797a8660498..987067189ac48 100644 --- a/tests/baselines/reference/objectRestCatchES5.js +++ b/tests/baselines/reference/objectRestCatchES5.js @@ -5,6 +5,7 @@ let a = 1, b = 2; try {} catch ({ a, ...b }) {} //// [objectRestCatchES5.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestForOf.js b/tests/baselines/reference/objectRestForOf.js index cc7088611572e..55d15a8c54b23 100644 --- a/tests/baselines/reference/objectRestForOf.js +++ b/tests/baselines/reference/objectRestForOf.js @@ -17,6 +17,7 @@ for (const norest of array.map(a => ({ ...a, x: 'a string' }))) { //// [objectRestForOf.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestParameter.js b/tests/baselines/reference/objectRestParameter.js index ed9ba45b74e01..8c290e0846373 100644 --- a/tests/baselines/reference/objectRestParameter.js +++ b/tests/baselines/reference/objectRestParameter.js @@ -24,6 +24,7 @@ foobar({ bar: { greeting: 'hello' } }); //// [objectRestParameter.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestParameterES5(target=es2015).js b/tests/baselines/reference/objectRestParameterES5(target=es2015).js index 85d8bf58bbecf..38baae2c08f4c 100644 --- a/tests/baselines/reference/objectRestParameterES5(target=es2015).js +++ b/tests/baselines/reference/objectRestParameterES5(target=es2015).js @@ -24,6 +24,7 @@ foobar({ bar: { greeting: 'hello' } }); //// [objectRestParameterES5.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestParameterES5(target=es5).js b/tests/baselines/reference/objectRestParameterES5(target=es5).js index 6454dc7a11f29..f7e47cdc3d4cd 100644 --- a/tests/baselines/reference/objectRestParameterES5(target=es5).js +++ b/tests/baselines/reference/objectRestParameterES5(target=es5).js @@ -24,6 +24,7 @@ foobar({ bar: { greeting: 'hello' } }); //// [objectRestParameterES5.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestPropertyMustBeLast.js b/tests/baselines/reference/objectRestPropertyMustBeLast.js index bd1657ef1f119..3c3c4772004fa 100644 --- a/tests/baselines/reference/objectRestPropertyMustBeLast.js +++ b/tests/baselines/reference/objectRestPropertyMustBeLast.js @@ -9,6 +9,7 @@ var {...a, x, ...b } = { x: 1 }; // Error, rest must be last property //// [objectRestPropertyMustBeLast.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestReadonly.js b/tests/baselines/reference/objectRestReadonly.js index b8ef0ab41901b..11729e602cf9a 100644 --- a/tests/baselines/reference/objectRestReadonly.js +++ b/tests/baselines/reference/objectRestReadonly.js @@ -20,6 +20,7 @@ delete rest.baz //// [objectRestReadonly.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectRestSpread.js b/tests/baselines/reference/objectRestSpread.js index a689b3f57614a..cb2a99ba6bfcf 100644 --- a/tests/baselines/reference/objectRestSpread.js +++ b/tests/baselines/reference/objectRestSpread.js @@ -25,6 +25,7 @@ function test({ }) {} //// [objectRestSpread.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index b5a80d092b480..87e6354e053e3 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -57,6 +57,7 @@ declare var b: { var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js index 4f219ffdd8206..bbad09a8abe0f 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js @@ -35,6 +35,7 @@ var r2d = x.data; var r2e = x['hm']; // should be Object //// [objectTypeWithCallSignatureHidingMembersOfExtendedFunction.js] +"use strict"; // object types with call signatures can override members of Function // no errors expected below var i; diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js index 3d08339fbe7c5..74e06205b2514 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js @@ -32,6 +32,7 @@ var r2d = x.data; var r2e = x['hm']; // should be Object //// [objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.js] +"use strict"; var i; var r1 = i.apply; var r1b = i.call; diff --git a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.js b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.js index b37faad3b1a26..108af0aec532f 100644 --- a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.js +++ b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.js @@ -35,6 +35,7 @@ var b = { //// [objectTypeWithDuplicateNumericProperty.js] +"use strict"; // numeric properties must be distinct after a ToNumber operation // so the below are all errors class C { diff --git a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js index 51e0333641ec1..a563ea1ae0537 100644 --- a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js +++ b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.js @@ -34,6 +34,7 @@ var r4: string = o2['']; //// [objectTypeWithStringIndexerHidingObjectIndexer.js] +"use strict"; // object types can define string indexers that are more specific than the default 'any' that would be returned // no errors expected below var o = {}; diff --git a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.js b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.js index 377276183af94..d80071d1552ae 100644 --- a/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.js +++ b/tests/baselines/reference/objectTypeWithStringNamedPropertyOfIllegalCharacters.js @@ -56,6 +56,7 @@ var r4 = b["~!@#$%^&*()_+{}|:'<>?\/.,`"]; //// [objectTypeWithStringNamedPropertyOfIllegalCharacters.js] +"use strict"; class C { } var c; diff --git a/tests/baselines/reference/objectTypesIdentity.js b/tests/baselines/reference/objectTypesIdentity.js index a9e89b7131c0c..f6430fc9b93ed 100644 --- a/tests/baselines/reference/objectTypesIdentity.js +++ b/tests/baselines/reference/objectTypesIdentity.js @@ -91,6 +91,7 @@ function foo14(x: typeof b); // error function foo14(x: any) { } //// [objectTypesIdentity.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentity2.js b/tests/baselines/reference/objectTypesIdentity2.js index 422a6426b2db0..14a9172bdc5cc 100644 --- a/tests/baselines/reference/objectTypesIdentity2.js +++ b/tests/baselines/reference/objectTypesIdentity2.js @@ -68,6 +68,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentity2.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js index 30474fb726f50..34c5f991f3f1e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js @@ -103,6 +103,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithCallSignatures.js] +"use strict"; // object types are identical structurally class A { foo(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js index 78f118a15471c..0e3e3600758b5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js @@ -103,6 +103,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithCallSignatures2.js] +"use strict"; // object types are identical structurally class A { foo(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js index 2e9adbcd7509b..b9e7f97353d53 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js @@ -42,6 +42,7 @@ function foo15(x: I2); // ok function foo15(x: any) { } //// [objectTypesIdentityWithCallSignatures3.js] +"use strict"; // object types are identical structurally var a; function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js index f5523095691a8..44aa33256edb0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js @@ -103,6 +103,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithCallSignaturesDifferingParamCounts.js] +"use strict"; // object types are identical structurally class A { foo(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js index 703d64e9484f6..57dde22ea0ea2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js @@ -46,6 +46,7 @@ function foo15(x: I2); // ok function foo15(x: any) { } //// [objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js] +"use strict"; // object types are identical structurally var a; function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js index feda2b4d6c66b..4f7aaac8b7adb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js @@ -119,6 +119,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithCallSignaturesWithOverloads.js] +"use strict"; // object types are identical structurally class A { foo(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js index 4aef590b2517b..696f8cc221e55 100644 --- a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js @@ -17,4 +17,5 @@ function foo(x: B); // error after constraints above made illegal function foo(x: any) { } //// [objectTypesIdentityWithComplexConstraints.js] +"use strict"; function foo(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js index a41511a1734e2..5efeb00b5ad1b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js @@ -90,6 +90,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithConstructSignatures.js] +"use strict"; // object types are identical structurally class A { constructor(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js index 491e25d5c05bb..844332bb9118e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js @@ -79,6 +79,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithConstructSignatures2.js] +"use strict"; // object types are identical structurally class B { constructor(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js index 41194d5718b0f..dfd228867894c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js @@ -79,6 +79,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js] +"use strict"; // object types are identical structurally class B { constructor(x, y) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js index 10291e86497bb..bf69bf1d2cf69 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js @@ -103,6 +103,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignatures.js] +"use strict"; // object types are identical structurally class A { foo(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js index f27b54fdb8dcb..f929e18ceb6c2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js @@ -103,6 +103,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignatures2.js] +"use strict"; // object types are identical structurally class A { foo(x, y) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js index 3ca17c64ddd85..dd479737629a3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js @@ -105,6 +105,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js index caaf0fd3c0bdf..00cab3d28abe9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js @@ -117,6 +117,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js index 26adfa0f21c17..d24bbf08fe8eb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js @@ -126,6 +126,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js index 1d6adee3c7e63..bfe9cb6da2e9e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js @@ -105,6 +105,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js index c7db1c8871f98..2899e024e4149 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js @@ -105,6 +105,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js index f52142f7f787c..dad590e9df232 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js @@ -103,6 +103,7 @@ function foo15(x: C, B>); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js] +"use strict"; // object types are identical structurally class A { foo(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js index 09befe0ed6693..1fc9f6c281b75 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js @@ -43,6 +43,7 @@ function foo15(x: I2); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js] +"use strict"; // object types are identical structurally var a; function foo1(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js index 737286a4d6a4f..8edad44d5d44c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js @@ -103,6 +103,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js] +"use strict"; // object types are identical structurally class A { foo(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js index e8c788e586682..f9a23b14d3217 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js @@ -105,6 +105,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesOptionalParams.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js index 441cd8a062f3f..fabaa670eb6fa 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js @@ -105,6 +105,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js index 79cf09cb64b31..9e5e01f7892a8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js @@ -105,6 +105,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js index a94eec3d2e6fb..4688e3852ad98 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js @@ -78,6 +78,7 @@ function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js index 5e98e5835f5bf..e9bcd368c8d70 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js @@ -89,6 +89,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js index 4e6f6e67a7563..894ed1eb19bef 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js @@ -98,6 +98,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js index 3599e7c593195..f85094aaa0fe1 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js @@ -85,6 +85,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js index c47d035bddc2a..73b8f814d0d2e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js @@ -81,6 +81,7 @@ function foo15(x: C); // ok function foo15(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js index d88787e10d1ec..259fa1eab1402 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js @@ -75,6 +75,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js] +"use strict"; // object types are identical structurally class B { constructor(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js index 1c3a05aa64876..ba89dec6b2cb8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js @@ -75,6 +75,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js] +"use strict"; // object types are identical structurally class B { constructor(x) { return null; } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js index 0902b0ca6e7f9..67faf643caada 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js @@ -77,6 +77,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js index ea505a051d6a4..4874005d42128 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js @@ -77,6 +77,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js index 97c9d276b2270..ddf44f85aaad6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js @@ -77,6 +77,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js] +"use strict"; // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 4283b6dd02001..8d8fd6eef653f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -125,6 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index fdc136085d335..024430d0cf48f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -128,6 +128,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] +"use strict"; // object types are identical structurally class Base { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index aec07e76c5288..7946b6795f598 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -125,6 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentityWithOptionality.js b/tests/baselines/reference/objectTypesIdentityWithOptionality.js index 85e16308c0ed6..24697d491ccd3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithOptionality.js +++ b/tests/baselines/reference/objectTypesIdentityWithOptionality.js @@ -59,6 +59,7 @@ function foo14(x: typeof b); // ok function foo14(x: any) { } //// [objectTypesIdentityWithOptionality.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index c71a26bf9ae35..8900995731a39 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -123,6 +123,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 31d675ffba738..6ab833d1667a5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -41,6 +41,7 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] +"use strict"; // object types are identical structurally class C { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPublics.js b/tests/baselines/reference/objectTypesIdentityWithPublics.js index 169e5277d39c2..8415f4d67540c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPublics.js +++ b/tests/baselines/reference/objectTypesIdentityWithPublics.js @@ -91,6 +91,7 @@ function foo14(x: typeof b); // error function foo14(x: any) { } //// [objectTypesIdentityWithPublics.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 55bd65ec4c10d..05f870ea09487 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -125,6 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] +"use strict"; // object types are identical structurally class A { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index a09c5604c60f7..f1d67dc57a6fe 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -128,6 +128,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] +"use strict"; // object types are identical structurally class Base { } diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties2.js b/tests/baselines/reference/objectTypesWithOptionalProperties2.js index 26baf9343b94a..cab06ddd457a9 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties2.js +++ b/tests/baselines/reference/objectTypesWithOptionalProperties2.js @@ -29,6 +29,7 @@ var b = { } //// [objectTypesWithOptionalProperties2.js] +"use strict"; // Illegal attempts to define optional methods var a; class C { diff --git a/tests/baselines/reference/operatorsAndIntersectionTypes.js b/tests/baselines/reference/operatorsAndIntersectionTypes.js index ba949c95e06dd..48204e6869b13 100644 --- a/tests/baselines/reference/operatorsAndIntersectionTypes.js +++ b/tests/baselines/reference/operatorsAndIntersectionTypes.js @@ -34,6 +34,7 @@ const b4 = serialNo === serialNo; //// [operatorsAndIntersectionTypes.js] +"use strict"; function createGuid() { return "21EC2020-3AEA-4069-A2DD-08002B30309D"; } diff --git a/tests/baselines/reference/optionalArgsWithDefaultValues.js b/tests/baselines/reference/optionalArgsWithDefaultValues.js index 40e5275d6d941..376354064655c 100644 --- a/tests/baselines/reference/optionalArgsWithDefaultValues.js +++ b/tests/baselines/reference/optionalArgsWithDefaultValues.js @@ -12,6 +12,7 @@ var a = (x?=0) => { return 1; }; var b = (x, y?:number = 2) => { x; }; //// [optionalArgsWithDefaultValues.js] +"use strict"; function foo(x, y = false, z = 0) { } class CCC { foo(x, y = false, z = 0) { } diff --git a/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es2015).js b/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es2015).js index 4deb650441990..621e500c223de 100644 --- a/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es2015).js +++ b/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es2015).js @@ -6,6 +6,7 @@ const a = (): { d: string } | undefined => undefined; (({ [a()?.d]: c = "" }) => {})(); //// [optionalChainingInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 const a = () => undefined; ((_a) => { var _b; var { [(_b = a()) === null || _b === void 0 ? void 0 : _b.d]: c = "" } = _a; })(); diff --git a/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es5).js b/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es5).js index b211f3b7ee20f..a59f709a896d0 100644 --- a/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es5).js +++ b/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=es5).js @@ -6,6 +6,7 @@ const a = (): { d: string } | undefined => undefined; (({ [a()?.d]: c = "" }) => {})(); //// [optionalChainingInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 var a = function () { return undefined; }; (function (_a) { diff --git a/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=esnext).js b/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=esnext).js index 7b41f8c7baa20..89541794988d4 100644 --- a/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=esnext).js +++ b/tests/baselines/reference/optionalChainingInParameterBindingPattern(target=esnext).js @@ -6,6 +6,7 @@ const a = (): { d: string } | undefined => undefined; (({ [a()?.d]: c = "" }) => {})(); //// [optionalChainingInParameterBindingPattern.js] +"use strict"; // https://github.com/microsoft/TypeScript/issues/36295 const a = () => undefined; (({ [a()?.d]: c = "" }) => { })(); diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index f486711568de0..3e0eb36446871 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -13,6 +13,7 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] +"use strict"; class Base { constructor(opt) { } foo(other) { } diff --git a/tests/baselines/reference/optionalParamReferencingOtherParams3.js b/tests/baselines/reference/optionalParamReferencingOtherParams3.js index 89f693fa4289b..71c287f8e452c 100644 --- a/tests/baselines/reference/optionalParamReferencingOtherParams3.js +++ b/tests/baselines/reference/optionalParamReferencingOtherParams3.js @@ -7,6 +7,7 @@ function right(a = b, b = a) { } //// [optionalParamReferencingOtherParams3.js] +"use strict"; function right(a = b, b = a) { a; b; diff --git a/tests/baselines/reference/optionalPropertiesSyntax.js b/tests/baselines/reference/optionalPropertiesSyntax.js index 911fd35dd6e94..ab086977144d9 100644 --- a/tests/baselines/reference/optionalPropertiesSyntax.js +++ b/tests/baselines/reference/optionalPropertiesSyntax.js @@ -38,3 +38,4 @@ interface indexSig { } //// [optionalPropertiesSyntax.js] +"use strict"; diff --git a/tests/baselines/reference/optionalProperty.js b/tests/baselines/reference/optionalProperty.js index c0a1724febfff..8cdffc4fc219b 100644 --- a/tests/baselines/reference/optionalProperty.js +++ b/tests/baselines/reference/optionalProperty.js @@ -7,6 +7,7 @@ class C { //// [optionalProperty.js] +"use strict"; class C { prop; } diff --git a/tests/baselines/reference/overload2.js b/tests/baselines/reference/overload2.js index ae63986841d28..c2724195358ac 100644 --- a/tests/baselines/reference/overload2.js +++ b/tests/baselines/reference/overload2.js @@ -19,6 +19,7 @@ function foo1(x: number) { //// [overload2.js] +"use strict"; var A; (function (A) { })(A || (A = {})); diff --git a/tests/baselines/reference/overloadCallTest.js b/tests/baselines/reference/overloadCallTest.js index 27b846075777c..94195606f2691 100644 --- a/tests/baselines/reference/overloadCallTest.js +++ b/tests/baselines/reference/overloadCallTest.js @@ -18,6 +18,7 @@ class foo { //// [overloadCallTest.js] +"use strict"; class foo { constructor() { function bar(foo) { return "foo"; } diff --git a/tests/baselines/reference/overloadConsecutiveness.js b/tests/baselines/reference/overloadConsecutiveness.js index 7c6b077109f2f..57ccf34da0f31 100644 --- a/tests/baselines/reference/overloadConsecutiveness.js +++ b/tests/baselines/reference/overloadConsecutiveness.js @@ -15,6 +15,7 @@ class C { //// [overloadConsecutiveness.js] +"use strict"; // Making sure compiler won't break with declarations that are consecutive in the AST but not consecutive in the source. Syntax errors intentional. function f1() { } function f2() { } diff --git a/tests/baselines/reference/overloadCrash.js b/tests/baselines/reference/overloadCrash.js index ec18f47d03f0a..3b63bb7e6220d 100644 --- a/tests/baselines/reference/overloadCrash.js +++ b/tests/baselines/reference/overloadCrash.js @@ -14,6 +14,7 @@ foo(i3, i3); // should not crash the compiler :) //// [overloadCrash.js] +"use strict"; ; ; ; diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.js b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.js index f4336e45260b3..d17661b785291 100644 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.js +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.js @@ -13,6 +13,7 @@ function foo2(a: any, x: any) { } //// [overloadOnConstDuplicateOverloads1.js] +"use strict"; function foo(a, x) { } function foo2(a, x) { diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.js b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.js index a5ab13ae68de0..8edb779fba230 100644 --- a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.js +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.js @@ -11,6 +11,7 @@ class C implements I { } //// [overloadOnConstInBaseWithBadImplementationInDerived.js] +"use strict"; class C { x1(a, callback) { } diff --git a/tests/baselines/reference/overloadOnConstInCallback1.js b/tests/baselines/reference/overloadOnConstInCallback1.js index e43e98b1735d6..d56f56b08b7d3 100644 --- a/tests/baselines/reference/overloadOnConstInCallback1.js +++ b/tests/baselines/reference/overloadOnConstInCallback1.js @@ -12,6 +12,7 @@ class C { } //// [overloadOnConstInCallback1.js] +"use strict"; class C { x1(a, callback) { callback('hi'); diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js index e3ecb87c9a2e9..4ecd87d7593b4 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js @@ -8,4 +8,5 @@ interface I { var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error //// [overloadOnConstInObjectLiteralImplementingAnInterface.js] +"use strict"; var i2 = { x1: (a, cb) => { } }; // error diff --git a/tests/baselines/reference/overloadOnConstInheritance4.js b/tests/baselines/reference/overloadOnConstInheritance4.js index 3d028baf4abe3..9b60ebc19ae4c 100644 --- a/tests/baselines/reference/overloadOnConstInheritance4.js +++ b/tests/baselines/reference/overloadOnConstInheritance4.js @@ -12,6 +12,7 @@ class C implements I { //// [overloadOnConstInheritance4.js] +"use strict"; class C { x1(a, callback) { } diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.js b/tests/baselines/reference/overloadOnConstNoAnyImplementation.js index a25d0a3629c54..f017aee4fc0c2 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.js +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.js @@ -18,6 +18,7 @@ x1(1, (x: 'hi') => 1); // error x1(1, (x: string) => 1); //// [overloadOnConstNoAnyImplementation.js] +"use strict"; function x1(a, cb) { cb('hi'); cb('bye'); diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js index 705b6545d6b81..441746ee191ca 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js @@ -24,6 +24,7 @@ c.x1(1, (x) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); //// [overloadOnConstNoAnyImplementation2.js] +"use strict"; class C { x1(a, callback) { callback('hi'); diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js index 96e0449db092e..bde878aeab7a4 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js @@ -8,6 +8,7 @@ class C { //// [overloadOnConstNoNonSpecializedSignature.js] +"use strict"; class C { x1(a) { } } diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.js b/tests/baselines/reference/overloadOnConstNoStringImplementation.js index 6991ba82cd3f3..5be1d7e85cc22 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.js +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.js @@ -18,6 +18,7 @@ x2(1, (x: 'hi') => 1); // error x2(1, (x: string) => 1); //// [overloadOnConstNoStringImplementation.js] +"use strict"; function x2(a, cb) { cb('hi'); cb('bye'); diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.js b/tests/baselines/reference/overloadOnConstNoStringImplementation2.js index d107c75853e4a..5de83d904186d 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.js +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.js @@ -23,6 +23,7 @@ c.x1(1, (x: string) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); //// [overloadOnConstNoStringImplementation2.js] +"use strict"; class C { x1(a, callback) { callback('hi'); diff --git a/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.js b/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.js index 1fcaf36f58581..e75a0d93ad205 100644 --- a/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.js +++ b/tests/baselines/reference/overloadOnGenericClassAndNonGenericClass.js @@ -19,6 +19,7 @@ var t3: A; // should not error //// [overloadOnGenericClassAndNonGenericClass.js] +"use strict"; class A { } class B { diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index d7f593c26de58..d85b98784b55a 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -97,6 +97,7 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] +"use strict"; class SomeBase { } class SomeDerived1 extends SomeBase { diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index d42f23d632884..c47284b7d7e6e 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -104,6 +104,7 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] +"use strict"; class SomeBase { } class SomeDerived1 extends SomeBase { diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 7868be9ddb4ae..d7460ec7725a4 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -105,6 +105,7 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] +"use strict"; class SomeBase { } class SomeDerived1 extends SomeBase { diff --git a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.js b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.js index d1a317cbb45e6..accf96f6cf49f 100644 --- a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.js +++ b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.js @@ -8,6 +8,7 @@ class Bar { } //// [overloadResolutionOnDefaultConstructor1.js] +"use strict"; class Bar { clone() { return new Bar(0); diff --git a/tests/baselines/reference/overloadResolutionOverCTLambda.js b/tests/baselines/reference/overloadResolutionOverCTLambda.js index 00d1fe6b8e278..0ffd17e781110 100644 --- a/tests/baselines/reference/overloadResolutionOverCTLambda.js +++ b/tests/baselines/reference/overloadResolutionOverCTLambda.js @@ -5,5 +5,6 @@ function foo(b: (item: number) => boolean) { } foo(a => a); // can not convert (number)=>bool to (number)=>number //// [overloadResolutionOverCTLambda.js] +"use strict"; function foo(b) { } foo(a => a); // can not convert (number)=>bool to (number)=>number diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js index 15486c5ef4d4d..0a3ec0012a8f8 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js @@ -26,6 +26,7 @@ bug3(fprime); bug3(function(x:string):string { return x; }); //// [overloadResolutionOverNonCTLambdas.js] +"use strict"; var Bugs; (function (Bugs) { class A { diff --git a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js index 2afecc89ef3ac..69e95994090a3 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js +++ b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js @@ -24,6 +24,7 @@ namespace Bugs { } //// [overloadResolutionOverNonCTObjectLit.js] +"use strict"; var Bugs; (function (Bugs) { function bug3() { diff --git a/tests/baselines/reference/overloadResolutionTest1.js b/tests/baselines/reference/overloadResolutionTest1.js index 3b802759d53f3..cc469f9f6af74 100644 --- a/tests/baselines/reference/overloadResolutionTest1.js +++ b/tests/baselines/reference/overloadResolutionTest1.js @@ -27,6 +27,7 @@ function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error //// [overloadResolutionTest1.js] +"use strict"; function foo(bar) { return bar; } ; var x1 = foo([{ a: true }]); // works diff --git a/tests/baselines/reference/overloadResolutionWithAny.js b/tests/baselines/reference/overloadResolutionWithAny.js index 355dc68a00e6d..e5ced1527508b 100644 --- a/tests/baselines/reference/overloadResolutionWithAny.js +++ b/tests/baselines/reference/overloadResolutionWithAny.js @@ -24,6 +24,7 @@ func2(x, ""); // boolean func2("", x); // RegExp //// [overloadResolutionWithAny.js] +"use strict"; var func; func(""); // number func(3); // string diff --git a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js index f48b894597670..c35a22f8d7b78 100644 --- a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js +++ b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js @@ -9,6 +9,7 @@ x2((x) => 1 ); //// [overloadWithCallbacksWithDifferingOptionalityOnArgs.js] +"use strict"; function x2(callback) { } x2(() => 1); x2((x) => 1); diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.js b/tests/baselines/reference/overloadingOnConstantsInImplementation.js index 47f9b0a1b914d..9e18c248b061c 100644 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.js +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.js @@ -7,5 +7,6 @@ function foo(a: 'hi', x: any) { } //// [overloadingOnConstantsInImplementation.js] +"use strict"; function foo(a, x) { } diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js index 95eb5d81db830..bf035f63927a4 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js @@ -25,6 +25,7 @@ var result3: string = foo(x => { // x has type D //// [overloadresolutionWithConstraintCheckingDeferred.js] +"use strict"; class G { constructor(x) { } } diff --git a/tests/baselines/reference/overloadsAndTypeArgumentArity.js b/tests/baselines/reference/overloadsAndTypeArgumentArity.js index 4c3592266cc93..ee20b480e1285 100644 --- a/tests/baselines/reference/overloadsAndTypeArgumentArity.js +++ b/tests/baselines/reference/overloadsAndTypeArgumentArity.js @@ -10,5 +10,6 @@ Callbacks('s'); // no error new Callbacks('s'); // no error //// [overloadsAndTypeArgumentArity.js] +"use strict"; Callbacks('s'); // no error new Callbacks('s'); // no error diff --git a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.js b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.js index 09f1f99000e52..8557e9ed4d618 100644 --- a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.js +++ b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.js @@ -13,6 +13,7 @@ f(); // wrong number of arguments (#25683) //// [overloadsAndTypeArgumentArityErrors.js] +"use strict"; Callbacks('s'); // wrong number of type arguments new Callbacks('s'); // wrong number of type arguments f(); // wrong number of arguments (#25683) diff --git a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js index bea304463ad93..0249e92eaa1c8 100644 --- a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js +++ b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js @@ -11,6 +11,7 @@ namespace M { } //// [overloadsInDifferentContainersDisagreeOnAmbient.js] +"use strict"; var M; (function (M) { function f() { } diff --git a/tests/baselines/reference/overloadsWithinClasses.js b/tests/baselines/reference/overloadsWithinClasses.js index 624be00b394c1..a580f63f36a67 100644 --- a/tests/baselines/reference/overloadsWithinClasses.js +++ b/tests/baselines/reference/overloadsWithinClasses.js @@ -26,6 +26,7 @@ class X { //// [overloadsWithinClasses.js] +"use strict"; class foo { static fnOverload() { } static fnOverload(foo) { } // error diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing(target=es2015).js b/tests/baselines/reference/parameterInitializersForwardReferencing(target=es2015).js index 001365a7136f8..c9e959348ec9f 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing(target=es2015).js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing(target=es2015).js @@ -44,6 +44,7 @@ function f(a, b = function () { return c; }, c = b()) { } //// [parameterInitializersForwardReferencing.js] +"use strict"; function left(a, b = a, c = b) { a; b; diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing(target=es5).js b/tests/baselines/reference/parameterInitializersForwardReferencing(target=es5).js index 174cfc54d5969..ace3b5b3c0208 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing(target=es5).js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing(target=es5).js @@ -44,6 +44,7 @@ function f(a, b = function () { return c; }, c = b()) { } //// [parameterInitializersForwardReferencing.js] +"use strict"; function left(a, b, c) { if (b === void 0) { b = a; } if (c === void 0) { c = b; } diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es2015).js b/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es2015).js index c91c67da12c5e..811b54b399f14 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es2015).js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es2015).js @@ -41,6 +41,7 @@ function f8(foo1: string, bar = foo1) { } //// [parameterInitializersForwardReferencing1.js] +"use strict"; let foo = ""; function f1(bar = foo) { var foo = 2; diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es5).js b/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es5).js index f36cb674a4c85..3e87acf375e28 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es5).js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing1(target=es5).js @@ -41,6 +41,7 @@ function f8(foo1: string, bar = foo1) { } //// [parameterInitializersForwardReferencing1.js] +"use strict"; var foo = ""; function f1(bar) { if (bar === void 0) { bar = foo; } diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.js b/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.js index 40a836cf26667..23cddbb51c7a9 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing1_es6.js @@ -41,6 +41,7 @@ function f8(foo1: string, bar = foo1) { } //// [parameterInitializersForwardReferencing1_es6.js] +"use strict"; let foo = ""; function f1(bar = foo) { var foo = 2; diff --git a/tests/baselines/reference/parameterPropertyOutsideConstructor.js b/tests/baselines/reference/parameterPropertyOutsideConstructor.js index a6d9c957aaa16..f48c3b203ce47 100644 --- a/tests/baselines/reference/parameterPropertyOutsideConstructor.js +++ b/tests/baselines/reference/parameterPropertyOutsideConstructor.js @@ -7,6 +7,7 @@ class C { } //// [parameterPropertyOutsideConstructor.js] +"use strict"; class C { foo(x) { } diff --git a/tests/baselines/reference/parametersWithNoAnnotationAreAny.js b/tests/baselines/reference/parametersWithNoAnnotationAreAny.js index 15b6b5edd5978..503d3f72dc313 100644 --- a/tests/baselines/reference/parametersWithNoAnnotationAreAny.js +++ b/tests/baselines/reference/parametersWithNoAnnotationAreAny.js @@ -32,6 +32,7 @@ var b = { } //// [parametersWithNoAnnotationAreAny.js] +"use strict"; function foo(x) { return x; } var f = function foo(x) { return x; }; var f2 = (x) => x; diff --git a/tests/baselines/reference/paramterDestrcuturingDeclaration.js b/tests/baselines/reference/paramterDestrcuturingDeclaration.js index 86d8e41a90358..81011174bc639 100644 --- a/tests/baselines/reference/paramterDestrcuturingDeclaration.js +++ b/tests/baselines/reference/paramterDestrcuturingDeclaration.js @@ -8,6 +8,7 @@ interface C { //// [paramterDestrcuturingDeclaration.js] +"use strict"; //// [paramterDestrcuturingDeclaration.d.ts] diff --git a/tests/baselines/reference/parenthesizedAsyncArrowFunction.js b/tests/baselines/reference/parenthesizedAsyncArrowFunction.js index f24fc683ba9ed..a7b6057753bcf 100644 --- a/tests/baselines/reference/parenthesizedAsyncArrowFunction.js +++ b/tests/baselines/reference/parenthesizedAsyncArrowFunction.js @@ -7,6 +7,7 @@ let foo = (async bar => bar); //// [parenthesizedAsyncArrowFunction.js] +"use strict"; // Repro from #20096 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -17,4 +18,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -let foo = ((bar) => __awaiter(this, void 0, void 0, function* () { return bar; })); +let foo = ((bar) => __awaiter(void 0, void 0, void 0, function* () { return bar; })); diff --git a/tests/baselines/reference/parenthesizedContexualTyping1.js b/tests/baselines/reference/parenthesizedContexualTyping1.js index e03ba96a7f6f8..ca1780b5b7908 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping1.js +++ b/tests/baselines/reference/parenthesizedContexualTyping1.js @@ -31,6 +31,7 @@ var obj1: ObjType = { x: x => (x, undefined), y: y => (y, undefined) }; var obj2: ObjType = ({ x: x => (x, undefined), y: y => (y, undefined) }); //// [parenthesizedContexualTyping1.js] +"use strict"; function fun(g, x) { return g(x); } diff --git a/tests/baselines/reference/parenthesizedTypes.js b/tests/baselines/reference/parenthesizedTypes.js index ef2ed269a4657..5e300a0887e1b 100644 --- a/tests/baselines/reference/parenthesizedTypes.js +++ b/tests/baselines/reference/parenthesizedTypes.js @@ -31,6 +31,7 @@ var g: [(string), (((typeof a)))]; //// [parenthesizedTypes.js] +"use strict"; var a; var a; var a; diff --git a/tests/baselines/reference/parseBigInt.js b/tests/baselines/reference/parseBigInt.js index 5739a7bc1bb03..9d26bafc6881d 100644 --- a/tests/baselines/reference/parseBigInt.js +++ b/tests/baselines/reference/parseBigInt.js @@ -73,6 +73,7 @@ oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); //// [parseBigInt.js] +"use strict"; // All bases should allow "n" suffix const bin = 0b101, binBig = 5n; // 5, 5n const oct = 0o567, octBig = 375n; // 375, 375n diff --git a/tests/baselines/reference/parseErrorIncorrectReturnToken.js b/tests/baselines/reference/parseErrorIncorrectReturnToken.js index 5c67b98f9316f..9e02bf725f317 100644 --- a/tests/baselines/reference/parseErrorIncorrectReturnToken.js +++ b/tests/baselines/reference/parseErrorIncorrectReturnToken.js @@ -16,6 +16,7 @@ let o = { //// [parseErrorIncorrectReturnToken.js] +"use strict"; string; // should be => not : // doesn't work in non-type contexts, where the return type is optional let f = (n) => string => n.toString(); diff --git a/tests/baselines/reference/parseLinkTag.js b/tests/baselines/reference/parseLinkTag.js index cf10b2f197aff..d524a6a7c741f 100644 --- a/tests/baselines/reference/parseLinkTag.js +++ b/tests/baselines/reference/parseLinkTag.js @@ -10,6 +10,7 @@ function f() { //// [parseLinkTag.js] +"use strict"; /** trailing @link tag {@link */ var x; /** @returns trailing @link tag {@link */ diff --git a/tests/baselines/reference/parseObjectLiteralsWithoutTypes.js b/tests/baselines/reference/parseObjectLiteralsWithoutTypes.js index f167295d4cc07..fd4728d3d6902 100644 --- a/tests/baselines/reference/parseObjectLiteralsWithoutTypes.js +++ b/tests/baselines/reference/parseObjectLiteralsWithoutTypes.js @@ -7,6 +7,7 @@ let z: { foo, bar: number } //// [parseObjectLiteralsWithoutTypes.js] +"use strict"; let x; let y; let z; diff --git a/tests/baselines/reference/parseUnaryExpressionNoTypeAssertionInJsx4.js b/tests/baselines/reference/parseUnaryExpressionNoTypeAssertionInJsx4.js index a418288543d7a..c7642da61075e 100644 --- a/tests/baselines/reference/parseUnaryExpressionNoTypeAssertionInJsx4.js +++ b/tests/baselines/reference/parseUnaryExpressionNoTypeAssertionInJsx4.js @@ -9,6 +9,7 @@ const c = + <1234> x; //// [index.jsx] +"use strict"; const x = "oops"; const a = + x; const b = + <> x; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index 086b602c0820f..dd6c7651f8df9 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -9,6 +9,7 @@ class Any extends Type { //// [parser509630.js] +"use strict"; class Type { constructor() { this.examples = []; // typing here diff --git a/tests/baselines/reference/parser642331.js b/tests/baselines/reference/parser642331.js index ef122939151fc..ec1f8550dff80 100644 --- a/tests/baselines/reference/parser642331.js +++ b/tests/baselines/reference/parser642331.js @@ -7,6 +7,7 @@ class test { //// [parser642331.js] +"use strict"; class test { constructor(static) { } } diff --git a/tests/baselines/reference/parser643728.js b/tests/baselines/reference/parser643728.js index d2f75afdee05d..2de63d34a267a 100644 --- a/tests/baselines/reference/parser643728.js +++ b/tests/baselines/reference/parser643728.js @@ -8,3 +8,4 @@ interface C { //// [parser643728.js] +"use strict"; diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic2.js b/tests/baselines/reference/parserAccessibilityAfterStatic2.js index 8cc0f589fa0f9..e7738d7a71546 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic2.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic2.js @@ -8,5 +8,6 @@ static public; //// [parserAccessibilityAfterStatic2.js] +"use strict"; class Outer { } diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic5.js b/tests/baselines/reference/parserAccessibilityAfterStatic5.js index 08502b80eb417..35599b5886815 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic5.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic5.js @@ -8,5 +8,6 @@ static public //// [parserAccessibilityAfterStatic5.js] +"use strict"; class Outer { } diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic6.js b/tests/baselines/reference/parserAccessibilityAfterStatic6.js index 45f56938aea7e..0fde5e639cfa2 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic6.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic6.js @@ -6,5 +6,6 @@ class Outer static public //// [parserAccessibilityAfterStatic6.js] +"use strict"; class Outer { } diff --git a/tests/baselines/reference/parserAccessors2(target=es2015).js b/tests/baselines/reference/parserAccessors2(target=es2015).js index e1dcb287d007a..0d44cd0a1ad1f 100644 --- a/tests/baselines/reference/parserAccessors2(target=es2015).js +++ b/tests/baselines/reference/parserAccessors2(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserAccessors2.js] +"use strict"; class C { set Foo(a) { } } diff --git a/tests/baselines/reference/parserAccessors2(target=es5).js b/tests/baselines/reference/parserAccessors2(target=es5).js index d3f2e81c51de7..4992129bf65f2 100644 --- a/tests/baselines/reference/parserAccessors2(target=es5).js +++ b/tests/baselines/reference/parserAccessors2(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserAccessors2.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserAccessors4(target=es2015).js b/tests/baselines/reference/parserAccessors4(target=es2015).js index fb1ba4194d2a4..10ff83b1b6acf 100644 --- a/tests/baselines/reference/parserAccessors4(target=es2015).js +++ b/tests/baselines/reference/parserAccessors4(target=es2015).js @@ -4,4 +4,5 @@ var v = { set Foo(a) { } }; //// [parserAccessors4.js] +"use strict"; var v = { set Foo(a) { } }; diff --git a/tests/baselines/reference/parserAccessors4(target=es5).js b/tests/baselines/reference/parserAccessors4(target=es5).js index fb1ba4194d2a4..10ff83b1b6acf 100644 --- a/tests/baselines/reference/parserAccessors4(target=es5).js +++ b/tests/baselines/reference/parserAccessors4(target=es5).js @@ -4,4 +4,5 @@ var v = { set Foo(a) { } }; //// [parserAccessors4.js] +"use strict"; var v = { set Foo(a) { } }; diff --git a/tests/baselines/reference/parserAccessors6(target=es2015).js b/tests/baselines/reference/parserAccessors6(target=es2015).js index 605a993238d54..b84da3378d382 100644 --- a/tests/baselines/reference/parserAccessors6(target=es2015).js +++ b/tests/baselines/reference/parserAccessors6(target=es2015).js @@ -6,3 +6,4 @@ declare class C { } //// [parserAccessors6.js] +"use strict"; diff --git a/tests/baselines/reference/parserAccessors6(target=es5).js b/tests/baselines/reference/parserAccessors6(target=es5).js index 605a993238d54..b84da3378d382 100644 --- a/tests/baselines/reference/parserAccessors6(target=es5).js +++ b/tests/baselines/reference/parserAccessors6(target=es5).js @@ -6,3 +6,4 @@ declare class C { } //// [parserAccessors6.js] +"use strict"; diff --git a/tests/baselines/reference/parserAccessors8(target=es2015).js b/tests/baselines/reference/parserAccessors8(target=es2015).js index 90f5a3abe3aaf..5641fd7e3bf87 100644 --- a/tests/baselines/reference/parserAccessors8(target=es2015).js +++ b/tests/baselines/reference/parserAccessors8(target=es2015).js @@ -4,4 +4,5 @@ var v = { set foo() { } } //// [parserAccessors8.js] +"use strict"; var v = { set foo() { } }; diff --git a/tests/baselines/reference/parserAccessors8(target=es5).js b/tests/baselines/reference/parserAccessors8(target=es5).js index 90f5a3abe3aaf..5641fd7e3bf87 100644 --- a/tests/baselines/reference/parserAccessors8(target=es5).js +++ b/tests/baselines/reference/parserAccessors8(target=es5).js @@ -4,4 +4,5 @@ var v = { set foo() { } } //// [parserAccessors8.js] +"use strict"; var v = { set foo() { } }; diff --git a/tests/baselines/reference/parserAccessors9(target=es2015).js b/tests/baselines/reference/parserAccessors9(target=es2015).js index a2b9b86fada6b..26b8936c691b5 100644 --- a/tests/baselines/reference/parserAccessors9(target=es2015).js +++ b/tests/baselines/reference/parserAccessors9(target=es2015).js @@ -4,4 +4,5 @@ var v = { set foo(a, b) { } } //// [parserAccessors9.js] +"use strict"; var v = { set foo(a, b) { } }; diff --git a/tests/baselines/reference/parserAccessors9(target=es5).js b/tests/baselines/reference/parserAccessors9(target=es5).js index a2b9b86fada6b..26b8936c691b5 100644 --- a/tests/baselines/reference/parserAccessors9(target=es5).js +++ b/tests/baselines/reference/parserAccessors9(target=es5).js @@ -4,4 +4,5 @@ var v = { set foo(a, b) { } } //// [parserAccessors9.js] +"use strict"; var v = { set foo(a, b) { } }; diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js index 2dfc30fb99996..8ef4368e0caae 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js @@ -7,6 +7,7 @@ function f1() { } //// [parserAmbiguityWithBinaryOperator1.js] +"use strict"; function f1() { var a, b, c; if (a < b || b > (c + 1)) { } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js index b656365c39adc..2e5951b7ac2bb 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js @@ -7,6 +7,7 @@ function f() { } //// [parserAmbiguityWithBinaryOperator2.js] +"use strict"; function f() { var a, b, c; if (a < b && b > (c + 1)) { } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js index 0106c8e144713..396f0f72b590f 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js @@ -8,6 +8,7 @@ function f() { //// [parserAmbiguityWithBinaryOperator3.js] +"use strict"; function f() { var a, b, c; if (a < b && b < (c + 1)) { } diff --git a/tests/baselines/reference/parserArrowFunctionExpression10.js b/tests/baselines/reference/parserArrowFunctionExpression10.js index 9109ef6971ab1..e2013a56b58a9 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression10.js +++ b/tests/baselines/reference/parserArrowFunctionExpression10.js @@ -8,6 +8,8 @@ a ? (b) : c => (d) : e => f //// [fileJs.js] +"use strict"; a ? (b) => (d) : e => f; // Not legal JS; "Unexpected token ':'" at last colon //// [fileTs.js] +"use strict"; a ? (b) => (d) : e => f; diff --git a/tests/baselines/reference/parserArrowFunctionExpression11.js b/tests/baselines/reference/parserArrowFunctionExpression11.js index 4b3d15555a4be..f6382ba726371 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression11.js +++ b/tests/baselines/reference/parserArrowFunctionExpression11.js @@ -8,6 +8,8 @@ a ? b ? c : (d) : e => f //// [fileJs.js] +"use strict"; a ? b ? c : (d) : e => f; // Legal JS //// [fileTs.js] +"use strict"; a ? b ? c : (d) : e => f; diff --git a/tests/baselines/reference/parserArrowFunctionExpression12.js b/tests/baselines/reference/parserArrowFunctionExpression12.js index 727fb88815450..86a00d6afe4c1 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression12.js +++ b/tests/baselines/reference/parserArrowFunctionExpression12.js @@ -8,6 +8,8 @@ a ? (b) => (c): d => e //// [fileJs.js] +"use strict"; a ? (b) => (c) : d => e; // Legal JS //// [fileTs.js] +"use strict"; a ? (b) => (c) : d => e; diff --git a/tests/baselines/reference/parserArrowFunctionExpression15.js b/tests/baselines/reference/parserArrowFunctionExpression15.js index 00eb062bed568..e6af18b0d9e0c 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression15.js +++ b/tests/baselines/reference/parserArrowFunctionExpression15.js @@ -8,6 +8,8 @@ false ? (param): string => param : null //// [fileJs.js] +"use strict"; false ? (param) => param : null; // Not legal JS; "Unexpected token ':'" at last colon //// [fileTs.js] +"use strict"; false ? (param) => param : null; diff --git a/tests/baselines/reference/parserArrowFunctionExpression16.js b/tests/baselines/reference/parserArrowFunctionExpression16.js index 8c7861c2dd107..bdbc472439461 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression16.js +++ b/tests/baselines/reference/parserArrowFunctionExpression16.js @@ -8,6 +8,8 @@ true ? false ? (param): string => param : null : null //// [fileJs.js] +"use strict"; true ? false ? (param) => param : null : null; // Not legal JS; "Unexpected token ':'" at last colon //// [fileTs.js] +"use strict"; true ? false ? (param) => param : null : null; diff --git a/tests/baselines/reference/parserArrowFunctionExpression17.js b/tests/baselines/reference/parserArrowFunctionExpression17.js index 469c9e2b852b2..53a7e1e3bca43 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression17.js +++ b/tests/baselines/reference/parserArrowFunctionExpression17.js @@ -8,6 +8,8 @@ a ? b : (c) : d => e //// [fileJs.js] +"use strict"; a ? b : (c) => e; // Not legal JS; "Unexpected token ':'" at last colon //// [fileTs.js] +"use strict"; a ? b : (c) => e; diff --git a/tests/baselines/reference/parserArrowFunctionExpression8.js b/tests/baselines/reference/parserArrowFunctionExpression8.js index e116ee9c9a662..196636fb4bc99 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression8.js +++ b/tests/baselines/reference/parserArrowFunctionExpression8.js @@ -8,6 +8,8 @@ x ? y => ({ y }) : z => ({ z }) //// [fileJs.js] +"use strict"; x ? y => ({ y }) : z => ({ z }); // Legal JS //// [fileTs.js] +"use strict"; x ? y => ({ y }) : z => ({ z }); diff --git a/tests/baselines/reference/parserArrowFunctionExpression9.js b/tests/baselines/reference/parserArrowFunctionExpression9.js index 891fd4914fb99..4b4fe9eb90ed5 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression9.js +++ b/tests/baselines/reference/parserArrowFunctionExpression9.js @@ -8,6 +8,8 @@ b ? (c) : d => e //// [fileJs.js] +"use strict"; b ? (c) : d => e; // Legal JS //// [fileTs.js] +"use strict"; b ? (c) : d => e; diff --git a/tests/baselines/reference/parserCastVersusArrowFunction1.js b/tests/baselines/reference/parserCastVersusArrowFunction1.js index 148c5f971d5c0..19b9aec62b6e4 100644 --- a/tests/baselines/reference/parserCastVersusArrowFunction1.js +++ b/tests/baselines/reference/parserCastVersusArrowFunction1.js @@ -13,6 +13,7 @@ var v = (a, b); var v = (a = 1, b = 2); //// [parserCastVersusArrowFunction1.js] +"use strict"; var v = () => 1; var v = a; var v = (a) => 1; diff --git a/tests/baselines/reference/parserClassDeclaration10.js b/tests/baselines/reference/parserClassDeclaration10.js index 1b93577d5f5f5..d638c6c69ebeb 100644 --- a/tests/baselines/reference/parserClassDeclaration10.js +++ b/tests/baselines/reference/parserClassDeclaration10.js @@ -7,5 +7,6 @@ class C { } //// [parserClassDeclaration10.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserClassDeclaration12.js b/tests/baselines/reference/parserClassDeclaration12.js index 1eb84a03a5c8e..5e9ddfdb94494 100644 --- a/tests/baselines/reference/parserClassDeclaration12.js +++ b/tests/baselines/reference/parserClassDeclaration12.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration12.js] +"use strict"; class C { constructor(a) { } } diff --git a/tests/baselines/reference/parserClassDeclaration13.js b/tests/baselines/reference/parserClassDeclaration13.js index add280eaf1649..aa9617ae0bb20 100644 --- a/tests/baselines/reference/parserClassDeclaration13.js +++ b/tests/baselines/reference/parserClassDeclaration13.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration13.js] +"use strict"; class C { bar() { } } diff --git a/tests/baselines/reference/parserClassDeclaration14.js b/tests/baselines/reference/parserClassDeclaration14.js index 7e9c56aba016d..ca64f750db690 100644 --- a/tests/baselines/reference/parserClassDeclaration14.js +++ b/tests/baselines/reference/parserClassDeclaration14.js @@ -7,5 +7,6 @@ class C { } //// [parserClassDeclaration14.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserClassDeclaration15.js b/tests/baselines/reference/parserClassDeclaration15.js index 375e81ef282b5..161d393651f52 100644 --- a/tests/baselines/reference/parserClassDeclaration15.js +++ b/tests/baselines/reference/parserClassDeclaration15.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration15.js] +"use strict"; class C { constructor() { } } diff --git a/tests/baselines/reference/parserClassDeclaration16.js b/tests/baselines/reference/parserClassDeclaration16.js index 3e1f32fc6951f..e77ebc0022773 100644 --- a/tests/baselines/reference/parserClassDeclaration16.js +++ b/tests/baselines/reference/parserClassDeclaration16.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration16.js] +"use strict"; class C { foo() { } } diff --git a/tests/baselines/reference/parserClassDeclaration17.js b/tests/baselines/reference/parserClassDeclaration17.js index bf93530b640e9..84cafcfc876fd 100644 --- a/tests/baselines/reference/parserClassDeclaration17.js +++ b/tests/baselines/reference/parserClassDeclaration17.js @@ -10,3 +10,4 @@ declare class Enumerator { //// [parserClassDeclaration17.js] +"use strict"; diff --git a/tests/baselines/reference/parserClassDeclaration19.js b/tests/baselines/reference/parserClassDeclaration19.js index c07bdeba95541..99d8981f9ca0e 100644 --- a/tests/baselines/reference/parserClassDeclaration19.js +++ b/tests/baselines/reference/parserClassDeclaration19.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration19.js] +"use strict"; class C { "foo"() { } } diff --git a/tests/baselines/reference/parserClassDeclaration20.js b/tests/baselines/reference/parserClassDeclaration20.js index b5613e4c0786f..3ae00cfbe2281 100644 --- a/tests/baselines/reference/parserClassDeclaration20.js +++ b/tests/baselines/reference/parserClassDeclaration20.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration20.js] +"use strict"; class C { "0"() { } } diff --git a/tests/baselines/reference/parserClassDeclaration21.js b/tests/baselines/reference/parserClassDeclaration21.js index 7d654956e89b7..20c56da263298 100644 --- a/tests/baselines/reference/parserClassDeclaration21.js +++ b/tests/baselines/reference/parserClassDeclaration21.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration21.js] +"use strict"; class C { 1() { } } diff --git a/tests/baselines/reference/parserClassDeclaration22.js b/tests/baselines/reference/parserClassDeclaration22.js index 6661be42df2a1..502a7ed3a3e98 100644 --- a/tests/baselines/reference/parserClassDeclaration22.js +++ b/tests/baselines/reference/parserClassDeclaration22.js @@ -7,6 +7,7 @@ class C { } //// [parserClassDeclaration22.js] +"use strict"; class C { "bar"() { } } diff --git a/tests/baselines/reference/parserClassDeclaration26.js b/tests/baselines/reference/parserClassDeclaration26.js index 3400928898024..386f16043490c 100644 --- a/tests/baselines/reference/parserClassDeclaration26.js +++ b/tests/baselines/reference/parserClassDeclaration26.js @@ -7,5 +7,6 @@ class C { } //// [parserClassDeclaration26.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserClassDeclaration9.js b/tests/baselines/reference/parserClassDeclaration9.js index 2f1dc50f63638..c3db10918e10a 100644 --- a/tests/baselines/reference/parserClassDeclaration9.js +++ b/tests/baselines/reference/parserClassDeclaration9.js @@ -6,5 +6,6 @@ class C { } //// [parserClassDeclaration9.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserCommaInTypeMemberList2.js b/tests/baselines/reference/parserCommaInTypeMemberList2.js index f097e46bfc038..1636d3d3976ae 100644 --- a/tests/baselines/reference/parserCommaInTypeMemberList2.js +++ b/tests/baselines/reference/parserCommaInTypeMemberList2.js @@ -5,4 +5,5 @@ var s = $.extend< { workItem: any }, { workItem: any, width: string }>({ workIte //// [parserCommaInTypeMemberList2.js] +"use strict"; var s = $.extend({ workItem: this._workItem }, {}); diff --git a/tests/baselines/reference/parserComputedPropertyName11.js b/tests/baselines/reference/parserComputedPropertyName11.js index 5064a0d5d6b22..6f51039da2678 100644 --- a/tests/baselines/reference/parserComputedPropertyName11.js +++ b/tests/baselines/reference/parserComputedPropertyName11.js @@ -6,5 +6,6 @@ class C { } //// [parserComputedPropertyName11.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserComputedPropertyName17.js b/tests/baselines/reference/parserComputedPropertyName17.js index 1ce55aef6b9fd..9b53b09010d75 100644 --- a/tests/baselines/reference/parserComputedPropertyName17.js +++ b/tests/baselines/reference/parserComputedPropertyName17.js @@ -4,4 +4,5 @@ var v = { set [e](v) { } } //// [parserComputedPropertyName17.js] +"use strict"; var v = { set [e](v) { } }; diff --git a/tests/baselines/reference/parserComputedPropertyName19.js b/tests/baselines/reference/parserComputedPropertyName19.js index 827e5bd218894..14ba29dfa6cdc 100644 --- a/tests/baselines/reference/parserComputedPropertyName19.js +++ b/tests/baselines/reference/parserComputedPropertyName19.js @@ -4,4 +4,5 @@ var v: { [e]? }; //// [parserComputedPropertyName19.js] +"use strict"; var v; diff --git a/tests/baselines/reference/parserComputedPropertyName24.js b/tests/baselines/reference/parserComputedPropertyName24.js index e0dc4b789aaeb..b6d32d84db7c1 100644 --- a/tests/baselines/reference/parserComputedPropertyName24.js +++ b/tests/baselines/reference/parserComputedPropertyName24.js @@ -6,6 +6,7 @@ class C { } //// [parserComputedPropertyName24.js] +"use strict"; class C { set [e](v) { } } diff --git a/tests/baselines/reference/parserComputedPropertyName25.js b/tests/baselines/reference/parserComputedPropertyName25.js index 43ff953d15000..4b39f4705e6cd 100644 --- a/tests/baselines/reference/parserComputedPropertyName25.js +++ b/tests/baselines/reference/parserComputedPropertyName25.js @@ -8,6 +8,7 @@ class C { } //// [parserComputedPropertyName25.js] +"use strict"; var _a; class C { constructor() { diff --git a/tests/baselines/reference/parserComputedPropertyName26.js b/tests/baselines/reference/parserComputedPropertyName26.js index 3b50e41835157..6e2b67a169417 100644 --- a/tests/baselines/reference/parserComputedPropertyName26.js +++ b/tests/baselines/reference/parserComputedPropertyName26.js @@ -8,6 +8,7 @@ enum E { } //// [parserComputedPropertyName26.js] +"use strict"; var E; (function (E) { // No ASI diff --git a/tests/baselines/reference/parserComputedPropertyName27.js b/tests/baselines/reference/parserComputedPropertyName27.js index 65bf6d5b6cc02..974866a2ed357 100644 --- a/tests/baselines/reference/parserComputedPropertyName27.js +++ b/tests/baselines/reference/parserComputedPropertyName27.js @@ -8,6 +8,7 @@ class C { } //// [parserComputedPropertyName27.js] +"use strict"; var _a; class C { constructor() { diff --git a/tests/baselines/reference/parserComputedPropertyName33.js b/tests/baselines/reference/parserComputedPropertyName33.js index b1a09a8b34457..3ed4ed9029e29 100644 --- a/tests/baselines/reference/parserComputedPropertyName33.js +++ b/tests/baselines/reference/parserComputedPropertyName33.js @@ -8,6 +8,7 @@ class C { } //// [parserComputedPropertyName33.js] +"use strict"; var _a; class C { constructor() { diff --git a/tests/baselines/reference/parserComputedPropertyName7.js b/tests/baselines/reference/parserComputedPropertyName7.js index dde73df106ea6..4af5ec043bf70 100644 --- a/tests/baselines/reference/parserComputedPropertyName7.js +++ b/tests/baselines/reference/parserComputedPropertyName7.js @@ -6,5 +6,6 @@ class C { } //// [parserComputedPropertyName7.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserComputedPropertyName8.js b/tests/baselines/reference/parserComputedPropertyName8.js index 060a66934856f..f36523d6245ba 100644 --- a/tests/baselines/reference/parserComputedPropertyName8.js +++ b/tests/baselines/reference/parserComputedPropertyName8.js @@ -6,5 +6,6 @@ class C { } //// [parserComputedPropertyName8.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserES3Accessors2.js b/tests/baselines/reference/parserES3Accessors2.js index 097e7dffe120c..97100cb3000c9 100644 --- a/tests/baselines/reference/parserES3Accessors2.js +++ b/tests/baselines/reference/parserES3Accessors2.js @@ -6,6 +6,7 @@ class C { } //// [parserES3Accessors2.js] +"use strict"; class C { set Foo(a) { } } diff --git a/tests/baselines/reference/parserES5ComputedPropertyName11(target=es2015).js b/tests/baselines/reference/parserES5ComputedPropertyName11(target=es2015).js index 5ef81f71b20c5..a0b76e6535a8b 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName11(target=es2015).js +++ b/tests/baselines/reference/parserES5ComputedPropertyName11(target=es2015).js @@ -6,5 +6,6 @@ class C { } //// [parserES5ComputedPropertyName11.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserES5ComputedPropertyName11(target=es5).js b/tests/baselines/reference/parserES5ComputedPropertyName11(target=es5).js index 44c219fd5e492..a94286460d45e 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName11(target=es5).js +++ b/tests/baselines/reference/parserES5ComputedPropertyName11(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserES5ComputedPropertyName11.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserES5ComputedPropertyName7(target=es2015).js b/tests/baselines/reference/parserES5ComputedPropertyName7(target=es2015).js index 8093391a6d0ac..82a8c2a09bcdf 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName7(target=es2015).js +++ b/tests/baselines/reference/parserES5ComputedPropertyName7(target=es2015).js @@ -6,5 +6,6 @@ class C { } //// [parserES5ComputedPropertyName7.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserES5ComputedPropertyName7(target=es5).js b/tests/baselines/reference/parserES5ComputedPropertyName7(target=es5).js index a3d1990025de8..441273db3f2ba 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName7(target=es5).js +++ b/tests/baselines/reference/parserES5ComputedPropertyName7(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserES5ComputedPropertyName7.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserES5ForOfStatement18(target=es2015).js b/tests/baselines/reference/parserES5ForOfStatement18(target=es2015).js index f3b5a427d8fa1..d76e444b124d4 100644 --- a/tests/baselines/reference/parserES5ForOfStatement18(target=es2015).js +++ b/tests/baselines/reference/parserES5ForOfStatement18(target=es2015).js @@ -4,4 +4,5 @@ for (var of of of) { } //// [parserES5ForOfStatement18.js] +"use strict"; for (var of of of) { } diff --git a/tests/baselines/reference/parserES5ForOfStatement18(target=es5).js b/tests/baselines/reference/parserES5ForOfStatement18(target=es5).js index fa07c41fa8f52..9cf6ff53cd2c0 100644 --- a/tests/baselines/reference/parserES5ForOfStatement18(target=es5).js +++ b/tests/baselines/reference/parserES5ForOfStatement18(target=es5).js @@ -4,6 +4,7 @@ for (var of of of) { } //// [parserES5ForOfStatement18.js] +"use strict"; for (var _i = 0, of_1 = of; _i < of_1.length; _i++) { var of = of_1[_i]; } diff --git a/tests/baselines/reference/parserES5ForOfStatement19(target=es2015).js b/tests/baselines/reference/parserES5ForOfStatement19(target=es2015).js index 6dd8ba508bd99..e5feb56ef5bd3 100644 --- a/tests/baselines/reference/parserES5ForOfStatement19(target=es2015).js +++ b/tests/baselines/reference/parserES5ForOfStatement19(target=es2015).js @@ -4,4 +4,5 @@ for (var of in of) { } //// [parserES5ForOfStatement19.js] +"use strict"; for (var of in of) { } diff --git a/tests/baselines/reference/parserES5ForOfStatement19(target=es5).js b/tests/baselines/reference/parserES5ForOfStatement19(target=es5).js index 6dd8ba508bd99..e5feb56ef5bd3 100644 --- a/tests/baselines/reference/parserES5ForOfStatement19(target=es5).js +++ b/tests/baselines/reference/parserES5ForOfStatement19(target=es5).js @@ -4,4 +4,5 @@ for (var of in of) { } //// [parserES5ForOfStatement19.js] +"use strict"; for (var of in of) { } diff --git a/tests/baselines/reference/parserES5ForOfStatement20(target=es2015).js b/tests/baselines/reference/parserES5ForOfStatement20(target=es2015).js index c844c7dbae7a7..7ca55f913c2f5 100644 --- a/tests/baselines/reference/parserES5ForOfStatement20(target=es2015).js +++ b/tests/baselines/reference/parserES5ForOfStatement20(target=es2015).js @@ -4,4 +4,5 @@ for (var of = 0 in of) { } //// [parserES5ForOfStatement20.js] +"use strict"; for (var of = 0 in of) { } diff --git a/tests/baselines/reference/parserES5ForOfStatement20(target=es5).js b/tests/baselines/reference/parserES5ForOfStatement20(target=es5).js index c844c7dbae7a7..7ca55f913c2f5 100644 --- a/tests/baselines/reference/parserES5ForOfStatement20(target=es5).js +++ b/tests/baselines/reference/parserES5ForOfStatement20(target=es5).js @@ -4,4 +4,5 @@ for (var of = 0 in of) { } //// [parserES5ForOfStatement20.js] +"use strict"; for (var of = 0 in of) { } diff --git a/tests/baselines/reference/parserErrantSemicolonInClass1.js b/tests/baselines/reference/parserErrantSemicolonInClass1.js index b0a3053ed3e65..5c4f9202bc588 100644 --- a/tests/baselines/reference/parserErrantSemicolonInClass1.js +++ b/tests/baselines/reference/parserErrantSemicolonInClass1.js @@ -38,6 +38,7 @@ class a { //// [parserErrantSemicolonInClass1.js] +"use strict"; class a { constructor(ns) { } diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js index 6762bbb363cb7..efc57f24e8308 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js @@ -31,6 +31,7 @@ var dist = p.getDist(); //// [parserErrorRecovery_IncompleteMemberVariable2.js] +"use strict"; // Module var Shapes; (function (Shapes) { diff --git a/tests/baselines/reference/parserErrorRecovery_ParameterList1.js b/tests/baselines/reference/parserErrorRecovery_ParameterList1.js index a6bd50aedcb08..189ba7d8ce7fc 100644 --- a/tests/baselines/reference/parserErrorRecovery_ParameterList1.js +++ b/tests/baselines/reference/parserErrorRecovery_ParameterList1.js @@ -5,3 +5,4 @@ function f(a { } //// [parserErrorRecovery_ParameterList1.js] +"use strict"; diff --git a/tests/baselines/reference/parserErrorRecovery_ParameterList2.js b/tests/baselines/reference/parserErrorRecovery_ParameterList2.js index 2bef2c77b8cb0..26b17eee17348 100644 --- a/tests/baselines/reference/parserErrorRecovery_ParameterList2.js +++ b/tests/baselines/reference/parserErrorRecovery_ParameterList2.js @@ -5,3 +5,4 @@ function f(a, { } //// [parserErrorRecovery_ParameterList2.js] +"use strict"; diff --git a/tests/baselines/reference/parserForOfStatement18.js b/tests/baselines/reference/parserForOfStatement18.js index f06973084af7d..dbc01277503cd 100644 --- a/tests/baselines/reference/parserForOfStatement18.js +++ b/tests/baselines/reference/parserForOfStatement18.js @@ -4,4 +4,5 @@ for (var of of of) { } //// [parserForOfStatement18.js] +"use strict"; for (var of of of) { } diff --git a/tests/baselines/reference/parserForOfStatement19.js b/tests/baselines/reference/parserForOfStatement19.js index 638519dad9cf6..d9cbe9955e40a 100644 --- a/tests/baselines/reference/parserForOfStatement19.js +++ b/tests/baselines/reference/parserForOfStatement19.js @@ -4,4 +4,5 @@ for (var of in of) { } //// [parserForOfStatement19.js] +"use strict"; for (var of in of) { } diff --git a/tests/baselines/reference/parserForOfStatement20.js b/tests/baselines/reference/parserForOfStatement20.js index 71f02f5f8dc6f..86128533071fa 100644 --- a/tests/baselines/reference/parserForOfStatement20.js +++ b/tests/baselines/reference/parserForOfStatement20.js @@ -4,4 +4,5 @@ for (var of = 0 in of) { } //// [parserForOfStatement20.js] +"use strict"; for (var of = 0 in of) { } diff --git a/tests/baselines/reference/parserForStatement2.js b/tests/baselines/reference/parserForStatement2.js index 3333884031504..28046ed84406a 100644 --- a/tests/baselines/reference/parserForStatement2.js +++ b/tests/baselines/reference/parserForStatement2.js @@ -9,6 +9,7 @@ for (a in b[c] = b[c] || [], d) { } //// [parserForStatement2.js] +"use strict"; var a; var b = []; var c; diff --git a/tests/baselines/reference/parserFunctionDeclaration1.js b/tests/baselines/reference/parserFunctionDeclaration1.js index d02dff13921f9..92d5e0eff7554 100644 --- a/tests/baselines/reference/parserFunctionDeclaration1.js +++ b/tests/baselines/reference/parserFunctionDeclaration1.js @@ -6,3 +6,4 @@ declare namespace M { } //// [parserFunctionDeclaration1.js] +"use strict"; diff --git a/tests/baselines/reference/parserFunctionDeclaration4.js b/tests/baselines/reference/parserFunctionDeclaration4.js index 1cf4d77d3c40b..7974bc5125ef8 100644 --- a/tests/baselines/reference/parserFunctionDeclaration4.js +++ b/tests/baselines/reference/parserFunctionDeclaration4.js @@ -5,4 +5,5 @@ function foo(); function bar() { } //// [parserFunctionDeclaration4.js] +"use strict"; function bar() { } diff --git a/tests/baselines/reference/parserFunctionDeclaration5.js b/tests/baselines/reference/parserFunctionDeclaration5.js index 533cfaef0aa76..0fc5884d9b682 100644 --- a/tests/baselines/reference/parserFunctionDeclaration5.js +++ b/tests/baselines/reference/parserFunctionDeclaration5.js @@ -5,4 +5,5 @@ function foo(); function foo() { } //// [parserFunctionDeclaration5.js] +"use strict"; function foo() { } diff --git a/tests/baselines/reference/parserFunctionDeclaration6.js b/tests/baselines/reference/parserFunctionDeclaration6.js index 6863c1050e2fa..d004afe94980e 100644 --- a/tests/baselines/reference/parserFunctionDeclaration6.js +++ b/tests/baselines/reference/parserFunctionDeclaration6.js @@ -7,6 +7,7 @@ } //// [parserFunctionDeclaration6.js] +"use strict"; { function bar() { } } diff --git a/tests/baselines/reference/parserFunctionDeclaration7.js b/tests/baselines/reference/parserFunctionDeclaration7.js index 0f47252c901ba..141ea30d6be32 100644 --- a/tests/baselines/reference/parserFunctionDeclaration7.js +++ b/tests/baselines/reference/parserFunctionDeclaration7.js @@ -6,6 +6,7 @@ namespace M { } //// [parserFunctionDeclaration7.js] +"use strict"; var M; (function (M) { })(M || (M = {})); diff --git a/tests/baselines/reference/parserFunctionDeclaration8.js b/tests/baselines/reference/parserFunctionDeclaration8.js index 7ade091a044f4..38856c801dd69 100644 --- a/tests/baselines/reference/parserFunctionDeclaration8.js +++ b/tests/baselines/reference/parserFunctionDeclaration8.js @@ -6,3 +6,4 @@ declare namespace M { } //// [parserFunctionDeclaration8.js] +"use strict"; diff --git a/tests/baselines/reference/parserIndexMemberDeclaration10.js b/tests/baselines/reference/parserIndexMemberDeclaration10.js index 475a0f3dedffa..ff6b5b112c664 100644 --- a/tests/baselines/reference/parserIndexMemberDeclaration10.js +++ b/tests/baselines/reference/parserIndexMemberDeclaration10.js @@ -6,5 +6,6 @@ class C { } //// [parserIndexMemberDeclaration10.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserIndexSignature1.js b/tests/baselines/reference/parserIndexSignature1.js index 6fc73b6a9d098..20c98be6acf30 100644 --- a/tests/baselines/reference/parserIndexSignature1.js +++ b/tests/baselines/reference/parserIndexSignature1.js @@ -6,3 +6,4 @@ interface I { } //// [parserIndexSignature1.js] +"use strict"; diff --git a/tests/baselines/reference/parserIndexSignature10.js b/tests/baselines/reference/parserIndexSignature10.js index 88ac74087a67a..a278bfe327c5a 100644 --- a/tests/baselines/reference/parserIndexSignature10.js +++ b/tests/baselines/reference/parserIndexSignature10.js @@ -6,3 +6,4 @@ interface I { } //// [parserIndexSignature10.js] +"use strict"; diff --git a/tests/baselines/reference/parserIndexSignature11.js b/tests/baselines/reference/parserIndexSignature11.js index 5fff303f89c8d..49cd5d4cdefab 100644 --- a/tests/baselines/reference/parserIndexSignature11.js +++ b/tests/baselines/reference/parserIndexSignature11.js @@ -8,3 +8,4 @@ interface I { } //// [parserIndexSignature11.js] +"use strict"; diff --git a/tests/baselines/reference/parserIndexSignature2.js b/tests/baselines/reference/parserIndexSignature2.js index 8f2fe95df8657..b0bb5b10233dd 100644 --- a/tests/baselines/reference/parserIndexSignature2.js +++ b/tests/baselines/reference/parserIndexSignature2.js @@ -6,3 +6,4 @@ interface I { } //// [parserIndexSignature2.js] +"use strict"; diff --git a/tests/baselines/reference/parserIndexSignature3.js b/tests/baselines/reference/parserIndexSignature3.js index cca780a2d2b94..0d34fc065fb1a 100644 --- a/tests/baselines/reference/parserIndexSignature3.js +++ b/tests/baselines/reference/parserIndexSignature3.js @@ -6,3 +6,4 @@ interface I { } //// [parserIndexSignature3.js] +"use strict"; diff --git a/tests/baselines/reference/parserIndexSignature4.js b/tests/baselines/reference/parserIndexSignature4.js index 9aded9dce22be..b002eda213d27 100644 --- a/tests/baselines/reference/parserIndexSignature4.js +++ b/tests/baselines/reference/parserIndexSignature4.js @@ -6,3 +6,4 @@ interface I { } //// [parserIndexSignature4.js] +"use strict"; diff --git a/tests/baselines/reference/parserIndexSignature5.js b/tests/baselines/reference/parserIndexSignature5.js index 1fd28c7d15b2f..1fa38bb428460 100644 --- a/tests/baselines/reference/parserIndexSignature5.js +++ b/tests/baselines/reference/parserIndexSignature5.js @@ -6,3 +6,4 @@ interface I { } //// [parserIndexSignature5.js] +"use strict"; diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es2015).js b/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es2015).js index a32fcadd567eb..749ecdc56121f 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es2015).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration13.js] +"use strict"; class C { set Foo() { } } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es5).js b/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es5).js index 99f6f5d328063..86a14134749da 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es5).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration13(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration13.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es2015).js b/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es2015).js index d0bfd2a7ca635..14dca7af1b071 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es2015).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration16.js] +"use strict"; class C { set Foo(a = 1) { } } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es5).js b/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es5).js index f517b6ea72e81..b79f31f98d5a9 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es5).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration16(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration16.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es2015).js b/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es2015).js index fb7087abdf841..403bf452e4e1f 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es2015).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration18.js] +"use strict"; class C { set Foo(...a) { } } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es5).js b/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es5).js index 9b5ba3ef88ea6..39fd2b2cb76e1 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es5).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration18(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration18.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es2015).js b/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es2015).js index 1ec315c099886..89b441cd357ae 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es2015).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration4.js] +"use strict"; class C { set a(i) { } } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es5).js b/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es5).js index a85668c9c530e..72025db3fb101 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es5).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration4(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration4.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es2015).js b/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es2015).js index 989afac8e96ba..ce9ea1df8cf40 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es2015).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration5.js] +"use strict"; class C { set "a"(i) { } } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es5).js b/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es5).js index d6bea75dab844..d8b43059d367c 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es5).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration5(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration5.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es2015).js b/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es2015).js index e2e9c0ba7daa7..c9e24ad661097 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es2015).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration6.js] +"use strict"; class C { set 0(i) { } } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es5).js b/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es5).js index 9f7c622dfe3db..edd610e53f25c 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es5).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration6(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration6.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es2015).js b/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es2015).js index 46f0b906da63d..fb04d5c69d597 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es2015).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration8.js] +"use strict"; class C { get Foo() { } } diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es5).js b/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es5).js index 91c894c09e283..e4d5e11a59fac 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es5).js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration8(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserMemberAccessorDeclaration8.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration2.js b/tests/baselines/reference/parserMemberFunctionDeclaration2.js index e9cdf0b9a3803..311021b61442c 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration2.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration2.js @@ -6,6 +6,7 @@ class C { } //// [parserMemberFunctionDeclaration2.js] +"use strict"; class C { Foo() { } } diff --git a/tests/baselines/reference/parserMemberVariableDeclaration1.js b/tests/baselines/reference/parserMemberVariableDeclaration1.js index 9fa8cf630b714..c5d142037dad7 100644 --- a/tests/baselines/reference/parserMemberVariableDeclaration1.js +++ b/tests/baselines/reference/parserMemberVariableDeclaration1.js @@ -6,5 +6,6 @@ class C { } //// [parserMemberVariableDeclaration1.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserMemberVariableDeclaration2.js b/tests/baselines/reference/parserMemberVariableDeclaration2.js index af443b6d1cf23..af23d911b81d4 100644 --- a/tests/baselines/reference/parserMemberVariableDeclaration2.js +++ b/tests/baselines/reference/parserMemberVariableDeclaration2.js @@ -6,5 +6,6 @@ class C { } //// [parserMemberVariableDeclaration2.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserMemberVariableDeclaration3.js b/tests/baselines/reference/parserMemberVariableDeclaration3.js index 759e32102bb55..53b387a84eadf 100644 --- a/tests/baselines/reference/parserMemberVariableDeclaration3.js +++ b/tests/baselines/reference/parserMemberVariableDeclaration3.js @@ -6,5 +6,6 @@ class C { } //// [parserMemberVariableDeclaration3.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserMemberVariableDeclaration4.js b/tests/baselines/reference/parserMemberVariableDeclaration4.js index 532d8fbac452b..aa9b62d856f79 100644 --- a/tests/baselines/reference/parserMemberVariableDeclaration4.js +++ b/tests/baselines/reference/parserMemberVariableDeclaration4.js @@ -6,5 +6,6 @@ class C { } //// [parserMemberVariableDeclaration4.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserMemberVariableDeclaration5.js b/tests/baselines/reference/parserMemberVariableDeclaration5.js index 03a8081d548f7..b9162b9e46986 100644 --- a/tests/baselines/reference/parserMemberVariableDeclaration5.js +++ b/tests/baselines/reference/parserMemberVariableDeclaration5.js @@ -6,5 +6,6 @@ class C { } //// [parserMemberVariableDeclaration5.js] +"use strict"; class C { } diff --git a/tests/baselines/reference/parserMethodSignature1.js b/tests/baselines/reference/parserMethodSignature1.js index 1003943226522..c4bfd81b417b2 100644 --- a/tests/baselines/reference/parserMethodSignature1.js +++ b/tests/baselines/reference/parserMethodSignature1.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature1.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature10.js b/tests/baselines/reference/parserMethodSignature10.js index c4c04351c777b..872af6271fe56 100644 --- a/tests/baselines/reference/parserMethodSignature10.js +++ b/tests/baselines/reference/parserMethodSignature10.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature10.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature11.js b/tests/baselines/reference/parserMethodSignature11.js index 22d919428429c..c76ff71e79772 100644 --- a/tests/baselines/reference/parserMethodSignature11.js +++ b/tests/baselines/reference/parserMethodSignature11.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature11.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature12.js b/tests/baselines/reference/parserMethodSignature12.js index 4c72aadc38ccc..3185fcdcac805 100644 --- a/tests/baselines/reference/parserMethodSignature12.js +++ b/tests/baselines/reference/parserMethodSignature12.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature12.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature2.js b/tests/baselines/reference/parserMethodSignature2.js index 3b8d6daa5b865..5c94e1838d31a 100644 --- a/tests/baselines/reference/parserMethodSignature2.js +++ b/tests/baselines/reference/parserMethodSignature2.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature2.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature3.js b/tests/baselines/reference/parserMethodSignature3.js index 17bbec24d4173..bbc4dda313fef 100644 --- a/tests/baselines/reference/parserMethodSignature3.js +++ b/tests/baselines/reference/parserMethodSignature3.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature3.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature4.js b/tests/baselines/reference/parserMethodSignature4.js index e9768dced2c32..9f4df16feade9 100644 --- a/tests/baselines/reference/parserMethodSignature4.js +++ b/tests/baselines/reference/parserMethodSignature4.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature4.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature5.js b/tests/baselines/reference/parserMethodSignature5.js index 7fbb68238d8e8..0c726f4b39ef2 100644 --- a/tests/baselines/reference/parserMethodSignature5.js +++ b/tests/baselines/reference/parserMethodSignature5.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature5.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature6.js b/tests/baselines/reference/parserMethodSignature6.js index 718c05a84da39..23e55141185fb 100644 --- a/tests/baselines/reference/parserMethodSignature6.js +++ b/tests/baselines/reference/parserMethodSignature6.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature6.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature7.js b/tests/baselines/reference/parserMethodSignature7.js index e94f8fb3edfbf..e850d6994ad6e 100644 --- a/tests/baselines/reference/parserMethodSignature7.js +++ b/tests/baselines/reference/parserMethodSignature7.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature7.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature8.js b/tests/baselines/reference/parserMethodSignature8.js index 8b0be3048c911..a53c85d350a8e 100644 --- a/tests/baselines/reference/parserMethodSignature8.js +++ b/tests/baselines/reference/parserMethodSignature8.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature8.js] +"use strict"; diff --git a/tests/baselines/reference/parserMethodSignature9.js b/tests/baselines/reference/parserMethodSignature9.js index d017b40710f4b..bcf2d2ae29396 100644 --- a/tests/baselines/reference/parserMethodSignature9.js +++ b/tests/baselines/reference/parserMethodSignature9.js @@ -6,3 +6,4 @@ interface I { } //// [parserMethodSignature9.js] +"use strict"; diff --git a/tests/baselines/reference/parserMissingLambdaOpenBrace1.js b/tests/baselines/reference/parserMissingLambdaOpenBrace1.js index 366449ecd9be6..8465a03f165a0 100644 --- a/tests/baselines/reference/parserMissingLambdaOpenBrace1.js +++ b/tests/baselines/reference/parserMissingLambdaOpenBrace1.js @@ -11,6 +11,7 @@ class C { } //// [parserMissingLambdaOpenBrace1.js] +"use strict"; class C { where(filter) { return fromDoWhile(test => { diff --git a/tests/baselines/reference/parserModifierOnPropertySignature1.js b/tests/baselines/reference/parserModifierOnPropertySignature1.js index b427c8d04c7a1..367a0b8ddd11f 100644 --- a/tests/baselines/reference/parserModifierOnPropertySignature1.js +++ b/tests/baselines/reference/parserModifierOnPropertySignature1.js @@ -7,3 +7,4 @@ interface Foo{ //// [parserModifierOnPropertySignature1.js] +"use strict"; diff --git a/tests/baselines/reference/parserModifierOnPropertySignature2.js b/tests/baselines/reference/parserModifierOnPropertySignature2.js index 51b23812e5581..510b86c9dbe1a 100644 --- a/tests/baselines/reference/parserModifierOnPropertySignature2.js +++ b/tests/baselines/reference/parserModifierOnPropertySignature2.js @@ -8,3 +8,4 @@ interface Foo{ //// [parserModifierOnPropertySignature2.js] +"use strict"; diff --git a/tests/baselines/reference/parserModuleDeclaration11.js b/tests/baselines/reference/parserModuleDeclaration11.js index 8dcbdc0e85f42..60c6b01285718 100644 --- a/tests/baselines/reference/parserModuleDeclaration11.js +++ b/tests/baselines/reference/parserModuleDeclaration11.js @@ -10,5 +10,6 @@ var x: string.X; //// [parserModuleDeclaration11.js] +"use strict"; string.foo("abc"); var x; diff --git a/tests/baselines/reference/parserObjectType3.js b/tests/baselines/reference/parserObjectType3.js index 6291a9337de39..391740eaea995 100644 --- a/tests/baselines/reference/parserObjectType3.js +++ b/tests/baselines/reference/parserObjectType3.js @@ -7,4 +7,5 @@ var v: { }; //// [parserObjectType3.js] +"use strict"; var v; diff --git a/tests/baselines/reference/parserObjectType4.js b/tests/baselines/reference/parserObjectType4.js index 8397f945c1154..73c861499d237 100644 --- a/tests/baselines/reference/parserObjectType4.js +++ b/tests/baselines/reference/parserObjectType4.js @@ -7,4 +7,5 @@ var v: { }; //// [parserObjectType4.js] +"use strict"; var v; diff --git a/tests/baselines/reference/parserObjectType5.js b/tests/baselines/reference/parserObjectType5.js index 94bbff4818b2c..d3332cf4e6f4b 100644 --- a/tests/baselines/reference/parserObjectType5.js +++ b/tests/baselines/reference/parserObjectType5.js @@ -7,4 +7,5 @@ var v: { }; //// [parserObjectType5.js] +"use strict"; var v; diff --git a/tests/baselines/reference/parserParameterList1.js b/tests/baselines/reference/parserParameterList1.js index 4c7a3e0366e38..6b66c79cabe78 100644 --- a/tests/baselines/reference/parserParameterList1.js +++ b/tests/baselines/reference/parserParameterList1.js @@ -6,6 +6,7 @@ class C { } //// [parserParameterList1.js] +"use strict"; class C { F(...A, B) { } } diff --git a/tests/baselines/reference/parserParameterList10.js b/tests/baselines/reference/parserParameterList10.js index d93e65bcb4494..d7d817c0f0774 100644 --- a/tests/baselines/reference/parserParameterList10.js +++ b/tests/baselines/reference/parserParameterList10.js @@ -6,6 +6,7 @@ class C { } //// [parserParameterList10.js] +"use strict"; class C { foo(...bar = 0) { } } diff --git a/tests/baselines/reference/parserParameterList12.js b/tests/baselines/reference/parserParameterList12.js index 79c43fc7ed600..1ae6589ac5c3b 100644 --- a/tests/baselines/reference/parserParameterList12.js +++ b/tests/baselines/reference/parserParameterList12.js @@ -5,5 +5,6 @@ function F(a,) { } //// [parserParameterList12.js] +"use strict"; function F(a) { } diff --git a/tests/baselines/reference/parserParameterList13.js b/tests/baselines/reference/parserParameterList13.js index 3be2e2bb11947..8ad401ae46167 100644 --- a/tests/baselines/reference/parserParameterList13.js +++ b/tests/baselines/reference/parserParameterList13.js @@ -6,3 +6,4 @@ interface I { } //// [parserParameterList13.js] +"use strict"; diff --git a/tests/baselines/reference/parserParameterList14.js b/tests/baselines/reference/parserParameterList14.js index d8d3dd96de143..e6d2268608136 100644 --- a/tests/baselines/reference/parserParameterList14.js +++ b/tests/baselines/reference/parserParameterList14.js @@ -6,3 +6,4 @@ declare class C { } //// [parserParameterList14.js] +"use strict"; diff --git a/tests/baselines/reference/parserParameterList15.js b/tests/baselines/reference/parserParameterList15.js index 9cb3497c815c8..1f7f05ee28d2a 100644 --- a/tests/baselines/reference/parserParameterList15.js +++ b/tests/baselines/reference/parserParameterList15.js @@ -5,4 +5,5 @@ function foo(a = 4); function foo(a, b) {} //// [parserParameterList15.js] +"use strict"; function foo(a, b) { } diff --git a/tests/baselines/reference/parserParameterList16.js b/tests/baselines/reference/parserParameterList16.js index 3e34698332af2..9b561d960e6a8 100644 --- a/tests/baselines/reference/parserParameterList16.js +++ b/tests/baselines/reference/parserParameterList16.js @@ -7,6 +7,7 @@ class C { } //// [parserParameterList16.js] +"use strict"; class C { foo(a, b) { } } diff --git a/tests/baselines/reference/parserParameterList17.js b/tests/baselines/reference/parserParameterList17.js index 707ad6f115846..93372ea2a1404 100644 --- a/tests/baselines/reference/parserParameterList17.js +++ b/tests/baselines/reference/parserParameterList17.js @@ -7,6 +7,7 @@ class C { } //// [parserParameterList17.js] +"use strict"; class C { constructor(a, b) { } } diff --git a/tests/baselines/reference/parserParameterList3.js b/tests/baselines/reference/parserParameterList3.js index 1ea4dfdc8c598..25b73bb7809a5 100644 --- a/tests/baselines/reference/parserParameterList3.js +++ b/tests/baselines/reference/parserParameterList3.js @@ -6,6 +6,7 @@ class C { } //// [parserParameterList3.js] +"use strict"; class C { F(A, B) { } } diff --git a/tests/baselines/reference/parserParameterList4.js b/tests/baselines/reference/parserParameterList4.js index 966370f36b501..dc24082eb66d3 100644 --- a/tests/baselines/reference/parserParameterList4.js +++ b/tests/baselines/reference/parserParameterList4.js @@ -5,5 +5,6 @@ function F(public A) { } //// [parserParameterList4.js] +"use strict"; function F(A) { } diff --git a/tests/baselines/reference/parserParameterList5.js b/tests/baselines/reference/parserParameterList5.js index 8eb2fa3a69143..f94080e3c0958 100644 --- a/tests/baselines/reference/parserParameterList5.js +++ b/tests/baselines/reference/parserParameterList5.js @@ -5,5 +5,6 @@ function A(): (public B) => C { } //// [parserParameterList5.js] +"use strict"; function A() { } diff --git a/tests/baselines/reference/parserParameterList6.js b/tests/baselines/reference/parserParameterList6.js index 8f85fb508800a..0a577ad1bf2ff 100644 --- a/tests/baselines/reference/parserParameterList6.js +++ b/tests/baselines/reference/parserParameterList6.js @@ -7,6 +7,7 @@ class C { } //// [parserParameterList6.js] +"use strict"; class C { constructor(C) { } diff --git a/tests/baselines/reference/parserParameterList9.js b/tests/baselines/reference/parserParameterList9.js index f420d00d051da..3d441c6bf18b4 100644 --- a/tests/baselines/reference/parserParameterList9.js +++ b/tests/baselines/reference/parserParameterList9.js @@ -6,6 +6,7 @@ class C { } //// [parserParameterList9.js] +"use strict"; class C { foo(...bar) { } } diff --git a/tests/baselines/reference/parserPropertySignature1.js b/tests/baselines/reference/parserPropertySignature1.js index a7ebdc415f584..90371b6decada 100644 --- a/tests/baselines/reference/parserPropertySignature1.js +++ b/tests/baselines/reference/parserPropertySignature1.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature1.js] +"use strict"; diff --git a/tests/baselines/reference/parserPropertySignature10.js b/tests/baselines/reference/parserPropertySignature10.js index 3e4b3af69dd75..56c6f415fe1db 100644 --- a/tests/baselines/reference/parserPropertySignature10.js +++ b/tests/baselines/reference/parserPropertySignature10.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature10.js] +"use strict"; diff --git a/tests/baselines/reference/parserPropertySignature11.js b/tests/baselines/reference/parserPropertySignature11.js index 6ff954c59113b..7f9e5cbb13c3a 100644 --- a/tests/baselines/reference/parserPropertySignature11.js +++ b/tests/baselines/reference/parserPropertySignature11.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature11.js] +"use strict"; diff --git a/tests/baselines/reference/parserPropertySignature12.js b/tests/baselines/reference/parserPropertySignature12.js index ee8fcacfaee06..eada5fba46a73 100644 --- a/tests/baselines/reference/parserPropertySignature12.js +++ b/tests/baselines/reference/parserPropertySignature12.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature12.js] +"use strict"; diff --git a/tests/baselines/reference/parserPropertySignature2.js b/tests/baselines/reference/parserPropertySignature2.js index 64ac70ba47199..5ad64b1f81e93 100644 --- a/tests/baselines/reference/parserPropertySignature2.js +++ b/tests/baselines/reference/parserPropertySignature2.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature2.js] +"use strict"; diff --git a/tests/baselines/reference/parserPropertySignature5.js b/tests/baselines/reference/parserPropertySignature5.js index 009e9dc4c2ba1..40533ae48796c 100644 --- a/tests/baselines/reference/parserPropertySignature5.js +++ b/tests/baselines/reference/parserPropertySignature5.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature5.js] +"use strict"; diff --git a/tests/baselines/reference/parserPropertySignature6.js b/tests/baselines/reference/parserPropertySignature6.js index 993897d42c3d5..8e749ac999397 100644 --- a/tests/baselines/reference/parserPropertySignature6.js +++ b/tests/baselines/reference/parserPropertySignature6.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature6.js] +"use strict"; diff --git a/tests/baselines/reference/parserPropertySignature9.js b/tests/baselines/reference/parserPropertySignature9.js index 3ea24f5ae6689..7f52f4c4163d5 100644 --- a/tests/baselines/reference/parserPropertySignature9.js +++ b/tests/baselines/reference/parserPropertySignature9.js @@ -6,3 +6,4 @@ interface I { } //// [parserPropertySignature9.js] +"use strict"; diff --git a/tests/baselines/reference/parserRealSource1.js b/tests/baselines/reference/parserRealSource1.js index 9fa4921094c7f..55213fc17f400 100644 --- a/tests/baselines/reference/parserRealSource1.js +++ b/tests/baselines/reference/parserRealSource1.js @@ -157,6 +157,7 @@ namespace TypeScript { //// [parserRealSource1.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 74b77e22d591c..4f791a8da9a49 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -458,6 +458,7 @@ namespace TypeScript { } //// [parserRealSource10.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index d2ed6100cf398..b16f57a4770e0 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2367,6 +2367,7 @@ namespace TypeScript { } //// [parserRealSource11.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource12.js b/tests/baselines/reference/parserRealSource12.js index 0f663c301b36b..5f959fc58c677 100644 --- a/tests/baselines/reference/parserRealSource12.js +++ b/tests/baselines/reference/parserRealSource12.js @@ -533,6 +533,7 @@ namespace TypeScript { } //// [parserRealSource12.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource13.js b/tests/baselines/reference/parserRealSource13.js index 602aa96e83007..3de2ee8ddea63 100644 --- a/tests/baselines/reference/parserRealSource13.js +++ b/tests/baselines/reference/parserRealSource13.js @@ -149,6 +149,7 @@ namespace TypeScript.AstWalkerWithDetailCallback { } //// [parserRealSource13.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource14.js b/tests/baselines/reference/parserRealSource14.js index 67f4a85bf1f58..c63575f75fd6d 100644 --- a/tests/baselines/reference/parserRealSource14.js +++ b/tests/baselines/reference/parserRealSource14.js @@ -578,6 +578,7 @@ namespace TypeScript { //// [parserRealSource14.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource2.js b/tests/baselines/reference/parserRealSource2.js index da668bba35cb3..9db7bd7ada67f 100644 --- a/tests/baselines/reference/parserRealSource2.js +++ b/tests/baselines/reference/parserRealSource2.js @@ -274,6 +274,7 @@ namespace TypeScript { } //// [parserRealSource2.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource4.js b/tests/baselines/reference/parserRealSource4.js index ed1e22d7fa0e0..88644c06a5d33 100644 --- a/tests/baselines/reference/parserRealSource4.js +++ b/tests/baselines/reference/parserRealSource4.js @@ -298,6 +298,7 @@ namespace TypeScript { } //// [parserRealSource4.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource5.js b/tests/baselines/reference/parserRealSource5.js index 29eccb02bca75..f6ed57d42fb2c 100644 --- a/tests/baselines/reference/parserRealSource5.js +++ b/tests/baselines/reference/parserRealSource5.js @@ -69,6 +69,7 @@ namespace TypeScript { } //// [parserRealSource5.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRealSource9.js b/tests/baselines/reference/parserRealSource9.js index 7428d4477cfb5..af85e0b5ce8a6 100644 --- a/tests/baselines/reference/parserRealSource9.js +++ b/tests/baselines/reference/parserRealSource9.js @@ -212,6 +212,7 @@ namespace TypeScript { } //// [parserRealSource9.js] +"use strict"; // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// diff --git a/tests/baselines/reference/parserRegularExpression6.js b/tests/baselines/reference/parserRegularExpression6.js index b6142fd267d3b..62b5261ce418c 100644 --- a/tests/baselines/reference/parserRegularExpression6.js +++ b/tests/baselines/reference/parserRegularExpression6.js @@ -6,5 +6,6 @@ a /= 1; // parse as infix a = /=/; // parse as regexp //// [parserRegularExpression6.js] +"use strict"; a /= 1; // parse as infix a = /=/; // parse as regexp diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity6.js b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity6.js index 2e16e9e76771c..b566c2b588a41 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity6.js +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity6.js @@ -25,6 +25,7 @@ function c255lsqr8h(a7, a6, a5, a4, a3, a2, a1, a0) { //// [parserRegularExpressionDivideAmbiguity6.js] +"use strict"; function c255lsqr8h(a7, a6, a5, a4, a3, a2, a1, a0) { let r = []; let v; diff --git a/tests/baselines/reference/parserS12.11_A3_T4.js b/tests/baselines/reference/parserS12.11_A3_T4.js index 08df23bfa31c0..2c5b7b52b87ca 100644 --- a/tests/baselines/reference/parserS12.11_A3_T4.js +++ b/tests/baselines/reference/parserS12.11_A3_T4.js @@ -31,6 +31,7 @@ var x = SwitchTest(0); //// [parserS12.11_A3_T4.js] +"use strict"; // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** diff --git a/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es2015).js b/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es2015).js index 6160420dc8543..8b9b767abbb94 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es2015).js +++ b/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es2015).js @@ -7,6 +7,7 @@ class C { } //// [parserSetAccessorWithTypeAnnotation1.js] +"use strict"; class C { set foo(v): number { } diff --git a/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es5).js b/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es5).js index e58318d599673..3a0ceb0ca2dbf 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es5).js +++ b/tests/baselines/reference/parserSetAccessorWithTypeAnnotation1(target=es5).js @@ -7,6 +7,7 @@ class C { } //// [parserSetAccessorWithTypeAnnotation1.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es2015).js b/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es2015).js index 9654ee5a2abfc..fa7a450d48463 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es2015).js +++ b/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es2015).js @@ -6,6 +6,7 @@ class C { } //// [parserSetAccessorWithTypeParameters1.js] +"use strict"; class C { set foo(v) { } } diff --git a/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es5).js b/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es5).js index d876e1c15ac5c..3267c6c5320ab 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es5).js +++ b/tests/baselines/reference/parserSetAccessorWithTypeParameters1(target=es5).js @@ -6,6 +6,7 @@ class C { } //// [parserSetAccessorWithTypeParameters1.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).js b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).js new file mode 100644 index 0000000000000..03e70305b7ff0 --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).js @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// + +//// [parserStatementIsNotAMemberVariableDeclaration1.ts] +return { + + "set": function (key, value) { + + // 'private' should not be considered a member variable here. + private[key] = value; + + } + +}; + +//// [parserStatementIsNotAMemberVariableDeclaration1.js] +return { + "set": function (key, value) { + // 'private' should not be considered a member variable here. + private[key] = value; + } +}; diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).js b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).js new file mode 100644 index 0000000000000..4adbe2d89ab23 --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).js @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// + +//// [parserStatementIsNotAMemberVariableDeclaration1.ts] +return { + + "set": function (key, value) { + + // 'private' should not be considered a member variable here. + private[key] = value; + + } + +}; + +//// [parserStatementIsNotAMemberVariableDeclaration1.js] +"use strict"; +return { + "set": function (key, value) { + // 'private' should not be considered a member variable here. + private[key] = value; + } +}; diff --git a/tests/baselines/reference/parserUsingConstructorAsIdentifier.js b/tests/baselines/reference/parserUsingConstructorAsIdentifier.js index 5068ed23601b5..67ea1b238471b 100644 --- a/tests/baselines/reference/parserUsingConstructorAsIdentifier.js +++ b/tests/baselines/reference/parserUsingConstructorAsIdentifier.js @@ -42,6 +42,7 @@ } //// [parserUsingConstructorAsIdentifier.js] +"use strict"; function define(constructor, instanceMembers, staticMembers) { constructor = constructor || function () { }; PluginUtilities.Utilities.markSupportedForProcessing(constructor); diff --git a/tests/baselines/reference/parserVariableDeclaration4.js b/tests/baselines/reference/parserVariableDeclaration4.js index c2c5fd63f6359..fd2d0f160aa50 100644 --- a/tests/baselines/reference/parserVariableDeclaration4.js +++ b/tests/baselines/reference/parserVariableDeclaration4.js @@ -6,3 +6,4 @@ declare namespace M { } //// [parserVariableDeclaration4.js] +"use strict"; diff --git a/tests/baselines/reference/parserX_ArrowFunction4.js b/tests/baselines/reference/parserX_ArrowFunction4.js index a0c4e2713b382..7a4a3887dfcda 100644 --- a/tests/baselines/reference/parserX_ArrowFunction4.js +++ b/tests/baselines/reference/parserX_ArrowFunction4.js @@ -6,5 +6,6 @@ var v = (a, b) => { }; //// [parserX_ArrowFunction4.js] +"use strict"; var v = (a, b) => { }; diff --git a/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js b/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js index b3ecb7e707082..617059425a228 100644 --- a/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js +++ b/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js @@ -8,6 +8,7 @@ class C { //// [parsingClassRecoversWhenHittingUnexpectedSemicolon.js] +"use strict"; class C { f() { } ; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 3dfff2a7b25cb..c21d3e6a612c1 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -18,6 +18,7 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] +"use strict"; class C { } class D extends C { diff --git a/tests/baselines/reference/plusOperatorWithAnyOtherType.js b/tests/baselines/reference/plusOperatorWithAnyOtherType.js index 77fc65190dac8..97f657c7b3a82 100644 --- a/tests/baselines/reference/plusOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/plusOperatorWithAnyOtherType.js @@ -59,6 +59,7 @@ var ResultIsNumber19 = +(undefined + undefined); +M.n; //// [plusOperatorWithAnyOtherType.js] +"use strict"; // + operator on any type var ANY2 = ["", ""]; var obj1 = { x: (s) => { }, y: (s1) => { } }; diff --git a/tests/baselines/reference/predicateSemantics.js b/tests/baselines/reference/predicateSemantics.js index 8ccfa9504ad3e..20523927defec 100644 --- a/tests/baselines/reference/predicateSemantics.js +++ b/tests/baselines/reference/predicateSemantics.js @@ -94,6 +94,7 @@ tag`foo${1}` ?? 32; // ok //// [predicateSemantics.js] +"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; // OK: One or other operand is possibly nullish const test1 = (_a = (opt ? undefined : 32)) !== null && _a !== void 0 ? _a : "possibly reached"; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 1962d25f3e3ab..6acac5b357600 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -34,6 +34,7 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] +"use strict"; var x = 5; var r = /yo/; r.source; diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.js b/tests/baselines/reference/primtiveTypesAreIdentical.js index 29305dcb1b65f..6eed87da50550 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.js +++ b/tests/baselines/reference/primtiveTypesAreIdentical.js @@ -34,6 +34,7 @@ function foo7(x: void); function foo7(x: any) { } //// [primtiveTypesAreIdentical.js] +"use strict"; // primitive types are identical to themselves so these overloads will all cause errors function foo1(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/privacyGloImport.js b/tests/baselines/reference/privacyGloImport.js index 6020a64894fd3..96d16e1fd3b40 100644 --- a/tests/baselines/reference/privacyGloImport.js +++ b/tests/baselines/reference/privacyGloImport.js @@ -155,6 +155,7 @@ namespace m2 { } //// [privacyGloImport.js] +"use strict"; var m1; (function (m1) { let m1_M1_public; diff --git a/tests/baselines/reference/privacyGloImportParseErrors.js b/tests/baselines/reference/privacyGloImportParseErrors.js index 226844fb7310f..a69364d967ee2 100644 --- a/tests/baselines/reference/privacyGloImportParseErrors.js +++ b/tests/baselines/reference/privacyGloImportParseErrors.js @@ -155,6 +155,7 @@ namespace m2 { } //// [privacyGloImportParseErrors.js] +"use strict"; var m1; (function (m1) { let m1_M1_public; diff --git a/tests/baselines/reference/privacyGloInterface.js b/tests/baselines/reference/privacyGloInterface.js index 5c1130590aa25..c485f0230dfe5 100644 --- a/tests/baselines/reference/privacyGloInterface.js +++ b/tests/baselines/reference/privacyGloInterface.js @@ -122,6 +122,7 @@ interface glo_C3_public extends glo_i_public { //// [privacyGloInterface.js] +"use strict"; var m1; (function (m1) { class C1_public { diff --git a/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js b/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js index b3fd02d95c5c2..6c52ed70c92df 100644 --- a/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js @@ -97,6 +97,7 @@ interface publicInterfaceImplementingPublicInterfaceInGlobal extends publicInter "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //// [privacyInterfaceExtendsClauseDeclFile_GlobalFile.js] +"use strict"; //// [privacyInterfaceExtendsClauseDeclFile_externalModule.d.ts] diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js index dcdcf0e850bf1..4204a68616803 100644 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js @@ -34,6 +34,7 @@ class C2 { //// [privateClassPropertyAccessibleWithinClass.js] +"use strict"; // no errors class C { get y() { return this.x; } diff --git a/tests/baselines/reference/privateIndexer2.js b/tests/baselines/reference/privateIndexer2.js index 46bdc4e0700c0..17980d4d3c1d1 100644 --- a/tests/baselines/reference/privateIndexer2.js +++ b/tests/baselines/reference/privateIndexer2.js @@ -12,6 +12,7 @@ var y: { } //// [privateIndexer2.js] +"use strict"; // private indexers not allowed var x = { [x]: string, string diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility(target=es2015).js b/tests/baselines/reference/privateInstanceMemberAccessibility(target=es2015).js index b78f15491dc29..a52f02bf54a97 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility(target=es2015).js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility(target=es2015).js @@ -16,6 +16,7 @@ class Derived extends Base { } //// [privateInstanceMemberAccessibility.js] +"use strict"; class Base { } class Derived extends Base { diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility(target=es5).js b/tests/baselines/reference/privateInstanceMemberAccessibility(target=es5).js index e1675acb21c0c..bae13e7f22e01 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility(target=es5).js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility(target=es5).js @@ -16,6 +16,7 @@ class Derived extends Base { } //// [privateInstanceMemberAccessibility.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/privateNameAccessorsCallExpression.js b/tests/baselines/reference/privateNameAccessorsCallExpression.js index 3d6df4db9528e..114a87ec261c3 100644 --- a/tests/baselines/reference/privateNameAccessorsCallExpression.js +++ b/tests/baselines/reference/privateNameAccessorsCallExpression.js @@ -21,6 +21,7 @@ class A { } //// [privateNameAccessorsCallExpression.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameBadSuper.js b/tests/baselines/reference/privateNameBadSuper.js index 0194e39a45f05..dee04b2760b09 100644 --- a/tests/baselines/reference/privateNameBadSuper.js +++ b/tests/baselines/reference/privateNameBadSuper.js @@ -11,6 +11,7 @@ class A extends B { } //// [privateNameBadSuper.js] +"use strict"; var _A_x; class B { } diff --git a/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=es2022).js b/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=es2022).js index ee7ceb1ccb22d..ebe39af34f37f 100644 --- a/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=es2022).js +++ b/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=es2022).js @@ -12,6 +12,7 @@ class A extends B { //// [privateNameBadSuperUseDefineForClassFields.js] +"use strict"; class B { } ; diff --git a/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=esnext).js b/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=esnext).js index ee7ceb1ccb22d..ebe39af34f37f 100644 --- a/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=esnext).js +++ b/tests/baselines/reference/privateNameBadSuperUseDefineForClassFields(target=esnext).js @@ -12,6 +12,7 @@ class A extends B { //// [privateNameBadSuperUseDefineForClassFields.js] +"use strict"; class B { } ; diff --git a/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).js b/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).js index 1fda52ab934e6..eb88de36f5d44 100644 --- a/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).js +++ b/tests/baselines/reference/privateNameComputedPropertyName3(target=es2015).js @@ -27,6 +27,7 @@ console.log(new Foo("NAME").getValue(100)); //// [privateNameComputedPropertyName3.js] +"use strict"; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); diff --git a/tests/baselines/reference/privateNameComputedPropertyName3(target=es2022).js b/tests/baselines/reference/privateNameComputedPropertyName3(target=es2022).js index d911eaa76ebb8..f4bcfecbe9fbd 100644 --- a/tests/baselines/reference/privateNameComputedPropertyName3(target=es2022).js +++ b/tests/baselines/reference/privateNameComputedPropertyName3(target=es2022).js @@ -27,6 +27,7 @@ console.log(new Foo("NAME").getValue(100)); //// [privateNameComputedPropertyName3.js] +"use strict"; class Foo { #name; constructor(name) { diff --git a/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).js b/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).js index d911eaa76ebb8..f4bcfecbe9fbd 100644 --- a/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).js +++ b/tests/baselines/reference/privateNameComputedPropertyName3(target=esnext).js @@ -27,6 +27,7 @@ console.log(new Foo("NAME").getValue(100)); //// [privateNameComputedPropertyName3.js] +"use strict"; class Foo { #name; constructor(name) { diff --git a/tests/baselines/reference/privateNameConstructorSignature.js b/tests/baselines/reference/privateNameConstructorSignature.js index c6210e97b1157..0407119fdda76 100644 --- a/tests/baselines/reference/privateNameConstructorSignature.js +++ b/tests/baselines/reference/privateNameConstructorSignature.js @@ -20,6 +20,7 @@ interface C { //// [privateNameConstructorSignature.js] +"use strict"; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); diff --git a/tests/baselines/reference/privateNameDeclarationMerging.js b/tests/baselines/reference/privateNameDeclarationMerging.js index f3a55fb886c5d..b93513eeb53a8 100644 --- a/tests/baselines/reference/privateNameDeclarationMerging.js +++ b/tests/baselines/reference/privateNameDeclarationMerging.js @@ -18,6 +18,7 @@ interface C { //// [privateNameDeclarationMerging.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameFieldCallExpression.js b/tests/baselines/reference/privateNameFieldCallExpression.js index cc25a7a94c18d..5cc18ebef2e52 100644 --- a/tests/baselines/reference/privateNameFieldCallExpression.js +++ b/tests/baselines/reference/privateNameFieldCallExpression.js @@ -23,6 +23,7 @@ class A { //// [privateNameFieldCallExpression.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameFieldInitializer.js b/tests/baselines/reference/privateNameFieldInitializer.js index 4f3b94a337ce8..9561efa3d6285 100644 --- a/tests/baselines/reference/privateNameFieldInitializer.js +++ b/tests/baselines/reference/privateNameFieldInitializer.js @@ -8,6 +8,7 @@ class A { //// [privateNameFieldInitializer.js] +"use strict"; var _A_field, _A_uninitialized; class A { constructor() { diff --git a/tests/baselines/reference/privateNameFieldsESNext(target=es2022).js b/tests/baselines/reference/privateNameFieldsESNext(target=es2022).js index b85485b40dfe9..d98595dc9a992 100644 --- a/tests/baselines/reference/privateNameFieldsESNext(target=es2022).js +++ b/tests/baselines/reference/privateNameFieldsESNext(target=es2022).js @@ -23,6 +23,7 @@ class C { //// [privateNameFieldsESNext.js] +"use strict"; class C { constructor() { this.a = 123; diff --git a/tests/baselines/reference/privateNameFieldsESNext(target=esnext).js b/tests/baselines/reference/privateNameFieldsESNext(target=esnext).js index b85485b40dfe9..d98595dc9a992 100644 --- a/tests/baselines/reference/privateNameFieldsESNext(target=esnext).js +++ b/tests/baselines/reference/privateNameFieldsESNext(target=esnext).js @@ -23,6 +23,7 @@ class C { //// [privateNameFieldsESNext.js] +"use strict"; class C { constructor() { this.a = 123; diff --git a/tests/baselines/reference/privateNameHashCharName.js b/tests/baselines/reference/privateNameHashCharName.js index 7dc181edad751..ee84d50ea7b87 100644 --- a/tests/baselines/reference/privateNameHashCharName.js +++ b/tests/baselines/reference/privateNameHashCharName.js @@ -13,6 +13,7 @@ class C { //// [privateNameHashCharName.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameLateSuper.js b/tests/baselines/reference/privateNameLateSuper.js index cac253cff463d..72d5e4181572a 100644 --- a/tests/baselines/reference/privateNameLateSuper.js +++ b/tests/baselines/reference/privateNameLateSuper.js @@ -12,6 +12,7 @@ class A extends B { //// [privateNameLateSuper.js] +"use strict"; var _A_x; class B { } diff --git a/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=es2022).js b/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=es2022).js index 1cf9259a0ae6e..8172467fe48fa 100644 --- a/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=es2022).js +++ b/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=es2022).js @@ -12,6 +12,7 @@ class A extends B { //// [privateNameLateSuperUseDefineForClassFields.js] +"use strict"; class B { } class A extends B { diff --git a/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=esnext).js b/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=esnext).js index 1cf9259a0ae6e..8172467fe48fa 100644 --- a/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=esnext).js +++ b/tests/baselines/reference/privateNameLateSuperUseDefineForClassFields(target=esnext).js @@ -12,6 +12,7 @@ class A extends B { //// [privateNameLateSuperUseDefineForClassFields.js] +"use strict"; class B { } class A extends B { diff --git a/tests/baselines/reference/privateNameMethodCallExpression.js b/tests/baselines/reference/privateNameMethodCallExpression.js index 3b22b46875ce9..96d6a37cc3b12 100644 --- a/tests/baselines/reference/privateNameMethodCallExpression.js +++ b/tests/baselines/reference/privateNameMethodCallExpression.js @@ -27,6 +27,7 @@ class AA { //// [privateNameMethodCallExpression.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameNestedClassFieldShadowing.js b/tests/baselines/reference/privateNameNestedClassFieldShadowing.js index 58dda140c9253..4e0c843d1ebc9 100644 --- a/tests/baselines/reference/privateNameNestedClassFieldShadowing.js +++ b/tests/baselines/reference/privateNameNestedClassFieldShadowing.js @@ -18,6 +18,7 @@ class Base { //// [privateNameNestedClassFieldShadowing.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameSetterNoGetter.js b/tests/baselines/reference/privateNameSetterNoGetter.js index e5313f6af59fa..359e43535b59c 100644 --- a/tests/baselines/reference/privateNameSetterNoGetter.js +++ b/tests/baselines/reference/privateNameSetterNoGetter.js @@ -12,6 +12,7 @@ console.log(new C().m()); //// [privateNameSetterNoGetter.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameStaticAccessorsCallExpression.js b/tests/baselines/reference/privateNameStaticAccessorsCallExpression.js index 111034c355a44..18a8bbc520735 100644 --- a/tests/baselines/reference/privateNameStaticAccessorsCallExpression.js +++ b/tests/baselines/reference/privateNameStaticAccessorsCallExpression.js @@ -21,6 +21,7 @@ class A { } //// [privateNameStaticAccessorsCallExpression.js] +"use strict"; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); diff --git a/tests/baselines/reference/privateNameStaticFieldCallExpression.js b/tests/baselines/reference/privateNameStaticFieldCallExpression.js index a31a36358b9fd..38788f3d6220c 100644 --- a/tests/baselines/reference/privateNameStaticFieldCallExpression.js +++ b/tests/baselines/reference/privateNameStaticFieldCallExpression.js @@ -23,6 +23,7 @@ class A { //// [privateNameStaticFieldCallExpression.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2015).js b/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2015).js index 80d08b3d4bb7d..b4b3e58e93518 100644 --- a/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2015).js +++ b/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2015).js @@ -8,6 +8,7 @@ class A { //// [privateNameStaticFieldInitializer.js] +"use strict"; var _a, _A_field, _A_uninitialized; class A { } diff --git a/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2022).js b/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2022).js index cae2bd319f51e..ee3b972136a0f 100644 --- a/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2022).js +++ b/tests/baselines/reference/privateNameStaticFieldInitializer(target=es2022).js @@ -8,6 +8,7 @@ class A { //// [privateNameStaticFieldInitializer.js] +"use strict"; class A { static #field = 10; static #uninitialized; diff --git a/tests/baselines/reference/privateNameStaticFieldInitializer(target=esnext).js b/tests/baselines/reference/privateNameStaticFieldInitializer(target=esnext).js index cae2bd319f51e..ee3b972136a0f 100644 --- a/tests/baselines/reference/privateNameStaticFieldInitializer(target=esnext).js +++ b/tests/baselines/reference/privateNameStaticFieldInitializer(target=esnext).js @@ -8,6 +8,7 @@ class A { //// [privateNameStaticFieldInitializer.js] +"use strict"; class A { static #field = 10; static #uninitialized; diff --git a/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2015).js b/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2015).js index 06cdca1bdd7ca..40bc9b69a3099 100644 --- a/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2015).js +++ b/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2015).js @@ -11,6 +11,7 @@ class C2 { //// [privateNameStaticFieldNoInitializer.js] +"use strict"; var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); diff --git a/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2022).js b/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2022).js index a2519ccacbf33..5b73cea4ffe82 100644 --- a/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2022).js +++ b/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=es2022).js @@ -11,6 +11,7 @@ class C2 { //// [privateNameStaticFieldNoInitializer.js] +"use strict"; const C = class { static #x; }; diff --git a/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=esnext).js b/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=esnext).js index a2519ccacbf33..5b73cea4ffe82 100644 --- a/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=esnext).js +++ b/tests/baselines/reference/privateNameStaticFieldNoInitializer(target=esnext).js @@ -11,6 +11,7 @@ class C2 { //// [privateNameStaticFieldNoInitializer.js] +"use strict"; const C = class { static #x; }; diff --git a/tests/baselines/reference/privateNameStaticMethodCallExpression.js b/tests/baselines/reference/privateNameStaticMethodCallExpression.js index 1f7ccfdf50f3f..b6ef055f96275 100644 --- a/tests/baselines/reference/privateNameStaticMethodCallExpression.js +++ b/tests/baselines/reference/privateNameStaticMethodCallExpression.js @@ -27,6 +27,7 @@ class AA { //// [privateNameStaticMethodCallExpression.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateNameWeakMapCollision.js b/tests/baselines/reference/privateNameWeakMapCollision.js index 6530a40cde031..adf156c0ba3ee 100644 --- a/tests/baselines/reference/privateNameWeakMapCollision.js +++ b/tests/baselines/reference/privateNameWeakMapCollision.js @@ -11,6 +11,7 @@ function test() { //// [privateNameWeakMapCollision.js] +"use strict"; function test() { var _C_x; let WeakMap; diff --git a/tests/baselines/reference/privateNamesInterfaceExtendingClass.js b/tests/baselines/reference/privateNamesInterfaceExtendingClass.js index e505624f35281..a613e84a7a2c4 100644 --- a/tests/baselines/reference/privateNamesInterfaceExtendingClass.js +++ b/tests/baselines/reference/privateNamesInterfaceExtendingClass.js @@ -16,6 +16,7 @@ function func(x: I) { //// [privateNamesInterfaceExtendingClass.js] +"use strict"; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); diff --git a/tests/baselines/reference/privateNamesUseBeforeDef.js b/tests/baselines/reference/privateNamesUseBeforeDef.js index bb6d1df304d21..c7805e66b1e1a 100644 --- a/tests/baselines/reference/privateNamesUseBeforeDef.js +++ b/tests/baselines/reference/privateNamesUseBeforeDef.js @@ -23,6 +23,7 @@ class B { //// [privateNamesUseBeforeDef.js] +"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index 4347dbae5b9c0..c57aff00be23a 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -27,6 +27,7 @@ function f({ priv, prot, privateMethod }: K) { //// [privateProtectedMembersAreNotAccessibleDestructuring.js] +"use strict"; class K { privateMethod() { } m() { diff --git a/tests/baselines/reference/promisePermutations.js b/tests/baselines/reference/promisePermutations.js index 43f037ae58eb7..7944d340e2eb5 100644 --- a/tests/baselines/reference/promisePermutations.js +++ b/tests/baselines/reference/promisePermutations.js @@ -170,6 +170,7 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok //// [promisePermutations.js] +"use strict"; var r1a = r1.then(testFunction, testFunction, testFunction); var r1b = r1.then(testFunction, testFunction, testFunction).then(testFunction, testFunction, testFunction); var r1c = r1.then(testFunctionP, testFunctionP, testFunctionP); diff --git a/tests/baselines/reference/promisePermutations2.js b/tests/baselines/reference/promisePermutations2.js index 70683471d9ed7..9166047cbebf6 100644 --- a/tests/baselines/reference/promisePermutations2.js +++ b/tests/baselines/reference/promisePermutations2.js @@ -169,6 +169,7 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok //// [promisePermutations2.js] +"use strict"; // same as promisePermutations but without the same overloads in Promise var r1a = r1.then(testFunction, testFunction, testFunction); var r1b = r1.then(testFunction, testFunction, testFunction).then(testFunction, testFunction, testFunction); diff --git a/tests/baselines/reference/promisePermutations3.js b/tests/baselines/reference/promisePermutations3.js index 66616bf39a4a6..1e09807e97485 100644 --- a/tests/baselines/reference/promisePermutations3.js +++ b/tests/baselines/reference/promisePermutations3.js @@ -169,6 +169,7 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok //// [promisePermutations3.js] +"use strict"; // same as promisePermutations but without the same overloads in IPromise var r1a = r1.then(testFunction, testFunction, testFunction); var r1b = r1.then(testFunction, testFunction, testFunction).then(testFunction, testFunction, testFunction); diff --git a/tests/baselines/reference/promiseType.js b/tests/baselines/reference/promiseType.js index 4139e06e36035..7f3b176b58357 100644 --- a/tests/baselines/reference/promiseType.js +++ b/tests/baselines/reference/promiseType.js @@ -227,6 +227,7 @@ Promise.resolve(undefined as Promise | Promise>); Promise.resolve(undefined as Promise>>); //// [promiseType.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/promiseTypeInference.js b/tests/baselines/reference/promiseTypeInference.js index 9e0a32071c5a2..80fdb98d6326f 100644 --- a/tests/baselines/reference/promiseTypeInference.js +++ b/tests/baselines/reference/promiseTypeInference.js @@ -14,4 +14,5 @@ var $$x = load("something").then(s => convert(s)); //// [promiseTypeInference.js] +"use strict"; var $$x = load("something").then(s => convert(s)); diff --git a/tests/baselines/reference/promiseTypeInferenceUnion.js b/tests/baselines/reference/promiseTypeInferenceUnion.js index b436f3ad8acef..2a05e68ef901d 100644 --- a/tests/baselines/reference/promiseTypeInferenceUnion.js +++ b/tests/baselines/reference/promiseTypeInferenceUnion.js @@ -18,6 +18,7 @@ const g2: Promise = Promise.resolve(f2(42)); const g3: Promise = Promise.resolve(f3(42)); //// [promiseTypeInferenceUnion.js] +"use strict"; function f1(x) { return Promise.resolve(x); } diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index bc3cf83112bc4..62e39dc1fe2c4 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -153,6 +153,7 @@ var x3: A; //// [propertyAccess.js] +"use strict"; class A { } class B extends A { diff --git a/tests/baselines/reference/propertyAccess1.js b/tests/baselines/reference/propertyAccess1.js index c0d87e45058d9..fb953bf17e0ed 100644 --- a/tests/baselines/reference/propertyAccess1.js +++ b/tests/baselines/reference/propertyAccess1.js @@ -6,5 +6,6 @@ foo.a = 4; foo.b = 5; //// [propertyAccess1.js] +"use strict"; foo.a = 4; foo.b = 5; diff --git a/tests/baselines/reference/propertyAccess2.js b/tests/baselines/reference/propertyAccess2.js index 42cb441eed23e..e43557517f0f7 100644 --- a/tests/baselines/reference/propertyAccess2.js +++ b/tests/baselines/reference/propertyAccess2.js @@ -5,4 +5,5 @@ declare var foo: number; foo.toBAZ(); //// [propertyAccess2.js] +"use strict"; foo.toBAZ(); diff --git a/tests/baselines/reference/propertyAccess3.js b/tests/baselines/reference/propertyAccess3.js index 5a1ab127cb250..09212ad33f803 100644 --- a/tests/baselines/reference/propertyAccess3.js +++ b/tests/baselines/reference/propertyAccess3.js @@ -5,4 +5,5 @@ declare var foo: boolean; foo.toBAZ(); //// [propertyAccess3.js] +"use strict"; foo.toBAZ(); diff --git a/tests/baselines/reference/propertyAccess6.js b/tests/baselines/reference/propertyAccess6.js index 993bc5f9f27b3..f968c53f2b42b 100644 --- a/tests/baselines/reference/propertyAccess6.js +++ b/tests/baselines/reference/propertyAccess6.js @@ -5,5 +5,6 @@ var foo: any; foo.bar = 4; //// [propertyAccess6.js] +"use strict"; var foo; foo.bar = 4; diff --git a/tests/baselines/reference/propertyAccess7.js b/tests/baselines/reference/propertyAccess7.js index a5d0985631491..902c2ad1068e8 100644 --- a/tests/baselines/reference/propertyAccess7.js +++ b/tests/baselines/reference/propertyAccess7.js @@ -5,5 +5,6 @@ var foo: string; foo.toUpperCase(); //// [propertyAccess7.js] +"use strict"; var foo; foo.toUpperCase(); diff --git a/tests/baselines/reference/propertyAccessChain.2.js b/tests/baselines/reference/propertyAccessChain.2.js index 85604709ce83d..6b94892f84300 100644 --- a/tests/baselines/reference/propertyAccessChain.2.js +++ b/tests/baselines/reference/propertyAccessChain.2.js @@ -12,6 +12,7 @@ o3.b?.c; //// [propertyAccessChain.2.js] +"use strict"; var _a; o1 === null || o1 === void 0 ? void 0 : o1.b; o2 === null || o2 === void 0 ? void 0 : o2.b.c; diff --git a/tests/baselines/reference/propertyAccessExpressionInnerComments.js b/tests/baselines/reference/propertyAccessExpressionInnerComments.js index 37537a7337df1..3f4f628931193 100644 --- a/tests/baselines/reference/propertyAccessExpressionInnerComments.js +++ b/tests/baselines/reference/propertyAccessExpressionInnerComments.js @@ -35,6 +35,7 @@ //// [propertyAccessExpressionInnerComments.js] +"use strict"; /*1*/ Array /*2*/. /*3*/toString; /*4*/ /*1*/ Array /*2*/ . /*3*/ diff --git a/tests/baselines/reference/propertyAccessNumericLiterals.es6.js b/tests/baselines/reference/propertyAccessNumericLiterals.es6.js index 8defb16956095..03d5e6b9b85a1 100644 --- a/tests/baselines/reference/propertyAccessNumericLiterals.es6.js +++ b/tests/baselines/reference/propertyAccessNumericLiterals.es6.js @@ -9,6 +9,7 @@ //// [propertyAccessNumericLiterals.es6.js] +"use strict"; 0xffffffff.toString(); 0o01234.toString(); 0b01101101.toString(); diff --git a/tests/baselines/reference/propertyAccessNumericLiterals.js b/tests/baselines/reference/propertyAccessNumericLiterals.js index 6e832dccb03f8..173bea2d915f9 100644 --- a/tests/baselines/reference/propertyAccessNumericLiterals.js +++ b/tests/baselines/reference/propertyAccessNumericLiterals.js @@ -16,6 +16,7 @@ 8_8e4.toString(); //// [propertyAccessNumericLiterals.js] +"use strict"; 0xffffffff.toString(); 0o01234.toString(); 0b01101101.toString(); diff --git a/tests/baselines/reference/propertyAccessOfReadonlyIndexSignature.js b/tests/baselines/reference/propertyAccessOfReadonlyIndexSignature.js index 94de21f3e64aa..efb6f0ba04f60 100644 --- a/tests/baselines/reference/propertyAccessOfReadonlyIndexSignature.js +++ b/tests/baselines/reference/propertyAccessOfReadonlyIndexSignature.js @@ -10,4 +10,5 @@ a.foo = 'baz'; //// [propertyAccessOfReadonlyIndexSignature.js] +"use strict"; a.foo = 'baz'; diff --git a/tests/baselines/reference/propertyAccessOnObjectLiteral.js b/tests/baselines/reference/propertyAccessOnObjectLiteral.js index 4ab3bbe7b297e..accf76fe8ee2d 100644 --- a/tests/baselines/reference/propertyAccessOnObjectLiteral.js +++ b/tests/baselines/reference/propertyAccessOnObjectLiteral.js @@ -11,6 +11,7 @@ class A { } //// [propertyAccessOnObjectLiteral.js] +"use strict"; class A { } ({}.toString()); diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.js index bf8400562b60a..fc41d1605457e 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.js @@ -37,6 +37,7 @@ var b = { var r4 = b.foo(new Date()); //// [propertyAccessOnTypeParameterWithConstraints.js] +"use strict"; // generic types should behave as if they have properties of their constraint type // no errors expected class C { diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index d02eae1d300a9..86560dcd1be1e 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -84,6 +84,7 @@ var b = { var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, error //// [propertyAccessOnTypeParameterWithConstraints2.js] +"use strict"; // generic types should behave as if they have properties of their constraint type class A { foo() { return ''; } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index 4dbe62f48914c..215df84479528 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -59,6 +59,7 @@ var b = { var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] +"use strict"; // generic types should behave as if they have properties of their constraint type class A { foo() { return ''; } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints4.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints4.js index f0ca315fb7816..b67fd864e6a74 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints4.js @@ -35,6 +35,7 @@ var b = { var r4 = b.foo(new Date()); //// [propertyAccessOnTypeParameterWithConstraints4.js] +"use strict"; class C { f() { var x = {}; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index e38886e5b9020..e3c829a07f2c7 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -47,6 +47,7 @@ var b = { var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't matter //// [propertyAccessOnTypeParameterWithConstraints5.js] +"use strict"; class A { foo() { return ''; } } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.js index 4fe77621f6fb7..e3e3a7d7270c3 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.js @@ -34,6 +34,7 @@ var b = { var r4 = b.foo(1); //// [propertyAccessOnTypeParameterWithoutConstraints.js] +"use strict"; class C { f() { var x; diff --git a/tests/baselines/reference/propertyAccessibility1.js b/tests/baselines/reference/propertyAccessibility1.js index 2428bd1d7963e..a4aedd73ddf1e 100644 --- a/tests/baselines/reference/propertyAccessibility1.js +++ b/tests/baselines/reference/propertyAccessibility1.js @@ -9,6 +9,7 @@ f.privProp; //// [propertyAccessibility1.js] +"use strict"; class Foo { constructor() { this.privProp = 0; diff --git a/tests/baselines/reference/propertyAccessibility2.js b/tests/baselines/reference/propertyAccessibility2.js index ba787cce24e32..e7ca939fd61b9 100644 --- a/tests/baselines/reference/propertyAccessibility2.js +++ b/tests/baselines/reference/propertyAccessibility2.js @@ -8,6 +8,7 @@ var c = C.x; //// [propertyAccessibility2.js] +"use strict"; class C { } C.x = 1; diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.js b/tests/baselines/reference/propertyAndAccessorWithSameName.js index 2d847198a0d1d..a0c98d1ea93a6 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.js +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.js @@ -22,6 +22,7 @@ class E { } //// [propertyAndAccessorWithSameName.js] +"use strict"; class C { get x() { return 1; diff --git a/tests/baselines/reference/propertyAndFunctionWithSameName.js b/tests/baselines/reference/propertyAndFunctionWithSameName.js index 5660259577413..094a8577ecca6 100644 --- a/tests/baselines/reference/propertyAndFunctionWithSameName.js +++ b/tests/baselines/reference/propertyAndFunctionWithSameName.js @@ -14,6 +14,7 @@ class D { } //// [propertyAndFunctionWithSameName.js] +"use strict"; class C { x() { return 1; diff --git a/tests/baselines/reference/propertyAssignment.js b/tests/baselines/reference/propertyAssignment.js index aa78c04bddc37..e123cc4e04fbf 100644 --- a/tests/baselines/reference/propertyAssignment.js +++ b/tests/baselines/reference/propertyAssignment.js @@ -17,6 +17,7 @@ foo2 = bar2; foo3 = bar3; // should be an error //// [propertyAssignment.js] +"use strict"; foo1 = bar1; // should be an error foo2 = bar2; foo3 = bar3; // should be an error diff --git a/tests/baselines/reference/propertyAssignmentUseParentType3.js b/tests/baselines/reference/propertyAssignmentUseParentType3.js index dd30e9b4de36e..af78f0f3925a1 100644 --- a/tests/baselines/reference/propertyAssignmentUseParentType3.js +++ b/tests/baselines/reference/propertyAssignmentUseParentType3.js @@ -25,6 +25,7 @@ foo4.x = "456"; //// [propertyAssignmentUseParentType3.js] +"use strict"; // don't use the parent type if it's a function declaration (#33741) function foo1() { return 123; diff --git a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js index f1610effb7afb..0980d9c9fdd15 100644 --- a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js +++ b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js @@ -28,6 +28,7 @@ var y: Foo1; var y: Foo2; //// [propertyIdentityWithPrivacyMismatch_0.js] +"use strict"; //// [propertyIdentityWithPrivacyMismatch_1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/propertyNameWithoutTypeAnnotation.js b/tests/baselines/reference/propertyNameWithoutTypeAnnotation.js index 785e1289fd52f..b50fdf397ed86 100644 --- a/tests/baselines/reference/propertyNameWithoutTypeAnnotation.js +++ b/tests/baselines/reference/propertyNameWithoutTypeAnnotation.js @@ -24,6 +24,7 @@ var r3 = a.foo; var r4 = b.foo; //// [propertyNameWithoutTypeAnnotation.js] +"use strict"; class C { } var a; diff --git a/tests/baselines/reference/propertyNamesOfReservedWords.js b/tests/baselines/reference/propertyNamesOfReservedWords.js index 391c9af287938..aedc62a73d58f 100644 --- a/tests/baselines/reference/propertyNamesOfReservedWords.js +++ b/tests/baselines/reference/propertyNamesOfReservedWords.js @@ -279,6 +279,7 @@ var r7 = E.abstract; var r8 = E.as; //// [propertyNamesOfReservedWords.js] +"use strict"; class C { } var c; diff --git a/tests/baselines/reference/propertyOrdering2.js b/tests/baselines/reference/propertyOrdering2.js index 7c63d479c4318..430b625134717 100644 --- a/tests/baselines/reference/propertyOrdering2.js +++ b/tests/baselines/reference/propertyOrdering2.js @@ -11,6 +11,7 @@ class Foo { //// [propertyOrdering2.js] +"use strict"; class Foo { constructor(x, y) { this.x = x; diff --git a/tests/baselines/reference/propertyParameterWithQuestionMark.js b/tests/baselines/reference/propertyParameterWithQuestionMark.js index ab90ddae10242..d30c34b86268a 100644 --- a/tests/baselines/reference/propertyParameterWithQuestionMark.js +++ b/tests/baselines/reference/propertyParameterWithQuestionMark.js @@ -12,6 +12,7 @@ v = v2; // Should succeed var v3: { x } = new C; // Should fail //// [propertyParameterWithQuestionMark.js] +"use strict"; class C { constructor(x) { this.x = x; diff --git a/tests/baselines/reference/propertySignatures.js b/tests/baselines/reference/propertySignatures.js index 74125b73b471f..93f8a7c1a9341 100644 --- a/tests/baselines/reference/propertySignatures.js +++ b/tests/baselines/reference/propertySignatures.js @@ -23,6 +23,7 @@ test.bar = 2; //// [propertySignatures.js] +"use strict"; foo2.a = 2; foo2.a = "0"; var test = foo(); diff --git a/tests/baselines/reference/propertyWrappedInTry.js b/tests/baselines/reference/propertyWrappedInTry.js index f69e5beb19848..8e75a4a1bd737 100644 --- a/tests/baselines/reference/propertyWrappedInTry.js +++ b/tests/baselines/reference/propertyWrappedInTry.js @@ -22,6 +22,7 @@ class Foo { //// [propertyWrappedInTry.js] +"use strict"; class Foo { } try { diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es2015).js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es2015).js index 905123552356a..4e5fafd156ac9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es2015).js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es2015).js @@ -34,6 +34,7 @@ class C2 { //// [protectedClassPropertyAccessibleWithinClass.js] +"use strict"; // no errors class C { get y() { return this.x; } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es5).js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es5).js index f22bf681acbbc..f74111989287c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es5).js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass(target=es5).js @@ -34,6 +34,7 @@ class C2 { //// [protectedClassPropertyAccessibleWithinClass.js] +"use strict"; // no errors var C = /** @class */ (function () { function C() { diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 3f114b1a60661..6597d89d1f6a4 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -118,6 +118,7 @@ class B3 extends A3 { //// [protectedMembers.js] +"use strict"; // Class with protected members class C1 { f() { diff --git a/tests/baselines/reference/protectedMembersThisParameter.js b/tests/baselines/reference/protectedMembersThisParameter.js index d3c26aa62f35d..e60f891f205e9 100644 --- a/tests/baselines/reference/protectedMembersThisParameter.js +++ b/tests/baselines/reference/protectedMembersThisParameter.js @@ -99,6 +99,7 @@ class D2 extends D { //// [protectedMembersThisParameter.js] +"use strict"; class Message { secret() { } } diff --git a/tests/baselines/reference/protoAsIndexInIndexExpression.js b/tests/baselines/reference/protoAsIndexInIndexExpression.js index f42c71789144c..d7961eea49355 100644 --- a/tests/baselines/reference/protoAsIndexInIndexExpression.js +++ b/tests/baselines/reference/protoAsIndexInIndexExpression.js @@ -24,6 +24,7 @@ class C { Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; //// [protoAsIndexInIndexExpression_1.js] +"use strict"; /// var EntityPrototype = undefined; var WorkspacePrototype = { diff --git a/tests/baselines/reference/protoAssignment.js b/tests/baselines/reference/protoAssignment.js index e2d00ceb1c2e1..b96f2795882c8 100644 --- a/tests/baselines/reference/protoAssignment.js +++ b/tests/baselines/reference/protoAssignment.js @@ -17,6 +17,7 @@ Number.prototype.compareTo = function (other: number) { //// [protoAssignment.js] +"use strict"; Number.prototype.compareTo = function (other) { return this.valueOf() == other; }; diff --git a/tests/baselines/reference/protoInIndexer.js b/tests/baselines/reference/protoInIndexer.js index 548eee24ea7b1..aec8f6abdc84d 100644 --- a/tests/baselines/reference/protoInIndexer.js +++ b/tests/baselines/reference/protoInIndexer.js @@ -8,6 +8,7 @@ class X { } //// [protoInIndexer.js] +"use strict"; class X { constructor() { this['__proto__'] = null; // used to cause ICE diff --git a/tests/baselines/reference/prototypeOnConstructorFunctions.js b/tests/baselines/reference/prototypeOnConstructorFunctions.js index e9459a4108d96..267e727896bc9 100644 --- a/tests/baselines/reference/prototypeOnConstructorFunctions.js +++ b/tests/baselines/reference/prototypeOnConstructorFunctions.js @@ -13,5 +13,6 @@ i.const.prototype.prop = "yo"; //// [prototypeOnConstructorFunctions.js] +"use strict"; var i; i.const.prototype.prop = "yo"; diff --git a/tests/baselines/reference/qualify.js b/tests/baselines/reference/qualify.js index f16733134085d..bb20d71af4669 100644 --- a/tests/baselines/reference/qualify.js +++ b/tests/baselines/reference/qualify.js @@ -63,6 +63,7 @@ var x:T.I=y; //// [qualify.js] +"use strict"; var M; (function (M) { M.m = 0; diff --git a/tests/baselines/reference/reachabilityChecks1.js b/tests/baselines/reference/reachabilityChecks1.js index f8bf8a6792c2a..463bef03aca62 100644 --- a/tests/baselines/reference/reachabilityChecks1.js +++ b/tests/baselines/reference/reachabilityChecks1.js @@ -77,6 +77,7 @@ function f4() { //// [reachabilityChecks1.js] +"use strict"; while (true) ; var x = 1; diff --git a/tests/baselines/reference/reachabilityChecks11.js b/tests/baselines/reference/reachabilityChecks11.js index 0b553215e6d9a..24867f1839838 100644 --- a/tests/baselines/reference/reachabilityChecks11.js +++ b/tests/baselines/reference/reachabilityChecks11.js @@ -77,6 +77,7 @@ function f4() { //// [reachabilityChecks11.js] +"use strict"; // while (true); var x = 1; var A; diff --git a/tests/baselines/reference/reachabilityChecks4.js b/tests/baselines/reference/reachabilityChecks4.js index 052bd3628f34f..1a28a1bc677df 100644 --- a/tests/baselines/reference/reachabilityChecks4.js +++ b/tests/baselines/reference/reachabilityChecks4.js @@ -68,6 +68,7 @@ function f2(transition: Transition): any { //// [reachabilityChecks4.js] +"use strict"; function foo(x, y) { switch (x) { case 1: diff --git a/tests/baselines/reference/reachabilityChecks5.js b/tests/baselines/reference/reachabilityChecks5.js index 95f554ea0b82a..dd05dde7d7393 100644 --- a/tests/baselines/reference/reachabilityChecks5.js +++ b/tests/baselines/reference/reachabilityChecks5.js @@ -131,6 +131,7 @@ function f11(x): number { } //// [reachabilityChecks5.js] +"use strict"; function f0(x) { while (true) ; diff --git a/tests/baselines/reference/reachabilityChecks6.js b/tests/baselines/reference/reachabilityChecks6.js index 6d5a20b35e379..242ac2f74d35e 100644 --- a/tests/baselines/reference/reachabilityChecks6.js +++ b/tests/baselines/reference/reachabilityChecks6.js @@ -131,6 +131,7 @@ function f11(x) { } //// [reachabilityChecks6.js] +"use strict"; function f0(x) { while (true) ; diff --git a/tests/baselines/reference/reachabilityChecks7.js b/tests/baselines/reference/reachabilityChecks7.js index cbc921a60027f..51753750267e6 100644 --- a/tests/baselines/reference/reachabilityChecks7.js +++ b/tests/baselines/reference/reachabilityChecks7.js @@ -32,6 +32,7 @@ declare function use(s: string): void; let x1 = () => { use("Test"); } //// [reachabilityChecks7.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/readonlyInAmbientClass.js b/tests/baselines/reference/readonlyInAmbientClass.js index 0f0f734ab7806..bfc276f9dcebb 100644 --- a/tests/baselines/reference/readonlyInAmbientClass.js +++ b/tests/baselines/reference/readonlyInAmbientClass.js @@ -7,3 +7,4 @@ declare class C{ } //// [readonlyInAmbientClass.js] +"use strict"; diff --git a/tests/baselines/reference/readonlyInNonPropertyParameters(target=es2015).js b/tests/baselines/reference/readonlyInNonPropertyParameters(target=es2015).js index 2ee3c0172c278..10d13f5bfda1a 100644 --- a/tests/baselines/reference/readonlyInNonPropertyParameters(target=es2015).js +++ b/tests/baselines/reference/readonlyInNonPropertyParameters(target=es2015).js @@ -11,6 +11,7 @@ class X { (readonly) => 0; //// [readonlyInNonPropertyParameters.js] +"use strict"; // `readonly` won't work outside of property parameters class X { method(x) { } diff --git a/tests/baselines/reference/readonlyInNonPropertyParameters(target=es5).js b/tests/baselines/reference/readonlyInNonPropertyParameters(target=es5).js index 8717bfc16ccae..e08d014ebf391 100644 --- a/tests/baselines/reference/readonlyInNonPropertyParameters(target=es5).js +++ b/tests/baselines/reference/readonlyInNonPropertyParameters(target=es5).js @@ -11,6 +11,7 @@ class X { (readonly) => 0; //// [readonlyInNonPropertyParameters.js] +"use strict"; // `readonly` won't work outside of property parameters var X = /** @class */ (function () { function X() { diff --git a/tests/baselines/reference/recur1.js b/tests/baselines/reference/recur1.js index 2ef1b7bc1b05d..369230ab9340b 100644 --- a/tests/baselines/reference/recur1.js +++ b/tests/baselines/reference/recur1.js @@ -10,6 +10,7 @@ cobalt.pitch = function() {} //// [recur1.js] +"use strict"; var salt = new salt.pepper(); salt.pepper = function () { }; var cobalt = new cobalt.pitch(); diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index ef75ec32b1a32..099f08ec6a925 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -105,6 +105,7 @@ namespace Sample.Thing.Languages.PlainText { //// [recursiveClassReferenceTest.js] +"use strict"; // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter var Sample; diff --git a/tests/baselines/reference/recursiveGetterAccess.js b/tests/baselines/reference/recursiveGetterAccess.js index 45851d835fa31..eb254fb50d485 100644 --- a/tests/baselines/reference/recursiveGetterAccess.js +++ b/tests/baselines/reference/recursiveGetterAccess.js @@ -8,6 +8,7 @@ get testProp() { return this.testProp; } //// [recursiveGetterAccess.js] +"use strict"; class MyClass { get testProp() { return this.testProp; } } diff --git a/tests/baselines/reference/recursiveInference1.js b/tests/baselines/reference/recursiveInference1.js index f1df8e3a3f2fc..acac30b1521a2 100644 --- a/tests/baselines/reference/recursiveInference1.js +++ b/tests/baselines/reference/recursiveInference1.js @@ -5,5 +5,6 @@ function fib(x:number) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } var result = fib(5); //// [recursiveInference1.js] +"use strict"; function fib(x) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } var result = fib(5); diff --git a/tests/baselines/reference/recursiveInitializer.js b/tests/baselines/reference/recursiveInitializer.js index a6b0dd8d0ab6c..916442bf1f426 100644 --- a/tests/baselines/reference/recursiveInitializer.js +++ b/tests/baselines/reference/recursiveInitializer.js @@ -22,6 +22,7 @@ var b4 = (!b4) && b4; // expected boolean here. actually 'any' var f = (x: string) => f(x); //// [recursiveInitializer.js] +"use strict"; // number unless otherwise specified var n1 = n1++; var n2 = n2 + n2; diff --git a/tests/baselines/reference/recursiveNamedLambdaCall.js b/tests/baselines/reference/recursiveNamedLambdaCall.js index df1f009eb1baf..d2ca3bd551457 100644 --- a/tests/baselines/reference/recursiveNamedLambdaCall.js +++ b/tests/baselines/reference/recursiveNamedLambdaCall.js @@ -22,6 +22,7 @@ var promise = function( obj ) { }; //// [recursiveNamedLambdaCall.js] +"use strict"; var promise = function (obj) { if (top && top.doScroll) { (function doScrollCheck() { diff --git a/tests/baselines/reference/recursiveProperties(target=es2015).js b/tests/baselines/reference/recursiveProperties(target=es2015).js index 4741a22aea793..69b728e0ed05d 100644 --- a/tests/baselines/reference/recursiveProperties(target=es2015).js +++ b/tests/baselines/reference/recursiveProperties(target=es2015).js @@ -10,6 +10,7 @@ class B { } //// [recursiveProperties.js] +"use strict"; class A { get testProp() { return this.testProp; } } diff --git a/tests/baselines/reference/recursiveProperties(target=es5).js b/tests/baselines/reference/recursiveProperties(target=es5).js index b67ef8ace2dd4..b51e5365bf0d6 100644 --- a/tests/baselines/reference/recursiveProperties(target=es5).js +++ b/tests/baselines/reference/recursiveProperties(target=es5).js @@ -10,6 +10,7 @@ class B { } //// [recursiveProperties.js] +"use strict"; var A = /** @class */ (function () { function A() { } diff --git a/tests/baselines/reference/recursiveSpecializationOfSignatures.js b/tests/baselines/reference/recursiveSpecializationOfSignatures.js index 71bd00bafd8b9..960df8318a89d 100644 --- a/tests/baselines/reference/recursiveSpecializationOfSignatures.js +++ b/tests/baselines/reference/recursiveSpecializationOfSignatures.js @@ -9,6 +9,7 @@ constructor(public S17: S0 A>) { } //// [recursiveSpecializationOfSignatures.js] +"use strict"; class S0 { set S1(S2) { } diff --git a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js index 6cecdef7388e6..632e8464caaed 100644 --- a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js +++ b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js @@ -46,6 +46,7 @@ function other, U>() { } //// [recursiveTypesUsedAsFunctionParameters.js] +"use strict"; class List { } class MyList { diff --git a/tests/baselines/reference/redeclareParameterInCatchBlock.js b/tests/baselines/reference/redeclareParameterInCatchBlock.js index 4d76b3d0c0dfb..deb45aa4347df 100644 --- a/tests/baselines/reference/redeclareParameterInCatchBlock.js +++ b/tests/baselines/reference/redeclareParameterInCatchBlock.js @@ -35,6 +35,7 @@ try { //// [redeclareParameterInCatchBlock.js] +"use strict"; try { } catch (e) { diff --git a/tests/baselines/reference/renamingDestructuredPropertyInFunctionType.js b/tests/baselines/reference/renamingDestructuredPropertyInFunctionType.js index f24c417f4dd5c..31acf5fb734a2 100644 --- a/tests/baselines/reference/renamingDestructuredPropertyInFunctionType.js +++ b/tests/baselines/reference/renamingDestructuredPropertyInFunctionType.js @@ -69,6 +69,7 @@ const f11 = ({ [2]: string }) => { }; function f12({ a: string = "" }: O): typeof string { return "a"; } //// [renamingDestructuredPropertyInFunctionType.js] +"use strict"; // GH#37454, GH#41044 // Below are OK but renaming should be removed from declaration emit function f1({ a: string }) { } diff --git a/tests/baselines/reference/renamingDestructuredPropertyInFunctionType3.js b/tests/baselines/reference/renamingDestructuredPropertyInFunctionType3.js index 347dac98581be..693c2b7ff5523 100644 --- a/tests/baselines/reference/renamingDestructuredPropertyInFunctionType3.js +++ b/tests/baselines/reference/renamingDestructuredPropertyInFunctionType3.js @@ -11,6 +11,7 @@ function f14 ({ [sym]: string }: O) { }; //// [renamingDestructuredPropertyInFunctionType3.js] +"use strict"; const sym = Symbol(); const f13 = ({ [sym]: string }) => { }; function f14({ [sym]: string }) { } diff --git a/tests/baselines/reference/requiredInitializedParameter1.js b/tests/baselines/reference/requiredInitializedParameter1.js index fdbde023c3969..156d92e3e3c79 100644 --- a/tests/baselines/reference/requiredInitializedParameter1.js +++ b/tests/baselines/reference/requiredInitializedParameter1.js @@ -22,6 +22,7 @@ f3(0); f4(0); //// [requiredInitializedParameter1.js] +"use strict"; function f1(a, b = 0, c) { } function f2(a, b = 0, c = 0) { } function f3(a, b = 0, c) { } diff --git a/tests/baselines/reference/requiredInitializedParameter2.js b/tests/baselines/reference/requiredInitializedParameter2.js index 09a2d6a3e317c..8961fed0cef9e 100644 --- a/tests/baselines/reference/requiredInitializedParameter2.js +++ b/tests/baselines/reference/requiredInitializedParameter2.js @@ -10,6 +10,7 @@ class C1 implements I1 { } //// [requiredInitializedParameter2.js] +"use strict"; class C1 { method(a = 0, b) { } } diff --git a/tests/baselines/reference/requiredInitializedParameter3.js b/tests/baselines/reference/requiredInitializedParameter3.js index f2ffd15b6acf0..ba639abaadb96 100644 --- a/tests/baselines/reference/requiredInitializedParameter3.js +++ b/tests/baselines/reference/requiredInitializedParameter3.js @@ -10,6 +10,7 @@ class C1 implements I1 { } //// [requiredInitializedParameter3.js] +"use strict"; class C1 { method(a = 0, b) { } } diff --git a/tests/baselines/reference/requiredInitializedParameter4.js b/tests/baselines/reference/requiredInitializedParameter4.js index 243286c667332..d41762c524099 100644 --- a/tests/baselines/reference/requiredInitializedParameter4.js +++ b/tests/baselines/reference/requiredInitializedParameter4.js @@ -6,6 +6,7 @@ class C1 { } //// [requiredInitializedParameter4.js] +"use strict"; class C1 { method(a = 0, b) { } } diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 9dd090ffec146..8159727350125 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1022,6 +1022,7 @@ namespace caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] +"use strict"; var rionegrensis; (function (rionegrensis) { class caniventer extends Lanthanum.nitidus { diff --git a/tests/baselines/reference/restArgMissingName.js b/tests/baselines/reference/restArgMissingName.js index 04cbefb04bcd5..a789698990d96 100644 --- a/tests/baselines/reference/restArgMissingName.js +++ b/tests/baselines/reference/restArgMissingName.js @@ -5,4 +5,5 @@ function sum (...) {} //// [restArgMissingName.js] +"use strict"; function sum(...) { } diff --git a/tests/baselines/reference/restElementWithNullInitializer(target=es2015).js b/tests/baselines/reference/restElementWithNullInitializer(target=es2015).js index 37b6dbaf22116..6667360451784 100644 --- a/tests/baselines/reference/restElementWithNullInitializer(target=es2015).js +++ b/tests/baselines/reference/restElementWithNullInitializer(target=es2015).js @@ -15,6 +15,7 @@ function foo4([...r] = []) { //// [restElementWithNullInitializer.js] +"use strict"; function foo1([...r] = null) { } function foo2([...r] = undefined) { diff --git a/tests/baselines/reference/restElementWithNullInitializer(target=es5).js b/tests/baselines/reference/restElementWithNullInitializer(target=es5).js index 522aa7bfe0180..a72fc735b7a84 100644 --- a/tests/baselines/reference/restElementWithNullInitializer(target=es5).js +++ b/tests/baselines/reference/restElementWithNullInitializer(target=es5).js @@ -15,6 +15,7 @@ function foo4([...r] = []) { //// [restElementWithNullInitializer.js] +"use strict"; function foo1(_a) { var r = (_a === void 0 ? null : _a).slice(0); } diff --git a/tests/baselines/reference/restParamAsOptional.js b/tests/baselines/reference/restParamAsOptional.js index 5c56b860fbbc7..ae540bf5e7294 100644 --- a/tests/baselines/reference/restParamAsOptional.js +++ b/tests/baselines/reference/restParamAsOptional.js @@ -5,5 +5,6 @@ function f(...x?) { } function f2(...x = []) { } //// [restParamAsOptional.js] +"use strict"; function f(...x) { } function f2(...x = []) { } diff --git a/tests/baselines/reference/restParamModifier.js b/tests/baselines/reference/restParamModifier.js index aac75e2307b4e..549a9e131a2eb 100644 --- a/tests/baselines/reference/restParamModifier.js +++ b/tests/baselines/reference/restParamModifier.js @@ -6,6 +6,7 @@ class C { } //// [restParamModifier.js] +"use strict"; class C { constructor(...public, rest) { } } diff --git a/tests/baselines/reference/restParamModifier2.js b/tests/baselines/reference/restParamModifier2.js index c8eb319b8c399..e27f6fb591acb 100644 --- a/tests/baselines/reference/restParamModifier2.js +++ b/tests/baselines/reference/restParamModifier2.js @@ -6,6 +6,7 @@ class C { } //// [restParamModifier2.js] +"use strict"; class C { constructor(...rest) { this.rest = rest; diff --git a/tests/baselines/reference/restParameterAssignmentCompatibility.js b/tests/baselines/reference/restParameterAssignmentCompatibility.js index c763f80c4e154..d810c90828d95 100644 --- a/tests/baselines/reference/restParameterAssignmentCompatibility.js +++ b/tests/baselines/reference/restParameterAssignmentCompatibility.js @@ -29,6 +29,7 @@ var t1: T1; t1 = s; // Similar to above, but optionality does not matter here. //// [restParameterAssignmentCompatibility.js] +"use strict"; class T { m(...p3) { } diff --git a/tests/baselines/reference/restParameterNoTypeAnnotation.js b/tests/baselines/reference/restParameterNoTypeAnnotation.js index 32bf32c9aa180..c6cfc96a63d4d 100644 --- a/tests/baselines/reference/restParameterNoTypeAnnotation.js +++ b/tests/baselines/reference/restParameterNoTypeAnnotation.js @@ -8,6 +8,7 @@ function foo(...rest) { //// [restParameterNoTypeAnnotation.js] +"use strict"; function foo(...rest) { var x = rest[0]; return x; diff --git a/tests/baselines/reference/restParameterWithBindingPattern1.js b/tests/baselines/reference/restParameterWithBindingPattern1.js index 33c283f64e5e8..60b1e21a1632a 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern1.js +++ b/tests/baselines/reference/restParameterWithBindingPattern1.js @@ -4,5 +4,6 @@ function a(...{a, b}) { } //// [restParameterWithBindingPattern1.js] +"use strict"; function a(...{ a, b }) { } //# sourceMappingURL=restParameterWithBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithBindingPattern2.js b/tests/baselines/reference/restParameterWithBindingPattern2.js index 01efaf31ffe67..d5fa2263d12a6 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern2.js +++ b/tests/baselines/reference/restParameterWithBindingPattern2.js @@ -4,5 +4,6 @@ function a(...[a, b]) { } //// [restParameterWithBindingPattern2.js] +"use strict"; function a(...[a, b]) { } //# sourceMappingURL=restParameterWithBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js b/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js index cc29999b0fd02..9e839cbce769a 100644 --- a/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js +++ b/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js @@ -29,6 +29,7 @@ var b = { //// [restParameterWithoutAnnotationIsAnyArray.js] +"use strict"; // Rest parameters without type annotations are 'any', errors only for the functions with 2 rest params function foo(...x) { } var f = function foo(...x) { }; diff --git a/tests/baselines/reference/restParametersOfNonArrayTypes.js b/tests/baselines/reference/restParametersOfNonArrayTypes.js index f7e08552eb629..791f0a3f9635a 100644 --- a/tests/baselines/reference/restParametersOfNonArrayTypes.js +++ b/tests/baselines/reference/restParametersOfNonArrayTypes.js @@ -28,6 +28,7 @@ var b = { } //// [restParametersOfNonArrayTypes.js] +"use strict"; // Rest parameters must be an array type if they have a type annotation, so all these are errors function foo(...x) { } var f = function foo(...x) { }; diff --git a/tests/baselines/reference/restParametersOfNonArrayTypes2.js b/tests/baselines/reference/restParametersOfNonArrayTypes2.js index db048f754596b..60fa155432587 100644 --- a/tests/baselines/reference/restParametersOfNonArrayTypes2.js +++ b/tests/baselines/reference/restParametersOfNonArrayTypes2.js @@ -59,6 +59,7 @@ var b2 = { } //// [restParametersOfNonArrayTypes2.js] +"use strict"; // Rest parameters must be an array type if they have a type annotation, // user defined subtypes of array do not count, all of these are errors function foo(...x) { } diff --git a/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js b/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js index f25c1e036bc42..1052e17891145 100644 --- a/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js +++ b/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js @@ -55,6 +55,7 @@ var b2 = { } //// [restParametersWithArrayTypeAnnotations.js] +"use strict"; // Rest parameters must be an array type if they have a type annotation, errors only for the functions with 2 rest params function foo(...x) { } var f = function foo(...x) { }; diff --git a/tests/baselines/reference/returnInfiniteIntersection.js b/tests/baselines/reference/returnInfiniteIntersection.js index 6a99e5220a44e..dab8ec127cb5f 100644 --- a/tests/baselines/reference/returnInfiniteIntersection.js +++ b/tests/baselines/reference/returnInfiniteIntersection.js @@ -10,6 +10,7 @@ let result = recursive()(1) //// [returnInfiniteIntersection.js] +"use strict"; function recursive() { let x = (subkey) => recursive(); return x; diff --git a/tests/baselines/reference/returnStatement1.js b/tests/baselines/reference/returnStatement1.js index b46c59b7a7ed5..ed1f8733d0838 100644 --- a/tests/baselines/reference/returnStatement1.js +++ b/tests/baselines/reference/returnStatement1.js @@ -9,6 +9,7 @@ function f() { } //// [returnStatement1.js] +"use strict"; function f() { return function (s) { var x = s; diff --git a/tests/baselines/reference/returnTypeParameterWithModules.js b/tests/baselines/reference/returnTypeParameterWithModules.js index 65805b0933ace..543acb23c1cf5 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.js +++ b/tests/baselines/reference/returnTypeParameterWithModules.js @@ -17,6 +17,7 @@ namespace M2 { }; //// [returnTypeParameterWithModules.js] +"use strict"; var M1; (function (M1) { function reduce(ar, f, e) { diff --git a/tests/baselines/reference/returnValueInSetter.js b/tests/baselines/reference/returnValueInSetter.js index ea8b464d5d70b..47f97c7e0f658 100644 --- a/tests/baselines/reference/returnValueInSetter.js +++ b/tests/baselines/reference/returnValueInSetter.js @@ -10,6 +10,7 @@ class f { //// [returnValueInSetter.js] +"use strict"; class f { set x(value) { return null; // Should be an error diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 84f67f91a353d..8887a7c161092 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -11,6 +11,7 @@ class D extends C { } //// [scopeCheckExtendedClassInsidePublicMethod2.js] +"use strict"; class C { } class D extends C { diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 18f4696709eb0..1658913ecca2f 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -11,6 +11,7 @@ class D extends C { } //// [scopeCheckExtendedClassInsideStaticMethod1.js] +"use strict"; class C { } class D extends C { diff --git a/tests/baselines/reference/scopeCheckInsidePublicMethod1.js b/tests/baselines/reference/scopeCheckInsidePublicMethod1.js index 423490166eca6..c99510eae6ad5 100644 --- a/tests/baselines/reference/scopeCheckInsidePublicMethod1.js +++ b/tests/baselines/reference/scopeCheckInsidePublicMethod1.js @@ -9,6 +9,7 @@ class C { } //// [scopeCheckInsidePublicMethod1.js] +"use strict"; class C { a() { s = 1; // ERR diff --git a/tests/baselines/reference/scopeCheckInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckInsideStaticMethod1.js index 1cdd8a5b0647a..aa52ed38a2139 100644 --- a/tests/baselines/reference/scopeCheckInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckInsideStaticMethod1.js @@ -13,6 +13,7 @@ class C { } //// [scopeCheckInsideStaticMethod1.js] +"use strict"; class C { static b() { v = 1; // ERR diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 79e515b260c87..c5aaaef4ce288 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -14,6 +14,7 @@ class D extends C { } //// [scopeTests.js] +"use strict"; class C { } class D extends C { diff --git a/tests/baselines/reference/selfReferencesInFunctionParameters.js b/tests/baselines/reference/selfReferencesInFunctionParameters.js index 8a977bd21ed71..a04c9286d727e 100644 --- a/tests/baselines/reference/selfReferencesInFunctionParameters.js +++ b/tests/baselines/reference/selfReferencesInFunctionParameters.js @@ -16,6 +16,7 @@ class C { } //// [selfReferencesInFunctionParameters.js] +"use strict"; function foo(x = x) { } function bar(x0 = "", x = x) { diff --git a/tests/baselines/reference/setMethods.js b/tests/baselines/reference/setMethods.js index b8c41f96afba7..c3afdfbb31819 100644 --- a/tests/baselines/reference/setMethods.js +++ b/tests/baselines/reference/setMethods.js @@ -57,6 +57,7 @@ numberSet.isDisjointFrom(numberSetLike); //// [setMethods.js] +"use strict"; let numberSet = new Set([0, 1, 2]); let stringSet = new Set(["a", "b"]); let numberMap = new Map([[4, {}], [5, {}]]); diff --git a/tests/baselines/reference/setterWithReturn.js b/tests/baselines/reference/setterWithReturn.js index 474cd07dd5cfe..811f26e5859f6 100644 --- a/tests/baselines/reference/setterWithReturn.js +++ b/tests/baselines/reference/setterWithReturn.js @@ -13,6 +13,7 @@ class C234 { } //// [setterWithReturn.js] +"use strict"; class C234 { set p1(arg1) { if (true) { diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.js b/tests/baselines/reference/specializationsShouldNotAffectEachOther.js index 8fcb79ec06c8b..92960506cd978 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.js +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.js @@ -22,6 +22,7 @@ function foo() { var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); //// [specializationsShouldNotAffectEachOther.js] +"use strict"; var series; function foo() { var seriesExtent = (series) => null; diff --git a/tests/baselines/reference/specializeVarArgs1.js b/tests/baselines/reference/specializeVarArgs1.js index ca77ac0890450..6ab63ce8ce611 100644 --- a/tests/baselines/reference/specializeVarArgs1.js +++ b/tests/baselines/reference/specializeVarArgs1.js @@ -25,6 +25,7 @@ a.push('Some Value'); //// [specializeVarArgs1.js] +"use strict"; function observableArray() { return null; } var a = observableArray(); a.push('Some Value'); diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index 21d1972cce966..3df8cdbc94a14 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -15,6 +15,7 @@ function g(tagName: any): Base { } //// [specializedOverloadWithRestParameters.js] +"use strict"; class Base { foo() { } } diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js index 0b05872d46cbb..381e9663b3969 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js @@ -11,6 +11,7 @@ x3(1, (x: string) => 1); x3(1, (x: 'hm') => 1); //// [specializedSignatureAsCallbackParameter1.js] +"use strict"; function x3(a, cb) { cb(a); } diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js index 91b2d6a87cbdf..c72edac5a3a62 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js @@ -66,6 +66,7 @@ var a3: { //// [specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js] +"use strict"; function foo(x) { } class C { foo(x) { } diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js index 015342b1814b5..4d8588aba40d0 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js @@ -84,6 +84,7 @@ var a3: { //// [specializedSignatureIsSubtypeOfNonSpecializedSignature.js] +"use strict"; // Specialized signatures must be a subtype of a non-specialized signature // All the below should not be errors function foo(x) { } diff --git a/tests/baselines/reference/staticAsIdentifier.js b/tests/baselines/reference/staticAsIdentifier.js index 02b7da808c5e4..146193d43e51d 100644 --- a/tests/baselines/reference/staticAsIdentifier.js +++ b/tests/baselines/reference/staticAsIdentifier.js @@ -36,6 +36,7 @@ class C7 extends C6 { //// [staticAsIdentifier.js] +"use strict"; class C1 { } class C2 { diff --git a/tests/baselines/reference/staticClassMemberError.js b/tests/baselines/reference/staticClassMemberError.js index a53d61625ecd3..348241283a8c6 100644 --- a/tests/baselines/reference/staticClassMemberError.js +++ b/tests/baselines/reference/staticClassMemberError.js @@ -15,6 +15,7 @@ class Foo { } //// [staticClassMemberError.js] +"use strict"; class C { a() { s = 1; diff --git a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js index 43007006a80e3..f219845ff6ba3 100644 --- a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js +++ b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js @@ -28,6 +28,7 @@ c = a; //// [staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js] +"use strict"; class B { prop() { } } diff --git a/tests/baselines/reference/staticModifierAlreadySeen.js b/tests/baselines/reference/staticModifierAlreadySeen.js index 1acb57b91356d..a4ace565e75f3 100644 --- a/tests/baselines/reference/staticModifierAlreadySeen.js +++ b/tests/baselines/reference/staticModifierAlreadySeen.js @@ -7,6 +7,7 @@ class C { } //// [staticModifierAlreadySeen.js] +"use strict"; class C { constructor() { this.foo = 1; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js index c74133eccbdd8..d2c335898b368 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js @@ -100,6 +100,7 @@ var b: { [x: string]: string; } = { } //// [stringIndexerConstrainsPropertyDeclarations.js] +"use strict"; // String indexer types constrain the types of named properties in their containing type class C { constructor() { } // ok diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index 4fef18b168602..5737fa766b4a7 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -42,6 +42,7 @@ var b: { [x: string]: A } = { } //// [stringIndexerConstrainsPropertyDeclarations2.js] +"use strict"; // String indexer providing a constraint of a user defined type class A { foo() { return ''; } diff --git a/tests/baselines/reference/stringLiteralType.js b/tests/baselines/reference/stringLiteralType.js index 027b19ea75c03..7e1d0cc0252e4 100644 --- a/tests/baselines/reference/stringLiteralType.js +++ b/tests/baselines/reference/stringLiteralType.js @@ -9,6 +9,7 @@ function f(x: any) { } //// [stringLiteralType.js] +"use strict"; var x; function f(x) { } diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js index dbbcd1b938539..834b132b99b4c 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js @@ -104,6 +104,7 @@ function f16(x: any) { } //// [stringLiteralTypeIsSubtypeOfString.js] +"use strict"; // string literal types are subtypes of string, any function f1(x) { } function f2(x) { } diff --git a/tests/baselines/reference/stringLiteralTypesAndTuples01.js b/tests/baselines/reference/stringLiteralTypesAndTuples01.js index 7ea6e699783fb..d09a8871a53e4 100644 --- a/tests/baselines/reference/stringLiteralTypesAndTuples01.js +++ b/tests/baselines/reference/stringLiteralTypesAndTuples01.js @@ -21,6 +21,7 @@ function rawr(dino: RexOrRaptor) { } //// [stringLiteralTypesAndTuples01.js] +"use strict"; // Should all be strings. let [hello, brave, newish, world] = ["Hello", "Brave", "New", "World"]; let [im, a, dinosaur] = ['I\'m', 'a', 't-rex']; diff --git a/tests/baselines/reference/stringLiteralTypesAsTags01.js b/tests/baselines/reference/stringLiteralTypesAsTags01.js index 1a5005cd5b99f..8f67190890eff 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTags01.js +++ b/tests/baselines/reference/stringLiteralTypesAsTags01.js @@ -44,6 +44,7 @@ else { } //// [stringLiteralTypesAsTags01.js] +"use strict"; function hasKind(entity, kind) { return entity.kind === kind; } diff --git a/tests/baselines/reference/stringLiteralTypesAsTags02.js b/tests/baselines/reference/stringLiteralTypesAsTags02.js index 9376442af24a2..5af15b4b02092 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTags02.js +++ b/tests/baselines/reference/stringLiteralTypesAsTags02.js @@ -43,6 +43,7 @@ else { } //// [stringLiteralTypesAsTags02.js] +"use strict"; function hasKind(entity, kind) { return entity.kind === kind; } diff --git a/tests/baselines/reference/stringLiteralTypesAsTags03.js b/tests/baselines/reference/stringLiteralTypesAsTags03.js index a02a4693cb334..b4c142337cfa9 100644 --- a/tests/baselines/reference/stringLiteralTypesAsTags03.js +++ b/tests/baselines/reference/stringLiteralTypesAsTags03.js @@ -47,6 +47,7 @@ else { } //// [stringLiteralTypesAsTags03.js] +"use strict"; function hasKind(entity, kind) { return entity.kind === kind; } diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js index 461d7c8cd251b..aa0dbe13dcda8 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js @@ -29,6 +29,7 @@ var b = { //// [stringLiteralTypesInImplementationSignatures.js] +"use strict"; // String literal types are only valid in overload signatures function foo(x) { } var f = function foo(x) { }; diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js index 5e98a6a101dd5..2234f7bd7f651 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js @@ -32,6 +32,7 @@ var b = { //// [stringLiteralTypesInImplementationSignatures2.js] +"use strict"; // String literal types are only valid in overload signatures function foo(x) { } class C { diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes01.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.js index 59df602c4c790..40c195a2b19e7 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes01.js +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes01.js @@ -22,6 +22,7 @@ x = y; y = x; //// [stringLiteralTypesInUnionTypes01.js] +"use strict"; var x = undefined; var y = undefined; if (x === "foo") { diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes02.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.js index 75816a68c3785..0032d66e55ce9 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes02.js +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes02.js @@ -22,6 +22,7 @@ x = y; y = x; //// [stringLiteralTypesInUnionTypes02.js] +"use strict"; var x = undefined; var y = undefined; if (x === "foo") { diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes03.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.js index 6ed8d6330fd75..d329a7a976da0 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes03.js +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes03.js @@ -22,6 +22,7 @@ x = y; y = x; //// [stringLiteralTypesInUnionTypes03.js] +"use strict"; var x; var y = undefined; if (x === "foo") { diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.js b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.js index 5a1d11fbfdef1..4cd4c90d0b7d3 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.js +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.js @@ -39,6 +39,7 @@ if (!!!x) { } //// [stringLiteralTypesInUnionTypes04.js] +"use strict"; let x = undefined; let y = undefined; if (x === "") { diff --git a/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.js b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.js index a53305ab82b6c..71011e38e0602 100644 --- a/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.js +++ b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.js @@ -20,6 +20,7 @@ f = "foo"; g = "bar"; //// [stringLiteralTypesInVariableDeclarations01.js] +"use strict"; let a; var b; let c; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads01.js b/tests/baselines/reference/stringLiteralTypesOverloads01.js index 73242df1a7414..88142f69b3073 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads01.js +++ b/tests/baselines/reference/stringLiteralTypesOverloads01.js @@ -55,6 +55,7 @@ namespace Consts2 { //// [stringLiteralTypesOverloads01.js] +"use strict"; function getFalsyPrimitive(x) { if (x === "string") { return ""; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads02.js b/tests/baselines/reference/stringLiteralTypesOverloads02.js index 0803d77030521..de4dd160e3404 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads02.js +++ b/tests/baselines/reference/stringLiteralTypesOverloads02.js @@ -53,6 +53,7 @@ namespace Consts2 { //// [stringLiteralTypesOverloads02.js] +"use strict"; function getFalsyPrimitive(x) { if (x === "string") { return ""; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.js b/tests/baselines/reference/stringLiteralTypesOverloads04.js index 787c91004f678..6a7331d34de96 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads04.js +++ b/tests/baselines/reference/stringLiteralTypesOverloads04.js @@ -9,6 +9,7 @@ f(y => { }) //// [stringLiteralTypesOverloads04.js] +"use strict"; f(y => { const z = y = "foo"; return z; diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.js b/tests/baselines/reference/stringLiteralTypesTypePredicates01.js index 3cf9599cbad4e..8204374dfb29c 100644 --- a/tests/baselines/reference/stringLiteralTypesTypePredicates01.js +++ b/tests/baselines/reference/stringLiteralTypesTypePredicates01.js @@ -26,6 +26,7 @@ else { } //// [stringLiteralTypesTypePredicates01.js] +"use strict"; function kindIs(kind, is) { return kind === is; } diff --git a/tests/baselines/reference/structuralTypeInDeclareFileForModule.js b/tests/baselines/reference/structuralTypeInDeclareFileForModule.js index 39f10351d8374..191b55c9f3103 100644 --- a/tests/baselines/reference/structuralTypeInDeclareFileForModule.js +++ b/tests/baselines/reference/structuralTypeInDeclareFileForModule.js @@ -5,6 +5,7 @@ namespace M { export var x; } var m = M; //// [structuralTypeInDeclareFileForModule.js] +"use strict"; var M; (function (M) { })(M || (M = {})); diff --git a/tests/baselines/reference/subtypesOfAny.js b/tests/baselines/reference/subtypesOfAny.js index 0b867689a9331..322024e826b5d 100644 --- a/tests/baselines/reference/subtypesOfAny.js +++ b/tests/baselines/reference/subtypesOfAny.js @@ -136,6 +136,7 @@ interface I20 { } //// [subtypesOfAny.js] +"use strict"; // every type is a subtype of any, no errors expected class A { } diff --git a/tests/baselines/reference/subtypesOfUnion.js b/tests/baselines/reference/subtypesOfUnion.js index 6974d82b1d286..c21da36abf1ca 100644 --- a/tests/baselines/reference/subtypesOfUnion.js +++ b/tests/baselines/reference/subtypesOfUnion.js @@ -55,6 +55,7 @@ interface I2 { } //// [subtypesOfUnion.js] +"use strict"; var E; (function (E) { E[E["e1"] = 0] = "e1"; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 821fd3ba0ea24..94a413fefc060 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -114,6 +114,7 @@ var r18arg = (x: (a: T) => T) => null; var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] +"use strict"; // checking subtype relations for function types as it relates to contextual signature instantiation class Base { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 9c95d5883173a..8820379131a7f 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -114,6 +114,7 @@ var r18arg: new (x: new (a: T) => T) => any[]; var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] +"use strict"; // checking subtype relations for function types as it relates to contextual signature instantiation class Base { } diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 5b03cdbab48c6..1395f14d10596 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -69,6 +69,7 @@ namespace Base4 { //// [super1.js] +"use strict"; // Case 1 class Base1 { foo() { diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index fff6b1e439556..c4e61042faf63 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -19,6 +19,7 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] +"use strict"; class Base { constructor(c) { } } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index 84346c5fc9b97..fd5388c11b1d9 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -13,6 +13,7 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] +"use strict"; class Base { constructor(c) { } } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 1cdbd42950c38..76e9ed27b3a08 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -10,6 +10,7 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] +"use strict"; class D extends null { constructor() { this._t; // No error diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 61d4165751259..4589c9f9db915 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -16,6 +16,7 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] +"use strict"; class Base { constructor(c) { } } diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index 470b2471161b2..e7309b598dbea 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -12,6 +12,7 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] +"use strict"; class A { constructor(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 677a726c15736..563cdab825dcc 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -12,6 +12,7 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] +"use strict"; class A { constructor(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 4330ac7084d5f..5121e76e1ad9e 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -12,6 +12,7 @@ class B extends A { } //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] +"use strict"; class A { constructor(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js index 7f175da622691..def76817e56b6 100644 --- a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js +++ b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js @@ -12,6 +12,7 @@ class B { } //// [superCallFromClassThatHasNoBaseType1.js] +"use strict"; class A { constructor(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromFunction1.js b/tests/baselines/reference/superCallFromFunction1.js index 9128aae6c8175..debbb41f18bfb 100644 --- a/tests/baselines/reference/superCallFromFunction1.js +++ b/tests/baselines/reference/superCallFromFunction1.js @@ -6,6 +6,7 @@ function foo() { } //// [superCallFromFunction1.js] +"use strict"; function foo() { super(value => String(value)); } diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 6aa70d4f96d78..c01c6574c0e03 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -14,6 +14,7 @@ class B extends A { } //// [superNewCall1.js] +"use strict"; class A { constructor(map) { this.map = map; diff --git a/tests/baselines/reference/superPropertyAccessNoError(target=es2015).js b/tests/baselines/reference/superPropertyAccessNoError(target=es2015).js index 1620dd2db1719..1082ba68d8b74 100644 --- a/tests/baselines/reference/superPropertyAccessNoError(target=es2015).js +++ b/tests/baselines/reference/superPropertyAccessNoError(target=es2015).js @@ -73,6 +73,7 @@ instance.returnThis().fn(); //// [superPropertyAccessNoError.js] +"use strict"; //super.publicInstanceMemberFunction in constructor of derived class //super.publicInstanceMemberFunction in instance member function of derived class //super.publicInstanceMemberFunction in instance member accessor(get and set) of derived class diff --git a/tests/baselines/reference/superPropertyAccessNoError(target=es5).js b/tests/baselines/reference/superPropertyAccessNoError(target=es5).js index b090be1165834..c15e2ba552266 100644 --- a/tests/baselines/reference/superPropertyAccessNoError(target=es5).js +++ b/tests/baselines/reference/superPropertyAccessNoError(target=es5).js @@ -73,6 +73,7 @@ instance.returnThis().fn(); //// [superPropertyAccessNoError.js] +"use strict"; //super.publicInstanceMemberFunction in constructor of derived class //super.publicInstanceMemberFunction in instance member function of derived class //super.publicInstanceMemberFunction in instance member accessor(get and set) of derived class diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 9c2fb43b98e43..201ef42654c03 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -12,6 +12,7 @@ class D extends C { } //// [superWithTypeArgument2.js] +"use strict"; class C { } class D extends C { diff --git a/tests/baselines/reference/switchCaseCircularRefeference.js b/tests/baselines/reference/switchCaseCircularRefeference.js index a437d7444885e..b686ae5490512 100644 --- a/tests/baselines/reference/switchCaseCircularRefeference.js +++ b/tests/baselines/reference/switchCaseCircularRefeference.js @@ -11,6 +11,7 @@ function f(x: {a: "A", b} | {a: "C", e}) { } //// [switchCaseCircularRefeference.js] +"use strict"; // Repro from #9507 function f(x) { switch (x.a) { diff --git a/tests/baselines/reference/symbolDeclarationEmit13.js b/tests/baselines/reference/symbolDeclarationEmit13.js index f962ce72d959c..ce47e5e639cdb 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.js +++ b/tests/baselines/reference/symbolDeclarationEmit13.js @@ -7,6 +7,7 @@ class C { } //// [symbolDeclarationEmit13.js] +"use strict"; class C { get [Symbol.toPrimitive]() { return ""; } set [Symbol.toStringTag](x) { } diff --git a/tests/baselines/reference/symbolDeclarationEmit3.js b/tests/baselines/reference/symbolDeclarationEmit3.js index 290dafcc9a39d..87c3d7a0c9f01 100644 --- a/tests/baselines/reference/symbolDeclarationEmit3.js +++ b/tests/baselines/reference/symbolDeclarationEmit3.js @@ -8,6 +8,7 @@ class C { } //// [symbolDeclarationEmit3.js] +"use strict"; class C { [Symbol.toPrimitive](x) { } } diff --git a/tests/baselines/reference/symbolProperty10.js b/tests/baselines/reference/symbolProperty10.js index e932e673fefab..3a89b7fa26444 100644 --- a/tests/baselines/reference/symbolProperty10.js +++ b/tests/baselines/reference/symbolProperty10.js @@ -13,6 +13,7 @@ i = new C; var c: C = i; //// [symbolProperty10.js] +"use strict"; class C { } Symbol.iterator; diff --git a/tests/baselines/reference/symbolProperty11.js b/tests/baselines/reference/symbolProperty11.js index ad6c80c9faece..e84185e0e27e8 100644 --- a/tests/baselines/reference/symbolProperty11.js +++ b/tests/baselines/reference/symbolProperty11.js @@ -11,6 +11,7 @@ i = new C; var c: C = i; //// [symbolProperty11.js] +"use strict"; class C { } var i; diff --git a/tests/baselines/reference/symbolProperty12.js b/tests/baselines/reference/symbolProperty12.js index f31482fe20d93..e84aecafc283c 100644 --- a/tests/baselines/reference/symbolProperty12.js +++ b/tests/baselines/reference/symbolProperty12.js @@ -13,6 +13,7 @@ i = new C; var c: C = i; //// [symbolProperty12.js] +"use strict"; class C { } Symbol.iterator; diff --git a/tests/baselines/reference/symbolProperty13.js b/tests/baselines/reference/symbolProperty13.js index 0eca421e6cda3..80075bcd1f9a5 100644 --- a/tests/baselines/reference/symbolProperty13.js +++ b/tests/baselines/reference/symbolProperty13.js @@ -19,6 +19,7 @@ var i: I; bar(i); //// [symbolProperty13.js] +"use strict"; class C { } Symbol.iterator; diff --git a/tests/baselines/reference/symbolProperty14.js b/tests/baselines/reference/symbolProperty14.js index edbfa2e50c970..202018d24ddec 100644 --- a/tests/baselines/reference/symbolProperty14.js +++ b/tests/baselines/reference/symbolProperty14.js @@ -19,6 +19,7 @@ var i: I; bar(i); //// [symbolProperty14.js] +"use strict"; class C { } Symbol.iterator; diff --git a/tests/baselines/reference/symbolProperty15.js b/tests/baselines/reference/symbolProperty15.js index 97ac0adfb46c9..83ceab7ce2ae0 100644 --- a/tests/baselines/reference/symbolProperty15.js +++ b/tests/baselines/reference/symbolProperty15.js @@ -17,6 +17,7 @@ var i: I; bar(i); //// [symbolProperty15.js] +"use strict"; class C { } foo(new C); diff --git a/tests/baselines/reference/symbolProperty16.js b/tests/baselines/reference/symbolProperty16.js index 711f0cbbe4a46..a649fbacaf1e2 100644 --- a/tests/baselines/reference/symbolProperty16.js +++ b/tests/baselines/reference/symbolProperty16.js @@ -19,6 +19,7 @@ var i: I; bar(i); //// [symbolProperty16.js] +"use strict"; class C { } Symbol.iterator; diff --git a/tests/baselines/reference/symbolProperty19.js b/tests/baselines/reference/symbolProperty19.js index 069dd485d2a7a..adedc91a940b2 100644 --- a/tests/baselines/reference/symbolProperty19.js +++ b/tests/baselines/reference/symbolProperty19.js @@ -10,6 +10,7 @@ var it = i[Symbol.iterator]; var str = i[Symbol.toStringTag](); //// [symbolProperty19.js] +"use strict"; var i = { [Symbol.iterator]: { p: null }, [Symbol.toStringTag]() { return { p: undefined }; } diff --git a/tests/baselines/reference/symbolProperty39.js b/tests/baselines/reference/symbolProperty39.js index 572e04b6c89ad..314bbf296e6d7 100644 --- a/tests/baselines/reference/symbolProperty39.js +++ b/tests/baselines/reference/symbolProperty39.js @@ -13,6 +13,7 @@ class C { } //// [symbolProperty39.js] +"use strict"; class C { [Symbol.iterator](x) { return undefined; diff --git a/tests/baselines/reference/symbolProperty40.js b/tests/baselines/reference/symbolProperty40.js index 0244a5be9ce8d..32e331486106c 100644 --- a/tests/baselines/reference/symbolProperty40.js +++ b/tests/baselines/reference/symbolProperty40.js @@ -15,6 +15,7 @@ c[Symbol.iterator](0); //// [symbolProperty40.js] +"use strict"; class C { [Symbol.iterator](x) { return undefined; diff --git a/tests/baselines/reference/symbolProperty41.js b/tests/baselines/reference/symbolProperty41.js index 3baa05084c470..52c44a55712b3 100644 --- a/tests/baselines/reference/symbolProperty41.js +++ b/tests/baselines/reference/symbolProperty41.js @@ -15,6 +15,7 @@ c[Symbol.iterator]("hello"); //// [symbolProperty41.js] +"use strict"; class C { [Symbol.iterator](x) { return undefined; diff --git a/tests/baselines/reference/symbolProperty42.js b/tests/baselines/reference/symbolProperty42.js index 3f298b05c4247..d7d497941934e 100644 --- a/tests/baselines/reference/symbolProperty42.js +++ b/tests/baselines/reference/symbolProperty42.js @@ -10,6 +10,7 @@ class C { } //// [symbolProperty42.js] +"use strict"; class C { [Symbol.iterator](x) { return undefined; diff --git a/tests/baselines/reference/symbolProperty48.js b/tests/baselines/reference/symbolProperty48.js index c2bc78d7a798a..61100118dae9b 100644 --- a/tests/baselines/reference/symbolProperty48.js +++ b/tests/baselines/reference/symbolProperty48.js @@ -10,6 +10,7 @@ namespace M { } //// [symbolProperty48.js] +"use strict"; var M; (function (M) { var Symbol; diff --git a/tests/baselines/reference/symbolProperty49.js b/tests/baselines/reference/symbolProperty49.js index 1ac0b1c5f2d66..00b1f4e5c4306 100644 --- a/tests/baselines/reference/symbolProperty49.js +++ b/tests/baselines/reference/symbolProperty49.js @@ -10,6 +10,7 @@ namespace M { } //// [symbolProperty49.js] +"use strict"; var M; (function (M) { class C { diff --git a/tests/baselines/reference/symbolProperty56.js b/tests/baselines/reference/symbolProperty56.js index be5677ddba71d..bc2da1129d70e 100644 --- a/tests/baselines/reference/symbolProperty56.js +++ b/tests/baselines/reference/symbolProperty56.js @@ -13,6 +13,7 @@ namespace M { } //// [symbolProperty56.js] +"use strict"; var obj = { [Symbol.iterator]: 0 }; diff --git a/tests/baselines/reference/symbolProperty57.js b/tests/baselines/reference/symbolProperty57.js index 83399b0371763..466638c1bdb71 100644 --- a/tests/baselines/reference/symbolProperty57.js +++ b/tests/baselines/reference/symbolProperty57.js @@ -9,6 +9,7 @@ var obj = { obj[Symbol["nonsense"]]; //// [symbolProperty57.js] +"use strict"; var obj = { [Symbol.iterator]: 0 }; diff --git a/tests/baselines/reference/symbolProperty8.js b/tests/baselines/reference/symbolProperty8.js index 270febc2c69ae..9a898379bfffa 100644 --- a/tests/baselines/reference/symbolProperty8.js +++ b/tests/baselines/reference/symbolProperty8.js @@ -7,3 +7,4 @@ interface I { } //// [symbolProperty8.js] +"use strict"; diff --git a/tests/baselines/reference/symbolProperty9.js b/tests/baselines/reference/symbolProperty9.js index dbf0dbb497980..a943ea87cc865 100644 --- a/tests/baselines/reference/symbolProperty9.js +++ b/tests/baselines/reference/symbolProperty9.js @@ -13,6 +13,7 @@ i = new C; var c: C = i; //// [symbolProperty9.js] +"use strict"; class C { } Symbol.iterator; diff --git a/tests/baselines/reference/symbolType14.js b/tests/baselines/reference/symbolType14.js index f19455fcd5ead..bd62d3250f846 100644 --- a/tests/baselines/reference/symbolType14.js +++ b/tests/baselines/reference/symbolType14.js @@ -4,4 +4,5 @@ new Symbol(); //// [symbolType14.js] +"use strict"; new Symbol(); diff --git a/tests/baselines/reference/symbolType17.js b/tests/baselines/reference/symbolType17.js index e6294044b2b73..ba7792fb7ecdc 100644 --- a/tests/baselines/reference/symbolType17.js +++ b/tests/baselines/reference/symbolType17.js @@ -13,6 +13,7 @@ else { } //// [symbolType17.js] +"use strict"; var x; x; if (typeof x === "symbol") { diff --git a/tests/baselines/reference/symbolType18.js b/tests/baselines/reference/symbolType18.js index fbb8070a0be1e..905e5c3257658 100644 --- a/tests/baselines/reference/symbolType18.js +++ b/tests/baselines/reference/symbolType18.js @@ -13,6 +13,7 @@ else { } //// [symbolType18.js] +"use strict"; var x; x; if (typeof x === "object") { diff --git a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es2015).js b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es2015).js index 28216ca976a1c..4403251128b19 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es2015).js +++ b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es2015).js @@ -13,6 +13,7 @@ f({ x: (() => 1)(), ...{ y: 1 } })``; //// [taggedTemplateStringsWithCurriedFunction.js] +"use strict"; // Originated from #38558 const f = _ => (..._) => ""; f(Object.assign({ x: 0 })) ``; diff --git a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es5).js b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es5).js index 0c0874d6f845f..5bd8ec4aeb432 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es5).js +++ b/tests/baselines/reference/taggedTemplateStringsWithCurriedFunction(target=es5).js @@ -13,6 +13,7 @@ f({ x: (() => 1)(), ...{ y: 1 } })``; //// [taggedTemplateStringsWithCurriedFunction.js] +"use strict"; // Originated from #38558 var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } diff --git a/tests/baselines/reference/targetTypeCastTest.js b/tests/baselines/reference/targetTypeCastTest.js index 4f836f092f630..20a1f2e8981a3 100644 --- a/tests/baselines/reference/targetTypeCastTest.js +++ b/tests/baselines/reference/targetTypeCastTest.js @@ -26,6 +26,7 @@ var add2: Adder2 = function(x,y) { function add3(x,y) {x} //// [targetTypeCastTest.js] +"use strict"; function Point(x, y) { this.x = x; this.y = y; diff --git a/tests/baselines/reference/targetTypeTest1.js b/tests/baselines/reference/targetTypeTest1.js index 2fbadecc96ac8..c145a85917582 100644 --- a/tests/baselines/reference/targetTypeTest1.js +++ b/tests/baselines/reference/targetTypeTest1.js @@ -75,6 +75,7 @@ C.prototype = //// [targetTypeTest1.js] +"use strict"; // Type provided by extern declaration // Because Point is a constructor function, this is inferred // to be Point and return type is inferred to be void diff --git a/tests/baselines/reference/templateStringInArrowFunctionES6.js b/tests/baselines/reference/templateStringInArrowFunctionES6.js index 0f8fa02ae5705..f7fb8b89c3d06 100644 --- a/tests/baselines/reference/templateStringInArrowFunctionES6.js +++ b/tests/baselines/reference/templateStringInArrowFunctionES6.js @@ -4,4 +4,5 @@ var x = x => `abc${ x }def`; //// [templateStringInArrowFunctionES6.js] +"use strict"; var x = x => `abc${x}def`; diff --git a/tests/baselines/reference/templateStringInYieldKeyword.js b/tests/baselines/reference/templateStringInYieldKeyword.js index 4588a25970358..ba614f2eaa6a0 100644 --- a/tests/baselines/reference/templateStringInYieldKeyword.js +++ b/tests/baselines/reference/templateStringInYieldKeyword.js @@ -8,6 +8,7 @@ function* gen() { //// [templateStringInYieldKeyword.js] +"use strict"; function* gen() { // Once this is supported, the inner expression does not need to be parenthesized. var x = yield `abc${x}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js index f388f64cbbe6f..3cf737415fe3c 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js @@ -4,4 +4,5 @@ var x = `abc${ x => x }def`; //// [templateStringWithEmbeddedArrowFunctionES6.js] +"use strict"; var x = `abc${x => x}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.js b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.js index 2b88eee7fdf8b..e8e8e4bfda6d9 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.js @@ -8,6 +8,7 @@ function* gen() { //// [templateStringWithEmbeddedYieldKeywordES6.js] +"use strict"; function* gen() { // Once this is supported, yield *must* be parenthesized. var x = `abc${yield 10}def`; diff --git a/tests/baselines/reference/testTypings.js b/tests/baselines/reference/testTypings.js index f919395b88a98..a2d2d349969c1 100644 --- a/tests/baselines/reference/testTypings.js +++ b/tests/baselines/reference/testTypings.js @@ -16,3 +16,4 @@ declare function sort>(items: U[]): U[]; //// [testTypings.js] +"use strict"; diff --git a/tests/baselines/reference/thisBinding.js b/tests/baselines/reference/thisBinding.js index 890ae7663f371..21f1e94669a34 100644 --- a/tests/baselines/reference/thisBinding.js +++ b/tests/baselines/reference/thisBinding.js @@ -24,6 +24,7 @@ class C { } //// [thisBinding.js] +"use strict"; var M; (function (M) { class C { diff --git a/tests/baselines/reference/thisExpressionInIndexExpression.js b/tests/baselines/reference/thisExpressionInIndexExpression.js index d94f8ce05dc84..af7a29c090c42 100644 --- a/tests/baselines/reference/thisExpressionInIndexExpression.js +++ b/tests/baselines/reference/thisExpressionInIndexExpression.js @@ -6,6 +6,7 @@ function f() { } //// [thisExpressionInIndexExpression.js] +"use strict"; function f() { return r => r[this]; } diff --git a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js index b4d2d0a8a08f2..b4e8ff529995e 100644 --- a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js +++ b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js @@ -11,6 +11,7 @@ class Vector { } //// [thisInArrowFunctionInStaticInitializer1.js] +"use strict"; var _a; function log(a) { } class Vector { diff --git a/tests/baselines/reference/thisInConstructorParameter1.js b/tests/baselines/reference/thisInConstructorParameter1.js index f4966372d53da..13de75da76093 100644 --- a/tests/baselines/reference/thisInConstructorParameter1.js +++ b/tests/baselines/reference/thisInConstructorParameter1.js @@ -7,6 +7,7 @@ class Foo { } //// [thisInConstructorParameter1.js] +"use strict"; class Foo { constructor(x = this.y) { } } diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 61c27bb8f5ba3..24e02d01490fd 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -46,6 +46,7 @@ enum SomeEnum { //// [thisInInvalidContexts.js] +"use strict"; class BaseErrClass { constructor(t) { } } diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 99b2acf172d66..8f618275bd010 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -25,6 +25,7 @@ class Foo3 extends Base { } //// [thisInSuperCall.js] +"use strict"; class Base { constructor(x) { } } diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index 36f16c612da80..26b1b841f31e2 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -13,6 +13,7 @@ class Foo extends Base { //// [thisInSuperCall1.js] +"use strict"; class Base { constructor(a) { } } diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index a8dd9c777270a..ca3dad7fc5ba0 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -22,6 +22,7 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] +"use strict"; class Base { constructor(a) { } } diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index ca20344b35829..aa863c20da9e1 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -15,6 +15,7 @@ class Foo extends Base { //// [thisInSuperCall3.js] +"use strict"; class Base { constructor(a) { } } diff --git a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js index 5193313df9b30..b983e5fd38bac 100644 --- a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js +++ b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js @@ -10,6 +10,7 @@ function test() } //// [thisReferencedInFunctionInsideArrowFunction1.js] +"use strict"; var foo = (dummy) => { }; function test() { foo(() => function () { return this; }); diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 245300f57260c..713b89cecb11c 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -197,6 +197,7 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] +"use strict"; // body checking class B { } diff --git a/tests/baselines/reference/thisTypeInFunctions3.js b/tests/baselines/reference/thisTypeInFunctions3.js index c1599e7b6638c..23d256db0389f 100644 --- a/tests/baselines/reference/thisTypeInFunctions3.js +++ b/tests/baselines/reference/thisTypeInFunctions3.js @@ -13,6 +13,7 @@ class Test extends Base { //// [thisTypeInFunctions3.js] +"use strict"; class Test extends Base { m() { this.check(this); diff --git a/tests/baselines/reference/thisTypeInFunctions4.js b/tests/baselines/reference/thisTypeInFunctions4.js index 26a2f6acc61a2..53f72480f358f 100644 --- a/tests/baselines/reference/thisTypeInFunctions4.js +++ b/tests/baselines/reference/thisTypeInFunctions4.js @@ -19,6 +19,7 @@ function problemFunction(this: CorrectObject | WrongObject): void { } //// [thisTypeInFunctions4.js] +"use strict"; function problemFunction() { //check type if (!isCorrect(this)) diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 5dae6fa5b53ce..4bffea3d48215 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -188,6 +188,7 @@ class Derived3 extends Base2 { //// [thisTypeInFunctionsNegative.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -337,8 +338,8 @@ number; // can't name parameters 'this' in a lambda. c.explicitProperty = (m) => m + this.n; const f2 = (m) => m + this.n; -const f3 = (m) => __awaiter(this, void 0, void 0, function* () { return m + this.n; }); -const f4 = (m) => __awaiter(this, void 0, void 0, function* () { return m + this.n; }); +const f3 = (m) => __awaiter(void 0, void 0, void 0, function* () { return m + this.n; }); +const f4 = (m) => __awaiter(void 0, void 0, void 0, function* () { return m + this.n; }); class Derived3 extends Base2 { f() { super.polymorphic(); diff --git a/tests/baselines/reference/throwInEnclosingStatements.js b/tests/baselines/reference/throwInEnclosingStatements.js index a35a0aa5a6308..3a05df27fbb89 100644 --- a/tests/baselines/reference/throwInEnclosingStatements.js +++ b/tests/baselines/reference/throwInEnclosingStatements.js @@ -49,6 +49,7 @@ var aa = { //// [throwInEnclosingStatements.js] +"use strict"; function fn(x) { throw x; } diff --git a/tests/baselines/reference/throwStatements.js b/tests/baselines/reference/throwStatements.js index bfd4193c516e7..d5be56e5b933c 100644 --- a/tests/baselines/reference/throwStatements.js +++ b/tests/baselines/reference/throwStatements.js @@ -88,6 +88,7 @@ throw new D(); //// [throwStatements.js] +"use strict"; // all legal class C { } diff --git a/tests/baselines/reference/topLevel.js b/tests/baselines/reference/topLevel.js index 93996bb85b316..f64536a6adc51 100644 --- a/tests/baselines/reference/topLevel.js +++ b/tests/baselines/reference/topLevel.js @@ -30,6 +30,7 @@ result+=(M.origin.move(1,1)); //// [topLevel.js] +"use strict"; class Point { constructor(x, y) { this.x = x; diff --git a/tests/baselines/reference/topLevelAmbientModule.js b/tests/baselines/reference/topLevelAmbientModule.js index 123bba09cb7b1..a37a6d1a2d2a9 100644 --- a/tests/baselines/reference/topLevelAmbientModule.js +++ b/tests/baselines/reference/topLevelAmbientModule.js @@ -12,6 +12,7 @@ var z = foo.x + 10; //// [foo_0.js] +"use strict"; //// [foo_1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/topLevelAwait.2(module=es2022).js b/tests/baselines/reference/topLevelAwait.2(module=es2022).js index 1911b78260946..22542272c8a24 100644 --- a/tests/baselines/reference/topLevelAwait.2(module=es2022).js +++ b/tests/baselines/reference/topLevelAwait.2(module=es2022).js @@ -8,5 +8,6 @@ import await = foo.await; //// [topLevelAwait.2.js] +"use strict"; // await allowed in import=namespace when not a module var await = foo.await; diff --git a/tests/baselines/reference/topLevelAwait.2(module=esnext).js b/tests/baselines/reference/topLevelAwait.2(module=esnext).js index 1911b78260946..22542272c8a24 100644 --- a/tests/baselines/reference/topLevelAwait.2(module=esnext).js +++ b/tests/baselines/reference/topLevelAwait.2(module=esnext).js @@ -8,5 +8,6 @@ import await = foo.await; //// [topLevelAwait.2.js] +"use strict"; // await allowed in import=namespace when not a module var await = foo.await; diff --git a/tests/baselines/reference/topLevelAwaitNonModule(module=es2022).js b/tests/baselines/reference/topLevelAwaitNonModule(module=es2022).js index fa5a126cc2bc6..ed020eac6c023 100644 --- a/tests/baselines/reference/topLevelAwaitNonModule(module=es2022).js +++ b/tests/baselines/reference/topLevelAwaitNonModule(module=es2022).js @@ -11,6 +11,7 @@ for await (const item of arr) { //// [topLevelAwaitNonModule.js] +"use strict"; await x; const arr = [Promise.resolve()]; for await (const item of arr) { diff --git a/tests/baselines/reference/topLevelAwaitNonModule(module=esnext).js b/tests/baselines/reference/topLevelAwaitNonModule(module=esnext).js index fa5a126cc2bc6..ed020eac6c023 100644 --- a/tests/baselines/reference/topLevelAwaitNonModule(module=esnext).js +++ b/tests/baselines/reference/topLevelAwaitNonModule(module=esnext).js @@ -11,6 +11,7 @@ for await (const item of arr) { //// [topLevelAwaitNonModule.js] +"use strict"; await x; const arr = [Promise.resolve()]; for await (const item of arr) { diff --git a/tests/baselines/reference/topLevelLambda.js b/tests/baselines/reference/topLevelLambda.js index c12cf8a75fb32..dd60b3c2b86f5 100644 --- a/tests/baselines/reference/topLevelLambda.js +++ b/tests/baselines/reference/topLevelLambda.js @@ -7,6 +7,7 @@ namespace M { //// [topLevelLambda.js] +"use strict"; var M; (function (M) { var f = () => { this.window; }; diff --git a/tests/baselines/reference/topLevelLambda2.js b/tests/baselines/reference/topLevelLambda2.js index 642e416857dba..4cfbbb64bdcbc 100644 --- a/tests/baselines/reference/topLevelLambda2.js +++ b/tests/baselines/reference/topLevelLambda2.js @@ -6,5 +6,6 @@ function foo(x:any) {} foo(()=>this.window); //// [topLevelLambda2.js] +"use strict"; function foo(x) { } foo(() => this.window); diff --git a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js index b90fab332fb35..42dbf16110fbb 100644 --- a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js +++ b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js @@ -17,6 +17,7 @@ var z2 = foo.y() + 10; // Should resolve //// [foo_1.js] +"use strict"; //// [foo_2.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/topLevelThisAssignment.js b/tests/baselines/reference/topLevelThisAssignment.js index c87fad289f709..825e26e316e31 100644 --- a/tests/baselines/reference/topLevelThisAssignment.js +++ b/tests/baselines/reference/topLevelThisAssignment.js @@ -11,6 +11,7 @@ a; //// [output.js] +"use strict"; this.a = 10; this.a; a; diff --git a/tests/baselines/reference/trailingCommasES5(target=es2015).js b/tests/baselines/reference/trailingCommasES5(target=es2015).js index 1ae92ee09f57a..6b3e27924b26f 100644 --- a/tests/baselines/reference/trailingCommasES5(target=es2015).js +++ b/tests/baselines/reference/trailingCommasES5(target=es2015).js @@ -14,6 +14,7 @@ var a5 = [1, , ]; var a6 = [, , ]; //// [trailingCommasES5.js] +"use strict"; var o1 = { a: 1, b: 2 }; var o2 = { a: 1, b: 2, }; var o3 = { a: 1, }; diff --git a/tests/baselines/reference/trailingCommasES5(target=es5).js b/tests/baselines/reference/trailingCommasES5(target=es5).js index 1ae92ee09f57a..6b3e27924b26f 100644 --- a/tests/baselines/reference/trailingCommasES5(target=es5).js +++ b/tests/baselines/reference/trailingCommasES5(target=es5).js @@ -14,6 +14,7 @@ var a5 = [1, , ]; var a6 = [, , ]; //// [trailingCommasES5.js] +"use strict"; var o1 = { a: 1, b: 2 }; var o2 = { a: 1, b: 2, }; var o3 = { a: 1, }; diff --git a/tests/baselines/reference/trailingCommasInBindingPatterns.js b/tests/baselines/reference/trailingCommasInBindingPatterns.js index 15cb5f9c827f1..f8564a4a8d946 100644 --- a/tests/baselines/reference/trailingCommasInBindingPatterns.js +++ b/tests/baselines/reference/trailingCommasInBindingPatterns.js @@ -16,6 +16,7 @@ let g, h; //// [trailingCommasInBindingPatterns.js] +"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) diff --git a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es2015).js b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es2015).js index bcbe4f997af3d..b824d387ed64b 100644 --- a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es2015).js +++ b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es2015).js @@ -34,6 +34,7 @@ new X(1,); //// [trailingCommasInFunctionParametersAndArguments.js] +"use strict"; function f1(x) { } f1(1); function f2(...args) { } diff --git a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es5).js b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es5).js index fe1a2e61eab6b..9a0a6fcd9756d 100644 --- a/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es5).js +++ b/tests/baselines/reference/trailingCommasInFunctionParametersAndArguments(target=es5).js @@ -34,6 +34,7 @@ new X(1,); //// [trailingCommasInFunctionParametersAndArguments.js] +"use strict"; function f1(x) { } f1(1); function f2() { diff --git a/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es2015).js b/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es2015).js index c36b736a1c25e..c58d31be4eb2c 100644 --- a/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es2015).js +++ b/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es2015).js @@ -9,6 +9,7 @@ while (true) } //// [transformArrowInBlockScopedLoopVarInitializer.js] +"use strict"; // https://github.com/Microsoft/TypeScript/issues/11236 while (true) { let local = null; diff --git a/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es5).js b/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es5).js index b0c4d093f1385..df9b131cc8f9b 100644 --- a/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es5).js +++ b/tests/baselines/reference/transformArrowInBlockScopedLoopVarInitializer(target=es5).js @@ -9,6 +9,7 @@ while (true) } //// [transformArrowInBlockScopedLoopVarInitializer.js] +"use strict"; var _loop_1 = function () { var local = null; a = function () { return local; }; // <-- Lambda should be converted to function() diff --git a/tests/baselines/reference/transformsElideNullUndefinedType.js b/tests/baselines/reference/transformsElideNullUndefinedType.js index 346ff0d677e4d..8dcc79ed642b1 100644 --- a/tests/baselines/reference/transformsElideNullUndefinedType.js +++ b/tests/baselines/reference/transformsElideNullUndefinedType.js @@ -61,6 +61,7 @@ new D(); new D(); //// [transformsElideNullUndefinedType.js] +"use strict"; var v0; var v1; function f0() { return null; } diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js index 065595bc03466..a234c8b8c84b8 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js @@ -122,9 +122,10 @@ Found 6 errors. //// [/home/src/workspaces/soltion/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;;;;;;ICAP,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;;;;;;ICAP,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/lib/module.js] +"use strict"; var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -226,9 +227,10 @@ declare const globalConst = 10; } //// [/home/src/workspaces/soltion/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,KAAK,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file4.ts","file3.ts"],"names":[],"mappings":";;;;;ICAa,QAAA,CAAC,GAAG,EAAE,CAAC;;ADApB,IAAM,KAAK,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/app/module.js] +"use strict"; define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -319,6 +321,7 @@ sources: file0.ts,file1.ts,file2.ts,global.ts emittedFile:/home/src/workspaces/soltion/lib/module.js sourceFile:file0.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var myGlob = 20; 1 > 2 >^^^^ @@ -333,12 +336,12 @@ sourceFile:file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(1, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(1, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(2, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(2, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(2, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(2, 17) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -361,12 +364,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(6, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(7, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(7, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(7, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(7, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(7, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(7, 20) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -390,12 +393,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(12, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(12, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(12, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(12, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(12, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(12, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(13, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(13, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(13, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(13, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(13, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(13, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -416,12 +419,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(14, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(14, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(14, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(14, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(14, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(14, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(15, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(15, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(15, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(15, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(15, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(15, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -546,12 +549,13 @@ sourceFile:global.ts JsFile: module.js mapUrl: module.js.map sourceRoot: -sources: file3.ts,file4.ts +sources: file4.ts,file3.ts =================================================================== ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/app/module.js sourceFile:file3.ts ------------------------------------------------------------------- +>>>"use strict"; >>>define("file3", ["require", "exports"], function (require, exports) { >>> "use strict"; >>> Object.defineProperty(exports, "__esModule", { value: true }); @@ -569,12 +573,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1 >Emitted(5, 5) Source(1, 14) + SourceIndex(0) -2 >Emitted(5, 13) Source(1, 14) + SourceIndex(0) -3 >Emitted(5, 14) Source(1, 15) + SourceIndex(0) -4 >Emitted(5, 17) Source(1, 18) + SourceIndex(0) -5 >Emitted(5, 19) Source(1, 20) + SourceIndex(0) -6 >Emitted(5, 20) Source(1, 21) + SourceIndex(0) +1 >Emitted(6, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/app/module.js @@ -595,12 +599,12 @@ sourceFile:file4.ts 4 > = 5 > 30 6 > ; -1 >Emitted(7, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(7, 5) Source(1, 7) + SourceIndex(1) -3 >Emitted(7, 10) Source(1, 12) + SourceIndex(1) -4 >Emitted(7, 13) Source(1, 15) + SourceIndex(1) -5 >Emitted(7, 15) Source(1, 17) + SourceIndex(1) -6 >Emitted(7, 16) Source(1, 18) + SourceIndex(1) +1 >Emitted(8, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(8, 10) Source(1, 12) + SourceIndex(0) +4 >Emitted(8, 13) Source(1, 15) + SourceIndex(0) +5 >Emitted(8, 15) Source(1, 17) + SourceIndex(0) +6 >Emitted(8, 16) Source(1, 18) + SourceIndex(0) --- >>>//# sourceMappingURL=module.js.map @@ -727,9 +731,10 @@ Found 6 errors. //// [/home/src/workspaces/soltion/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICAtB,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICAtB,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/lib/module.js] +"use strict"; var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -829,6 +834,7 @@ sources: file0.ts,file1.ts,file2.ts,global.ts emittedFile:/home/src/workspaces/soltion/lib/module.js sourceFile:file0.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var myGlob = 20; 1 > 2 >^^^^ @@ -843,12 +849,12 @@ sourceFile:file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(1, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(1, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(2, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(2, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(2, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(2, 17) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -872,12 +878,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(6, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(7, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(7, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(7, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(7, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(7, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(7, 20) Source(1, 21) + SourceIndex(1) --- >>> console.log(exports.x); 1->^^^^ @@ -896,14 +902,14 @@ sourceFile:file1.ts 6 > x 7 > ) 8 > ; -1->Emitted(7, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(7, 12) Source(1, 28) + SourceIndex(1) -3 >Emitted(7, 13) Source(1, 29) + SourceIndex(1) -4 >Emitted(7, 16) Source(1, 32) + SourceIndex(1) -5 >Emitted(7, 17) Source(1, 33) + SourceIndex(1) -6 >Emitted(7, 26) Source(1, 34) + SourceIndex(1) -7 >Emitted(7, 27) Source(1, 35) + SourceIndex(1) -8 >Emitted(7, 28) Source(1, 36) + SourceIndex(1) +1->Emitted(8, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(8, 12) Source(1, 28) + SourceIndex(1) +3 >Emitted(8, 13) Source(1, 29) + SourceIndex(1) +4 >Emitted(8, 16) Source(1, 32) + SourceIndex(1) +5 >Emitted(8, 17) Source(1, 33) + SourceIndex(1) +6 >Emitted(8, 26) Source(1, 34) + SourceIndex(1) +7 >Emitted(8, 27) Source(1, 35) + SourceIndex(1) +8 >Emitted(8, 28) Source(1, 36) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -927,12 +933,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(13, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(13, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(13, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(13, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(13, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(13, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(14, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(14, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(14, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(14, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(14, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(14, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -953,12 +959,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(15, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(15, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(15, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(15, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(15, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(15, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(16, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(16, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(16, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(16, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(16, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(16, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js index 6f6fd92cb47d4..557d7c7b9577f 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js @@ -134,9 +134,10 @@ Found 7 errors. //// [/home/src/workspaces/soltion/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;;;;;;ICAP,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;;;;;;ICAP,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/lib/module.js] +"use strict"; var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -238,9 +239,10 @@ declare const globalConst = 10; } //// [/home/src/workspaces/soltion/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,KAAK,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file4.ts","file3.ts"],"names":[],"mappings":";;;;;ICAa,QAAA,CAAC,GAAG,EAAE,CAAC;;ADApB,IAAM,KAAK,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/app/module.js] +"use strict"; define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -331,6 +333,7 @@ sources: file0.ts,file1.ts,file2.ts,global.ts emittedFile:/home/src/workspaces/soltion/lib/module.js sourceFile:file0.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var myGlob = 20; 1 > 2 >^^^^ @@ -345,12 +348,12 @@ sourceFile:file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(1, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(1, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(2, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(2, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(2, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(2, 17) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -373,12 +376,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(6, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(7, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(7, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(7, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(7, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(7, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(7, 20) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -402,12 +405,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(12, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(12, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(12, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(12, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(12, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(12, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(13, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(13, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(13, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(13, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(13, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(13, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -428,12 +431,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(14, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(14, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(14, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(14, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(14, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(14, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(15, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(15, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(15, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(15, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(15, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(15, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -558,12 +561,13 @@ sourceFile:global.ts JsFile: module.js mapUrl: module.js.map sourceRoot: -sources: file3.ts,file4.ts +sources: file4.ts,file3.ts =================================================================== ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/app/module.js sourceFile:file3.ts ------------------------------------------------------------------- +>>>"use strict"; >>>define("file3", ["require", "exports"], function (require, exports) { >>> "use strict"; >>> Object.defineProperty(exports, "__esModule", { value: true }); @@ -581,12 +585,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1 >Emitted(5, 5) Source(1, 14) + SourceIndex(0) -2 >Emitted(5, 13) Source(1, 14) + SourceIndex(0) -3 >Emitted(5, 14) Source(1, 15) + SourceIndex(0) -4 >Emitted(5, 17) Source(1, 18) + SourceIndex(0) -5 >Emitted(5, 19) Source(1, 20) + SourceIndex(0) -6 >Emitted(5, 20) Source(1, 21) + SourceIndex(0) +1 >Emitted(6, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/app/module.js @@ -607,12 +611,12 @@ sourceFile:file4.ts 4 > = 5 > 30 6 > ; -1 >Emitted(7, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(7, 5) Source(1, 7) + SourceIndex(1) -3 >Emitted(7, 10) Source(1, 12) + SourceIndex(1) -4 >Emitted(7, 13) Source(1, 15) + SourceIndex(1) -5 >Emitted(7, 15) Source(1, 17) + SourceIndex(1) -6 >Emitted(7, 16) Source(1, 18) + SourceIndex(1) +1 >Emitted(8, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(8, 10) Source(1, 12) + SourceIndex(0) +4 >Emitted(8, 13) Source(1, 15) + SourceIndex(0) +5 >Emitted(8, 15) Source(1, 17) + SourceIndex(0) +6 >Emitted(8, 16) Source(1, 18) + SourceIndex(0) --- >>>//# sourceMappingURL=module.js.map @@ -750,9 +754,10 @@ Found 7 errors. //// [/home/src/workspaces/soltion/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICAtB,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;;ICAtB,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/lib/module.js] +"use strict"; var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -852,6 +857,7 @@ sources: file0.ts,file1.ts,file2.ts,global.ts emittedFile:/home/src/workspaces/soltion/lib/module.js sourceFile:file0.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var myGlob = 20; 1 > 2 >^^^^ @@ -866,12 +872,12 @@ sourceFile:file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(1, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(1, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(2, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(2, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(2, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(2, 17) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -895,12 +901,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(6, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(7, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(7, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(7, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(7, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(7, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(7, 20) Source(1, 21) + SourceIndex(1) --- >>> console.log(exports.x); 1->^^^^ @@ -919,14 +925,14 @@ sourceFile:file1.ts 6 > x 7 > ) 8 > ; -1->Emitted(7, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(7, 12) Source(1, 28) + SourceIndex(1) -3 >Emitted(7, 13) Source(1, 29) + SourceIndex(1) -4 >Emitted(7, 16) Source(1, 32) + SourceIndex(1) -5 >Emitted(7, 17) Source(1, 33) + SourceIndex(1) -6 >Emitted(7, 26) Source(1, 34) + SourceIndex(1) -7 >Emitted(7, 27) Source(1, 35) + SourceIndex(1) -8 >Emitted(7, 28) Source(1, 36) + SourceIndex(1) +1->Emitted(8, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(8, 12) Source(1, 28) + SourceIndex(1) +3 >Emitted(8, 13) Source(1, 29) + SourceIndex(1) +4 >Emitted(8, 16) Source(1, 32) + SourceIndex(1) +5 >Emitted(8, 17) Source(1, 33) + SourceIndex(1) +6 >Emitted(8, 26) Source(1, 34) + SourceIndex(1) +7 >Emitted(8, 27) Source(1, 35) + SourceIndex(1) +8 >Emitted(8, 28) Source(1, 36) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -950,12 +956,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(13, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(13, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(13, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(13, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(13, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(13, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(14, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(14, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(14, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(14, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(14, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(14, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/lib/module.js @@ -976,12 +982,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(15, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(15, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(15, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(15, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(15, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(15, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(16, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(16, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(16, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(16, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(16, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(16, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js index 747ced5ae21b5..e2f7aab717c4b 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js @@ -122,9 +122,10 @@ Found 6 errors. //// [/home/src/workspaces/soltion/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["lib/file0.ts","lib/file1.ts","lib/file2.ts","lib/global.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;;;;;;ICAP,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["lib/file0.ts","lib/file1.ts","lib/file2.ts","lib/global.ts"],"names":[],"mappings":";AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;ICAL,QAAA,CAAC,GAAG,EAAE,CAAC;;;;;;ICAP,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/module.js] +"use strict"; var myGlob = 20; define("lib/file1", ["require", "exports"], function (require, exports) { "use strict"; @@ -227,9 +228,10 @@ declare const globalConst = 10; } //// [/home/src/workspaces/soltion/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,KAAK,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file4.ts","file3.ts"],"names":[],"mappings":";;;;;ICAa,QAAA,CAAC,GAAG,EAAE,CAAC;;ADApB,IAAM,KAAK,GAAG,EAAE,CAAC"} //// [/home/src/workspaces/soltion/app/module.js] +"use strict"; define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -320,6 +322,7 @@ sources: lib/file0.ts,lib/file1.ts,lib/file2.ts,lib/global.ts emittedFile:/home/src/workspaces/soltion/module.js sourceFile:lib/file0.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var myGlob = 20; 1 > 2 >^^^^ @@ -334,12 +337,12 @@ sourceFile:lib/file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(1, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(1, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(2, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(2, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(2, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(2, 17) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/module.js @@ -362,12 +365,12 @@ sourceFile:lib/file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(6, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(7, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(7, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(7, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(7, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(7, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(7, 20) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/module.js @@ -391,12 +394,12 @@ sourceFile:lib/file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(12, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(12, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(12, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(12, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(12, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(12, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(13, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(13, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(13, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(13, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(13, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(13, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/module.js @@ -417,12 +420,12 @@ sourceFile:lib/global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(14, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(14, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(14, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(14, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(14, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(14, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(15, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(15, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(15, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(15, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(15, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(15, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -548,12 +551,13 @@ sourceFile:lib/global.ts JsFile: module.js mapUrl: module.js.map sourceRoot: -sources: file3.ts,file4.ts +sources: file4.ts,file3.ts =================================================================== ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/app/module.js sourceFile:file3.ts ------------------------------------------------------------------- +>>>"use strict"; >>>define("file3", ["require", "exports"], function (require, exports) { >>> "use strict"; >>> Object.defineProperty(exports, "__esModule", { value: true }); @@ -571,12 +575,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1 >Emitted(5, 5) Source(1, 14) + SourceIndex(0) -2 >Emitted(5, 13) Source(1, 14) + SourceIndex(0) -3 >Emitted(5, 14) Source(1, 15) + SourceIndex(0) -4 >Emitted(5, 17) Source(1, 18) + SourceIndex(0) -5 >Emitted(5, 19) Source(1, 20) + SourceIndex(0) -6 >Emitted(5, 20) Source(1, 21) + SourceIndex(0) +1 >Emitted(6, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(6, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(6, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(6, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(6, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(6, 20) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/soltion/app/module.js @@ -597,12 +601,12 @@ sourceFile:file4.ts 4 > = 5 > 30 6 > ; -1 >Emitted(7, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(7, 5) Source(1, 7) + SourceIndex(1) -3 >Emitted(7, 10) Source(1, 12) + SourceIndex(1) -4 >Emitted(7, 13) Source(1, 15) + SourceIndex(1) -5 >Emitted(7, 15) Source(1, 17) + SourceIndex(1) -6 >Emitted(7, 16) Source(1, 18) + SourceIndex(1) +1 >Emitted(8, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(8, 10) Source(1, 12) + SourceIndex(0) +4 >Emitted(8, 13) Source(1, 15) + SourceIndex(0) +5 >Emitted(8, 15) Source(1, 17) + SourceIndex(0) +6 >Emitted(8, 16) Source(1, 18) + SourceIndex(0) --- >>>//# sourceMappingURL=module.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js index bb35ebe79848b..4cb1902f16eee 100644 --- a/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js @@ -205,9 +205,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -295,9 +296,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -385,9 +387,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map @@ -468,6 +471,7 @@ sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts emittedFile:/home/src/workspaces/solution/first/bin/first-output.js sourceFile:../first_PART1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var s = "Hello, world"; 1 > 2 >^^^^ @@ -485,12 +489,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(1, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(1, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(1, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(2, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -516,14 +520,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(2, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -548,15 +552,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(3, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(3, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(3, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(3, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(3, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(3, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(3, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(3, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -570,9 +574,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(4, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(4, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(4, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -584,10 +588,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(5, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(5, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(5, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(5, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -596,8 +600,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(6, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(6, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -742,6 +746,7 @@ sources: ../second/second_part1.ts,../second/second_part2.ts emittedFile:/home/src/workspaces/solution/2/second-output.js sourceFile:../second/second_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var N; 1 > 2 >^^^^ @@ -762,10 +767,10 @@ sourceFile:../second/second_part1.ts > > f(); > } -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 11) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 12) + SourceIndex(0) -4 >Emitted(1, 7) Source(11, 2) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 11) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 12) + SourceIndex(0) +4 >Emitted(2, 7) Source(11, 2) + SourceIndex(0) --- >>>(function (N) { 1-> @@ -775,9 +780,9 @@ sourceFile:../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(2, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(2, 12) Source(5, 11) + SourceIndex(0) -3 >Emitted(2, 13) Source(5, 12) + SourceIndex(0) +1->Emitted(3, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(3, 12) Source(5, 11) + SourceIndex(0) +3 >Emitted(3, 13) Source(5, 12) + SourceIndex(0) --- >>> function f() { 1->^^^^ @@ -788,9 +793,9 @@ sourceFile:../second/second_part1.ts > 2 > function 3 > f -1->Emitted(3, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(3, 14) Source(6, 14) + SourceIndex(0) -3 >Emitted(3, 15) Source(6, 15) + SourceIndex(0) +1->Emitted(4, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(4, 14) Source(6, 14) + SourceIndex(0) +3 >Emitted(4, 15) Source(6, 15) + SourceIndex(0) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -810,14 +815,14 @@ sourceFile:../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(4, 9) Source(7, 9) + SourceIndex(0) -2 >Emitted(4, 16) Source(7, 16) + SourceIndex(0) -3 >Emitted(4, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(4, 20) Source(7, 20) + SourceIndex(0) -5 >Emitted(4, 21) Source(7, 21) + SourceIndex(0) -6 >Emitted(4, 30) Source(7, 30) + SourceIndex(0) -7 >Emitted(4, 31) Source(7, 31) + SourceIndex(0) -8 >Emitted(4, 32) Source(7, 32) + SourceIndex(0) +1->Emitted(5, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(5, 16) Source(7, 16) + SourceIndex(0) +3 >Emitted(5, 17) Source(7, 17) + SourceIndex(0) +4 >Emitted(5, 20) Source(7, 20) + SourceIndex(0) +5 >Emitted(5, 21) Source(7, 21) + SourceIndex(0) +6 >Emitted(5, 30) Source(7, 30) + SourceIndex(0) +7 >Emitted(5, 31) Source(7, 31) + SourceIndex(0) +8 >Emitted(5, 32) Source(7, 32) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -826,8 +831,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 > } -1 >Emitted(5, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(5, 6) Source(8, 6) + SourceIndex(0) +1 >Emitted(6, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(8, 6) + SourceIndex(0) --- >>> f(); 1->^^^^ @@ -841,10 +846,10 @@ sourceFile:../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(6, 5) Source(10, 5) + SourceIndex(0) -2 >Emitted(6, 6) Source(10, 6) + SourceIndex(0) -3 >Emitted(6, 8) Source(10, 8) + SourceIndex(0) -4 >Emitted(6, 9) Source(10, 9) + SourceIndex(0) +1->Emitted(7, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(7, 6) Source(10, 6) + SourceIndex(0) +3 >Emitted(7, 8) Source(10, 8) + SourceIndex(0) +4 >Emitted(7, 9) Source(10, 9) + SourceIndex(0) --- >>>})(N || (N = {})); 1-> @@ -869,13 +874,13 @@ sourceFile:../second/second_part1.ts > > f(); > } -1->Emitted(7, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(7, 2) Source(11, 2) + SourceIndex(0) -3 >Emitted(7, 4) Source(5, 11) + SourceIndex(0) -4 >Emitted(7, 5) Source(5, 12) + SourceIndex(0) -5 >Emitted(7, 10) Source(5, 11) + SourceIndex(0) -6 >Emitted(7, 11) Source(5, 12) + SourceIndex(0) -7 >Emitted(7, 19) Source(11, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(11, 2) + SourceIndex(0) +3 >Emitted(8, 4) Source(5, 11) + SourceIndex(0) +4 >Emitted(8, 5) Source(5, 12) + SourceIndex(0) +5 >Emitted(8, 10) Source(5, 11) + SourceIndex(0) +6 >Emitted(8, 11) Source(5, 12) + SourceIndex(0) +7 >Emitted(8, 19) Source(11, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/2/second-output.js @@ -885,13 +890,13 @@ sourceFile:../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(8, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^-> 1-> -1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(10, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -903,8 +908,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(10, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(10, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(11, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(11, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -914,9 +919,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(11, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(11, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(11, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(12, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(12, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(12, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -936,14 +941,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(12, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(12, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(12, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(12, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(12, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(12, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(12, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(12, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(13, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(13, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(13, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(13, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(13, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(13, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(13, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(13, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -952,8 +957,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(13, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(13, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(14, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -961,8 +966,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(14, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(14, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -978,10 +983,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(15, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(15, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(15, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(16, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(16, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(16, 6) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -1093,6 +1098,7 @@ sources: ../../third_part1.ts emittedFile:/home/src/workspaces/solution/third/thirdjs/output/third-output.js sourceFile:../../third_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var c = new C(); 1 > 2 >^^^^ @@ -1110,14 +1116,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 13) Source(1, 13) + SourceIndex(0) -6 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -7 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -8 >Emitted(1, 17) Source(1, 17) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(2, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(2, 9) Source(1, 9) + SourceIndex(0) +5 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +6 >Emitted(2, 14) Source(1, 14) + SourceIndex(0) +7 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +8 >Emitted(2, 17) Source(1, 17) + SourceIndex(0) --- >>>c.doSomething(); 1 > @@ -1134,12 +1140,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(2, 3) Source(2, 3) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(3, 3) Source(2, 3) + SourceIndex(0) +4 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) +5 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) +6 >Emitted(3, 17) Source(2, 17) + SourceIndex(0) --- >>>//# sourceMappingURL=third-output.js.map @@ -1288,9 +1294,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hola, world"; console.log(s); console.log(f()); @@ -1449,6 +1456,7 @@ sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts emittedFile:/home/src/workspaces/solution/first/bin/first-output.js sourceFile:../first_PART1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var s = "Hola, world"; 1 > 2 >^^^^ @@ -1466,12 +1474,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hola, world" 6 > ; -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(1, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(1, 22) Source(5, 24) + SourceIndex(0) -6 >Emitted(1, 23) Source(5, 25) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 22) Source(5, 24) + SourceIndex(0) +6 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1497,14 +1505,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(2, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -1529,15 +1537,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(3, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(3, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(3, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(3, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(3, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(3, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(3, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(3, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -1551,9 +1559,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(4, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(4, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(4, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1565,10 +1573,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(5, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(5, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(5, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(5, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1577,8 +1585,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(6, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(6, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -1828,9 +1836,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hola, world"; console.log(s); console.log(s); @@ -1916,6 +1925,7 @@ sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts emittedFile:/home/src/workspaces/solution/first/bin/first-output.js sourceFile:../first_PART1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var s = "Hola, world"; 1 > 2 >^^^^ @@ -1933,12 +1943,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hola, world" 6 > ; -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(1, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(1, 22) Source(5, 24) + SourceIndex(0) -6 >Emitted(1, 23) Source(5, 25) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 22) Source(5, 24) + SourceIndex(0) +6 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1963,14 +1973,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(2, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1991,14 +2001,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(3, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(3, 8) Source(12, 8) + SourceIndex(0) -3 >Emitted(3, 9) Source(12, 9) + SourceIndex(0) -4 >Emitted(3, 12) Source(12, 12) + SourceIndex(0) -5 >Emitted(3, 13) Source(12, 13) + SourceIndex(0) -6 >Emitted(3, 14) Source(12, 14) + SourceIndex(0) -7 >Emitted(3, 15) Source(12, 15) + SourceIndex(0) -8 >Emitted(3, 16) Source(12, 16) + SourceIndex(0) +1 >Emitted(4, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(4, 8) Source(12, 8) + SourceIndex(0) +3 >Emitted(4, 9) Source(12, 9) + SourceIndex(0) +4 >Emitted(4, 12) Source(12, 12) + SourceIndex(0) +5 >Emitted(4, 13) Source(12, 13) + SourceIndex(0) +6 >Emitted(4, 14) Source(12, 14) + SourceIndex(0) +7 >Emitted(4, 15) Source(12, 15) + SourceIndex(0) +8 >Emitted(4, 16) Source(12, 16) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -2023,15 +2033,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(5, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(5, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(5, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(5, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(5, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(5, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(5, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(5, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(5, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -2045,9 +2055,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(6, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(6, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(6, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -2059,10 +2069,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(7, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(7, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(7, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(7, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -2071,8 +2081,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(8, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(8, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js b/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js index 1e66009f42ae5..9158142247af6 100644 --- a/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/outFile/builds-till-project-specified.js @@ -143,9 +143,10 @@ Output:: //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { diff --git a/tests/baselines/reference/tsbuild/outFile/clean-projects.js b/tests/baselines/reference/tsbuild/outFile/clean-projects.js index ff2c554508859..2a63cb767eabe 100644 --- a/tests/baselines/reference/tsbuild/outFile/clean-projects.js +++ b/tests/baselines/reference/tsbuild/outFile/clean-projects.js @@ -128,9 +128,10 @@ interface ReadonlyArray {} declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -218,9 +219,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -308,9 +310,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js b/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js index 73b33cee9ae93..99926a573f072 100644 --- a/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js @@ -128,9 +128,10 @@ interface ReadonlyArray {} declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -218,9 +219,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -308,9 +310,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js b/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js index 57377d1c95a0a..413614a98fec5 100644 --- a/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js +++ b/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js @@ -183,9 +183,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/first_PART1.js.map] -{"version":3,"file":"first_PART1.js","sourceRoot":"","sources":["first_PART1.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC"} +{"version":3,"file":"first_PART1.js","sourceRoot":"","sources":["first_PART1.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC"} //// [/home/src/workspaces/solution/first/first_PART1.js] +"use strict"; var s = "Hello, world"; console.log(s); //# sourceMappingURL=first_PART1.js.map @@ -204,9 +205,10 @@ interface NoJsForHereEither { //# sourceMappingURL=first_PART1.d.ts.map //// [/home/src/workspaces/solution/first/first_part2.js.map] -{"version":3,"file":"first_part2.js","sourceRoot":"","sources":["first_part2.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC"} +{"version":3,"file":"first_part2.js","sourceRoot":"","sources":["first_part2.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC"} //// [/home/src/workspaces/solution/first/first_part2.js] +"use strict"; console.log(f()); //# sourceMappingURL=first_part2.js.map @@ -217,9 +219,10 @@ console.log(f()); //# sourceMappingURL=first_part2.d.ts.map //// [/home/src/workspaces/solution/first/first_part3.js.map] -{"version":3,"file":"first_part3.js","sourceRoot":"","sources":["first_part3.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first_part3.js","sourceRoot":"","sources":["first_part3.ts"],"names":[],"mappings":";AAAA,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/first_part3.js] +"use strict"; function f() { return "JS does hoists"; } @@ -331,9 +334,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/second/second_part1.js.map] -{"version":3,"file":"second_part1.js","sourceRoot":"","sources":["second_part1.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV"} +{"version":3,"file":"second_part1.js","sourceRoot":"","sources":["second_part1.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV"} //// [/home/src/workspaces/solution/second/second_part1.js] +"use strict"; var N; (function (N) { function f() { @@ -354,9 +358,10 @@ declare namespace N { //# sourceMappingURL=second_part1.d.ts.map //// [/home/src/workspaces/solution/second/second_part2.js.map] -{"version":3,"file":"second_part2.js","sourceRoot":"","sources":["second_part2.ts"],"names":[],"mappings":"AAAA;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second_part2.js","sourceRoot":"","sources":["second_part2.ts"],"names":[],"mappings":";AAAA;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/second/second_part2.js] +"use strict"; var C = (function () { function C() { } @@ -458,9 +463,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/third_part1.js.map] -{"version":3,"file":"third_part1.js","sourceRoot":"","sources":["third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third_part1.js","sourceRoot":"","sources":["third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/third_part1.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third_part1.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js index dc8659fe740d1..dc5cd6f28b088 100644 --- a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js +++ b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js @@ -183,9 +183,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -273,9 +274,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -363,9 +365,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map @@ -498,9 +501,10 @@ Found 4 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(s); @@ -656,9 +660,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACX9B,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACX9B,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(s); diff --git a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js index 1e46c167014bd..9e0a1891adb6e 100644 --- a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js +++ b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js @@ -128,9 +128,10 @@ interface ReadonlyArray {} declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -218,9 +219,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -308,9 +310,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js index 69fa5e61fc731..c4c56ecf5ca6a 100644 --- a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js +++ b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js @@ -183,9 +183,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -273,9 +274,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -363,9 +365,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js b/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js index 8c590ef2738d6..dc0c1ff2a3f3c 100644 --- a/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js +++ b/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js @@ -128,9 +128,10 @@ interface ReadonlyArray {} declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -215,9 +216,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -305,9 +307,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js index d3374885cc827..ada79fcce95fb 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js +++ b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js @@ -183,9 +183,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -273,9 +274,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -363,9 +365,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map @@ -443,6 +446,7 @@ sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts emittedFile:/home/src/workspaces/solution/first/bin/first-output.js sourceFile:../first_PART1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var s = "Hello, world"; 1 > 2 >^^^^ @@ -460,12 +464,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(1, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(1, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(1, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(2, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -491,14 +495,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(2, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -523,15 +527,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(3, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(3, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(3, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(3, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(3, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(3, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(3, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(3, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -545,9 +549,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(4, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(4, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(4, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -559,10 +563,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(5, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(5, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(5, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(5, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -571,8 +575,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(6, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(6, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -717,6 +721,7 @@ sources: ../second/second_part1.ts,../second/second_part2.ts emittedFile:/home/src/workspaces/solution/2/second-output.js sourceFile:../second/second_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var N; 1 > 2 >^^^^ @@ -737,10 +742,10 @@ sourceFile:../second/second_part1.ts > > f(); > } -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 11) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 12) + SourceIndex(0) -4 >Emitted(1, 7) Source(11, 2) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 11) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 12) + SourceIndex(0) +4 >Emitted(2, 7) Source(11, 2) + SourceIndex(0) --- >>>(function (N) { 1-> @@ -750,9 +755,9 @@ sourceFile:../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(2, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(2, 12) Source(5, 11) + SourceIndex(0) -3 >Emitted(2, 13) Source(5, 12) + SourceIndex(0) +1->Emitted(3, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(3, 12) Source(5, 11) + SourceIndex(0) +3 >Emitted(3, 13) Source(5, 12) + SourceIndex(0) --- >>> function f() { 1->^^^^ @@ -763,9 +768,9 @@ sourceFile:../second/second_part1.ts > 2 > function 3 > f -1->Emitted(3, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(3, 14) Source(6, 14) + SourceIndex(0) -3 >Emitted(3, 15) Source(6, 15) + SourceIndex(0) +1->Emitted(4, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(4, 14) Source(6, 14) + SourceIndex(0) +3 >Emitted(4, 15) Source(6, 15) + SourceIndex(0) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -785,14 +790,14 @@ sourceFile:../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(4, 9) Source(7, 9) + SourceIndex(0) -2 >Emitted(4, 16) Source(7, 16) + SourceIndex(0) -3 >Emitted(4, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(4, 20) Source(7, 20) + SourceIndex(0) -5 >Emitted(4, 21) Source(7, 21) + SourceIndex(0) -6 >Emitted(4, 30) Source(7, 30) + SourceIndex(0) -7 >Emitted(4, 31) Source(7, 31) + SourceIndex(0) -8 >Emitted(4, 32) Source(7, 32) + SourceIndex(0) +1->Emitted(5, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(5, 16) Source(7, 16) + SourceIndex(0) +3 >Emitted(5, 17) Source(7, 17) + SourceIndex(0) +4 >Emitted(5, 20) Source(7, 20) + SourceIndex(0) +5 >Emitted(5, 21) Source(7, 21) + SourceIndex(0) +6 >Emitted(5, 30) Source(7, 30) + SourceIndex(0) +7 >Emitted(5, 31) Source(7, 31) + SourceIndex(0) +8 >Emitted(5, 32) Source(7, 32) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -801,8 +806,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 > } -1 >Emitted(5, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(5, 6) Source(8, 6) + SourceIndex(0) +1 >Emitted(6, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(8, 6) + SourceIndex(0) --- >>> f(); 1->^^^^ @@ -816,10 +821,10 @@ sourceFile:../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(6, 5) Source(10, 5) + SourceIndex(0) -2 >Emitted(6, 6) Source(10, 6) + SourceIndex(0) -3 >Emitted(6, 8) Source(10, 8) + SourceIndex(0) -4 >Emitted(6, 9) Source(10, 9) + SourceIndex(0) +1->Emitted(7, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(7, 6) Source(10, 6) + SourceIndex(0) +3 >Emitted(7, 8) Source(10, 8) + SourceIndex(0) +4 >Emitted(7, 9) Source(10, 9) + SourceIndex(0) --- >>>})(N || (N = {})); 1-> @@ -844,13 +849,13 @@ sourceFile:../second/second_part1.ts > > f(); > } -1->Emitted(7, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(7, 2) Source(11, 2) + SourceIndex(0) -3 >Emitted(7, 4) Source(5, 11) + SourceIndex(0) -4 >Emitted(7, 5) Source(5, 12) + SourceIndex(0) -5 >Emitted(7, 10) Source(5, 11) + SourceIndex(0) -6 >Emitted(7, 11) Source(5, 12) + SourceIndex(0) -7 >Emitted(7, 19) Source(11, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(11, 2) + SourceIndex(0) +3 >Emitted(8, 4) Source(5, 11) + SourceIndex(0) +4 >Emitted(8, 5) Source(5, 12) + SourceIndex(0) +5 >Emitted(8, 10) Source(5, 11) + SourceIndex(0) +6 >Emitted(8, 11) Source(5, 12) + SourceIndex(0) +7 >Emitted(8, 19) Source(11, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/2/second-output.js @@ -860,13 +865,13 @@ sourceFile:../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(8, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^-> 1-> -1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(10, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -878,8 +883,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(10, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(10, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(11, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(11, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -889,9 +894,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(11, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(11, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(11, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(12, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(12, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(12, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -911,14 +916,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(12, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(12, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(12, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(12, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(12, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(12, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(12, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(12, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(13, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(13, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(13, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(13, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(13, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(13, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(13, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(13, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -927,8 +932,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(13, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(13, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(14, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -936,8 +941,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(14, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(14, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -953,10 +958,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(15, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(15, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(15, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(16, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(16, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(16, 6) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -1068,6 +1073,7 @@ sources: ../../third_part1.ts emittedFile:/home/src/workspaces/solution/third/thirdjs/output/third-output.js sourceFile:../../third_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var c = new C(); 1 > 2 >^^^^ @@ -1085,14 +1091,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 13) Source(1, 13) + SourceIndex(0) -6 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -7 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -8 >Emitted(1, 17) Source(1, 17) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(2, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(2, 9) Source(1, 9) + SourceIndex(0) +5 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +6 >Emitted(2, 14) Source(1, 14) + SourceIndex(0) +7 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +8 >Emitted(2, 17) Source(1, 17) + SourceIndex(0) --- >>>c.doSomething(); 1 > @@ -1109,12 +1115,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(2, 3) Source(2, 3) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(3, 3) Source(2, 3) + SourceIndex(0) +4 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) +5 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) +6 >Emitted(3, 17) Source(2, 17) + SourceIndex(0) --- >>>//# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js index b11d2d1755a64..1d3f6106fcc4f 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js @@ -183,9 +183,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -273,9 +274,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -363,9 +365,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map @@ -401,6 +404,7 @@ sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts emittedFile:/home/src/workspaces/solution/first/bin/first-output.js sourceFile:../first_PART1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var s = "Hello, world"; 1 > 2 >^^^^ @@ -418,12 +422,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(1, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(1, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(1, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(2, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -449,14 +453,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(2, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -481,15 +485,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(3, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(3, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(3, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(3, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(3, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(3, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(3, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(3, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -503,9 +507,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(4, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(4, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(4, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -517,10 +521,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(5, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(5, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(5, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(5, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -529,8 +533,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(6, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(6, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -675,6 +679,7 @@ sources: ../second/second_part1.ts,../second/second_part2.ts emittedFile:/home/src/workspaces/solution/2/second-output.js sourceFile:../second/second_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var N; 1 > 2 >^^^^ @@ -695,10 +700,10 @@ sourceFile:../second/second_part1.ts > > f(); > } -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 11) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 12) + SourceIndex(0) -4 >Emitted(1, 7) Source(11, 2) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 11) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 12) + SourceIndex(0) +4 >Emitted(2, 7) Source(11, 2) + SourceIndex(0) --- >>>(function (N) { 1-> @@ -708,9 +713,9 @@ sourceFile:../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(2, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(2, 12) Source(5, 11) + SourceIndex(0) -3 >Emitted(2, 13) Source(5, 12) + SourceIndex(0) +1->Emitted(3, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(3, 12) Source(5, 11) + SourceIndex(0) +3 >Emitted(3, 13) Source(5, 12) + SourceIndex(0) --- >>> function f() { 1->^^^^ @@ -721,9 +726,9 @@ sourceFile:../second/second_part1.ts > 2 > function 3 > f -1->Emitted(3, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(3, 14) Source(6, 14) + SourceIndex(0) -3 >Emitted(3, 15) Source(6, 15) + SourceIndex(0) +1->Emitted(4, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(4, 14) Source(6, 14) + SourceIndex(0) +3 >Emitted(4, 15) Source(6, 15) + SourceIndex(0) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -743,14 +748,14 @@ sourceFile:../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(4, 9) Source(7, 9) + SourceIndex(0) -2 >Emitted(4, 16) Source(7, 16) + SourceIndex(0) -3 >Emitted(4, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(4, 20) Source(7, 20) + SourceIndex(0) -5 >Emitted(4, 21) Source(7, 21) + SourceIndex(0) -6 >Emitted(4, 30) Source(7, 30) + SourceIndex(0) -7 >Emitted(4, 31) Source(7, 31) + SourceIndex(0) -8 >Emitted(4, 32) Source(7, 32) + SourceIndex(0) +1->Emitted(5, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(5, 16) Source(7, 16) + SourceIndex(0) +3 >Emitted(5, 17) Source(7, 17) + SourceIndex(0) +4 >Emitted(5, 20) Source(7, 20) + SourceIndex(0) +5 >Emitted(5, 21) Source(7, 21) + SourceIndex(0) +6 >Emitted(5, 30) Source(7, 30) + SourceIndex(0) +7 >Emitted(5, 31) Source(7, 31) + SourceIndex(0) +8 >Emitted(5, 32) Source(7, 32) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -759,8 +764,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 > } -1 >Emitted(5, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(5, 6) Source(8, 6) + SourceIndex(0) +1 >Emitted(6, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(8, 6) + SourceIndex(0) --- >>> f(); 1->^^^^ @@ -774,10 +779,10 @@ sourceFile:../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(6, 5) Source(10, 5) + SourceIndex(0) -2 >Emitted(6, 6) Source(10, 6) + SourceIndex(0) -3 >Emitted(6, 8) Source(10, 8) + SourceIndex(0) -4 >Emitted(6, 9) Source(10, 9) + SourceIndex(0) +1->Emitted(7, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(7, 6) Source(10, 6) + SourceIndex(0) +3 >Emitted(7, 8) Source(10, 8) + SourceIndex(0) +4 >Emitted(7, 9) Source(10, 9) + SourceIndex(0) --- >>>})(N || (N = {})); 1-> @@ -802,13 +807,13 @@ sourceFile:../second/second_part1.ts > > f(); > } -1->Emitted(7, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(7, 2) Source(11, 2) + SourceIndex(0) -3 >Emitted(7, 4) Source(5, 11) + SourceIndex(0) -4 >Emitted(7, 5) Source(5, 12) + SourceIndex(0) -5 >Emitted(7, 10) Source(5, 11) + SourceIndex(0) -6 >Emitted(7, 11) Source(5, 12) + SourceIndex(0) -7 >Emitted(7, 19) Source(11, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(11, 2) + SourceIndex(0) +3 >Emitted(8, 4) Source(5, 11) + SourceIndex(0) +4 >Emitted(8, 5) Source(5, 12) + SourceIndex(0) +5 >Emitted(8, 10) Source(5, 11) + SourceIndex(0) +6 >Emitted(8, 11) Source(5, 12) + SourceIndex(0) +7 >Emitted(8, 19) Source(11, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/2/second-output.js @@ -818,13 +823,13 @@ sourceFile:../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(8, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^-> 1-> -1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(10, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -836,8 +841,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(10, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(10, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(11, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(11, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -847,9 +852,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(11, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(11, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(11, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(12, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(12, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(12, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -869,14 +874,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(12, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(12, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(12, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(12, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(12, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(12, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(12, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(12, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(13, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(13, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(13, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(13, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(13, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(13, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(13, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(13, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -885,8 +890,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(13, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(13, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(14, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -894,8 +899,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(14, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(14, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -911,10 +916,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(15, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(15, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(15, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(16, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(16, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(16, 6) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -1026,6 +1031,7 @@ sources: ../../third_part1.ts emittedFile:/home/src/workspaces/solution/third/thirdjs/output/third-output.js sourceFile:../../third_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var c = new C(); 1 > 2 >^^^^ @@ -1043,14 +1049,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 13) Source(1, 13) + SourceIndex(0) -6 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -7 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -8 >Emitted(1, 17) Source(1, 17) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(2, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(2, 9) Source(1, 9) + SourceIndex(0) +5 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +6 >Emitted(2, 14) Source(1, 14) + SourceIndex(0) +7 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +8 >Emitted(2, 17) Source(1, 17) + SourceIndex(0) --- >>>c.doSomething(); 1 > @@ -1067,12 +1073,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(2, 3) Source(2, 3) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(3, 3) Source(2, 3) + SourceIndex(0) +4 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) +5 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) +6 >Emitted(3, 17) Source(2, 17) + SourceIndex(0) --- >>>//# sourceMappingURL=third-output.js.map @@ -1186,9 +1192,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(s); @@ -1280,6 +1287,7 @@ sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts emittedFile:/home/src/workspaces/solution/first/bin/first-output.js sourceFile:../first_PART1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var s = "Hello, world"; 1 > 2 >^^^^ @@ -1297,12 +1305,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(1, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(1, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(1, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(2, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1327,14 +1335,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(2, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1355,14 +1363,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(3, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(3, 8) Source(12, 8) + SourceIndex(0) -3 >Emitted(3, 9) Source(12, 9) + SourceIndex(0) -4 >Emitted(3, 12) Source(12, 12) + SourceIndex(0) -5 >Emitted(3, 13) Source(12, 13) + SourceIndex(0) -6 >Emitted(3, 14) Source(12, 14) + SourceIndex(0) -7 >Emitted(3, 15) Source(12, 15) + SourceIndex(0) -8 >Emitted(3, 16) Source(12, 16) + SourceIndex(0) +1 >Emitted(4, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(4, 8) Source(12, 8) + SourceIndex(0) +3 >Emitted(4, 9) Source(12, 9) + SourceIndex(0) +4 >Emitted(4, 12) Source(12, 12) + SourceIndex(0) +5 >Emitted(4, 13) Source(12, 13) + SourceIndex(0) +6 >Emitted(4, 14) Source(12, 14) + SourceIndex(0) +7 >Emitted(4, 15) Source(12, 15) + SourceIndex(0) +8 >Emitted(4, 16) Source(12, 16) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -1387,15 +1395,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(5, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(5, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(5, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(5, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(5, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(5, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(5, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(5, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(5, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -1409,9 +1417,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(6, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(6, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(6, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1423,10 +1431,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(7, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(7, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(7, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(7, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1435,8 +1443,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(8, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(8, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js index 8dcb6a76dcc4c..c141a5ccc9975 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js @@ -184,9 +184,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -274,9 +275,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -364,9 +366,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map @@ -448,6 +451,7 @@ sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts emittedFile:/home/src/workspaces/solution/first/bin/first-output.js sourceFile:../first_PART1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var s = "Hello, world"; 1 > 2 >^^^^ @@ -465,12 +469,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(1, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(1, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(1, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(2, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -496,14 +500,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(2, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(2, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(2, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(2, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(2, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(2, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(2, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(2, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -528,15 +532,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(3, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(3, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(3, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(3, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(3, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(3, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(3, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(3, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/first/bin/first-output.js @@ -550,9 +554,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(4, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(4, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(4, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -564,10 +568,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(5, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(5, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(5, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(5, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -576,8 +580,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(6, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(6, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -722,6 +726,7 @@ sources: ../second/second_part1.ts,../second/second_part2.ts emittedFile:/home/src/workspaces/solution/2/second-output.js sourceFile:../second/second_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var N; 1 > 2 >^^^^ @@ -742,10 +747,10 @@ sourceFile:../second/second_part1.ts > > f(); > } -1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(5, 11) + SourceIndex(0) -3 >Emitted(1, 6) Source(5, 12) + SourceIndex(0) -4 >Emitted(1, 7) Source(11, 2) + SourceIndex(0) +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 11) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 12) + SourceIndex(0) +4 >Emitted(2, 7) Source(11, 2) + SourceIndex(0) --- >>>(function (N) { 1-> @@ -755,9 +760,9 @@ sourceFile:../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(2, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(2, 12) Source(5, 11) + SourceIndex(0) -3 >Emitted(2, 13) Source(5, 12) + SourceIndex(0) +1->Emitted(3, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(3, 12) Source(5, 11) + SourceIndex(0) +3 >Emitted(3, 13) Source(5, 12) + SourceIndex(0) --- >>> function f() { 1->^^^^ @@ -768,9 +773,9 @@ sourceFile:../second/second_part1.ts > 2 > function 3 > f -1->Emitted(3, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(3, 14) Source(6, 14) + SourceIndex(0) -3 >Emitted(3, 15) Source(6, 15) + SourceIndex(0) +1->Emitted(4, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(4, 14) Source(6, 14) + SourceIndex(0) +3 >Emitted(4, 15) Source(6, 15) + SourceIndex(0) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -790,14 +795,14 @@ sourceFile:../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(4, 9) Source(7, 9) + SourceIndex(0) -2 >Emitted(4, 16) Source(7, 16) + SourceIndex(0) -3 >Emitted(4, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(4, 20) Source(7, 20) + SourceIndex(0) -5 >Emitted(4, 21) Source(7, 21) + SourceIndex(0) -6 >Emitted(4, 30) Source(7, 30) + SourceIndex(0) -7 >Emitted(4, 31) Source(7, 31) + SourceIndex(0) -8 >Emitted(4, 32) Source(7, 32) + SourceIndex(0) +1->Emitted(5, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(5, 16) Source(7, 16) + SourceIndex(0) +3 >Emitted(5, 17) Source(7, 17) + SourceIndex(0) +4 >Emitted(5, 20) Source(7, 20) + SourceIndex(0) +5 >Emitted(5, 21) Source(7, 21) + SourceIndex(0) +6 >Emitted(5, 30) Source(7, 30) + SourceIndex(0) +7 >Emitted(5, 31) Source(7, 31) + SourceIndex(0) +8 >Emitted(5, 32) Source(7, 32) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -806,8 +811,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 > } -1 >Emitted(5, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(5, 6) Source(8, 6) + SourceIndex(0) +1 >Emitted(6, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(8, 6) + SourceIndex(0) --- >>> f(); 1->^^^^ @@ -821,10 +826,10 @@ sourceFile:../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(6, 5) Source(10, 5) + SourceIndex(0) -2 >Emitted(6, 6) Source(10, 6) + SourceIndex(0) -3 >Emitted(6, 8) Source(10, 8) + SourceIndex(0) -4 >Emitted(6, 9) Source(10, 9) + SourceIndex(0) +1->Emitted(7, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(7, 6) Source(10, 6) + SourceIndex(0) +3 >Emitted(7, 8) Source(10, 8) + SourceIndex(0) +4 >Emitted(7, 9) Source(10, 9) + SourceIndex(0) --- >>>})(N || (N = {})); 1-> @@ -849,13 +854,13 @@ sourceFile:../second/second_part1.ts > > f(); > } -1->Emitted(7, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(7, 2) Source(11, 2) + SourceIndex(0) -3 >Emitted(7, 4) Source(5, 11) + SourceIndex(0) -4 >Emitted(7, 5) Source(5, 12) + SourceIndex(0) -5 >Emitted(7, 10) Source(5, 11) + SourceIndex(0) -6 >Emitted(7, 11) Source(5, 12) + SourceIndex(0) -7 >Emitted(7, 19) Source(11, 2) + SourceIndex(0) +1->Emitted(8, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(11, 2) + SourceIndex(0) +3 >Emitted(8, 4) Source(5, 11) + SourceIndex(0) +4 >Emitted(8, 5) Source(5, 12) + SourceIndex(0) +5 >Emitted(8, 10) Source(5, 11) + SourceIndex(0) +6 >Emitted(8, 11) Source(5, 12) + SourceIndex(0) +7 >Emitted(8, 19) Source(11, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/home/src/workspaces/solution/2/second-output.js @@ -865,13 +870,13 @@ sourceFile:../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(8, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^-> 1-> -1->Emitted(9, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(10, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -883,8 +888,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(10, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(10, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(11, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(11, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -894,9 +899,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(11, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(11, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(11, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(12, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(12, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(12, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -916,14 +921,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(12, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(12, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(12, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(12, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(12, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(12, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(12, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(12, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(13, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(13, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(13, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(13, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(13, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(13, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(13, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(13, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -932,8 +937,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(13, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(13, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(14, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(14, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -941,8 +946,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(14, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(14, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(15, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(15, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -958,10 +963,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(15, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(15, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(15, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(15, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(16, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(16, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(16, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(16, 6) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -1073,6 +1078,7 @@ sources: ../../third_part1.ts emittedFile:/home/src/workspaces/solution/third/thirdjs/output/third-output.js sourceFile:../../third_part1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var c = new C(); 1 > 2 >^^^^ @@ -1090,14 +1096,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 13) Source(1, 13) + SourceIndex(0) -6 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -7 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -8 >Emitted(1, 17) Source(1, 17) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(2, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(2, 9) Source(1, 9) + SourceIndex(0) +5 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +6 >Emitted(2, 14) Source(1, 14) + SourceIndex(0) +7 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +8 >Emitted(2, 17) Source(1, 17) + SourceIndex(0) --- >>>c.doSomething(); 1 > @@ -1114,12 +1120,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1 >Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(2, 3) Source(2, 3) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) -5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -6 >Emitted(2, 17) Source(2, 17) + SourceIndex(0) +1 >Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(3, 3) Source(2, 3) + SourceIndex(0) +4 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) +5 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) +6 >Emitted(3, 17) Source(2, 17) + SourceIndex(0) --- >>>//# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js b/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js index e584087e83aa4..28f183c2c590e 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js +++ b/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js @@ -183,9 +183,10 @@ Found 6 errors. //// [/home/src/workspaces/solution/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/home/src/workspaces/solution/first/bin/first-output.js] +"use strict"; var s = "Hello, world"; console.log(s); console.log(f()); @@ -273,9 +274,10 @@ declare function f(): string; } //// [/home/src/workspaces/solution/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/home/src/workspaces/solution/2/second-output.js] +"use strict"; var N; (function (N) { function f() { @@ -363,9 +365,10 @@ declare class C { } //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/home/src/workspaces/solution/third/thirdjs/output/third-output.js] +"use strict"; var c = new C(); c.doSomething(); //# sourceMappingURL=third-output.js.map diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js b/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js index cbbc4402c246f..d539777833448 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js @@ -506,10 +506,6 @@ Output:: -//// [/user/username/projects/project/other.js] -let z = 0; - - //// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] {"fileNames":["../../../../home/src/tslibs/ts/lib/lib.es2024.full.d.ts","./other.ts"],"fileInfos":[{"version":"-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"2874288940-let z = 0;","signature":"-1272633924-declare let z: number;\n","affectsGlobalScope":true}],"root":[2],"options":{"composite":true,"strict":false},"latestChangedDtsFile":"./other.d.ts","version":"FakeTSVersion"} @@ -611,11 +607,7 @@ Output:: //// [/user/username/projects/project/commonFile1.js] file written with same contents //// [/user/username/projects/project/commonFile2.js] file written with same contents -//// [/user/username/projects/project/other.js] -"use strict"; -let z = 0; - - +//// [/user/username/projects/project/other.js] file written with same contents //// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] {"root":["./commonfile1.ts","./commonfile2.ts","./other.ts","./other2.ts"],"version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js index bb2de3434e974..505fe68ad705b 100644 --- a/tests/baselines/reference/tsc/commandLine/help-all.js +++ b/tests/baselines/reference/tsc/commandLine/help-all.js @@ -219,7 +219,7 @@ default: undefined --alwaysStrict Ensure 'use strict' is always emitted. type: boolean -default: `false`, unless `strict` is set +default: true --exactOptionalPropertyTypes Interpret optional property types as written, rather than adding 'undefined'. diff --git a/tests/baselines/reference/tscWatch/programUpdates/extended-source-files-are-watched.js b/tests/baselines/reference/tscWatch/programUpdates/extended-source-files-are-watched.js index e671226da5b7a..6403d590dff60 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/extended-source-files-are-watched.js +++ b/tests/baselines/reference/tscWatch/programUpdates/extended-source-files-are-watched.js @@ -216,14 +216,6 @@ Output:: -//// [/user/username/workspace/solution/projects/project/commonFile1.js] -let x = 1; - - -//// [/user/username/workspace/solution/projects/project/commonFile2.js] -let y = 1; - - Program root files: [ @@ -336,16 +328,6 @@ Output:: -//// [/user/username/workspace/solution/projects/project/commonFile1.js] -"use strict"; -let x = 1; - - -//// [/user/username/workspace/solution/projects/project/commonFile2.js] -"use strict"; -let y = 1; - - PolledWatches:: /user/username/workspace/node_modules/@types: diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js index b392558f0e890..3f68072b0609e 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js @@ -163,10 +163,10 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -a.ts:2:1 - error TS2531: Object is possibly 'null'. +tsconfig.json:4:21 - error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -2 foo().hello -  ~~~~~ +4 "alwaysStrict": false +   ~~~~~ [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js index eeb0ad0d7ce2c..49e8c267ba876 100644 --- a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js +++ b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js @@ -206,7 +206,7 @@ ScriptInfos:: /user/username/projects/myproject/tsconfig.json DocumentRegistry:: - Key:: undefined|undefined|undefined|undefined|true|undefined|undefined|undefined|undefined|undefined|undefined|undefined + Key:: undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined /user/username/projects/myproject/index.ts: TS 1 /user/username/projects/myproject/module1.d.ts: TS 1 /home/src/tslibs/ts/lib/lib.es2024.full.d.ts: TS 1 @@ -272,7 +272,7 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- DocumentRegistry:: - Key:: undefined|undefined|undefined|undefined|true|undefined|undefined|undefined|undefined|undefined|undefined|undefined + Key:: undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined /user/username/projects/myproject/index.ts: TS 1 /home/src/tslibs/ts/lib/lib.es2024.full.d.ts: TS 1 Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/module1.d.ts 1:: WatchInfo: /user/username/projects/myproject/module1.d.ts 500 undefined WatchType: Closed Script info @@ -367,7 +367,7 @@ Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- DocumentRegistry:: - Key:: undefined|undefined|undefined|undefined|true|undefined|undefined|undefined|undefined|undefined|undefined|undefined + Key:: undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined /user/username/projects/myproject/index.ts: TS 1 /home/src/tslibs/ts/lib/lib.es2024.full.d.ts: TS 1 /user/username/projects/myproject/module1.d.ts: TS 1 \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js index 9d912ecf20d31..884545717bfac 100644 --- a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js +++ b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js @@ -206,7 +206,7 @@ ScriptInfos:: /user/username/projects/myproject/tsconfig.json DocumentRegistry:: - Key:: undefined|undefined|undefined|undefined|true|undefined|undefined|undefined|undefined|undefined|undefined|undefined + Key:: undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined /user/username/projects/myproject/index.ts: TS 1 /user/username/projects/myproject/module1.d.ts: TS 1 /home/src/tslibs/ts/lib/lib.es2024.full.d.ts: TS 1 @@ -272,7 +272,7 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- DocumentRegistry:: - Key:: undefined|undefined|undefined|undefined|true|undefined|undefined|undefined|undefined|undefined|undefined|undefined + Key:: undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined /user/username/projects/myproject/index.ts: TS 1 /home/src/tslibs/ts/lib/lib.es2024.full.d.ts: TS 1 Before request @@ -359,7 +359,7 @@ Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- DocumentRegistry:: - Key:: undefined|undefined|undefined|undefined|true|undefined|undefined|undefined|undefined|undefined|undefined|undefined + Key:: undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined|undefined /user/username/projects/myproject/index.ts: TS 1 /home/src/tslibs/ts/lib/lib.es2024.full.d.ts: TS 1 /user/username/projects/myproject/module1.d.ts: TS 1 \ No newline at end of file diff --git a/tests/baselines/reference/twoAccessorsWithSameName(target=es2015).js b/tests/baselines/reference/twoAccessorsWithSameName(target=es2015).js index ecc5047023be6..a87535b13ae44 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName(target=es2015).js +++ b/tests/baselines/reference/twoAccessorsWithSameName(target=es2015).js @@ -37,6 +37,7 @@ var y = { } //// [twoAccessorsWithSameName.js] +"use strict"; class C { get x() { return 1; } get x() { return 1; } // error diff --git a/tests/baselines/reference/twoAccessorsWithSameName(target=es5).js b/tests/baselines/reference/twoAccessorsWithSameName(target=es5).js index 1fc2003a8c2b3..450627c66aa6a 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName(target=es5).js +++ b/tests/baselines/reference/twoAccessorsWithSameName(target=es5).js @@ -37,6 +37,7 @@ var y = { } //// [twoAccessorsWithSameName.js] +"use strict"; var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.js b/tests/baselines/reference/twoAccessorsWithSameName2.js index b34f969b8a690..9c1c5adb659a1 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.js +++ b/tests/baselines/reference/twoAccessorsWithSameName2.js @@ -19,6 +19,7 @@ class E { } //// [twoAccessorsWithSameName2.js] +"use strict"; class C { static get x() { return 1; } static get x() { return 1; } // error diff --git a/tests/baselines/reference/typeAliasExport.js b/tests/baselines/reference/typeAliasExport.js index 38512b0d54c87..cb6aa3f122574 100644 --- a/tests/baselines/reference/typeAliasExport.js +++ b/tests/baselines/reference/typeAliasExport.js @@ -8,3 +8,4 @@ declare module "a" { } //// [typeAliasExport.js] +"use strict"; diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.js b/tests/baselines/reference/typeArgumentConstraintResolution1.js index 215b7cbf31fae..8feb39105d77e 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.js +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.js @@ -15,6 +15,7 @@ foo2(""); // Type Date does not satisfy the constraint 'Number' for type p //// [typeArgumentConstraintResolution1.js] +"use strict"; function foo1(test) { } foo1(""); // should error function foo2(test) { return null; } diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js index 1819ab48e7cce..77a36306bf9d3 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js @@ -141,6 +141,7 @@ declare var arr: any[]; //// [typeArgumentInferenceConstructSignatures.js] +"use strict"; new noParams(); new noParams(); new noParams(); diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js index fe7e297f0675a..b8f7c23fd6d16 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js @@ -10,5 +10,6 @@ declare var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal //// [typeArgumentInferenceWithConstraintAsCommonRoot.js] +"use strict"; function f(x, y) { return undefined; } f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js index 9becc03c769bc..7a41d1309ad95 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js @@ -39,6 +39,7 @@ var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error //// [typeArgumentInferenceWithObjectLiteral.js] +"use strict"; function foo(x) { } var s; // Calls below should infer string for T and then assign that type to the value parameter diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 80b37e6ee7da4..ec8204bacd610 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -54,6 +54,7 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] +"use strict"; // Function call whose argument is a 1 arg generic function call with explicit type arguments function fn1(t) { } function fn2(t) { } diff --git a/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.js b/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.js index 01d4018c9a58c..cc8a35a6e84e7 100644 --- a/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.js +++ b/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.js @@ -24,6 +24,7 @@ var d = y; //// [typeAssertionsWithIntersectionTypes01.js] +"use strict"; var x = { p1: 10, p2: 20, p3: 30 }; var y = x; var z = x; diff --git a/tests/baselines/reference/typeAssertionsWithUnionTypes01.js b/tests/baselines/reference/typeAssertionsWithUnionTypes01.js index f9b9c6772a4f4..0c19e43463de8 100644 --- a/tests/baselines/reference/typeAssertionsWithUnionTypes01.js +++ b/tests/baselines/reference/typeAssertionsWithUnionTypes01.js @@ -20,6 +20,7 @@ var d = y; //// [typeAssertionsWithUnionTypes01.js] +"use strict"; var x = { p1: 10, p2: 20 }; var y = x; var z = x; diff --git a/tests/baselines/reference/typeCheckTypeArgument.js b/tests/baselines/reference/typeCheckTypeArgument.js index ed968e0aef5dd..b63c6bfeb45ee 100644 --- a/tests/baselines/reference/typeCheckTypeArgument.js +++ b/tests/baselines/reference/typeCheckTypeArgument.js @@ -16,6 +16,7 @@ class Foo2 { ((a) => { }); //// [typeCheckTypeArgument.js] +"use strict"; var f; class Foo { } diff --git a/tests/baselines/reference/typeFromPropertyAssignment29.js b/tests/baselines/reference/typeFromPropertyAssignment29.js index 272883da10475..4af84327ea730 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment29.js +++ b/tests/baselines/reference/typeFromPropertyAssignment29.js @@ -89,6 +89,7 @@ var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n //// [typeFromPropertyAssignment29.js] +"use strict"; function ExpandoDecl(n) { return n.toString(); } diff --git a/tests/baselines/reference/typeFromPropertyAssignment30.js b/tests/baselines/reference/typeFromPropertyAssignment30.js index 8ec7163962fc4..427af92013e4a 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment30.js +++ b/tests/baselines/reference/typeFromPropertyAssignment30.js @@ -12,6 +12,7 @@ c.p = {} //// [typeFromPropertyAssignment30.js] +"use strict"; const c = () => 1; // should not be an expando object, but contextually typed by Combo.p c.p = {}; diff --git a/tests/baselines/reference/typeFromPropertyAssignment31.js b/tests/baselines/reference/typeFromPropertyAssignment31.js index 336e291459972..bcb6270ec473b 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment31.js +++ b/tests/baselines/reference/typeFromPropertyAssignment31.js @@ -30,6 +30,7 @@ var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + //// [typeFromPropertyAssignment31.js] +"use strict"; function ExpandoMerge(n) { return n; } diff --git a/tests/baselines/reference/typeFromPropertyAssignment32.js b/tests/baselines/reference/typeFromPropertyAssignment32.js index d805f6783587c..09578019abd7e 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment32.js +++ b/tests/baselines/reference/typeFromPropertyAssignment32.js @@ -32,6 +32,7 @@ namespace ExpandoMerge { //// [expando.js] +"use strict"; function ExpandoMerge(n) { return n; } @@ -47,6 +48,7 @@ ExpandoMerge.p8 = false; // type error ExpandoMerge.p9 = false; // type error var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); //// [ns.js] +"use strict"; var ExpandoMerge; (function (ExpandoMerge) { ExpandoMerge.p3 = 333; diff --git a/tests/baselines/reference/typeFromPropertyAssignment33.js b/tests/baselines/reference/typeFromPropertyAssignment33.js index fa431a0f273a6..7bdf060291d94 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment33.js +++ b/tests/baselines/reference/typeFromPropertyAssignment33.js @@ -34,6 +34,7 @@ var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + //// [ns.js] +"use strict"; var ExpandoMerge; (function (ExpandoMerge) { ExpandoMerge.p3 = 333; @@ -48,6 +49,7 @@ var ExpandoMerge; ExpandoMerge.p2 = 222; })(ExpandoMerge || (ExpandoMerge = {})); //// [expando.js] +"use strict"; function ExpandoMerge(n) { return n; } diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index 68292e6e517fd..5fae9282b3047 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -85,6 +85,7 @@ let union2: C | B; let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] +"use strict"; class A { } class B { diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index 9a0e0d308c47e..55102eb58eb06 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -35,6 +35,7 @@ if (funD(isC, a)) { let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] +"use strict"; class A { } class B { diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index ae68d97d21457..baecafa50dcfc 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -144,6 +144,7 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] +"use strict"; class RoyalGuard { isLeader() { return this instanceof LeadGuard; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index 59df51a86382b..29a572f52ba2d 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -62,6 +62,7 @@ else { } //// [typeGuardFunctionOfFormThisErrors.js] +"use strict"; class RoyalGuard { isLeader() { return this instanceof LeadGuard; diff --git a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js index 5f9f3f2c4a5f9..24e4b9356585d 100644 --- a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js +++ b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.js @@ -49,6 +49,7 @@ else { } //// [typeGuardOfFormExpr1AndExpr2.js] +"use strict"; var str; var bool; var num; diff --git a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js index b7d10cf71c8db..92abdf3785010 100644 --- a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js +++ b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.js @@ -49,6 +49,7 @@ else { } //// [typeGuardOfFormExpr1OrExpr2.js] +"use strict"; var str; var bool; var num; diff --git a/tests/baselines/reference/typeMatch1.js b/tests/baselines/reference/typeMatch1.js index c7287f1197309..c1ae8a15383f0 100644 --- a/tests/baselines/reference/typeMatch1.js +++ b/tests/baselines/reference/typeMatch1.js @@ -26,6 +26,7 @@ C==C; //// [typeMatch1.js] +"use strict"; var x2 = x1; var x3 = i; var x4 = i2; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 3919f14024213..cca6dc53beb35 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -47,6 +47,7 @@ function f4() { //// [typeMatch2.js] +"use strict"; function f1() { var a = { x: 1, y: 2 }; a = {}; // error diff --git a/tests/baselines/reference/typeName1.js b/tests/baselines/reference/typeName1.js index fb91c7ba3eb1d..7dbc5776ba710 100644 --- a/tests/baselines/reference/typeName1.js +++ b/tests/baselines/reference/typeName1.js @@ -30,6 +30,7 @@ var x15:number=C; //// [typeName1.js] +"use strict"; class C { } var x1 = 3; diff --git a/tests/baselines/reference/typeOfThisGeneral.js b/tests/baselines/reference/typeOfThisGeneral.js index 031ca1e0ac58c..ed5ef5aeed25f 100644 --- a/tests/baselines/reference/typeOfThisGeneral.js +++ b/tests/baselines/reference/typeOfThisGeneral.js @@ -180,6 +180,7 @@ this.spaaaaace = 4; //// [typeOfThisGeneral.js] +"use strict"; class MyTestClass { constructor() { this.someFunc = () => { diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js index b913c13866804..30b404cfa3f0a 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js @@ -27,6 +27,7 @@ foo(a, b, c); foo(b, b, { foo: 1, bar: '', hm: '' }); //// [typeParameterAsTypeParameterConstraintTransitively.js] +"use strict"; // using a type parameter as a constraint for a type parameter is valid // no errors expected var a; diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js index 38e599b3cfb77..1839fc7dbb899 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js @@ -26,6 +26,7 @@ foo(b, a, c); foo(c, c, a); //// [typeParameterAsTypeParameterConstraintTransitively2.js] +"use strict"; // using a type parameter as a constraint for a type parameter is invalid // these should be errors at the type parameter constraint declarations, and have no downstream errors var a; diff --git a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js index dc43590415aa9..81ae0c1d2dbf7 100644 --- a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js +++ b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.js @@ -13,4 +13,5 @@ declare var a: A; var b: B = a; // assignment should be legal (both U's get instantiated to any for comparison) //// [typeParameterConstrainedToOuterTypeParameter.js] +"use strict"; var b = a; // assignment should be legal (both U's get instantiated to any for comparison) diff --git a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter2.js b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter2.js index 4e17072f647bf..09ec12e764cb3 100644 --- a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter2.js +++ b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter2.js @@ -13,5 +13,6 @@ var a: A var b: B = a; //// [typeParameterConstrainedToOuterTypeParameter2.js] +"use strict"; var a; var b = a; diff --git a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js index e36a3b2ea62f6..3461c9406252e 100644 --- a/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js +++ b/tests/baselines/reference/typeParameterExplicitlyExtendsAny.js @@ -36,6 +36,7 @@ class MyClass { //// [typeParameterExplicitlyExtendsAny.js] +"use strict"; function fee() { var t; t.blah; // Error diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index b65d4c9bd97ba..b0b5200d3f2c6 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -15,6 +15,7 @@ function f(a: T) { } //// [typeParameterExtendingUnion1.js] +"use strict"; class Animal { run() { } } diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index 6f72f169e1ee4..237ce6176cc81 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -15,6 +15,7 @@ function f(a: T) { } //// [typeParameterExtendingUnion2.js] +"use strict"; class Animal { run() { } } diff --git a/tests/baselines/reference/typeParameterFixingWithConstraints.js b/tests/baselines/reference/typeParameterFixingWithConstraints.js index 9d230ce751edd..13cdc25aa8167 100644 --- a/tests/baselines/reference/typeParameterFixingWithConstraints.js +++ b/tests/baselines/reference/typeParameterFixingWithConstraints.js @@ -13,5 +13,6 @@ var foo: IFoo; foo.foo({ bar: null }, bar => null, bar => null); //// [typeParameterFixingWithConstraints.js] +"use strict"; var foo; foo.foo({ bar: null }, bar => null, bar => null); diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.js index 48c817e770968..25fd727760845 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.js +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments.js @@ -12,6 +12,7 @@ var d2 = f(b, x => x.a, null); // type [B, A] var d3 = f(b, x => x.b, null); // type [B, any] //// [typeParameterFixingWithContextSensitiveArguments.js] +"use strict"; function f(y, f, x) { return [y, f(x)]; } var a, b; var d = f(b, x => x.a, a); // type [A, A] diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js index 153c58c2d2cf5..57871b46eecb8 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.js @@ -10,5 +10,6 @@ declare var a: A, b: B; var d = f(a, b, x => x, x => x); // A => A not assignable to A => B //// [typeParameterFixingWithContextSensitiveArguments2.js] +"use strict"; function f(y, y1, p, p1) { return [y, p1(y)]; } var d = f(a, b, x => x, x => x); // A => A not assignable to A => B diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js index 32f08fa4df7c6..3dabb539f0cd7 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.js @@ -10,5 +10,6 @@ declare var a: A, b: B; var d = f(a, b, u2 => u2.b, t2 => t2); //// [typeParameterFixingWithContextSensitiveArguments3.js] +"use strict"; function f(t1, u1, pf1, pf2) { return [t1, pf2(t1)]; } var d = f(a, b, u2 => u2.b, t2 => t2); diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.js index 064a06af2bd55..3ad3c6ca6697c 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.js +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments4.js @@ -10,6 +10,7 @@ var a: A, b: B; var d = f(a, b, x => x, x => x); // Type [A, B] //// [typeParameterFixingWithContextSensitiveArguments4.js] +"use strict"; function f(y, y1, p, p1) { return [y, p1(y)]; } var a, b; var d = f(a, b, x => x, x => x); // Type [A, B] diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.js b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.js index 98069d363299f..82405c63266a6 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.js +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments5.js @@ -10,6 +10,7 @@ var a: A, b: B; var d = f(a, b, u2 => u2.b, t2 => t2); //// [typeParameterFixingWithContextSensitiveArguments5.js] +"use strict"; function f(t1, u1, pf1, pf2) { return [t1, pf2(t1)]; } var a, b; var d = f(a, b, u2 => u2.b, t2 => t2); diff --git a/tests/baselines/reference/typeParameterWithInvalidConstraintType.js b/tests/baselines/reference/typeParameterWithInvalidConstraintType.js index c8ea170ce8441..81e901d5acb45 100644 --- a/tests/baselines/reference/typeParameterWithInvalidConstraintType.js +++ b/tests/baselines/reference/typeParameterWithInvalidConstraintType.js @@ -12,6 +12,7 @@ class A { } //// [typeParameterWithInvalidConstraintType.js] +"use strict"; class A { foo() { var x; diff --git a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js index 6de2bd9575015..f8435273bbfa8 100644 --- a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js +++ b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js @@ -79,6 +79,7 @@ interface I2 { } //// [typeParametersAreIdenticalToThemselves.js] +"use strict"; // type parameters from the same declaration are identical to themself function foo1(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/typeQueryOnClass.js b/tests/baselines/reference/typeQueryOnClass.js index e75bfa1c7babe..550852fdcdbfe 100644 --- a/tests/baselines/reference/typeQueryOnClass.js +++ b/tests/baselines/reference/typeQueryOnClass.js @@ -59,6 +59,7 @@ var r3: typeof D; var r4: typeof d; //// [typeQueryOnClass.js] +"use strict"; class C { constructor(x) { this.x = x; diff --git a/tests/baselines/reference/typeReferenceDirectives1.js b/tests/baselines/reference/typeReferenceDirectives1.js index 3dcd7d000f0cd..2591369d520c8 100644 --- a/tests/baselines/reference/typeReferenceDirectives1.js +++ b/tests/baselines/reference/typeReferenceDirectives1.js @@ -10,6 +10,7 @@ interface A { } //// [app.js] +"use strict"; /// diff --git a/tests/baselines/reference/typeReferenceDirectives2.js b/tests/baselines/reference/typeReferenceDirectives2.js index 1579404c21b53..b88b4385c592c 100644 --- a/tests/baselines/reference/typeReferenceDirectives2.js +++ b/tests/baselines/reference/typeReferenceDirectives2.js @@ -9,6 +9,7 @@ interface A { } //// [app.js] +"use strict"; //// [app.d.ts] diff --git a/tests/baselines/reference/typeReferenceDirectives3.js b/tests/baselines/reference/typeReferenceDirectives3.js index 7ca1ca25dccb9..1d1f06b853907 100644 --- a/tests/baselines/reference/typeReferenceDirectives3.js +++ b/tests/baselines/reference/typeReferenceDirectives3.js @@ -14,6 +14,7 @@ interface A { } //// [app.js] +"use strict"; /// /// diff --git a/tests/baselines/reference/typeReferenceDirectives4.js b/tests/baselines/reference/typeReferenceDirectives4.js index b610d83dc499e..82c51f62f53c8 100644 --- a/tests/baselines/reference/typeReferenceDirectives4.js +++ b/tests/baselines/reference/typeReferenceDirectives4.js @@ -15,6 +15,7 @@ let x: $; let y = () => x //// [app.js] +"use strict"; /// /// let x; diff --git a/tests/baselines/reference/typeReferenceDirectives6.js b/tests/baselines/reference/typeReferenceDirectives6.js index 1959998febc74..1b8e60c1c91ca 100644 --- a/tests/baselines/reference/typeReferenceDirectives6.js +++ b/tests/baselines/reference/typeReferenceDirectives6.js @@ -17,6 +17,7 @@ let y = () => x //// [app.js] +"use strict"; /// /// let x; diff --git a/tests/baselines/reference/typedArrays-es5(target=es2015).js b/tests/baselines/reference/typedArrays-es5(target=es2015).js index bfac166b11c63..8bda3ca054964 100644 --- a/tests/baselines/reference/typedArrays-es5(target=es2015).js +++ b/tests/baselines/reference/typedArrays-es5(target=es2015).js @@ -35,6 +35,7 @@ const uint8ClampedArray = new Uint8ClampedArray(1); //// [typedArrays-es5.js] +"use strict"; const float32Array = new Float32Array(1); [...float32Array]; const float64Array = new Float64Array(1); diff --git a/tests/baselines/reference/typedArrays-es5(target=es5).js b/tests/baselines/reference/typedArrays-es5(target=es5).js index c580640175463..ff4a23182d827 100644 --- a/tests/baselines/reference/typedArrays-es5(target=es5).js +++ b/tests/baselines/reference/typedArrays-es5(target=es5).js @@ -35,6 +35,7 @@ const uint8ClampedArray = new Uint8ClampedArray(1); //// [typedArrays-es5.js] +"use strict"; var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { diff --git a/tests/baselines/reference/typedArrays-es6.js b/tests/baselines/reference/typedArrays-es6.js index 2f50d332f11fc..b3028aa3341fa 100644 --- a/tests/baselines/reference/typedArrays-es6.js +++ b/tests/baselines/reference/typedArrays-es6.js @@ -33,6 +33,7 @@ const uint8ClampedArray = new Uint8ClampedArray(1); //// [typedArrays-es6.js] +"use strict"; const float32Array = new Float32Array(1); [...float32Array]; const float64Array = new Float64Array(1); diff --git a/tests/baselines/reference/typedArrays.js b/tests/baselines/reference/typedArrays.js index f4212d10ff6ef..7915c398cf3e8 100644 --- a/tests/baselines/reference/typedArrays.js +++ b/tests/baselines/reference/typedArrays.js @@ -167,6 +167,7 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe } //// [typedArrays.js] +"use strict"; function CreateTypedArrayTypes() { var typedArrays = []; typedArrays[0] = Int8Array; diff --git a/tests/baselines/reference/typedArraysSubarray.js b/tests/baselines/reference/typedArraysSubarray.js index 0c7fbd4a03150..cb331db803bc2 100644 --- a/tests/baselines/reference/typedArraysSubarray.js +++ b/tests/baselines/reference/typedArraysSubarray.js @@ -66,6 +66,7 @@ function float64ArraySubarray() { //// [typedArraysSubarray.js] +"use strict"; function int8ArraySubarray() { var arr = new Int8Array(10); arr.subarray(); diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index 7a8689933f4c0..a14b67f4c058b 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -24,6 +24,7 @@ var r1: typeof D; var r2: typeof d; //// [typeofClass2.js] +"use strict"; class C { constructor(x) { } static foo(x) { } diff --git a/tests/baselines/reference/typeofOperatorInvalidOperations.js b/tests/baselines/reference/typeofOperatorInvalidOperations.js index 3c99cf1ea577a..063b1074c9ea3 100644 --- a/tests/baselines/reference/typeofOperatorInvalidOperations.js +++ b/tests/baselines/reference/typeofOperatorInvalidOperations.js @@ -10,6 +10,7 @@ var ANY = ANY typeof ; //expect error var ANY1 = typeof ; //// [typeofOperatorInvalidOperations.js] +"use strict"; // Unary operator typeof // opreand before typeof var ANY = ANY; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 31e0130517cb0..763ff7fae8abc 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -44,6 +44,7 @@ var r2: Derived2 = c.foo('bye'); var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] +"use strict"; // basic uses of specialized signatures without errors class Base { } diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 432ebbfde0956..16ba71234edc7 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -42,6 +42,7 @@ var r2: Derived2 = new i('bye'); var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] +"use strict"; // basic uses of specialized signatures without errors class Base { } diff --git a/tests/baselines/reference/uncaughtCompilerError1.js b/tests/baselines/reference/uncaughtCompilerError1.js index 84b5311f6a8df..f6aa47d9836a8 100644 --- a/tests/baselines/reference/uncaughtCompilerError1.js +++ b/tests/baselines/reference/uncaughtCompilerError1.js @@ -17,6 +17,7 @@ function f() { //// [uncaughtCompilerError1.js] +"use strict"; function f() { if (lineTokens[index].trim() === '=' && index > 0 && token.type === '' && tokens[index - 1].type === 'attribute.name.html') { if (index === (tokens.length - 1)) { diff --git a/tests/baselines/reference/undefinedTypeAssignment2.js b/tests/baselines/reference/undefinedTypeAssignment2.js index b90afaedc047c..877692a2a8e2a 100644 --- a/tests/baselines/reference/undefinedTypeAssignment2.js +++ b/tests/baselines/reference/undefinedTypeAssignment2.js @@ -5,4 +5,5 @@ var undefined = void 0; //// [undefinedTypeAssignment2.js] +"use strict"; var undefined = void 0; diff --git a/tests/baselines/reference/underscoreTest1.js b/tests/baselines/reference/underscoreTest1.js index b88a32db42f57..b1b1ad0b99818 100644 --- a/tests/baselines/reference/underscoreTest1.js +++ b/tests/baselines/reference/underscoreTest1.js @@ -903,7 +903,9 @@ template2({ name: "Mustache" }); _.template("Using 'with': <%= data.answer %>", { answer: 'no' }, { variable: 'data' }); //// [underscoreTest1_underscore.js] +"use strict"; //// [underscoreTest1_underscoreTests.js] +"use strict"; /// _.each([1, 2, 3], (num) => alert(num.toString())); _.each({ one: 1, two: 2, three: 3 }, (value, key) => alert(value.toString())); diff --git a/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.js b/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.js index 0ae584e8e6f3c..719cb953de71a 100644 --- a/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.js +++ b/tests/baselines/reference/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.js @@ -15,5 +15,6 @@ forEach({ toString: 123 }, () => count++); //// [unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.js] +"use strict"; let count = 0; forEach({ toString: 123 }, () => count++); diff --git a/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js b/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js index 86fe38a1980a7..59ed2388194c1 100644 --- a/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js +++ b/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js @@ -146,6 +146,7 @@ interface I20 { } //// [unionSubtypeIfEveryConstituentTypeIsSubtype.js] +"use strict"; var e; (function (e) { e[e["e1"] = 0] = "e1"; diff --git a/tests/baselines/reference/unionTypeIndexSignature.js b/tests/baselines/reference/unionTypeIndexSignature.js index 4129f23e0cac9..9fac590f12bcb 100644 --- a/tests/baselines/reference/unionTypeIndexSignature.js +++ b/tests/baselines/reference/unionTypeIndexSignature.js @@ -26,6 +26,7 @@ anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"]; // any anyVar = unionOfTypesWithAndWithoutStringSignature1[10]; // any //// [unionTypeIndexSignature.js] +"use strict"; var numOrDate; var anyVar; // If each type in U has a string index signature, diff --git a/tests/baselines/reference/unionTypeReduction.js b/tests/baselines/reference/unionTypeReduction.js index 76b3be9bed161..01fb2c8cdf2f2 100644 --- a/tests/baselines/reference/unionTypeReduction.js +++ b/tests/baselines/reference/unionTypeReduction.js @@ -20,6 +20,7 @@ var r2 = e2(); //// [unionTypeReduction.js] +"use strict"; var i2, i3; var e1; var e2 = i2 || i3; // Type of e2 immediately reduced to I3 diff --git a/tests/baselines/reference/uniqueSymbolsErrors.js b/tests/baselines/reference/uniqueSymbolsErrors.js index 628f60e711cb0..f848b52b562c0 100644 --- a/tests/baselines/reference/uniqueSymbolsErrors.js +++ b/tests/baselines/reference/uniqueSymbolsErrors.js @@ -90,6 +90,7 @@ declare const invalidIntersection: unique symbol | unique symbol; const shouldNotBeAssignable: string = Symbol(); //// [uniqueSymbolsErrors.js] +"use strict"; // classes class InvalidClass { constructor(invalidConstructorArgType) { } diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 45261989ca007..6a0df8fa76388 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -35,6 +35,7 @@ class C5 { } //// [unknownSymbols1.js] +"use strict"; var x = asdf; var y; function foo(x, y) { } diff --git a/tests/baselines/reference/unknownSymbols2.js b/tests/baselines/reference/unknownSymbols2.js index c53392a941f2e..77e57e03fbce5 100644 --- a/tests/baselines/reference/unknownSymbols2.js +++ b/tests/baselines/reference/unknownSymbols2.js @@ -33,6 +33,7 @@ namespace M { } //// [unknownSymbols2.js] +"use strict"; var M; (function (M) { var x; diff --git a/tests/baselines/reference/unknownTypeArgOnCall.js b/tests/baselines/reference/unknownTypeArgOnCall.js index 86646fed9db64..d134384854e0d 100644 --- a/tests/baselines/reference/unknownTypeArgOnCall.js +++ b/tests/baselines/reference/unknownTypeArgOnCall.js @@ -11,6 +11,7 @@ var r = f.clone() //// [unknownTypeArgOnCall.js] +"use strict"; class Foo { clone() { return null; diff --git a/tests/baselines/reference/untypedArgumentInLambdaExpression.js b/tests/baselines/reference/untypedArgumentInLambdaExpression.js index deb7be11ac24a..26fe38f5f2614 100644 --- a/tests/baselines/reference/untypedArgumentInLambdaExpression.js +++ b/tests/baselines/reference/untypedArgumentInLambdaExpression.js @@ -9,6 +9,7 @@ f((input): string => { //// [untypedArgumentInLambdaExpression.js] +"use strict"; f((input) => { return "." + input; }); diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index d83c9af8ffc88..1a63dfa2885cc 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -46,6 +46,7 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] +"use strict"; // none of these function calls should be allowed var x = function () { return; }; var r1 = x(); diff --git a/tests/baselines/reference/unusedDestructuringParameters.js b/tests/baselines/reference/unusedDestructuringParameters.js index b788fb0a61fa5..70f095be4759c 100644 --- a/tests/baselines/reference/unusedDestructuringParameters.js +++ b/tests/baselines/reference/unusedDestructuringParameters.js @@ -9,6 +9,7 @@ const f3 = ([_]) => { }; f3([10]); //// [unusedDestructuringParameters.js] +"use strict"; const f = ([a]) => { }; f([1]); const f2 = ({ a }) => { }; diff --git a/tests/baselines/reference/unusedMethodsInInterface.js b/tests/baselines/reference/unusedMethodsInInterface.js index a015ed35f669b..a6546612343ad 100644 --- a/tests/baselines/reference/unusedMethodsInInterface.js +++ b/tests/baselines/reference/unusedMethodsInInterface.js @@ -7,3 +7,4 @@ interface I1 { } //// [unusedMethodsInInterface.js] +"use strict"; diff --git a/tests/baselines/reference/unusedParameterProperty2.js b/tests/baselines/reference/unusedParameterProperty2.js index 5ec601edeec04..4a81dda506fdf 100644 --- a/tests/baselines/reference/unusedParameterProperty2.js +++ b/tests/baselines/reference/unusedParameterProperty2.js @@ -9,6 +9,7 @@ class A { //// [unusedParameterProperty2.js] +"use strict"; class A { constructor(used) { this.used = used; diff --git a/tests/baselines/reference/unusedParametersInLambda1.js b/tests/baselines/reference/unusedParametersInLambda1.js index 228ed500cb032..6868b8313378f 100644 --- a/tests/baselines/reference/unusedParametersInLambda1.js +++ b/tests/baselines/reference/unusedParametersInLambda1.js @@ -9,6 +9,7 @@ class A { } //// [unusedParametersInLambda1.js] +"use strict"; class A { f1() { return (X) => { diff --git a/tests/baselines/reference/unusedParametersInLambda2.js b/tests/baselines/reference/unusedParametersInLambda2.js index a79b7a3bfdeaa..4a38b339871fa 100644 --- a/tests/baselines/reference/unusedParametersInLambda2.js +++ b/tests/baselines/reference/unusedParametersInLambda2.js @@ -10,6 +10,7 @@ class A { } //// [unusedParametersInLambda2.js] +"use strict"; class A { f1() { return (X, Y) => { diff --git a/tests/baselines/reference/unusedParametersWithUnderscore.js b/tests/baselines/reference/unusedParametersWithUnderscore.js index ce26a99379459..591445fa793ca 100644 --- a/tests/baselines/reference/unusedParametersWithUnderscore.js +++ b/tests/baselines/reference/unusedParametersWithUnderscore.js @@ -25,6 +25,7 @@ var f7 = _ => undefined; var f8 = function (_) { }; //// [unusedParametersWithUnderscore.js] +"use strict"; function f(a, _b, c, ___, d, e___, _f) { } function f2({ _a, __b }) { diff --git a/tests/baselines/reference/unusedPrivateMembers(target=es2015).js b/tests/baselines/reference/unusedPrivateMembers(target=es2015).js index 1883f742ae8be..2f51db29e43fd 100644 --- a/tests/baselines/reference/unusedPrivateMembers(target=es2015).js +++ b/tests/baselines/reference/unusedPrivateMembers(target=es2015).js @@ -66,6 +66,7 @@ class Test6 { //// [unusedPrivateMembers.js] +"use strict"; class Test1 { initializeInternal() { } diff --git a/tests/baselines/reference/unusedPrivateMembers(target=es5).js b/tests/baselines/reference/unusedPrivateMembers(target=es5).js index 3ef3b5c3973ca..861e97e0c6ee3 100644 --- a/tests/baselines/reference/unusedPrivateMembers(target=es5).js +++ b/tests/baselines/reference/unusedPrivateMembers(target=es5).js @@ -66,6 +66,7 @@ class Test6 { //// [unusedPrivateMembers.js] +"use strict"; var Test1 = /** @class */ (function () { function Test1() { } diff --git a/tests/baselines/reference/usingDeclarations.10.js b/tests/baselines/reference/usingDeclarations.10.js index 91c2e067aef7a..aaa28cea65b19 100644 --- a/tests/baselines/reference/usingDeclarations.10.js +++ b/tests/baselines/reference/usingDeclarations.10.js @@ -6,5 +6,6 @@ if (x) using a = null; //// [usingDeclarations.10.js] +"use strict"; if (x) using a = null; diff --git a/tests/baselines/reference/usingDeclarations.11(target=es2015).js b/tests/baselines/reference/usingDeclarations.11(target=es2015).js index d72f6954f8d37..ab692e21b5118 100644 --- a/tests/baselines/reference/usingDeclarations.11(target=es2015).js +++ b/tests/baselines/reference/usingDeclarations.11(target=es2015).js @@ -37,6 +37,7 @@ class C5 extends A { //// [usingDeclarations.11.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarations.11(target=es5).js b/tests/baselines/reference/usingDeclarations.11(target=es5).js index 19959e6d995e1..df28e7af8c8a9 100644 --- a/tests/baselines/reference/usingDeclarations.11(target=es5).js +++ b/tests/baselines/reference/usingDeclarations.11(target=es5).js @@ -37,6 +37,7 @@ class C5 extends A { //// [usingDeclarations.11.js] +"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || diff --git a/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=false).js b/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=false).js index 22c0ba099c55b..e5a5c2d0694ee 100644 --- a/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=false).js +++ b/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=false).js @@ -14,6 +14,7 @@ class C2 extends C1 { } //// [usingDeclarations.12.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=true).js b/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=true).js index c72699637b0f7..1457bae0e425d 100644 --- a/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=true).js +++ b/tests/baselines/reference/usingDeclarations.12(usedefineforclassfields=true).js @@ -14,6 +14,7 @@ class C2 extends C1 { } //// [usingDeclarations.12.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarations.14.js b/tests/baselines/reference/usingDeclarations.14.js index 600af3d7103f3..af3faf23de091 100644 --- a/tests/baselines/reference/usingDeclarations.14.js +++ b/tests/baselines/reference/usingDeclarations.14.js @@ -4,4 +4,5 @@ using x = {}; //// [usingDeclarations.14.js] +"use strict"; using x = {}; diff --git a/tests/baselines/reference/usingDeclarations.16.js b/tests/baselines/reference/usingDeclarations.16.js index d59b139c2d543..8e0e8bb9431aa 100644 --- a/tests/baselines/reference/usingDeclarations.16.js +++ b/tests/baselines/reference/usingDeclarations.16.js @@ -12,3 +12,4 @@ declare module 'M' { //// [usingDeclarations.16.js] +"use strict"; diff --git a/tests/baselines/reference/usingDeclarations.3(target=es2015).js b/tests/baselines/reference/usingDeclarations.3(target=es2015).js index 4810e74d865e6..6fdee0c31638f 100644 --- a/tests/baselines/reference/usingDeclarations.3(target=es2015).js +++ b/tests/baselines/reference/usingDeclarations.3(target=es2015).js @@ -10,6 +10,7 @@ //// [usingDeclarations.3.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarations.3(target=es2017).js b/tests/baselines/reference/usingDeclarations.3(target=es2017).js index 4810e74d865e6..6fdee0c31638f 100644 --- a/tests/baselines/reference/usingDeclarations.3(target=es2017).js +++ b/tests/baselines/reference/usingDeclarations.3(target=es2017).js @@ -10,6 +10,7 @@ //// [usingDeclarations.3.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarations.3(target=es2022).js b/tests/baselines/reference/usingDeclarations.3(target=es2022).js index 4810e74d865e6..6fdee0c31638f 100644 --- a/tests/baselines/reference/usingDeclarations.3(target=es2022).js +++ b/tests/baselines/reference/usingDeclarations.3(target=es2022).js @@ -10,6 +10,7 @@ //// [usingDeclarations.3.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarations.3(target=es5).js b/tests/baselines/reference/usingDeclarations.3(target=es5).js index 301be428010f7..dc7727c73b946 100644 --- a/tests/baselines/reference/usingDeclarations.3(target=es5).js +++ b/tests/baselines/reference/usingDeclarations.3(target=es5).js @@ -10,6 +10,7 @@ //// [usingDeclarations.3.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarations.3(target=esnext).js b/tests/baselines/reference/usingDeclarations.3(target=esnext).js index 7b58965954fb8..e1b3d6bfc9b83 100644 --- a/tests/baselines/reference/usingDeclarations.3(target=esnext).js +++ b/tests/baselines/reference/usingDeclarations.3(target=esnext).js @@ -10,6 +10,7 @@ //// [usingDeclarations.3.js] +"use strict"; { using d1 = { [Symbol.dispose]() { } }, d2 = null, d3 = undefined, d4 = { [Symbol.dispose]() { } }; } diff --git a/tests/baselines/reference/usingDeclarations.5.js b/tests/baselines/reference/usingDeclarations.5.js index 31062246156f4..cc907f7825e14 100644 --- a/tests/baselines/reference/usingDeclarations.5.js +++ b/tests/baselines/reference/usingDeclarations.5.js @@ -9,6 +9,7 @@ //// [usingDeclarations.5.js] +"use strict"; { using a = null, [b] = null, c = null; } diff --git a/tests/baselines/reference/usingDeclarations.7.js b/tests/baselines/reference/usingDeclarations.7.js index c92c8929aa719..8866953d3b3ab 100644 --- a/tests/baselines/reference/usingDeclarations.7.js +++ b/tests/baselines/reference/usingDeclarations.7.js @@ -8,6 +8,7 @@ } //// [usingDeclarations.7.js] +"use strict"; { using a = null, { b } = null, c = null; } diff --git a/tests/baselines/reference/usingDeclarations.8.js b/tests/baselines/reference/usingDeclarations.8.js index 3bfabea2c9e51..e0d774822d2bd 100644 --- a/tests/baselines/reference/usingDeclarations.8.js +++ b/tests/baselines/reference/usingDeclarations.8.js @@ -6,6 +6,7 @@ } //// [usingDeclarations.8.js] +"use strict"; { using a; } diff --git a/tests/baselines/reference/usingDeclarations.9.js b/tests/baselines/reference/usingDeclarations.9.js index d423904e8b2a9..d0d02142f0e84 100644 --- a/tests/baselines/reference/usingDeclarations.9.js +++ b/tests/baselines/reference/usingDeclarations.9.js @@ -6,6 +6,7 @@ } //// [usingDeclarations.9.js] +"use strict"; { using a = null; } diff --git a/tests/baselines/reference/usingDeclarationsInFor(target=es2015).js b/tests/baselines/reference/usingDeclarationsInFor(target=es2015).js index a6ec32ec0c235..bc8af185c202f 100644 --- a/tests/baselines/reference/usingDeclarationsInFor(target=es2015).js +++ b/tests/baselines/reference/usingDeclarationsInFor(target=es2015).js @@ -6,6 +6,7 @@ for (using d1 = { [Symbol.dispose]() {} }, d2 = null, d3 = undefined;;) { //// [usingDeclarationsInFor.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInFor(target=es2017).js b/tests/baselines/reference/usingDeclarationsInFor(target=es2017).js index a6ec32ec0c235..bc8af185c202f 100644 --- a/tests/baselines/reference/usingDeclarationsInFor(target=es2017).js +++ b/tests/baselines/reference/usingDeclarationsInFor(target=es2017).js @@ -6,6 +6,7 @@ for (using d1 = { [Symbol.dispose]() {} }, d2 = null, d3 = undefined;;) { //// [usingDeclarationsInFor.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInFor(target=es2022).js b/tests/baselines/reference/usingDeclarationsInFor(target=es2022).js index a6ec32ec0c235..bc8af185c202f 100644 --- a/tests/baselines/reference/usingDeclarationsInFor(target=es2022).js +++ b/tests/baselines/reference/usingDeclarationsInFor(target=es2022).js @@ -6,6 +6,7 @@ for (using d1 = { [Symbol.dispose]() {} }, d2 = null, d3 = undefined;;) { //// [usingDeclarationsInFor.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInFor(target=es5).js b/tests/baselines/reference/usingDeclarationsInFor(target=es5).js index d6589a1779afc..98c462d6190b1 100644 --- a/tests/baselines/reference/usingDeclarationsInFor(target=es5).js +++ b/tests/baselines/reference/usingDeclarationsInFor(target=es5).js @@ -6,6 +6,7 @@ for (using d1 = { [Symbol.dispose]() {} }, d2 = null, d3 = undefined;;) { //// [usingDeclarationsInFor.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInFor(target=esnext).js b/tests/baselines/reference/usingDeclarationsInFor(target=esnext).js index f279fdb59e3b4..7e9e4a99b6d88 100644 --- a/tests/baselines/reference/usingDeclarationsInFor(target=esnext).js +++ b/tests/baselines/reference/usingDeclarationsInFor(target=esnext).js @@ -6,5 +6,6 @@ for (using d1 = { [Symbol.dispose]() {} }, d2 = null, d3 = undefined;;) { //// [usingDeclarationsInFor.js] +"use strict"; for (using d1 = { [Symbol.dispose]() { } }, d2 = null, d3 = undefined;;) { } diff --git a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2015).js b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2015).js index 52a0d20d1efc6..9bce2a50024a9 100644 --- a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2015).js +++ b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2015).js @@ -8,6 +8,7 @@ async function main() { //// [usingDeclarationsInForAwaitOf.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2017).js b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2017).js index 9d4fa33d6ef25..60b01bb6d283c 100644 --- a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2017).js +++ b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2017).js @@ -8,6 +8,7 @@ async function main() { //// [usingDeclarationsInForAwaitOf.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2022).js b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2022).js index 353ac015ec2ee..9073277bc7cea 100644 --- a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2022).js +++ b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es2022).js @@ -8,6 +8,7 @@ async function main() { //// [usingDeclarationsInForAwaitOf.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js index 31d3c5ab036bb..9c8152374d6a8 100644 --- a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js +++ b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js @@ -8,6 +8,7 @@ async function main() { //// [usingDeclarationsInForAwaitOf.js] +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=esnext).js b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=esnext).js index c17e98d6a6732..437c3140c99bb 100644 --- a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=esnext).js +++ b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=esnext).js @@ -8,6 +8,7 @@ async function main() { //// [usingDeclarationsInForAwaitOf.js] +"use strict"; async function main() { for await (using d1 of [{ [Symbol.dispose]() { } }, null, undefined]) { } diff --git a/tests/baselines/reference/usingDeclarationsInForIn.js b/tests/baselines/reference/usingDeclarationsInForIn.js index fce8a93bb9d3c..5e3e1e496c35b 100644 --- a/tests/baselines/reference/usingDeclarationsInForIn.js +++ b/tests/baselines/reference/usingDeclarationsInForIn.js @@ -6,5 +6,6 @@ for (using x in {}) { //// [usingDeclarationsInForIn.js] +"use strict"; for (using x in {}) { } diff --git a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2015).js b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2015).js index 3ae4724bd550a..cffa2b09f58ae 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2015).js +++ b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2015).js @@ -6,6 +6,7 @@ for (using d1 of [{ [Symbol.dispose]() {} }, null, undefined]) { //// [usingDeclarationsInForOf.1.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2017).js b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2017).js index 3ae4724bd550a..cffa2b09f58ae 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2017).js +++ b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2017).js @@ -6,6 +6,7 @@ for (using d1 of [{ [Symbol.dispose]() {} }, null, undefined]) { //// [usingDeclarationsInForOf.1.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2022).js b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2022).js index 3ae4724bd550a..cffa2b09f58ae 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2022).js +++ b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es2022).js @@ -6,6 +6,7 @@ for (using d1 of [{ [Symbol.dispose]() {} }, null, undefined]) { //// [usingDeclarationsInForOf.1.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es5).js b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es5).js index caec071966fdd..e176222ff99b8 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.1(target=es5).js +++ b/tests/baselines/reference/usingDeclarationsInForOf.1(target=es5).js @@ -6,6 +6,7 @@ for (using d1 of [{ [Symbol.dispose]() {} }, null, undefined]) { //// [usingDeclarationsInForOf.1.js] +"use strict"; var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); diff --git a/tests/baselines/reference/usingDeclarationsInForOf.1(target=esnext).js b/tests/baselines/reference/usingDeclarationsInForOf.1(target=esnext).js index aaebb8948a2b6..e6ffcfd04f72d 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.1(target=esnext).js +++ b/tests/baselines/reference/usingDeclarationsInForOf.1(target=esnext).js @@ -6,5 +6,6 @@ for (using d1 of [{ [Symbol.dispose]() {} }, null, undefined]) { //// [usingDeclarationsInForOf.1.js] +"use strict"; for (using d1 of [{ [Symbol.dispose]() { } }, null, undefined]) { } diff --git a/tests/baselines/reference/usingDeclarationsInForOf.2.js b/tests/baselines/reference/usingDeclarationsInForOf.2.js index d965d7aa458dc..f04b5a098bed8 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.2.js +++ b/tests/baselines/reference/usingDeclarationsInForOf.2.js @@ -6,5 +6,6 @@ for (using of of []) { //// [usingDeclarationsInForOf.2.js] +"use strict"; for (using of of[]) { } diff --git a/tests/baselines/reference/usingDeclarationsInForOf.3.js b/tests/baselines/reference/usingDeclarationsInForOf.3.js index 877a260326521..2bd0b80f29fc2 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.3.js +++ b/tests/baselines/reference/usingDeclarationsInForOf.3.js @@ -6,5 +6,6 @@ for (using {} of []) { //// [usingDeclarationsInForOf.3.js] +"use strict"; for (using {} of []) { } diff --git a/tests/baselines/reference/usingDeclarationsInForOf.4.js b/tests/baselines/reference/usingDeclarationsInForOf.4.js index f16eec711487d..2632b151163ef 100644 --- a/tests/baselines/reference/usingDeclarationsInForOf.4.js +++ b/tests/baselines/reference/usingDeclarationsInForOf.4.js @@ -7,6 +7,7 @@ for (using of;;) break; //// [usingDeclarationsInForOf.4.js] +"use strict"; for (using of = null;;) break; for (using of = null;;) diff --git a/tests/baselines/reference/varAsID.js b/tests/baselines/reference/varAsID.js index 301f449941080..c9219965901ef 100644 --- a/tests/baselines/reference/varAsID.js +++ b/tests/baselines/reference/varAsID.js @@ -21,6 +21,7 @@ var f2 = new Foo2(); //// [varAsID.js] +"use strict"; class Foo { constructor() { this.x = 1; diff --git a/tests/baselines/reference/varBlock.js b/tests/baselines/reference/varBlock.js index 0f35e6ad03fd2..e2175b2d8ec79 100644 --- a/tests/baselines/reference/varBlock.js +++ b/tests/baselines/reference/varBlock.js @@ -42,6 +42,7 @@ declare var c; declare var c = 10; //// [varBlock.js] +"use strict"; var m2; (function (m2) { m2.b2 = 10; diff --git a/tests/baselines/reference/vardecl.js b/tests/baselines/reference/vardecl.js index a123495abb679..aceecca577ef7 100644 --- a/tests/baselines/reference/vardecl.js +++ b/tests/baselines/reference/vardecl.js @@ -113,6 +113,7 @@ var b = 10; //// [vardecl.js] +"use strict"; var simpleVar; var anotherVar; var varWithSimpleType; diff --git a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.js b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.js index 0f5b7b0d9fe9b..fb2ece4e206b0 100644 --- a/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.js +++ b/tests/baselines/reference/variableDeclaratorResolvedDuringContextualTyping.js @@ -128,6 +128,7 @@ class FileService { } //// [variableDeclaratorResolvedDuringContextualTyping.js] +"use strict"; var WinJS; (function (WinJS) { })(WinJS || (WinJS = {})); diff --git a/tests/baselines/reference/varianceCantBeStrictWhileStructureIsnt.js b/tests/baselines/reference/varianceCantBeStrictWhileStructureIsnt.js index e9c59527c50e5..46e037e18b226 100644 --- a/tests/baselines/reference/varianceCantBeStrictWhileStructureIsnt.js +++ b/tests/baselines/reference/varianceCantBeStrictWhileStructureIsnt.js @@ -29,6 +29,7 @@ a2 = b; b2 = a; //// [varianceCantBeStrictWhileStructureIsnt.js] +"use strict"; a = b; b = a; a2 = b2; diff --git a/tests/baselines/reference/voidOperator1.js b/tests/baselines/reference/voidOperator1.js index 6bdf1c29c0865..b97d5d497d60e 100644 --- a/tests/baselines/reference/voidOperator1.js +++ b/tests/baselines/reference/voidOperator1.js @@ -6,6 +6,7 @@ var y: void = void 1; var z = void 1; //// [voidOperator1.js] +"use strict"; var x = void 1; var y = void 1; var z = void 1; diff --git a/tests/baselines/reference/voidOperatorInvalidOperations.js b/tests/baselines/reference/voidOperatorInvalidOperations.js index 9e5dd413743c3..d4b9738d4e776 100644 --- a/tests/baselines/reference/voidOperatorInvalidOperations.js +++ b/tests/baselines/reference/voidOperatorInvalidOperations.js @@ -10,6 +10,7 @@ var ANY = ANY void ; //expect error var ANY1 = void ; //// [voidOperatorInvalidOperations.js] +"use strict"; // Unary operator void // operand before void var ANY = ANY; diff --git a/tests/baselines/reference/voidOperatorWithBooleanType.js b/tests/baselines/reference/voidOperatorWithBooleanType.js index 891d4977e0e8a..32fdcd1494728 100644 --- a/tests/baselines/reference/voidOperatorWithBooleanType.js +++ b/tests/baselines/reference/voidOperatorWithBooleanType.js @@ -41,6 +41,7 @@ void objA.a; void M.n; //// [voidOperatorWithBooleanType.js] +"use strict"; // void operator on boolean type var BOOLEAN; function foo() { return true; } diff --git a/tests/baselines/reference/voidOperatorWithEnumType.js b/tests/baselines/reference/voidOperatorWithEnumType.js index 6d17ada7acdfc..9dc5c947787a2 100644 --- a/tests/baselines/reference/voidOperatorWithEnumType.js +++ b/tests/baselines/reference/voidOperatorWithEnumType.js @@ -25,6 +25,7 @@ void ENUM1["B"]; void ENUM, ENUM1; //// [voidOperatorWithEnumType.js] +"use strict"; // void operator on enum type var ENUM; (function (ENUM) { diff --git a/tests/baselines/reference/voidOperatorWithNumberType.js b/tests/baselines/reference/voidOperatorWithNumberType.js index 0094633702f0f..8c7620592225b 100644 --- a/tests/baselines/reference/voidOperatorWithNumberType.js +++ b/tests/baselines/reference/voidOperatorWithNumberType.js @@ -48,6 +48,7 @@ void M.n; void objA.a, M.n; //// [voidOperatorWithNumberType.js] +"use strict"; // void operator on number type var NUMBER; var NUMBER1 = [1, 2]; diff --git a/tests/baselines/reference/voidOperatorWithStringType.js b/tests/baselines/reference/voidOperatorWithStringType.js index fdcbbf247a22c..f426da34e5e99 100644 --- a/tests/baselines/reference/voidOperatorWithStringType.js +++ b/tests/baselines/reference/voidOperatorWithStringType.js @@ -47,6 +47,7 @@ void foo(); void objA.a,M.n; //// [voidOperatorWithStringType.js] +"use strict"; // void operator on string type var STRING; var STRING1 = ["", "abc"]; diff --git a/tests/baselines/reference/voidReturnLambdaValue.js b/tests/baselines/reference/voidReturnLambdaValue.js index b78f9e067dcd5..f2aeac1716a0a 100644 --- a/tests/baselines/reference/voidReturnLambdaValue.js +++ b/tests/baselines/reference/voidReturnLambdaValue.js @@ -6,6 +6,7 @@ function foo(arg1, arg2, callback:(v1,v2,v3) => void):void { } //// [voidReturnLambdaValue.js] +"use strict"; function foo(arg1, arg2, callback) { return callback(arg1, arg2, arg2); } diff --git a/tests/baselines/reference/widenedTypes.js b/tests/baselines/reference/widenedTypes.js index 657030ffdf005..70390876f4796 100644 --- a/tests/baselines/reference/widenedTypes.js +++ b/tests/baselines/reference/widenedTypes.js @@ -26,6 +26,7 @@ var arr: string[] = [3, null]; // not assignable because null is not widened. BC var obj: { [x: string]: string; } = { x: 3, y: null }; // assignable because null is widened, and therefore BCT is any //// [widenedTypes.js] +"use strict"; null instanceof (() => { }); ({}) instanceof null; // Ok because null is a subtype of function null in {}; diff --git a/tests/baselines/reference/widenedTypes1.js b/tests/baselines/reference/widenedTypes1.js index 57fe1c60c76a7..c53cec728de6d 100644 --- a/tests/baselines/reference/widenedTypes1.js +++ b/tests/baselines/reference/widenedTypes1.js @@ -12,6 +12,7 @@ var h = [{x: undefined}]; //// [widenedTypes1.js] +"use strict"; var a = null; var b = undefined; var c = { x: null }; diff --git a/tests/baselines/reference/wideningTuples1.js b/tests/baselines/reference/wideningTuples1.js index 91ae1ac20c4c0..e0403ba15e745 100644 --- a/tests/baselines/reference/wideningTuples1.js +++ b/tests/baselines/reference/wideningTuples1.js @@ -7,5 +7,6 @@ var y = foo([undefined]); y = [""]; //// [wideningTuples1.js] +"use strict"; var y = foo([undefined]); y = [""]; diff --git a/tests/baselines/reference/wideningTuples2.js b/tests/baselines/reference/wideningTuples2.js index 26debced48972..aaf8e0eec30a6 100644 --- a/tests/baselines/reference/wideningTuples2.js +++ b/tests/baselines/reference/wideningTuples2.js @@ -8,6 +8,7 @@ var foo: () => [any] = function bar() { }; //// [wideningTuples2.js] +"use strict"; var foo = function bar() { let intermediate = bar(); intermediate = [""]; diff --git a/tests/baselines/reference/wideningTuples3.js b/tests/baselines/reference/wideningTuples3.js index 262cb754daf59..2e53c76654a12 100644 --- a/tests/baselines/reference/wideningTuples3.js +++ b/tests/baselines/reference/wideningTuples3.js @@ -6,5 +6,6 @@ var a: [any]; var b = a = [undefined, null]; //// [wideningTuples3.js] +"use strict"; var a; var b = a = [undefined, null]; diff --git a/tests/baselines/reference/wideningTuples4.js b/tests/baselines/reference/wideningTuples4.js index d299b2f2e597c..1b36796d950d7 100644 --- a/tests/baselines/reference/wideningTuples4.js +++ b/tests/baselines/reference/wideningTuples4.js @@ -7,6 +7,7 @@ var b = a = [undefined, null]; b = ["", ""]; //// [wideningTuples4.js] +"use strict"; var a; var b = a = [undefined, null]; b = ["", ""]; diff --git a/tests/baselines/reference/wideningTuples5.js b/tests/baselines/reference/wideningTuples5.js index 8741574f320d9..4faca508324c4 100644 --- a/tests/baselines/reference/wideningTuples5.js +++ b/tests/baselines/reference/wideningTuples5.js @@ -4,4 +4,5 @@ var [a, b] = [undefined, null]; //// [wideningTuples5.js] +"use strict"; var [a, b] = [undefined, null]; diff --git a/tests/baselines/reference/wideningTuples6.js b/tests/baselines/reference/wideningTuples6.js index d5687996f7a89..0beee87ad15a9 100644 --- a/tests/baselines/reference/wideningTuples6.js +++ b/tests/baselines/reference/wideningTuples6.js @@ -6,6 +6,7 @@ a = ""; b = ""; //// [wideningTuples6.js] +"use strict"; var [a, b] = [undefined, null]; a = ""; b = ""; diff --git a/tests/baselines/reference/wideningTuples7.js b/tests/baselines/reference/wideningTuples7.js index 6ce3a83891129..58924487c8d25 100644 --- a/tests/baselines/reference/wideningTuples7.js +++ b/tests/baselines/reference/wideningTuples7.js @@ -7,6 +7,7 @@ var foo = function bar() { }; //// [wideningTuples7.js] +"use strict"; var foo = function bar() { let intermediate; return intermediate = [undefined]; diff --git a/tests/baselines/reference/witness.js b/tests/baselines/reference/witness.js index fc4c275f76f9f..939a0b95422f2 100644 --- a/tests/baselines/reference/witness.js +++ b/tests/baselines/reference/witness.js @@ -139,6 +139,7 @@ var qq: any; //// [witness.js] +"use strict"; // Initializers var varInit = varInit; // any var pInit; diff --git a/tests/baselines/reference/wrappedIncovations1.js b/tests/baselines/reference/wrappedIncovations1.js index 4226b1d9cc4ec..cdf01d2887f2c 100644 --- a/tests/baselines/reference/wrappedIncovations1.js +++ b/tests/baselines/reference/wrappedIncovations1.js @@ -7,6 +7,7 @@ var v = this .baz(); //// [wrappedIncovations1.js] +"use strict"; var v = this .foo() .bar() diff --git a/tests/baselines/reference/wrappedIncovations2.js b/tests/baselines/reference/wrappedIncovations2.js index 392a842d75400..c0f9a606d60ed 100644 --- a/tests/baselines/reference/wrappedIncovations2.js +++ b/tests/baselines/reference/wrappedIncovations2.js @@ -7,6 +7,7 @@ var v = this. baz(); //// [wrappedIncovations2.js] +"use strict"; var v = this. foo(). bar(). From ac0c45f40628794b6c20d174c3955e05854ef11d Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 3 Feb 2026 21:25:42 -0800 Subject: [PATCH 5/7] Remaining baselines --- ...(alwaysstrict=false,target=es2015).symbols | 21 + ...19(alwaysstrict=false,target=es2015).types | 26 + ...f19(alwaysstrict=false,target=es5).symbols | 21 + ...-of19(alwaysstrict=false,target=es5).types | 26 + ...9(alwaysstrict=true,target=es2015).symbols | 21 + ...f19(alwaysstrict=true,target=es2015).types | 26 + ...9(alwaysstrict=true,target=es5).errors.txt | 15 + ...of19(alwaysstrict=true,target=es5).symbols | 21 + ...r-of19(alwaysstrict=true,target=es5).types | 30 + .../ES5For-of19(target=es2015).errors.txt | 14 + .../ES5For-of19(target=es2015).types | 4 + .../ES5For-of19(target=es5).errors.txt | 2 + .../ES5For-of25(target=es2015).js.map | 4 +- .../ES5For-of25(target=es2015).sourcemap.txt | 57 +- .../reference/ES5For-of25(target=es5).js.map | 4 +- .../ES5For-of25(target=es5).sourcemap.txt | 71 +- .../ES5For-of26(target=es2015).js.map | 4 +- .../ES5For-of26(target=es2015).sourcemap.txt | 57 +- .../reference/ES5For-of26(target=es5).js.map | 4 +- .../ES5For-of26(target=es5).sourcemap.txt | 81 +- ...claration2_es6(alwaysstrict=false).symbols | 7 + ...Declaration2_es6(alwaysstrict=false).types | 8 + ...aration2_es6(alwaysstrict=true).errors.txt | 8 + ...eclaration2_es6(alwaysstrict=true).symbols | 7 + ...nDeclaration2_es6(alwaysstrict=true).types | 9 + .../FunctionDeclaration2_es6.errors.txt | 7 + .../reference/FunctionDeclaration2_es6.types | 1 + ...ernalModule(alwaysstrict=false).errors.txt | 46 + ...InternalModule(alwaysstrict=false).symbols | 95 + ...InInternalModule(alwaysstrict=false).types | 153 ++ ...ternalModule(alwaysstrict=true).errors.txt | 49 + ...nInternalModule(alwaysstrict=true).symbols | 95 + ...tInInternalModule(alwaysstrict=true).types | 153 ++ ...itializedExportInInternalModule.errors.txt | 2 + ...hStatements(alwaysstrict=false).errors.txt | 42 + ...WithStatements(alwaysstrict=false).symbols | 42 + ...ntWithStatements(alwaysstrict=false).types | 66 + ...thStatements(alwaysstrict=true).errors.txt | 48 + ...tWithStatements(alwaysstrict=true).symbols | 42 + ...entWithStatements(alwaysstrict=true).types | 66 + .../ambientWithStatements.errors.txt | 2 + ...rgumentList(alwaysstrict=false).errors.txt | 10 + ...peArgumentList(alwaysstrict=false).symbols | 13 + ...copeArgumentList(alwaysstrict=false).types | 23 + ...ArgumentList(alwaysstrict=true).errors.txt | 16 + ...opeArgumentList(alwaysstrict=true).symbols | 13 + ...ScopeArgumentList(alwaysstrict=true).types | 23 + ...indsToFunctionScopeArgumentList.errors.txt | 2 + ...tLiteral_Js(alwaysstrict=false).errors.txt | 32 + ...jectLiteral_Js(alwaysstrict=false).symbols | 51 + ...ObjectLiteral_Js(alwaysstrict=false).types | 86 + ...ctLiteral_Js(alwaysstrict=true).errors.txt | 35 + ...bjectLiteral_Js(alwaysstrict=true).symbols | 51 + ...nObjectLiteral_Js(alwaysstrict=true).types | 86 + ...entsReferenceInObjectLiteral_Js.errors.txt | 2 + ...ionContexts(alwaysstrict=false).errors.txt | 116 + ...nctionContexts(alwaysstrict=false).symbols | 210 ++ ...FunctionContexts(alwaysstrict=false).types | 383 ++++ ...tionContexts(alwaysstrict=true).errors.txt | 122 ++ ...unctionContexts(alwaysstrict=true).symbols | 210 ++ ...wFunctionContexts(alwaysstrict=true).types | 383 ++++ .../arrowFunctionContexts.errors.txt | 2 + ...teProtected(alwaysstrict=false).errors.txt | 52 + ...ivateProtected(alwaysstrict=false).symbols | 74 + ...PrivateProtected(alwaysstrict=false).types | 102 + ...ateProtected(alwaysstrict=true).errors.txt | 61 + ...rivateProtected(alwaysstrict=true).symbols | 74 + ...cPrivateProtected(alwaysstrict=true).types | 102 + .../asiPublicPrivateProtected.errors.txt | 2 + ...(alwaysstrict=false,target=es2015).symbols | 40 + ...ns(alwaysstrict=false,target=es2015).types | 74 + ...(alwaysstrict=false,target=es5).errors.txt | 25 + ...ons(alwaysstrict=false,target=es5).symbols | 40 + ...tions(alwaysstrict=false,target=es5).types | 74 + ...lwaysstrict=true,target=es2015).errors.txt | 43 + ...s(alwaysstrict=true,target=es2015).symbols | 40 + ...ons(alwaysstrict=true,target=es2015).types | 74 + ...s(alwaysstrict=true,target=es5).errors.txt | 49 + ...ions(alwaysstrict=true,target=es5).symbols | 40 + ...ctions(alwaysstrict=true,target=es5).types | 74 + ...tsArrowFunctions(target=es2015).errors.txt | 21 + ...mentsArrowFunctions(target=es5).errors.txt | 2 + ...(alwaysstrict=false,target=es2015).symbols | 136 ++ ...on(alwaysstrict=false,target=es2015).types | 206 ++ ...(alwaysstrict=false,target=es5).errors.txt | 59 + ...ion(alwaysstrict=false,target=es5).symbols | 136 ++ ...ction(alwaysstrict=false,target=es5).types | 211 ++ ...lwaysstrict=true,target=es2015).errors.txt | 107 + ...n(alwaysstrict=true,target=es2015).symbols | 136 ++ ...ion(alwaysstrict=true,target=es2015).types | 211 ++ ...n(alwaysstrict=true,target=es5).errors.txt | 119 ++ ...tion(alwaysstrict=true,target=es5).symbols | 136 ++ ...nction(alwaysstrict=true,target=es5).types | 211 ++ ...rgumentsFunction(target=es2015).errors.txt | 49 + ...sionArgumentsFunction(target=es2015).types | 5 + ...onArgumentsFunction(target=es5).errors.txt | 2 + ...(alwaysstrict=false,target=es2015).symbols | 96 + ...ns(alwaysstrict=false,target=es2015).types | 143 ++ ...(alwaysstrict=false,target=es5).errors.txt | 49 + ...ons(alwaysstrict=false,target=es5).symbols | 96 + ...sions(alwaysstrict=false,target=es5).types | 148 ++ ...lwaysstrict=true,target=es2015).errors.txt | 97 + ...s(alwaysstrict=true,target=es2015).symbols | 96 + ...ons(alwaysstrict=true,target=es2015).types | 148 ++ ...s(alwaysstrict=true,target=es5).errors.txt | 109 + ...ions(alwaysstrict=true,target=es5).symbols | 96 + ...ssions(alwaysstrict=true,target=es5).types | 148 ++ ...ctionExpressions(target=es2015).errors.txt | 39 + ...tsFunctionExpressions(target=es2015).types | 5 + ...FunctionExpressions(target=es5).errors.txt | 2 + ...rgumentsInType(alwaysstrict=false).symbols | 55 + ...nArgumentsInType(alwaysstrict=false).types | 83 + ...umentsInType(alwaysstrict=true).errors.txt | 47 + ...ArgumentsInType(alwaysstrict=true).symbols | 55 + ...onArgumentsInType(alwaysstrict=true).types | 83 + .../collisionArgumentsInType.errors.txt | 19 + ...terfaceMembers(alwaysstrict=false).symbols | 65 + ...InterfaceMembers(alwaysstrict=false).types | 69 + ...rfaceMembers(alwaysstrict=true).errors.txt | 58 + ...nterfaceMembers(alwaysstrict=true).symbols | 65 + ...sInterfaceMembers(alwaysstrict=true).types | 69 + ...lisionArgumentsInterfaceMembers.errors.txt | 33 + ...lidContexts(alwaysstrict=false).errors.txt | 62 + ...nvalidContexts(alwaysstrict=false).symbols | 55 + ...-invalidContexts(alwaysstrict=false).types | 121 ++ ...alidContexts(alwaysstrict=true).errors.txt | 71 + ...invalidContexts(alwaysstrict=true).symbols | 55 + ...s-invalidContexts(alwaysstrict=true).types | 121 ++ ...nstDeclarations-invalidContexts.errors.txt | 2 + ...ions-scopes(alwaysstrict=false).errors.txt | 152 ++ ...rations-scopes(alwaysstrict=false).symbols | 293 +++ ...larations-scopes(alwaysstrict=false).types | 545 +++++ ...tions-scopes(alwaysstrict=true).errors.txt | 161 ++ ...arations-scopes(alwaysstrict=true).symbols | 293 +++ ...clarations-scopes(alwaysstrict=true).types | 545 +++++ .../constDeclarations-scopes.errors.txt | 2 + ...lidContexts(alwaysstrict=false).errors.txt | 127 ++ ...-validContexts(alwaysstrict=false).symbols | 197 ++ ...ns-validContexts(alwaysstrict=false).types | 352 +++ ...alidContexts(alwaysstrict=true).errors.txt | 139 ++ ...s-validContexts(alwaysstrict=true).symbols | 197 ++ ...ons-validContexts(alwaysstrict=true).types | 352 +++ ...constDeclarations-validContexts.errors.txt | 2 + .../reference/contextualTyping.js.map | 4 +- .../reference/contextualTyping.sourcemap.txt | 1885 +++++++++-------- ...KeywordsYes(alwaysstrict=false).errors.txt | 338 +++ ...ertKeywordsYes(alwaysstrict=false).symbols | 882 ++++++++ ...nvertKeywordsYes(alwaysstrict=false).types | 1363 ++++++++++++ ...tKeywordsYes(alwaysstrict=true).errors.txt | 419 ++++ ...vertKeywordsYes(alwaysstrict=true).symbols | 882 ++++++++ ...onvertKeywordsYes(alwaysstrict=true).types | 1363 ++++++++++++ .../reference/convertKeywordsYes.errors.txt | 2 + .../declarationMapsWithSourceMap.js.map | 4 +- ...declarationMapsWithSourceMap.sourcemap.txt | 135 +- ...nyOtherType(alwaysstrict=false).errors.txt | 139 ++ ...thAnyOtherType(alwaysstrict=false).symbols | 190 ++ ...WithAnyOtherType(alwaysstrict=false).types | 391 ++++ ...AnyOtherType(alwaysstrict=true).errors.txt | 172 ++ ...ithAnyOtherType(alwaysstrict=true).symbols | 190 ++ ...rWithAnyOtherType(alwaysstrict=true).types | 391 ++++ .../deleteOperatorWithAnyOtherType.errors.txt | 2 + ...(alwaysstrict=false,target=es2015).symbols | 10 + ...03(alwaysstrict=false,target=es2015).types | 13 + ...(alwaysstrict=false,target=es5).errors.txt | 8 + ...s03(alwaysstrict=false,target=es5).symbols | 10 + ...nts03(alwaysstrict=false,target=es5).types | 15 + ...lwaysstrict=true,target=es2015).errors.txt | 8 + ...3(alwaysstrict=true,target=es2015).symbols | 10 + ...s03(alwaysstrict=true,target=es2015).types | 15 + ...3(alwaysstrict=true,target=es5).errors.txt | 11 + ...ts03(alwaysstrict=true,target=es5).symbols | 10 + ...ents03(alwaysstrict=true,target=es5).types | 15 + ...UsingArguments03(target=es2015).errors.txt | 7 + ...nWhenUsingArguments03(target=es2015).types | 2 + ...henUsingArguments03(target=es5).errors.txt | 2 + ...rguments03_ES6(alwaysstrict=false).symbols | 10 + ...gArguments03_ES6(alwaysstrict=false).types | 13 + ...uments03_ES6(alwaysstrict=true).errors.txt | 8 + ...Arguments03_ES6(alwaysstrict=true).symbols | 10 + ...ngArguments03_ES6(alwaysstrict=true).types | 15 + ...unctionWhenUsingArguments03_ES6.errors.txt | 7 + ...rrowFunctionWhenUsingArguments03_ES6.types | 2 + ...(alwaysstrict=false,target=es2015).symbols | 13 + ...04(alwaysstrict=false,target=es2015).types | 17 + ...(alwaysstrict=false,target=es5).errors.txt | 10 + ...s04(alwaysstrict=false,target=es5).symbols | 13 + ...nts04(alwaysstrict=false,target=es5).types | 19 + ...lwaysstrict=true,target=es2015).errors.txt | 10 + ...4(alwaysstrict=true,target=es2015).symbols | 13 + ...s04(alwaysstrict=true,target=es2015).types | 19 + ...4(alwaysstrict=true,target=es5).errors.txt | 13 + ...ts04(alwaysstrict=true,target=es5).symbols | 13 + ...ents04(alwaysstrict=true,target=es5).types | 19 + ...UsingArguments04(target=es2015).errors.txt | 9 + ...nWhenUsingArguments04(target=es2015).types | 2 + ...henUsingArguments04(target=es5).errors.txt | 2 + ...rguments04_ES6(alwaysstrict=false).symbols | 13 + ...gArguments04_ES6(alwaysstrict=false).types | 17 + ...uments04_ES6(alwaysstrict=true).errors.txt | 10 + ...Arguments04_ES6(alwaysstrict=true).symbols | 13 + ...ngArguments04_ES6(alwaysstrict=true).types | 19 + ...unctionWhenUsingArguments04_ES6.errors.txt | 9 + ...rrowFunctionWhenUsingArguments04_ES6.types | 2 + ...(alwaysstrict=false,target=es2015).symbols | 11 + ...05(alwaysstrict=false,target=es2015).types | 15 + ...(alwaysstrict=false,target=es5).errors.txt | 9 + ...s05(alwaysstrict=false,target=es5).symbols | 11 + ...nts05(alwaysstrict=false,target=es5).types | 17 + ...lwaysstrict=true,target=es2015).errors.txt | 9 + ...5(alwaysstrict=true,target=es2015).symbols | 11 + ...s05(alwaysstrict=true,target=es2015).types | 17 + ...5(alwaysstrict=true,target=es5).errors.txt | 12 + ...ts05(alwaysstrict=true,target=es5).symbols | 11 + ...ents05(alwaysstrict=true,target=es5).types | 17 + ...UsingArguments05(target=es2015).errors.txt | 8 + ...nWhenUsingArguments05(target=es2015).types | 2 + ...henUsingArguments05(target=es5).errors.txt | 2 + ...rguments05_ES6(alwaysstrict=false).symbols | 11 + ...gArguments05_ES6(alwaysstrict=false).types | 15 + ...uments05_ES6(alwaysstrict=true).errors.txt | 9 + ...Arguments05_ES6(alwaysstrict=true).symbols | 11 + ...ngArguments05_ES6(alwaysstrict=true).types | 17 + ...unctionWhenUsingArguments05_ES6.errors.txt | 8 + ...rrowFunctionWhenUsingArguments05_ES6.types | 2 + ...(alwaysstrict=false,target=es2015).symbols | 11 + ...06(alwaysstrict=false,target=es2015).types | 17 + ...(alwaysstrict=false,target=es5).errors.txt | 9 + ...s06(alwaysstrict=false,target=es5).symbols | 11 + ...nts06(alwaysstrict=false,target=es5).types | 19 + ...lwaysstrict=true,target=es2015).errors.txt | 9 + ...6(alwaysstrict=true,target=es2015).symbols | 11 + ...s06(alwaysstrict=true,target=es2015).types | 19 + ...6(alwaysstrict=true,target=es5).errors.txt | 12 + ...ts06(alwaysstrict=true,target=es5).symbols | 11 + ...ents06(alwaysstrict=true,target=es5).types | 19 + ...UsingArguments06(target=es2015).errors.txt | 8 + ...nWhenUsingArguments06(target=es2015).types | 2 + ...henUsingArguments06(target=es5).errors.txt | 2 + ...rguments06_ES6(alwaysstrict=false).symbols | 11 + ...gArguments06_ES6(alwaysstrict=false).types | 17 + ...uments06_ES6(alwaysstrict=true).errors.txt | 9 + ...Arguments06_ES6(alwaysstrict=true).symbols | 11 + ...ngArguments06_ES6(alwaysstrict=true).types | 19 + ...unctionWhenUsingArguments06_ES6.errors.txt | 8 + ...rrowFunctionWhenUsingArguments06_ES6.types | 2 + ...(alwaysstrict=false,target=es2015).symbols | 12 + ...07(alwaysstrict=false,target=es2015).types | 18 + ...(alwaysstrict=false,target=es5).errors.txt | 9 + ...s07(alwaysstrict=false,target=es5).symbols | 12 + ...nts07(alwaysstrict=false,target=es5).types | 21 + ...lwaysstrict=true,target=es2015).errors.txt | 12 + ...7(alwaysstrict=true,target=es2015).symbols | 12 + ...s07(alwaysstrict=true,target=es2015).types | 21 + ...7(alwaysstrict=true,target=es5).errors.txt | 15 + ...ts07(alwaysstrict=true,target=es5).symbols | 12 + ...ents07(alwaysstrict=true,target=es5).types | 21 + ...UsingArguments07(target=es2015).errors.txt | 8 + ...nWhenUsingArguments07(target=es2015).types | 3 + ...henUsingArguments07(target=es5).errors.txt | 2 + ...rguments07_ES6(alwaysstrict=false).symbols | 12 + ...gArguments07_ES6(alwaysstrict=false).types | 18 + ...uments07_ES6(alwaysstrict=true).errors.txt | 12 + ...Arguments07_ES6(alwaysstrict=true).symbols | 12 + ...ngArguments07_ES6(alwaysstrict=true).types | 21 + ...unctionWhenUsingArguments07_ES6.errors.txt | 8 + ...rrowFunctionWhenUsingArguments07_ES6.types | 3 + ...(alwaysstrict=false,target=es2015).symbols | 12 + ...08(alwaysstrict=false,target=es2015).types | 18 + ...s08(alwaysstrict=false,target=es5).symbols | 12 + ...nts08(alwaysstrict=false,target=es5).types | 18 + ...lwaysstrict=true,target=es2015).errors.txt | 12 + ...8(alwaysstrict=true,target=es2015).symbols | 12 + ...s08(alwaysstrict=true,target=es2015).types | 21 + ...8(alwaysstrict=true,target=es5).errors.txt | 12 + ...ts08(alwaysstrict=true,target=es5).symbols | 12 + ...ents08(alwaysstrict=true,target=es5).types | 21 + ...UsingArguments08(target=es2015).errors.txt | 8 + ...nWhenUsingArguments08(target=es2015).types | 3 + ...henUsingArguments08(target=es5).errors.txt | 2 + ...rguments08_ES6(alwaysstrict=false).symbols | 12 + ...gArguments08_ES6(alwaysstrict=false).types | 18 + ...uments08_ES6(alwaysstrict=true).errors.txt | 12 + ...Arguments08_ES6(alwaysstrict=true).symbols | 12 + ...ngArguments08_ES6(alwaysstrict=true).types | 21 + ...unctionWhenUsingArguments08_ES6.errors.txt | 8 + ...rrowFunctionWhenUsingArguments08_ES6.types | 3 + ...(alwaysstrict=false,target=es2015).symbols | 14 + ...11(alwaysstrict=false,target=es2015).types | 23 + ...(alwaysstrict=false,target=es5).errors.txt | 10 + ...s11(alwaysstrict=false,target=es5).symbols | 14 + ...nts11(alwaysstrict=false,target=es5).types | 25 + ...lwaysstrict=true,target=es2015).errors.txt | 10 + ...1(alwaysstrict=true,target=es2015).symbols | 14 + ...s11(alwaysstrict=true,target=es2015).types | 25 + ...1(alwaysstrict=true,target=es5).errors.txt | 13 + ...ts11(alwaysstrict=true,target=es5).symbols | 14 + ...ents11(alwaysstrict=true,target=es5).types | 25 + ...UsingArguments11(target=es2015).errors.txt | 9 + ...nWhenUsingArguments11(target=es2015).types | 2 + ...henUsingArguments11(target=es5).errors.txt | 2 + ...rguments11_ES6(alwaysstrict=false).symbols | 14 + ...gArguments11_ES6(alwaysstrict=false).types | 23 + ...uments11_ES6(alwaysstrict=true).errors.txt | 10 + ...Arguments11_ES6(alwaysstrict=true).symbols | 14 + ...ngArguments11_ES6(alwaysstrict=true).types | 25 + ...unctionWhenUsingArguments11_ES6.errors.txt | 9 + ...rrowFunctionWhenUsingArguments11_ES6.types | 2 + ...(alwaysstrict=false,target=es2015).symbols | 14 + ...13(alwaysstrict=false,target=es2015).types | 24 + ...s13(alwaysstrict=false,target=es5).symbols | 14 + ...nts13(alwaysstrict=false,target=es5).types | 24 + ...lwaysstrict=true,target=es2015).errors.txt | 10 + ...3(alwaysstrict=true,target=es2015).symbols | 14 + ...s13(alwaysstrict=true,target=es2015).types | 25 + ...3(alwaysstrict=true,target=es5).errors.txt | 10 + ...ts13(alwaysstrict=true,target=es5).symbols | 14 + ...ents13(alwaysstrict=true,target=es5).types | 25 + ...UsingArguments13(target=es2015).errors.txt | 9 + ...nWhenUsingArguments13(target=es2015).types | 1 + ...henUsingArguments13(target=es5).errors.txt | 2 + ...rguments13_ES6(alwaysstrict=false).symbols | 14 + ...gArguments13_ES6(alwaysstrict=false).types | 24 + ...uments13_ES6(alwaysstrict=true).errors.txt | 10 + ...Arguments13_ES6(alwaysstrict=true).symbols | 14 + ...ngArguments13_ES6(alwaysstrict=true).types | 25 + ...unctionWhenUsingArguments13_ES6.errors.txt | 9 + ...rrowFunctionWhenUsingArguments13_ES6.types | 1 + ...(alwaysstrict=false,target=es2015).symbols | 18 + ...14(alwaysstrict=false,target=es2015).types | 30 + ...(alwaysstrict=false,target=es5).errors.txt | 12 + ...s14(alwaysstrict=false,target=es5).symbols | 18 + ...nts14(alwaysstrict=false,target=es5).types | 30 + ...lwaysstrict=true,target=es2015).errors.txt | 12 + ...4(alwaysstrict=true,target=es2015).symbols | 18 + ...s14(alwaysstrict=true,target=es2015).types | 30 + ...4(alwaysstrict=true,target=es5).errors.txt | 15 + ...ts14(alwaysstrict=true,target=es5).symbols | 18 + ...ents14(alwaysstrict=true,target=es5).types | 30 + ...UsingArguments14(target=es2015).errors.txt | 11 + ...henUsingArguments14(target=es5).errors.txt | 2 + ...rguments14_ES6(alwaysstrict=false).symbols | 18 + ...gArguments14_ES6(alwaysstrict=false).types | 30 + ...uments14_ES6(alwaysstrict=true).errors.txt | 12 + ...Arguments14_ES6(alwaysstrict=true).symbols | 18 + ...ngArguments14_ES6(alwaysstrict=true).types | 30 + ...unctionWhenUsingArguments14_ES6.errors.txt | 11 + ...(alwaysstrict=false,target=es2015).symbols | 21 + ...15(alwaysstrict=false,target=es2015).types | 36 + ...(alwaysstrict=false,target=es5).errors.txt | 13 + ...s15(alwaysstrict=false,target=es5).symbols | 21 + ...nts15(alwaysstrict=false,target=es5).types | 36 + ...lwaysstrict=true,target=es2015).errors.txt | 16 + ...5(alwaysstrict=true,target=es2015).symbols | 21 + ...s15(alwaysstrict=true,target=es2015).types | 36 + ...5(alwaysstrict=true,target=es5).errors.txt | 19 + ...ts15(alwaysstrict=true,target=es5).symbols | 21 + ...ents15(alwaysstrict=true,target=es5).types | 36 + ...UsingArguments15(target=es2015).errors.txt | 12 + ...henUsingArguments15(target=es5).errors.txt | 2 + ...rguments15_ES6(alwaysstrict=false).symbols | 21 + ...gArguments15_ES6(alwaysstrict=false).types | 36 + ...uments15_ES6(alwaysstrict=true).errors.txt | 16 + ...Arguments15_ES6(alwaysstrict=true).symbols | 21 + ...ngArguments15_ES6(alwaysstrict=true).types | 36 + ...unctionWhenUsingArguments15_ES6.errors.txt | 12 + ...(alwaysstrict=false,target=es2015).symbols | 20 + ...16(alwaysstrict=false,target=es2015).types | 39 + ...(alwaysstrict=false,target=es5).errors.txt | 13 + ...s16(alwaysstrict=false,target=es5).symbols | 20 + ...nts16(alwaysstrict=false,target=es5).types | 39 + ...lwaysstrict=true,target=es2015).errors.txt | 16 + ...6(alwaysstrict=true,target=es2015).symbols | 20 + ...s16(alwaysstrict=true,target=es2015).types | 39 + ...6(alwaysstrict=true,target=es5).errors.txt | 19 + ...ts16(alwaysstrict=true,target=es5).symbols | 20 + ...ents16(alwaysstrict=true,target=es5).types | 39 + ...UsingArguments16(target=es2015).errors.txt | 12 + ...henUsingArguments16(target=es5).errors.txt | 2 + ...rguments16_ES6(alwaysstrict=false).symbols | 20 + ...gArguments16_ES6(alwaysstrict=false).types | 39 + ...uments16_ES6(alwaysstrict=true).errors.txt | 16 + ...Arguments16_ES6(alwaysstrict=true).symbols | 20 + ...ngArguments16_ES6(alwaysstrict=true).types | 39 + ...unctionWhenUsingArguments16_ES6.errors.txt | 12 + ...(alwaysstrict=false,target=es2015).symbols | 21 + ...17(alwaysstrict=false,target=es2015).types | 43 + ...(alwaysstrict=false,target=es5).errors.txt | 13 + ...s17(alwaysstrict=false,target=es5).symbols | 21 + ...nts17(alwaysstrict=false,target=es5).types | 43 + ...lwaysstrict=true,target=es2015).errors.txt | 16 + ...7(alwaysstrict=true,target=es2015).symbols | 21 + ...s17(alwaysstrict=true,target=es2015).types | 43 + ...7(alwaysstrict=true,target=es5).errors.txt | 19 + ...ts17(alwaysstrict=true,target=es5).symbols | 21 + ...ents17(alwaysstrict=true,target=es5).types | 43 + ...UsingArguments17(target=es2015).errors.txt | 12 + ...henUsingArguments17(target=es5).errors.txt | 2 + ...rguments17_ES6(alwaysstrict=false).symbols | 21 + ...gArguments17_ES6(alwaysstrict=false).types | 43 + ...uments17_ES6(alwaysstrict=true).errors.txt | 16 + ...Arguments17_ES6(alwaysstrict=true).symbols | 21 + ...ngArguments17_ES6(alwaysstrict=true).types | 43 + ...unctionWhenUsingArguments17_ES6.errors.txt | 12 + ...waysstrict=false,target=es2015).errors.txt | 58 + ...(alwaysstrict=false,target=es2015).symbols | 56 + ...ts(alwaysstrict=false,target=es2015).types | 99 + ...(alwaysstrict=false,target=es5).errors.txt | 58 + ...nts(alwaysstrict=false,target=es5).symbols | 56 + ...ments(alwaysstrict=false,target=es5).types | 99 + ...lwaysstrict=true,target=es2015).errors.txt | 73 + ...s(alwaysstrict=true,target=es2015).symbols | 56 + ...nts(alwaysstrict=true,target=es2015).types | 99 + ...s(alwaysstrict=true,target=es5).errors.txt | 73 + ...ents(alwaysstrict=true,target=es5).symbols | 56 + ...ements(alwaysstrict=true,target=es5).types | 99 + ...onWithStatements(target=es2015).errors.txt | 2 + ...ctionWithStatements(target=es5).errors.txt | 2 + .../for-of56(alwaysstrict=false).symbols | 6 + .../for-of56(alwaysstrict=false).types | 8 + .../for-of56(alwaysstrict=true).errors.txt | 7 + .../for-of56(alwaysstrict=true).symbols | 6 + .../for-of56(alwaysstrict=true).types | 9 + tests/baselines/reference/for-of56.errors.txt | 6 + tests/baselines/reference/for-of56.types | 1 + ...torTypeCheck38(alwaysstrict=false).symbols | 14 + ...ratorTypeCheck38(alwaysstrict=false).types | 19 + ...rTypeCheck38(alwaysstrict=true).errors.txt | 14 + ...atorTypeCheck38(alwaysstrict=true).symbols | 14 + ...eratorTypeCheck38(alwaysstrict=true).types | 23 + .../reference/generatorTypeCheck38.errors.txt | 10 + .../reference/generatorTypeCheck38.types | 4 + .../getEmitOutputTsxFile_React.baseline | 6 +- ...ilityErrors(alwaysstrict=false).errors.txt | 31 + ...habilityErrors(alwaysstrict=false).symbols | 40 + ...achabilityErrors(alwaysstrict=false).types | 64 + ...bilityErrors(alwaysstrict=true).errors.txt | 34 + ...chabilityErrors(alwaysstrict=true).symbols | 40 + ...eachabilityErrors(alwaysstrict=true).types | 64 + ...mpilationBindReachabilityErrors.errors.txt | 2 + ...nStatements(alwaysstrict=false).errors.txt | 32 + ...arenStatements(alwaysstrict=false).symbols | 39 + ...eParenStatements(alwaysstrict=false).types | 117 + ...enStatements(alwaysstrict=true).errors.txt | 35 + ...ParenStatements(alwaysstrict=true).symbols | 39 + ...seParenStatements(alwaysstrict=true).types | 117 + .../missingCloseParenStatements.errors.txt | 2 + ...hods.es2018(alwaysstrict=false).errors.txt | 197 ++ ...Methods.es2018(alwaysstrict=false).symbols | 266 +++ ...ssMethods.es2018(alwaysstrict=false).types | 371 ++++ ...thods.es2018(alwaysstrict=true).errors.txt | 200 ++ ...sMethods.es2018(alwaysstrict=true).symbols | 266 +++ ...assMethods.es2018(alwaysstrict=true).types | 371 ++++ ...cGenerators.classMethods.es2018.errors.txt | 2 + ...ions.es2018(alwaysstrict=false).errors.txt | 117 + ...rations.es2018(alwaysstrict=false).symbols | 145 ++ ...larations.es2018(alwaysstrict=false).types | 213 ++ ...tions.es2018(alwaysstrict=true).errors.txt | 126 ++ ...arations.es2018(alwaysstrict=true).symbols | 145 ++ ...clarations.es2018(alwaysstrict=true).types | 213 ++ ...ors.functionDeclarations.es2018.errors.txt | 2 + ...ions.es2018(alwaysstrict=false).errors.txt | 123 ++ ...essions.es2018(alwaysstrict=false).symbols | 158 ++ ...pressions.es2018(alwaysstrict=false).types | 277 +++ ...sions.es2018(alwaysstrict=true).errors.txt | 129 ++ ...ressions.es2018(alwaysstrict=true).symbols | 158 ++ ...xpressions.es2018(alwaysstrict=true).types | 277 +++ ...tors.functionExpressions.es2018.errors.txt | 2 + ...hods.es2018(alwaysstrict=false).errors.txt | 183 ++ ...Methods.es2018(alwaysstrict=false).symbols | 258 +++ ...alMethods.es2018(alwaysstrict=false).types | 406 ++++ ...thods.es2018(alwaysstrict=true).errors.txt | 189 ++ ...lMethods.es2018(alwaysstrict=true).symbols | 258 +++ ...ralMethods.es2018(alwaysstrict=true).types | 406 ++++ ...ors.objectLiteralMethods.es2018.errors.txt | 2 + ...eclaration1(alwaysstrict=false).errors.txt | 20 + ...leDeclaration1(alwaysstrict=false).symbols | 18 + ...ableDeclaration1(alwaysstrict=false).types | 33 + ...Declaration1(alwaysstrict=true).errors.txt | 23 + ...bleDeclaration1(alwaysstrict=true).symbols | 18 + ...iableDeclaration1(alwaysstrict=true).types | 33 + ...sNotAMemberVariableDeclaration1.errors.txt | 6 +- .../recursiveClassReferenceTest.js.map | 4 +- .../recursiveClassReferenceTest.sourcemap.txt | 683 +++--- .../restParameterWithBindingPattern1.js.map | 4 +- ...ParameterWithBindingPattern1.sourcemap.txt | 25 +- .../restParameterWithBindingPattern2.js.map | 4 +- ...ParameterWithBindingPattern2.sourcemap.txt | 25 +- 487 files changed, 30924 insertions(+), 1527 deletions(-) create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/ES5For-of19(target=es2015).errors.txt create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/FunctionDeclaration2_es6.errors.txt create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).types create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).types create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=false).types create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/ambientWithStatements(alwaysstrict=true).types create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).types create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).types create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).types create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).types create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).types create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).types create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).types create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).types create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).types create mode 100644 tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).types create mode 100644 tests/baselines/reference/collisionArgumentsInType.errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).types create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).types create mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).types create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).types create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).types create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).types create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).types create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).types create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).types create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).types create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).types create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).types create mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).errors.txt create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).symbols create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).types create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).errors.txt create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).symbols create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).types create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).errors.txt create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).symbols create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).types create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).errors.txt create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).symbols create mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).types create mode 100644 tests/baselines/reference/for-of56(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/for-of56(alwaysstrict=false).types create mode 100644 tests/baselines/reference/for-of56(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/for-of56(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/for-of56(alwaysstrict=true).types create mode 100644 tests/baselines/reference/for-of56.errors.txt create mode 100644 tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).types create mode 100644 tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).types create mode 100644 tests/baselines/reference/generatorTypeCheck38.errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).types create mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).types create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).types create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).types create mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).types create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).errors.txt create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).symbols create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).types create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).errors.txt create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).symbols create mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).types diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..646e312385af2 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + function foo() { +>foo : Symbol(foo, Decl(ES5For-of19.ts, 1, 6)) + + for (const v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..30cb86bfdb2ef --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es2015).types @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : any +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any + + function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + for (const v of []) { +>v : any +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..646e312385af2 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + function foo() { +>foo : Symbol(foo, Decl(ES5For-of19.ts, 1, 6)) + + for (const v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).types b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..30cb86bfdb2ef --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=false,target=es5).types @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : any +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any + + function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + for (const v of []) { +>v : any +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..646e312385af2 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + function foo() { +>foo : Symbol(foo, Decl(ES5For-of19.ts, 1, 6)) + + for (const v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..30cb86bfdb2ef --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es2015).types @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : any +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any + + function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + for (const v of []) { +>v : any +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..f44152785e780 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,15 @@ +ES5For-of19.ts(3,14): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. + + +==== ES5For-of19.ts (1 errors) ==== + for (let v of []) { + v; + function foo() { + ~~~ +!!! error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. + for (const v of []) { + v; + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..646e312385af2 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) + + function foo() { +>foo : Symbol(foo, Decl(ES5For-of19.ts, 1, 6)) + + for (const v of []) { +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + + v; +>v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).types b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..67affcfc4c249 --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(alwaysstrict=true,target=es5).types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === +for (let v of []) { +>v : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any +> : ^^^ + + function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + for (const v of []) { +>v : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + + v; +>v : any +> : ^^^ + } + } +} + diff --git a/tests/baselines/reference/ES5For-of19(target=es2015).errors.txt b/tests/baselines/reference/ES5For-of19(target=es2015).errors.txt new file mode 100644 index 0000000000000..0e241ffdce85b --- /dev/null +++ b/tests/baselines/reference/ES5For-of19(target=es2015).errors.txt @@ -0,0 +1,14 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== ES5For-of19.ts (0 errors) ==== + for (let v of []) { + v; + function foo() { + for (const v of []) { + v; + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of19(target=es2015).types b/tests/baselines/reference/ES5For-of19(target=es2015).types index 30cb86bfdb2ef..67affcfc4c249 100644 --- a/tests/baselines/reference/ES5For-of19(target=es2015).types +++ b/tests/baselines/reference/ES5For-of19(target=es2015).types @@ -3,11 +3,13 @@ === ES5For-of19.ts === for (let v of []) { >v : any +> : ^^^ >[] : undefined[] > : ^^^^^^^^^^^ v; >v : any +> : ^^^ function foo() { >foo : () => void @@ -15,11 +17,13 @@ for (let v of []) { for (const v of []) { >v : any +> : ^^^ >[] : undefined[] > : ^^^^^^^^^^^ v; >v : any +> : ^^^ } } } diff --git a/tests/baselines/reference/ES5For-of19(target=es5).errors.txt b/tests/baselines/reference/ES5For-of19(target=es5).errors.txt index 9d68e6c5170b2..9ad2fc0d0578e 100644 --- a/tests/baselines/reference/ES5For-of19(target=es5).errors.txt +++ b/tests/baselines/reference/ES5For-of19(target=es5).errors.txt @@ -1,6 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== ES5For-of19.ts (0 errors) ==== for (let v of []) { diff --git a/tests/baselines/reference/ES5For-of25(target=es2015).js.map b/tests/baselines/reference/ES5For-of25(target=es2015).js.map index 4cb55270ed3c6..14db38aa9ee4d 100644 --- a/tests/baselines/reference/ES5For-of25(target=es2015).js.map +++ b/tests/baselines/reference/ES5For-of25(target=es2015).js.map @@ -1,3 +1,3 @@ //// [ES5For-of25.js.map] -{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACd,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIGEgPSBbMSwgMiwgM107DQpmb3IgKHZhciB2IG9mIGEpIHsNCiAgICB2Ow0KICAgIGE7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1FUzVGb3Itb2YyNS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDbEIsS0FBSyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQztJQUNkLENBQUMsQ0FBQztJQUNGLENBQUMsQ0FBQztBQUNOLENBQUMifQ==,dmFyIGEgPSBbMSwgMiwgM107CmZvciAodmFyIHYgb2YgYSkgewogICAgdjsKICAgIGE7Cn0= +{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACd,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KdmFyIGEgPSBbMSwgMiwgM107DQpmb3IgKHZhciB2IG9mIGEpIHsNCiAgICB2Ow0KICAgIGE7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1FUzVGb3Itb2YyNS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ2xCLEtBQUssSUFBSSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUM7SUFDZCxDQUFDLENBQUM7SUFDRixDQUFDLENBQUM7QUFDTixDQUFDIn0=,dmFyIGEgPSBbMSwgMiwgM107CmZvciAodmFyIHYgb2YgYSkgewogICAgdjsKICAgIGE7Cn0= diff --git a/tests/baselines/reference/ES5For-of25(target=es2015).sourcemap.txt b/tests/baselines/reference/ES5For-of25(target=es2015).sourcemap.txt index 12f7a2d129fc4..dfc97dcd8d871 100644 --- a/tests/baselines/reference/ES5For-of25(target=es2015).sourcemap.txt +++ b/tests/baselines/reference/ES5For-of25(target=es2015).sourcemap.txt @@ -8,6 +8,7 @@ sources: ES5For-of25.ts emittedFile:ES5For-of25.js sourceFile:ES5For-of25.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var a = [1, 2, 3]; 1 > 2 >^^^^ @@ -34,18 +35,18 @@ sourceFile:ES5For-of25.ts 10> 3 11> ] 12> ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -7 >Emitted(1, 13) Source(1, 13) + SourceIndex(0) -8 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -9 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -10>Emitted(1, 17) Source(1, 17) + SourceIndex(0) -11>Emitted(1, 18) Source(1, 18) + SourceIndex(0) -12>Emitted(1, 19) Source(1, 19) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(2, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(2, 9) Source(1, 9) + SourceIndex(0) +5 >Emitted(2, 10) Source(1, 10) + SourceIndex(0) +6 >Emitted(2, 11) Source(1, 11) + SourceIndex(0) +7 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +8 >Emitted(2, 14) Source(1, 14) + SourceIndex(0) +9 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +10>Emitted(2, 17) Source(1, 17) + SourceIndex(0) +11>Emitted(2, 18) Source(1, 18) + SourceIndex(0) +12>Emitted(2, 19) Source(1, 19) + SourceIndex(0) --- >>>for (var v of a) { 1-> @@ -65,14 +66,14 @@ sourceFile:ES5For-of25.ts 6 > a 7 > ) 8 > { -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 6) Source(2, 6) + SourceIndex(0) -3 >Emitted(2, 10) Source(2, 10) + SourceIndex(0) -4 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) -5 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) -6 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -7 >Emitted(2, 18) Source(2, 18) + SourceIndex(0) -8 >Emitted(2, 19) Source(2, 19) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 6) + SourceIndex(0) +3 >Emitted(3, 10) Source(2, 10) + SourceIndex(0) +4 >Emitted(3, 11) Source(2, 11) + SourceIndex(0) +5 >Emitted(3, 15) Source(2, 15) + SourceIndex(0) +6 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) +7 >Emitted(3, 18) Source(2, 18) + SourceIndex(0) +8 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) --- >>> v; 1 >^^^^ @@ -83,9 +84,9 @@ sourceFile:ES5For-of25.ts > 2 > v 3 > ; -1 >Emitted(3, 5) Source(3, 5) + SourceIndex(0) -2 >Emitted(3, 6) Source(3, 6) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 7) + SourceIndex(0) +1 >Emitted(4, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0) --- >>> a; 1->^^^^ @@ -95,9 +96,9 @@ sourceFile:ES5For-of25.ts > 2 > a 3 > ; -1->Emitted(4, 5) Source(4, 5) + SourceIndex(0) -2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) -3 >Emitted(4, 7) Source(4, 7) + SourceIndex(0) +1->Emitted(5, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 6) + SourceIndex(0) +3 >Emitted(5, 7) Source(4, 7) + SourceIndex(0) --- >>>} 1 > @@ -106,7 +107,7 @@ sourceFile:ES5For-of25.ts 1 > > 2 >} -1 >Emitted(5, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(5, 2) Source(5, 2) + SourceIndex(0) +1 >Emitted(6, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(5, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=ES5For-of25.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of25(target=es5).js.map b/tests/baselines/reference/ES5For-of25(target=es5).js.map index 288ec798920c5..eb9181f496a75 100644 --- a/tests/baselines/reference/ES5For-of25(target=es5).js.map +++ b/tests/baselines/reference/ES5For-of25(target=es5).js.map @@ -1,3 +1,3 @@ //// [ES5For-of25.js.map] -{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,KAAc,UAAC,EAAD,OAAC,EAAD,eAAC,EAAD,IAAC,EAAE,CAAC;IAAb,IAAI,CAAC,UAAA;IACN,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,dmFyIGEgPSBbMSwgMiwgM107DQpmb3IgKHZhciBfaSA9IDAsIGFfMSA9IGE7IF9pIDwgYV8xLmxlbmd0aDsgX2krKykgew0KICAgIHZhciB2ID0gYV8xW19pXTsNCiAgICB2Ow0KICAgIGE7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1FUzVGb3Itb2YyNS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDbEIsS0FBYyxVQUFDLEVBQUQsT0FBQyxFQUFELGVBQUMsRUFBRCxJQUFDLEVBQUUsQ0FBQztJQUFiLElBQUksQ0FBQyxVQUFBO0lBQ04sQ0FBQyxDQUFDO0lBQ0YsQ0FBQyxDQUFDO0FBQ04sQ0FBQyJ9,dmFyIGEgPSBbMSwgMiwgM107CmZvciAodmFyIHYgb2YgYSkgewogICAgdjsKICAgIGE7Cn0= +{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,KAAc,UAAC,EAAD,OAAC,EAAD,eAAC,EAAD,IAAC,EAAE,CAAC;IAAb,IAAI,CAAC,UAAA;IACN,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KdmFyIGEgPSBbMSwgMiwgM107DQpmb3IgKHZhciBfaSA9IDAsIGFfMSA9IGE7IF9pIDwgYV8xLmxlbmd0aDsgX2krKykgew0KICAgIHZhciB2ID0gYV8xW19pXTsNCiAgICB2Ow0KICAgIGE7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1FUzVGb3Itb2YyNS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ2xCLEtBQWMsVUFBQyxFQUFELE9BQUMsRUFBRCxlQUFDLEVBQUQsSUFBQyxFQUFFLENBQUM7SUFBYixJQUFJLENBQUMsVUFBQTtJQUNOLENBQUMsQ0FBQztJQUNGLENBQUMsQ0FBQztBQUNOLENBQUMifQ==,dmFyIGEgPSBbMSwgMiwgM107CmZvciAodmFyIHYgb2YgYSkgewogICAgdjsKICAgIGE7Cn0= diff --git a/tests/baselines/reference/ES5For-of25(target=es5).sourcemap.txt b/tests/baselines/reference/ES5For-of25(target=es5).sourcemap.txt index 345e2ac16ca52..e488df86f345c 100644 --- a/tests/baselines/reference/ES5For-of25(target=es5).sourcemap.txt +++ b/tests/baselines/reference/ES5For-of25(target=es5).sourcemap.txt @@ -8,6 +8,7 @@ sources: ES5For-of25.ts emittedFile:ES5For-of25.js sourceFile:ES5For-of25.ts ------------------------------------------------------------------- +>>>"use strict"; >>>var a = [1, 2, 3]; 1 > 2 >^^^^ @@ -34,18 +35,18 @@ sourceFile:ES5For-of25.ts 10> 3 11> ] 12> ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) -3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -6 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -7 >Emitted(1, 13) Source(1, 13) + SourceIndex(0) -8 >Emitted(1, 14) Source(1, 14) + SourceIndex(0) -9 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -10>Emitted(1, 17) Source(1, 17) + SourceIndex(0) -11>Emitted(1, 18) Source(1, 18) + SourceIndex(0) -12>Emitted(1, 19) Source(1, 19) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(2, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(2, 9) Source(1, 9) + SourceIndex(0) +5 >Emitted(2, 10) Source(1, 10) + SourceIndex(0) +6 >Emitted(2, 11) Source(1, 11) + SourceIndex(0) +7 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +8 >Emitted(2, 14) Source(1, 14) + SourceIndex(0) +9 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +10>Emitted(2, 17) Source(1, 17) + SourceIndex(0) +11>Emitted(2, 18) Source(1, 18) + SourceIndex(0) +12>Emitted(2, 19) Source(1, 19) + SourceIndex(0) --- >>>for (var _i = 0, a_1 = a; _i < a_1.length; _i++) { 1-> @@ -71,17 +72,17 @@ sourceFile:ES5For-of25.ts 9 > a 10> ) 11> { -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 6) Source(2, 15) + SourceIndex(0) -3 >Emitted(2, 16) Source(2, 16) + SourceIndex(0) -4 >Emitted(2, 18) Source(2, 15) + SourceIndex(0) -5 >Emitted(2, 25) Source(2, 16) + SourceIndex(0) -6 >Emitted(2, 27) Source(2, 15) + SourceIndex(0) -7 >Emitted(2, 42) Source(2, 16) + SourceIndex(0) -8 >Emitted(2, 44) Source(2, 15) + SourceIndex(0) -9 >Emitted(2, 48) Source(2, 16) + SourceIndex(0) -10>Emitted(2, 50) Source(2, 18) + SourceIndex(0) -11>Emitted(2, 51) Source(2, 19) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 15) + SourceIndex(0) +3 >Emitted(3, 16) Source(2, 16) + SourceIndex(0) +4 >Emitted(3, 18) Source(2, 15) + SourceIndex(0) +5 >Emitted(3, 25) Source(2, 16) + SourceIndex(0) +6 >Emitted(3, 27) Source(2, 15) + SourceIndex(0) +7 >Emitted(3, 42) Source(2, 16) + SourceIndex(0) +8 >Emitted(3, 44) Source(2, 15) + SourceIndex(0) +9 >Emitted(3, 48) Source(2, 16) + SourceIndex(0) +10>Emitted(3, 50) Source(2, 18) + SourceIndex(0) +11>Emitted(3, 51) Source(2, 19) + SourceIndex(0) --- >>> var v = a_1[_i]; 1 >^^^^ @@ -92,10 +93,10 @@ sourceFile:ES5For-of25.ts 2 > var 3 > v 4 > -1 >Emitted(3, 5) Source(2, 6) + SourceIndex(0) -2 >Emitted(3, 9) Source(2, 10) + SourceIndex(0) -3 >Emitted(3, 10) Source(2, 11) + SourceIndex(0) -4 >Emitted(3, 20) Source(2, 11) + SourceIndex(0) +1 >Emitted(4, 5) Source(2, 6) + SourceIndex(0) +2 >Emitted(4, 9) Source(2, 10) + SourceIndex(0) +3 >Emitted(4, 10) Source(2, 11) + SourceIndex(0) +4 >Emitted(4, 20) Source(2, 11) + SourceIndex(0) --- >>> v; 1 >^^^^ @@ -106,9 +107,9 @@ sourceFile:ES5For-of25.ts > 2 > v 3 > ; -1 >Emitted(4, 5) Source(3, 5) + SourceIndex(0) -2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) -3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0) +1 >Emitted(5, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(5, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(5, 7) Source(3, 7) + SourceIndex(0) --- >>> a; 1->^^^^ @@ -118,9 +119,9 @@ sourceFile:ES5For-of25.ts > 2 > a 3 > ; -1->Emitted(5, 5) Source(4, 5) + SourceIndex(0) -2 >Emitted(5, 6) Source(4, 6) + SourceIndex(0) -3 >Emitted(5, 7) Source(4, 7) + SourceIndex(0) +1->Emitted(6, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(6, 6) Source(4, 6) + SourceIndex(0) +3 >Emitted(6, 7) Source(4, 7) + SourceIndex(0) --- >>>} 1 > @@ -129,7 +130,7 @@ sourceFile:ES5For-of25.ts 1 > > 2 >} -1 >Emitted(6, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(6, 2) Source(5, 2) + SourceIndex(0) +1 >Emitted(7, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(7, 2) Source(5, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=ES5For-of25.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of26(target=es2015).js.map b/tests/baselines/reference/ES5For-of26(target=es2015).js.map index 51d0525b9d6e4..49e0519113f2c 100644 --- a/tests/baselines/reference/ES5For-of26(target=es2015).js.map +++ b/tests/baselines/reference/ES5For-of26(target=es2015).js.map @@ -1,3 +1,3 @@ //// [ES5For-of26.js.map] -{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAChC,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,Zm9yICh2YXIgW2EgPSAwLCBiID0gMV0gb2YgWzIsIDNdKSB7DQogICAgYTsNCiAgICBiOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9RVM1Rm9yLW9mMjYuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxLQUFLLElBQUksQ0FBQyxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDO0lBQ2hDLENBQUMsQ0FBQztJQUNGLENBQUMsQ0FBQztBQUNOLENBQUMifQ==,Zm9yICh2YXIgW2EgPSAwLCBiID0gMV0gb2YgWzIsIDNdKSB7CiAgICBhOwogICAgYjsKfQ== +{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":";AAAA,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAChC,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KZm9yICh2YXIgW2EgPSAwLCBiID0gMV0gb2YgWzIsIDNdKSB7DQogICAgYTsNCiAgICBiOw0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9RVM1Rm9yLW9mMjYuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsS0FBSyxJQUFJLENBQUMsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQztJQUNoQyxDQUFDLENBQUM7SUFDRixDQUFDLENBQUM7QUFDTixDQUFDIn0=,Zm9yICh2YXIgW2EgPSAwLCBiID0gMV0gb2YgWzIsIDNdKSB7CiAgICBhOwogICAgYjsKfQ== diff --git a/tests/baselines/reference/ES5For-of26(target=es2015).sourcemap.txt b/tests/baselines/reference/ES5For-of26(target=es2015).sourcemap.txt index 162846607b68b..5198fdfa80f99 100644 --- a/tests/baselines/reference/ES5For-of26(target=es2015).sourcemap.txt +++ b/tests/baselines/reference/ES5For-of26(target=es2015).sourcemap.txt @@ -8,6 +8,7 @@ sources: ES5For-of26.ts emittedFile:ES5For-of26.js sourceFile:ES5For-of26.ts ------------------------------------------------------------------- +>>>"use strict"; >>>for (var [a = 0, b = 1] of [2, 3]) { 1 > 2 >^^^^^ @@ -49,26 +50,26 @@ sourceFile:ES5For-of26.ts 18> ] 19> ) 20> { -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) -3 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -4 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -5 >Emitted(1, 12) Source(1, 12) + SourceIndex(0) -6 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -7 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -8 >Emitted(1, 18) Source(1, 18) + SourceIndex(0) -9 >Emitted(1, 19) Source(1, 19) + SourceIndex(0) -10>Emitted(1, 22) Source(1, 22) + SourceIndex(0) -11>Emitted(1, 23) Source(1, 23) + SourceIndex(0) -12>Emitted(1, 24) Source(1, 24) + SourceIndex(0) -13>Emitted(1, 28) Source(1, 28) + SourceIndex(0) -14>Emitted(1, 29) Source(1, 29) + SourceIndex(0) -15>Emitted(1, 30) Source(1, 30) + SourceIndex(0) -16>Emitted(1, 32) Source(1, 32) + SourceIndex(0) -17>Emitted(1, 33) Source(1, 33) + SourceIndex(0) -18>Emitted(1, 34) Source(1, 34) + SourceIndex(0) -19>Emitted(1, 36) Source(1, 36) + SourceIndex(0) -20>Emitted(1, 37) Source(1, 37) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 6) Source(1, 6) + SourceIndex(0) +3 >Emitted(2, 10) Source(1, 10) + SourceIndex(0) +4 >Emitted(2, 11) Source(1, 11) + SourceIndex(0) +5 >Emitted(2, 12) Source(1, 12) + SourceIndex(0) +6 >Emitted(2, 15) Source(1, 15) + SourceIndex(0) +7 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +8 >Emitted(2, 18) Source(1, 18) + SourceIndex(0) +9 >Emitted(2, 19) Source(1, 19) + SourceIndex(0) +10>Emitted(2, 22) Source(1, 22) + SourceIndex(0) +11>Emitted(2, 23) Source(1, 23) + SourceIndex(0) +12>Emitted(2, 24) Source(1, 24) + SourceIndex(0) +13>Emitted(2, 28) Source(1, 28) + SourceIndex(0) +14>Emitted(2, 29) Source(1, 29) + SourceIndex(0) +15>Emitted(2, 30) Source(1, 30) + SourceIndex(0) +16>Emitted(2, 32) Source(1, 32) + SourceIndex(0) +17>Emitted(2, 33) Source(1, 33) + SourceIndex(0) +18>Emitted(2, 34) Source(1, 34) + SourceIndex(0) +19>Emitted(2, 36) Source(1, 36) + SourceIndex(0) +20>Emitted(2, 37) Source(1, 37) + SourceIndex(0) --- >>> a; 1 >^^^^ @@ -79,9 +80,9 @@ sourceFile:ES5For-of26.ts > 2 > a 3 > ; -1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) -2 >Emitted(2, 6) Source(2, 6) + SourceIndex(0) -3 >Emitted(2, 7) Source(2, 7) + SourceIndex(0) +1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(3, 6) Source(2, 6) + SourceIndex(0) +3 >Emitted(3, 7) Source(2, 7) + SourceIndex(0) --- >>> b; 1->^^^^ @@ -91,9 +92,9 @@ sourceFile:ES5For-of26.ts > 2 > b 3 > ; -1->Emitted(3, 5) Source(3, 5) + SourceIndex(0) -2 >Emitted(3, 6) Source(3, 6) + SourceIndex(0) -3 >Emitted(3, 7) Source(3, 7) + SourceIndex(0) +1->Emitted(4, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0) --- >>>} 1 > @@ -102,7 +103,7 @@ sourceFile:ES5For-of26.ts 1 > > 2 >} -1 >Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) +1 >Emitted(5, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(4, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=ES5For-of26.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of26(target=es5).js.map b/tests/baselines/reference/ES5For-of26(target=es5).js.map index 196e63437187a..8a864c9c86e53 100644 --- a/tests/baselines/reference/ES5For-of26(target=es5).js.map +++ b/tests/baselines/reference/ES5For-of26(target=es5).js.map @@ -1,3 +1,3 @@ //// [ES5For-of26.js.map] -{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,KAA2B,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAAN,cAAM,EAAN,IAAM,EAAE,CAAC;IAA3B,IAAA,WAAc,EAAb,UAAK,EAAL,CAAC,mBAAG,CAAC,KAAA,EAAE,UAAK,EAAL,CAAC,mBAAG,CAAC,KAAA;IAClB,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,Zm9yICh2YXIgX2kgPSAwLCBfYSA9IFsyLCAzXTsgX2kgPCBfYS5sZW5ndGg7IF9pKyspIHsNCiAgICB2YXIgX2IgPSBfYVtfaV0sIF9jID0gX2JbMF0sIGEgPSBfYyA9PT0gdm9pZCAwID8gMCA6IF9jLCBfZCA9IF9iWzFdLCBiID0gX2QgPT09IHZvaWQgMCA/IDEgOiBfZDsNCiAgICBhOw0KICAgIGI7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1FUzVGb3Itb2YyNi5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxLQUEyQixVQUFNLEVBQU4sTUFBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQU4sY0FBTSxFQUFOLElBQU0sRUFBRSxDQUFDO0lBQTNCLElBQUEsV0FBYyxFQUFiLFVBQUssRUFBTCxDQUFDLG1CQUFHLENBQUMsS0FBQSxFQUFFLFVBQUssRUFBTCxDQUFDLG1CQUFHLENBQUMsS0FBQTtJQUNsQixDQUFDLENBQUM7SUFDRixDQUFDLENBQUM7QUFDTixDQUFDIn0=,Zm9yICh2YXIgW2EgPSAwLCBiID0gMV0gb2YgWzIsIDNdKSB7CiAgICBhOwogICAgYjsKfQ== +{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":";AAAA,KAA2B,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAAN,cAAM,EAAN,IAAM,EAAE,CAAC;IAA3B,IAAA,WAAc,EAAb,UAAK,EAAL,CAAC,mBAAG,CAAC,KAAA,EAAE,UAAK,EAAL,CAAC,mBAAG,CAAC,KAAA;IAClB,CAAC,CAAC;IACF,CAAC,CAAC;AACN,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KZm9yICh2YXIgX2kgPSAwLCBfYSA9IFsyLCAzXTsgX2kgPCBfYS5sZW5ndGg7IF9pKyspIHsNCiAgICB2YXIgX2IgPSBfYVtfaV0sIF9jID0gX2JbMF0sIGEgPSBfYyA9PT0gdm9pZCAwID8gMCA6IF9jLCBfZCA9IF9iWzFdLCBiID0gX2QgPT09IHZvaWQgMCA/IDEgOiBfZDsNCiAgICBhOw0KICAgIGI7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1FUzVGb3Itb2YyNi5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRVM1Rm9yLW9mMjYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJFUzVGb3Itb2YyNi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsS0FBMkIsVUFBTSxFQUFOLE1BQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFOLGNBQU0sRUFBTixJQUFNLEVBQUUsQ0FBQztJQUEzQixJQUFBLFdBQWMsRUFBYixVQUFLLEVBQUwsQ0FBQyxtQkFBRyxDQUFDLEtBQUEsRUFBRSxVQUFLLEVBQUwsQ0FBQyxtQkFBRyxDQUFDLEtBQUE7SUFDbEIsQ0FBQyxDQUFDO0lBQ0YsQ0FBQyxDQUFDO0FBQ04sQ0FBQyJ9,Zm9yICh2YXIgW2EgPSAwLCBiID0gMV0gb2YgWzIsIDNdKSB7CiAgICBhOwogICAgYjsKfQ== diff --git a/tests/baselines/reference/ES5For-of26(target=es5).sourcemap.txt b/tests/baselines/reference/ES5For-of26(target=es5).sourcemap.txt index 2955602a9b846..191d32947b0f4 100644 --- a/tests/baselines/reference/ES5For-of26(target=es5).sourcemap.txt +++ b/tests/baselines/reference/ES5For-of26(target=es5).sourcemap.txt @@ -8,6 +8,7 @@ sources: ES5For-of26.ts emittedFile:ES5For-of26.js sourceFile:ES5For-of26.ts ------------------------------------------------------------------- +>>>"use strict"; >>>for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) { 1 > 2 >^^^^^ @@ -40,21 +41,21 @@ sourceFile:ES5For-of26.ts 13> [2, 3] 14> ) 15> { -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 6) Source(1, 28) + SourceIndex(0) -3 >Emitted(1, 16) Source(1, 34) + SourceIndex(0) -4 >Emitted(1, 18) Source(1, 28) + SourceIndex(0) -5 >Emitted(1, 24) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 25) Source(1, 30) + SourceIndex(0) -7 >Emitted(1, 27) Source(1, 32) + SourceIndex(0) -8 >Emitted(1, 28) Source(1, 33) + SourceIndex(0) -9 >Emitted(1, 29) Source(1, 34) + SourceIndex(0) -10>Emitted(1, 31) Source(1, 28) + SourceIndex(0) -11>Emitted(1, 45) Source(1, 34) + SourceIndex(0) -12>Emitted(1, 47) Source(1, 28) + SourceIndex(0) -13>Emitted(1, 51) Source(1, 34) + SourceIndex(0) -14>Emitted(1, 53) Source(1, 36) + SourceIndex(0) -15>Emitted(1, 54) Source(1, 37) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 6) Source(1, 28) + SourceIndex(0) +3 >Emitted(2, 16) Source(1, 34) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 28) + SourceIndex(0) +5 >Emitted(2, 24) Source(1, 29) + SourceIndex(0) +6 >Emitted(2, 25) Source(1, 30) + SourceIndex(0) +7 >Emitted(2, 27) Source(1, 32) + SourceIndex(0) +8 >Emitted(2, 28) Source(1, 33) + SourceIndex(0) +9 >Emitted(2, 29) Source(1, 34) + SourceIndex(0) +10>Emitted(2, 31) Source(1, 28) + SourceIndex(0) +11>Emitted(2, 45) Source(1, 34) + SourceIndex(0) +12>Emitted(2, 47) Source(1, 28) + SourceIndex(0) +13>Emitted(2, 51) Source(1, 34) + SourceIndex(0) +14>Emitted(2, 53) Source(1, 36) + SourceIndex(0) +15>Emitted(2, 54) Source(1, 37) + SourceIndex(0) --- >>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d; 1->^^^^ @@ -91,23 +92,23 @@ sourceFile:ES5For-of26.ts 15> = 16> 1 17> -1->Emitted(2, 5) Source(1, 10) + SourceIndex(0) -2 >Emitted(2, 9) Source(1, 10) + SourceIndex(0) -3 >Emitted(2, 20) Source(1, 24) + SourceIndex(0) -4 >Emitted(2, 22) Source(1, 11) + SourceIndex(0) -5 >Emitted(2, 32) Source(1, 16) + SourceIndex(0) -6 >Emitted(2, 34) Source(1, 11) + SourceIndex(0) -7 >Emitted(2, 35) Source(1, 12) + SourceIndex(0) -8 >Emitted(2, 54) Source(1, 15) + SourceIndex(0) -9 >Emitted(2, 55) Source(1, 16) + SourceIndex(0) -10>Emitted(2, 60) Source(1, 16) + SourceIndex(0) -11>Emitted(2, 62) Source(1, 18) + SourceIndex(0) -12>Emitted(2, 72) Source(1, 23) + SourceIndex(0) -13>Emitted(2, 74) Source(1, 18) + SourceIndex(0) -14>Emitted(2, 75) Source(1, 19) + SourceIndex(0) -15>Emitted(2, 94) Source(1, 22) + SourceIndex(0) -16>Emitted(2, 95) Source(1, 23) + SourceIndex(0) -17>Emitted(2, 100) Source(1, 23) + SourceIndex(0) +1->Emitted(3, 5) Source(1, 10) + SourceIndex(0) +2 >Emitted(3, 9) Source(1, 10) + SourceIndex(0) +3 >Emitted(3, 20) Source(1, 24) + SourceIndex(0) +4 >Emitted(3, 22) Source(1, 11) + SourceIndex(0) +5 >Emitted(3, 32) Source(1, 16) + SourceIndex(0) +6 >Emitted(3, 34) Source(1, 11) + SourceIndex(0) +7 >Emitted(3, 35) Source(1, 12) + SourceIndex(0) +8 >Emitted(3, 54) Source(1, 15) + SourceIndex(0) +9 >Emitted(3, 55) Source(1, 16) + SourceIndex(0) +10>Emitted(3, 60) Source(1, 16) + SourceIndex(0) +11>Emitted(3, 62) Source(1, 18) + SourceIndex(0) +12>Emitted(3, 72) Source(1, 23) + SourceIndex(0) +13>Emitted(3, 74) Source(1, 18) + SourceIndex(0) +14>Emitted(3, 75) Source(1, 19) + SourceIndex(0) +15>Emitted(3, 94) Source(1, 22) + SourceIndex(0) +16>Emitted(3, 95) Source(1, 23) + SourceIndex(0) +17>Emitted(3, 100) Source(1, 23) + SourceIndex(0) --- >>> a; 1 >^^^^ @@ -118,9 +119,9 @@ sourceFile:ES5For-of26.ts > 2 > a 3 > ; -1 >Emitted(3, 5) Source(2, 5) + SourceIndex(0) -2 >Emitted(3, 6) Source(2, 6) + SourceIndex(0) -3 >Emitted(3, 7) Source(2, 7) + SourceIndex(0) +1 >Emitted(4, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(4, 6) Source(2, 6) + SourceIndex(0) +3 >Emitted(4, 7) Source(2, 7) + SourceIndex(0) --- >>> b; 1->^^^^ @@ -130,9 +131,9 @@ sourceFile:ES5For-of26.ts > 2 > b 3 > ; -1->Emitted(4, 5) Source(3, 5) + SourceIndex(0) -2 >Emitted(4, 6) Source(3, 6) + SourceIndex(0) -3 >Emitted(4, 7) Source(3, 7) + SourceIndex(0) +1->Emitted(5, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(5, 6) Source(3, 6) + SourceIndex(0) +3 >Emitted(5, 7) Source(3, 7) + SourceIndex(0) --- >>>} 1 > @@ -141,7 +142,7 @@ sourceFile:ES5For-of26.ts 1 > > 2 >} -1 >Emitted(5, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(5, 2) Source(4, 2) + SourceIndex(0) +1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=ES5For-of26.js.map \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).symbols b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..771277a7e7b1c --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).symbols @@ -0,0 +1,7 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +=== FunctionDeclaration2_es6.ts === +function f(yield) { +>f : Symbol(f, Decl(FunctionDeclaration2_es6.ts, 0, 0)) +>yield : Symbol(yield, Decl(FunctionDeclaration2_es6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).types b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).types new file mode 100644 index 0000000000000..eb85c4124006f --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=false).types @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +=== FunctionDeclaration2_es6.ts === +function f(yield) { +>f : (yield: any) => void +> : ^ ^^^^^^^^^^^^^^ +>yield : any +} diff --git a/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).errors.txt b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..ed45ffd2e325f --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).errors.txt @@ -0,0 +1,8 @@ +FunctionDeclaration2_es6.ts(1,12): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + + +==== FunctionDeclaration2_es6.ts (1 errors) ==== + function f(yield) { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).symbols b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..771277a7e7b1c --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).symbols @@ -0,0 +1,7 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +=== FunctionDeclaration2_es6.ts === +function f(yield) { +>f : Symbol(f, Decl(FunctionDeclaration2_es6.ts, 0, 0)) +>yield : Symbol(yield, Decl(FunctionDeclaration2_es6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).types b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).types new file mode 100644 index 0000000000000..ab3967a8e9039 --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6(alwaysstrict=true).types @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +=== FunctionDeclaration2_es6.ts === +function f(yield) { +>f : (yield: any) => void +> : ^ ^^^^^^^^^^^^^^ +>yield : any +> : ^^^ +} diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration2_es6.errors.txt new file mode 100644 index 0000000000000..01b3ed79f5f19 --- /dev/null +++ b/tests/baselines/reference/FunctionDeclaration2_es6.errors.txt @@ -0,0 +1,7 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== FunctionDeclaration2_es6.ts (0 errors) ==== + function f(yield) { + } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.types b/tests/baselines/reference/FunctionDeclaration2_es6.types index eb85c4124006f..ab3967a8e9039 100644 --- a/tests/baselines/reference/FunctionDeclaration2_es6.types +++ b/tests/baselines/reference/FunctionDeclaration2_es6.types @@ -5,4 +5,5 @@ function f(yield) { >f : (yield: any) => void > : ^ ^^^^^^^^^^^^^^ >yield : any +> : ^^^ } diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).errors.txt b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..20fd93f7c5cb8 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).errors.txt @@ -0,0 +1,46 @@ +NonInitializedExportInInternalModule.ts(2,8): error TS1123: Variable declaration list cannot be empty. +NonInitializedExportInInternalModule.ts(3,5): error TS2304: Cannot find name 'let'. +NonInitializedExportInInternalModule.ts(4,10): error TS1123: Variable declaration list cannot be empty. + + +==== NonInitializedExportInInternalModule.ts (3 errors) ==== + namespace Inner { + var; + +!!! error TS1123: Variable declaration list cannot be empty. + let; + ~~~ +!!! error TS2304: Cannot find name 'let'. + const; + +!!! error TS1123: Variable declaration list cannot be empty. + + export var a; + export let b; + export var c: string; + export let d: number; + class A {} + export var e: A; + export let f: A; + + namespace B { + export let a = 1, b, c = 2; + export let x, y, z; + } + + namespace C { + export var a = 1, b, c = 2; + export var x, y, z; + } + + // Shouldn't be filtered + export var a1 = 1; + export let b1 = 1; + export var c1: string = 'a'; + export let d1: number = 1; + class D {} + export var e1 = new D; + export let f1 = new D; + export var g1: D = new D; + export let h1: D = new D; + } \ No newline at end of file diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).symbols b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..62f7c0d2e5258 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).symbols @@ -0,0 +1,95 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +=== NonInitializedExportInInternalModule.ts === +namespace Inner { +>Inner : Symbol(Inner, Decl(NonInitializedExportInInternalModule.ts, 0, 0)) + + var; + let; + const; + + export var a; +>a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 5, 14)) + + export let b; +>b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 6, 14)) + + export var c: string; +>c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 7, 14)) + + export let d: number; +>d : Symbol(d, Decl(NonInitializedExportInInternalModule.ts, 8, 14)) + + class A {} +>A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) + + export var e: A; +>e : Symbol(e, Decl(NonInitializedExportInInternalModule.ts, 10, 14)) +>A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) + + export let f: A; +>f : Symbol(f, Decl(NonInitializedExportInInternalModule.ts, 11, 14)) +>A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) + + namespace B { +>B : Symbol(B, Decl(NonInitializedExportInInternalModule.ts, 11, 20)) + + export let a = 1, b, c = 2; +>a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 14, 18)) +>b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 14, 25)) +>c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 14, 28)) + + export let x, y, z; +>x : Symbol(x, Decl(NonInitializedExportInInternalModule.ts, 15, 18)) +>y : Symbol(y, Decl(NonInitializedExportInInternalModule.ts, 15, 21)) +>z : Symbol(z, Decl(NonInitializedExportInInternalModule.ts, 15, 24)) + } + + namespace C { +>C : Symbol(C, Decl(NonInitializedExportInInternalModule.ts, 16, 5)) + + export var a = 1, b, c = 2; +>a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 19, 18)) +>b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 19, 25)) +>c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 19, 28)) + + export var x, y, z; +>x : Symbol(x, Decl(NonInitializedExportInInternalModule.ts, 20, 18)) +>y : Symbol(y, Decl(NonInitializedExportInInternalModule.ts, 20, 21)) +>z : Symbol(z, Decl(NonInitializedExportInInternalModule.ts, 20, 24)) + } + + // Shouldn't be filtered + export var a1 = 1; +>a1 : Symbol(a1, Decl(NonInitializedExportInInternalModule.ts, 24, 14)) + + export let b1 = 1; +>b1 : Symbol(b1, Decl(NonInitializedExportInInternalModule.ts, 25, 14)) + + export var c1: string = 'a'; +>c1 : Symbol(c1, Decl(NonInitializedExportInInternalModule.ts, 26, 14)) + + export let d1: number = 1; +>d1 : Symbol(d1, Decl(NonInitializedExportInInternalModule.ts, 27, 14)) + + class D {} +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export var e1 = new D; +>e1 : Symbol(e1, Decl(NonInitializedExportInInternalModule.ts, 29, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export let f1 = new D; +>f1 : Symbol(f1, Decl(NonInitializedExportInInternalModule.ts, 30, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export var g1: D = new D; +>g1 : Symbol(g1, Decl(NonInitializedExportInInternalModule.ts, 31, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export let h1: D = new D; +>h1 : Symbol(h1, Decl(NonInitializedExportInInternalModule.ts, 32, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) +} diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).types b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).types new file mode 100644 index 0000000000000..4c715dc8fe518 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=false).types @@ -0,0 +1,153 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +=== NonInitializedExportInInternalModule.ts === +namespace Inner { +>Inner : typeof Inner +> : ^^^^^^^^^^^^ + + var; + let; +>let : any +> : ^^^ + + const; + + export var a; +>a : any +> : ^^^ + + export let b; +>b : any +> : ^^^ + + export var c: string; +>c : string +> : ^^^^^^ + + export let d: number; +>d : number +> : ^^^^^^ + + class A {} +>A : A +> : ^ + + export var e: A; +>e : A +> : ^ + + export let f: A; +>f : A +> : ^ + + namespace B { +>B : typeof B +> : ^^^^^^^^ + + export let a = 1, b, c = 2; +>a : number +> : ^^^^^^ +>1 : 1 +> : ^ +>b : any +> : ^^^ +>c : number +> : ^^^^^^ +>2 : 2 +> : ^ + + export let x, y, z; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ + } + + namespace C { +>C : typeof C +> : ^^^^^^^^ + + export var a = 1, b, c = 2; +>a : number +> : ^^^^^^ +>1 : 1 +> : ^ +>b : any +> : ^^^ +>c : number +> : ^^^^^^ +>2 : 2 +> : ^ + + export var x, y, z; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ + } + + // Shouldn't be filtered + export var a1 = 1; +>a1 : number +> : ^^^^^^ +>1 : 1 +> : ^ + + export let b1 = 1; +>b1 : number +> : ^^^^^^ +>1 : 1 +> : ^ + + export var c1: string = 'a'; +>c1 : string +> : ^^^^^^ +>'a' : "a" +> : ^^^ + + export let d1: number = 1; +>d1 : number +> : ^^^^^^ +>1 : 1 +> : ^ + + class D {} +>D : D +> : ^ + + export var e1 = new D; +>e1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ + + export let f1 = new D; +>f1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ + + export var g1: D = new D; +>g1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ + + export let h1: D = new D; +>h1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ +} diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).errors.txt b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..6ebcd07495e35 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).errors.txt @@ -0,0 +1,49 @@ +NonInitializedExportInInternalModule.ts(2,8): error TS1123: Variable declaration list cannot be empty. +NonInitializedExportInInternalModule.ts(3,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. +NonInitializedExportInInternalModule.ts(3,5): error TS2304: Cannot find name 'let'. +NonInitializedExportInInternalModule.ts(4,10): error TS1123: Variable declaration list cannot be empty. + + +==== NonInitializedExportInInternalModule.ts (4 errors) ==== + namespace Inner { + var; + +!!! error TS1123: Variable declaration list cannot be empty. + let; + ~~~ +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. + ~~~ +!!! error TS2304: Cannot find name 'let'. + const; + +!!! error TS1123: Variable declaration list cannot be empty. + + export var a; + export let b; + export var c: string; + export let d: number; + class A {} + export var e: A; + export let f: A; + + namespace B { + export let a = 1, b, c = 2; + export let x, y, z; + } + + namespace C { + export var a = 1, b, c = 2; + export var x, y, z; + } + + // Shouldn't be filtered + export var a1 = 1; + export let b1 = 1; + export var c1: string = 'a'; + export let d1: number = 1; + class D {} + export var e1 = new D; + export let f1 = new D; + export var g1: D = new D; + export let h1: D = new D; + } \ No newline at end of file diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).symbols b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..62f7c0d2e5258 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).symbols @@ -0,0 +1,95 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +=== NonInitializedExportInInternalModule.ts === +namespace Inner { +>Inner : Symbol(Inner, Decl(NonInitializedExportInInternalModule.ts, 0, 0)) + + var; + let; + const; + + export var a; +>a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 5, 14)) + + export let b; +>b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 6, 14)) + + export var c: string; +>c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 7, 14)) + + export let d: number; +>d : Symbol(d, Decl(NonInitializedExportInInternalModule.ts, 8, 14)) + + class A {} +>A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) + + export var e: A; +>e : Symbol(e, Decl(NonInitializedExportInInternalModule.ts, 10, 14)) +>A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) + + export let f: A; +>f : Symbol(f, Decl(NonInitializedExportInInternalModule.ts, 11, 14)) +>A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) + + namespace B { +>B : Symbol(B, Decl(NonInitializedExportInInternalModule.ts, 11, 20)) + + export let a = 1, b, c = 2; +>a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 14, 18)) +>b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 14, 25)) +>c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 14, 28)) + + export let x, y, z; +>x : Symbol(x, Decl(NonInitializedExportInInternalModule.ts, 15, 18)) +>y : Symbol(y, Decl(NonInitializedExportInInternalModule.ts, 15, 21)) +>z : Symbol(z, Decl(NonInitializedExportInInternalModule.ts, 15, 24)) + } + + namespace C { +>C : Symbol(C, Decl(NonInitializedExportInInternalModule.ts, 16, 5)) + + export var a = 1, b, c = 2; +>a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 19, 18)) +>b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 19, 25)) +>c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 19, 28)) + + export var x, y, z; +>x : Symbol(x, Decl(NonInitializedExportInInternalModule.ts, 20, 18)) +>y : Symbol(y, Decl(NonInitializedExportInInternalModule.ts, 20, 21)) +>z : Symbol(z, Decl(NonInitializedExportInInternalModule.ts, 20, 24)) + } + + // Shouldn't be filtered + export var a1 = 1; +>a1 : Symbol(a1, Decl(NonInitializedExportInInternalModule.ts, 24, 14)) + + export let b1 = 1; +>b1 : Symbol(b1, Decl(NonInitializedExportInInternalModule.ts, 25, 14)) + + export var c1: string = 'a'; +>c1 : Symbol(c1, Decl(NonInitializedExportInInternalModule.ts, 26, 14)) + + export let d1: number = 1; +>d1 : Symbol(d1, Decl(NonInitializedExportInInternalModule.ts, 27, 14)) + + class D {} +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export var e1 = new D; +>e1 : Symbol(e1, Decl(NonInitializedExportInInternalModule.ts, 29, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export let f1 = new D; +>f1 : Symbol(f1, Decl(NonInitializedExportInInternalModule.ts, 30, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export var g1: D = new D; +>g1 : Symbol(g1, Decl(NonInitializedExportInInternalModule.ts, 31, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) + + export let h1: D = new D; +>h1 : Symbol(h1, Decl(NonInitializedExportInInternalModule.ts, 32, 14)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) +>D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) +} diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).types b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).types new file mode 100644 index 0000000000000..4c715dc8fe518 --- /dev/null +++ b/tests/baselines/reference/NonInitializedExportInInternalModule(alwaysstrict=true).types @@ -0,0 +1,153 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +=== NonInitializedExportInInternalModule.ts === +namespace Inner { +>Inner : typeof Inner +> : ^^^^^^^^^^^^ + + var; + let; +>let : any +> : ^^^ + + const; + + export var a; +>a : any +> : ^^^ + + export let b; +>b : any +> : ^^^ + + export var c: string; +>c : string +> : ^^^^^^ + + export let d: number; +>d : number +> : ^^^^^^ + + class A {} +>A : A +> : ^ + + export var e: A; +>e : A +> : ^ + + export let f: A; +>f : A +> : ^ + + namespace B { +>B : typeof B +> : ^^^^^^^^ + + export let a = 1, b, c = 2; +>a : number +> : ^^^^^^ +>1 : 1 +> : ^ +>b : any +> : ^^^ +>c : number +> : ^^^^^^ +>2 : 2 +> : ^ + + export let x, y, z; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ + } + + namespace C { +>C : typeof C +> : ^^^^^^^^ + + export var a = 1, b, c = 2; +>a : number +> : ^^^^^^ +>1 : 1 +> : ^ +>b : any +> : ^^^ +>c : number +> : ^^^^^^ +>2 : 2 +> : ^ + + export var x, y, z; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ + } + + // Shouldn't be filtered + export var a1 = 1; +>a1 : number +> : ^^^^^^ +>1 : 1 +> : ^ + + export let b1 = 1; +>b1 : number +> : ^^^^^^ +>1 : 1 +> : ^ + + export var c1: string = 'a'; +>c1 : string +> : ^^^^^^ +>'a' : "a" +> : ^^^ + + export let d1: number = 1; +>d1 : number +> : ^^^^^^ +>1 : 1 +> : ^ + + class D {} +>D : D +> : ^ + + export var e1 = new D; +>e1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ + + export let f1 = new D; +>f1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ + + export var g1: D = new D; +>g1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ + + export let h1: D = new D; +>h1 : D +> : ^ +>new D : D +> : ^ +>D : typeof D +> : ^^^^^^^^ +} diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt b/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt index 20fd93f7c5cb8..8c2f3f9667707 100644 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt +++ b/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt @@ -1,8 +1,10 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. NonInitializedExportInInternalModule.ts(2,8): error TS1123: Variable declaration list cannot be empty. NonInitializedExportInInternalModule.ts(3,5): error TS2304: Cannot find name 'let'. NonInitializedExportInInternalModule.ts(4,10): error TS1123: Variable declaration list cannot be empty. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== NonInitializedExportInInternalModule.ts (3 errors) ==== namespace Inner { var; diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).errors.txt b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..bef1bb8c98da0 --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).errors.txt @@ -0,0 +1,42 @@ +ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. +ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body. +ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + + +==== ambientWithStatements.ts (4 errors) ==== + declare namespace M { + break; + ~~~~~ +!!! error TS1036: Statements are not allowed in ambient contexts. + continue; + ~~~~~~~~~ +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. + debugger; + do { } while (true); + var x; + for (x in null) { } + if (true) { } else { } + 1; + L: var y; + return; + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. + switch (x) { + case 1: + break; + default: + break; + } + throw "nooo"; + try { + } + catch (e) { + } + finally { + } + with (x) { + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).symbols b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..9442562aa5e3e --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).symbols @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +=== ambientWithStatements.ts === +declare namespace M { +>M : Symbol(M, Decl(ambientWithStatements.ts, 0, 0)) + + break; + continue; + debugger; + do { } while (true); + var x; +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + + for (x in null) { } +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + + if (true) { } else { } + 1; + L: var y; +>y : Symbol(y, Decl(ambientWithStatements.ts, 9, 10)) + + return; + switch (x) { +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + + case 1: + break; + default: + break; + } + throw "nooo"; + try { + } + catch (e) { +>e : Symbol(e, Decl(ambientWithStatements.ts, 20, 11)) + } + finally { + } + with (x) { +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + } +} diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).types b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).types new file mode 100644 index 0000000000000..b980ece7ef31d --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=false).types @@ -0,0 +1,66 @@ +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +=== ambientWithStatements.ts === +declare namespace M { +>M : typeof M +> : ^^^^^^^^ + + break; + continue; + debugger; + do { } while (true); +>true : true +> : ^^^^ + + var x; +>x : any +> : ^^^ + + for (x in null) { } +>x : any +> : ^^^ + + if (true) { } else { } +>true : true +> : ^^^^ + + 1; +>1 : 1 +> : ^ + + L: var y; +>L : any +> : ^^^ +>y : any +> : ^^^ + + return; + switch (x) { +>x : any +> : ^^^ + + case 1: +>1 : 1 +> : ^ + + break; + default: + break; + } + throw "nooo"; +>"nooo" : "nooo" +> : ^^^^^^ + + try { + } + catch (e) { +>e : any +> : ^^^ + } + finally { + } + with (x) { +>x : any +> : ^^^ + } +} diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).errors.txt b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..8d04ac6a78d20 --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).errors.txt @@ -0,0 +1,48 @@ +ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. +ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +ambientWithStatements.ts(10,5): error TS1344: 'A label is not allowed here. +ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body. +ambientWithStatements.ts(25,5): error TS1101: 'with' statements are not allowed in strict mode. +ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + + +==== ambientWithStatements.ts (6 errors) ==== + declare namespace M { + break; + ~~~~~ +!!! error TS1036: Statements are not allowed in ambient contexts. + continue; + ~~~~~~~~~ +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. + debugger; + do { } while (true); + var x; + for (x in null) { } + if (true) { } else { } + 1; + L: var y; + ~ +!!! error TS1344: 'A label is not allowed here. + return; + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. + switch (x) { + case 1: + break; + default: + break; + } + throw "nooo"; + try { + } + catch (e) { + } + finally { + } + with (x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).symbols b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..9442562aa5e3e --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).symbols @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +=== ambientWithStatements.ts === +declare namespace M { +>M : Symbol(M, Decl(ambientWithStatements.ts, 0, 0)) + + break; + continue; + debugger; + do { } while (true); + var x; +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + + for (x in null) { } +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + + if (true) { } else { } + 1; + L: var y; +>y : Symbol(y, Decl(ambientWithStatements.ts, 9, 10)) + + return; + switch (x) { +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + + case 1: + break; + default: + break; + } + throw "nooo"; + try { + } + catch (e) { +>e : Symbol(e, Decl(ambientWithStatements.ts, 20, 11)) + } + finally { + } + with (x) { +>x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) + } +} diff --git a/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).types b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).types new file mode 100644 index 0000000000000..b980ece7ef31d --- /dev/null +++ b/tests/baselines/reference/ambientWithStatements(alwaysstrict=true).types @@ -0,0 +1,66 @@ +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +=== ambientWithStatements.ts === +declare namespace M { +>M : typeof M +> : ^^^^^^^^ + + break; + continue; + debugger; + do { } while (true); +>true : true +> : ^^^^ + + var x; +>x : any +> : ^^^ + + for (x in null) { } +>x : any +> : ^^^ + + if (true) { } else { } +>true : true +> : ^^^^ + + 1; +>1 : 1 +> : ^ + + L: var y; +>L : any +> : ^^^ +>y : any +> : ^^^ + + return; + switch (x) { +>x : any +> : ^^^ + + case 1: +>1 : 1 +> : ^ + + break; + default: + break; + } + throw "nooo"; +>"nooo" : "nooo" +> : ^^^^^^ + + try { + } + catch (e) { +>e : any +> : ^^^ + } + finally { + } + with (x) { +>x : any +> : ^^^ + } +} diff --git a/tests/baselines/reference/ambientWithStatements.errors.txt b/tests/baselines/reference/ambientWithStatements.errors.txt index bef1bb8c98da0..348d591e2f79b 100644 --- a/tests/baselines/reference/ambientWithStatements.errors.txt +++ b/tests/baselines/reference/ambientWithStatements.errors.txt @@ -1,9 +1,11 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body. ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== ambientWithStatements.ts (4 errors) ==== declare namespace M { break; diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..6f0eacb5dff5a --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).errors.txt @@ -0,0 +1,10 @@ +argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'. + + +==== argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ==== + var arguments = 10; + function foo(a) { + arguments = 10; /// This shouldnt be of type number and result in error. + ~~~~~~~~~ +!!! error TS2322: Type 'number' is not assignable to type 'IArguments'. + } \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).symbols b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..a7c67c1447cce --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +=== argumentsBindsToFunctionScopeArgumentList.ts === +var arguments = 10; +>arguments : Symbol(arguments, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 0, 3)) + +function foo(a) { +>foo : Symbol(foo, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 0, 19)) +>a : Symbol(a, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 1, 13)) + + arguments = 10; /// This shouldnt be of type number and result in error. +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).types b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).types new file mode 100644 index 0000000000000..e85419e2d06be --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=false).types @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +=== argumentsBindsToFunctionScopeArgumentList.ts === +var arguments = 10; +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + +function foo(a) { +>foo : (a: any) => void +> : ^ ^^^^^^^^^^^^^^ +>a : any +> : ^^^ + + arguments = 10; /// This shouldnt be of type number and result in error. +>arguments = 10 : 10 +> : ^^ +>arguments : IArguments +> : ^^^^^^^^^^ +>10 : 10 +> : ^^ +} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..e603cc83c1632 --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).errors.txt @@ -0,0 +1,16 @@ +argumentsBindsToFunctionScopeArgumentList.ts(1,5): error TS1100: Invalid use of 'arguments' in strict mode. +argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS1100: Invalid use of 'arguments' in strict mode. +argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'. + + +==== argumentsBindsToFunctionScopeArgumentList.ts (3 errors) ==== + var arguments = 10; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function foo(a) { + arguments = 10; /// This shouldnt be of type number and result in error. + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~ +!!! error TS2322: Type 'number' is not assignable to type 'IArguments'. + } \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).symbols b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..a7c67c1447cce --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +=== argumentsBindsToFunctionScopeArgumentList.ts === +var arguments = 10; +>arguments : Symbol(arguments, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 0, 3)) + +function foo(a) { +>foo : Symbol(foo, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 0, 19)) +>a : Symbol(a, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 1, 13)) + + arguments = 10; /// This shouldnt be of type number and result in error. +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).types b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).types new file mode 100644 index 0000000000000..e85419e2d06be --- /dev/null +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList(alwaysstrict=true).types @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +=== argumentsBindsToFunctionScopeArgumentList.ts === +var arguments = 10; +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + +function foo(a) { +>foo : (a: any) => void +> : ^ ^^^^^^^^^^^^^^ +>a : any +> : ^^^ + + arguments = 10; /// This shouldnt be of type number and result in error. +>arguments = 10 : 10 +> : ^^ +>arguments : IArguments +> : ^^^^^^^^^^ +>10 : 10 +> : ^^ +} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index 6f0eacb5dff5a..03a336ae6d41f 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt @@ -1,6 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ==== var arguments = 10; function foo(a) { diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).errors.txt b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..1c26e2e60116b --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).errors.txt @@ -0,0 +1,32 @@ +/a.js(16,9): error TS18004: No value exists in scope for the shorthand property 'arguments'. Either declare one or provide an initializer. + + +==== /a.js (1 errors) ==== + const a = () => { + return { + arguments: [], + }; + }; + + const b = () => { + const c = { + arguments: [], + } + return c; + }; + + const c = () => { + return { + arguments, + ~~~~~~~~~ +!!! error TS18004: No value exists in scope for the shorthand property 'arguments'. Either declare one or provide an initializer. + }; + } + + const d = () => { + const arguments = undefined; + return { + arguments, + }; + } + \ No newline at end of file diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).symbols b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..aa97a19bca110 --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).symbols @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + +=== /a.js === +const a = () => { +>a : Symbol(a, Decl(a.js, 0, 5)) + + return { + arguments: [], +>arguments : Symbol(arguments, Decl(a.js, 1, 12)) + + }; +}; + +const b = () => { +>b : Symbol(b, Decl(a.js, 6, 5)) + + const c = { +>c : Symbol(c, Decl(a.js, 7, 9)) + + arguments: [], +>arguments : Symbol(arguments, Decl(a.js, 7, 15)) + } + return c; +>c : Symbol(c, Decl(a.js, 7, 9)) + +}; + +const c = () => { +>c : Symbol(c, Decl(a.js, 13, 5)) + + return { + arguments, +>arguments : Symbol(arguments, Decl(a.js, 14, 12)) + + }; +} + +const d = () => { +>d : Symbol(d, Decl(a.js, 19, 5)) + + const arguments = undefined; +>arguments : Symbol(arguments, Decl(a.js, 20, 9)) +>undefined : Symbol(undefined) + + return { + arguments, +>arguments : Symbol(arguments, Decl(a.js, 21, 12)) + + }; +} + diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).types b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).types new file mode 100644 index 0000000000000..be6df31991ee4 --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=false).types @@ -0,0 +1,86 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + +=== /a.js === +const a = () => { +>a : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { return { arguments: [], };} : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + return { +>{ arguments: [], } : { arguments: undefined[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + arguments: [], +>arguments : undefined[] +> : ^^^^^^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + + }; +}; + +const b = () => { +>b : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { const c = { arguments: [], } return c;} : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const c = { +>c : { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^ +>{ arguments: [], } : { arguments: undefined[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + arguments: [], +>arguments : undefined[] +> : ^^^^^^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + } + return c; +>c : { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^ + +}; + +const c = () => { +>c : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { return { arguments, };} : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ + + return { +>{ arguments, } : { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^ + + arguments, +>arguments : any +> : ^^^ + + }; +} + +const d = () => { +>d : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { const arguments = undefined; return { arguments, };} : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ + + const arguments = undefined; +>arguments : any +> : ^^^ +>undefined : undefined +> : ^^^^^^^^^ + + return { +>{ arguments, } : { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^ + + arguments, +>arguments : any +> : ^^^ + + }; +} + diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).errors.txt b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..4ab9073c95059 --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).errors.txt @@ -0,0 +1,35 @@ +/a.js(16,9): error TS18004: No value exists in scope for the shorthand property 'arguments'. Either declare one or provide an initializer. +/a.js(21,11): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== /a.js (2 errors) ==== + const a = () => { + return { + arguments: [], + }; + }; + + const b = () => { + const c = { + arguments: [], + } + return c; + }; + + const c = () => { + return { + arguments, + ~~~~~~~~~ +!!! error TS18004: No value exists in scope for the shorthand property 'arguments'. Either declare one or provide an initializer. + }; + } + + const d = () => { + const arguments = undefined; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + return { + arguments, + }; + } + \ No newline at end of file diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).symbols b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..aa97a19bca110 --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).symbols @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + +=== /a.js === +const a = () => { +>a : Symbol(a, Decl(a.js, 0, 5)) + + return { + arguments: [], +>arguments : Symbol(arguments, Decl(a.js, 1, 12)) + + }; +}; + +const b = () => { +>b : Symbol(b, Decl(a.js, 6, 5)) + + const c = { +>c : Symbol(c, Decl(a.js, 7, 9)) + + arguments: [], +>arguments : Symbol(arguments, Decl(a.js, 7, 15)) + } + return c; +>c : Symbol(c, Decl(a.js, 7, 9)) + +}; + +const c = () => { +>c : Symbol(c, Decl(a.js, 13, 5)) + + return { + arguments, +>arguments : Symbol(arguments, Decl(a.js, 14, 12)) + + }; +} + +const d = () => { +>d : Symbol(d, Decl(a.js, 19, 5)) + + const arguments = undefined; +>arguments : Symbol(arguments, Decl(a.js, 20, 9)) +>undefined : Symbol(undefined) + + return { + arguments, +>arguments : Symbol(arguments, Decl(a.js, 21, 12)) + + }; +} + diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).types b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).types new file mode 100644 index 0000000000000..be6df31991ee4 --- /dev/null +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js(alwaysstrict=true).types @@ -0,0 +1,86 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + +=== /a.js === +const a = () => { +>a : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { return { arguments: [], };} : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + return { +>{ arguments: [], } : { arguments: undefined[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + arguments: [], +>arguments : undefined[] +> : ^^^^^^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + + }; +}; + +const b = () => { +>b : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { const c = { arguments: [], } return c;} : () => { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const c = { +>c : { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^ +>{ arguments: [], } : { arguments: undefined[]; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + arguments: [], +>arguments : undefined[] +> : ^^^^^^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + } + return c; +>c : { arguments: any[]; } +> : ^^^^^^^^^^^^^^^^^^^^^ + +}; + +const c = () => { +>c : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { return { arguments, };} : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ + + return { +>{ arguments, } : { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^ + + arguments, +>arguments : any +> : ^^^ + + }; +} + +const d = () => { +>d : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>() => { const arguments = undefined; return { arguments, };} : () => { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ + + const arguments = undefined; +>arguments : any +> : ^^^ +>undefined : undefined +> : ^^^^^^^^^ + + return { +>{ arguments, } : { arguments: any; } +> : ^^^^^^^^^^^^^^^^^^^ + + arguments, +>arguments : any +> : ^^^ + + }; +} + diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt index 1c26e2e60116b..3eebdee2768c0 100644 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt @@ -1,6 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. /a.js(16,9): error TS18004: No value exists in scope for the shorthand property 'arguments'. Either declare one or provide an initializer. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== /a.js (1 errors) ==== const a = () => { return { diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).errors.txt b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..5d9a5ef323759 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).errors.txt @@ -0,0 +1,116 @@ +arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. +arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. + + +==== arrowFunctionContexts.ts (6 errors) ==== + // Arrow function used in with statement + with (window) { + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length // error, can't use this in enum + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + namespace M { + export var a = (s) => ''; + var b = (s) => s; + } + + // Repeat above for module members that are functions? (necessary to redo all of them?) + namespace M2 { + // Arrow function used in with statement + with (window) { + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + namespace M { + export var a = (s) => ''; + var b = (s) => s; + } + + } + + // (ParamList) => { ... } is a generic arrow function + var generic1 = (n: T) => [n]; + var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 + var generic2 = (n: T) => { return [n]; }; + var generic2: { (n: T): T[] }; + + // ((ParamList) => { ... } ) is a type assertion to an arrow function + var asserted1 = ((n) => [n]); + var asserted1: any; + var asserted2 = ((n) => { return n; }); + var asserted2: any; + + \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).symbols b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..3f0542e16a482 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).symbols @@ -0,0 +1,210 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +=== arrowFunctionContexts.ts === +// Arrow function used in with statement +with (window) { +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) + + var p = () => this; +} + +// Arrow function as argument to super call +class Base { +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) + + constructor(n: any) { } +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 7, 16)) +} + +class Derived extends Base { +>Derived : Symbol(Derived, Decl(arrowFunctionContexts.ts, 8, 1)) +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) + + constructor() { + super(() => this); +>super : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) +>this : Symbol(Derived, Decl(arrowFunctionContexts.ts, 8, 1)) + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); +>window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) +>setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) + +// Arrow function as value in array literal + +var obj = (n: number) => ''; +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 21, 3), Decl(arrowFunctionContexts.ts, 22, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 21, 11)) + +var obj: { (n: number): string; }; // OK +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 21, 3), Decl(arrowFunctionContexts.ts, 22, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 22, 12)) + +var arr = [(n: number) => '']; +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 24, 3), Decl(arrowFunctionContexts.ts, 25, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 24, 12)) + +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 24, 3), Decl(arrowFunctionContexts.ts, 25, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 25, 12)) + +// Arrow function as enum value +enum E { +>E : Symbol(E, Decl(arrowFunctionContexts.ts, 25, 36)) + + x = () => 4, // Error expected +>x : Symbol(E.x, Decl(arrowFunctionContexts.ts, 28, 8)) + + y = (() => this).length // error, can't use this in enum +>y : Symbol(E.y, Decl(arrowFunctionContexts.ts, 29, 16)) +>(() => this).length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) +>length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) +} + +// Arrow function as module variable initializer +namespace M { +>M : Symbol(M, Decl(arrowFunctionContexts.ts, 31, 1)) + + export var a = (s) => ''; +>a : Symbol(a, Decl(arrowFunctionContexts.ts, 35, 14)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 35, 20)) + + var b = (s) => s; +>b : Symbol(b, Decl(arrowFunctionContexts.ts, 36, 7)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 36, 13)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 36, 13)) +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +namespace M2 { +>M2 : Symbol(M2, Decl(arrowFunctionContexts.ts, 37, 1)) + + // Arrow function used in with statement + with (window) { +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) + + var p = () => this; + } + + // Arrow function as argument to super call + class Base { +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) + + constructor(n: any) { } +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 48, 20)) + } + + class Derived extends Base { +>Derived : Symbol(Derived, Decl(arrowFunctionContexts.ts, 49, 5)) +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) + + constructor() { + super(() => this); +>super : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) +>this : Symbol(Derived, Decl(arrowFunctionContexts.ts, 49, 5)) + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); +>window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) +>setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) + + // Arrow function as value in array literal + + var obj = (n: number) => ''; +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 62, 7), Decl(arrowFunctionContexts.ts, 63, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 62, 15)) + + var obj: { (n: number): string; }; // OK +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 62, 7), Decl(arrowFunctionContexts.ts, 63, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 63, 16)) + + var arr = [(n: number) => '']; +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 65, 7), Decl(arrowFunctionContexts.ts, 66, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 65, 16)) + + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 65, 7), Decl(arrowFunctionContexts.ts, 66, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 66, 16)) + + // Arrow function as enum value + enum E { +>E : Symbol(E, Decl(arrowFunctionContexts.ts, 66, 40)) + + x = () => 4, // Error expected +>x : Symbol(E.x, Decl(arrowFunctionContexts.ts, 69, 12)) + + y = (() => this).length +>y : Symbol(E.y, Decl(arrowFunctionContexts.ts, 70, 20)) +>(() => this).length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) +>length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) + } + + // Arrow function as module variable initializer + namespace M { +>M : Symbol(M, Decl(arrowFunctionContexts.ts, 72, 5)) + + export var a = (s) => ''; +>a : Symbol(a, Decl(arrowFunctionContexts.ts, 76, 18)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 76, 24)) + + var b = (s) => s; +>b : Symbol(b, Decl(arrowFunctionContexts.ts, 77, 11)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 77, 17)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 77, 17)) + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T) => [n]; +>generic1 : Symbol(generic1, Decl(arrowFunctionContexts.ts, 83, 3), Decl(arrowFunctionContexts.ts, 84, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 83, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 83, 19)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 83, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 83, 19)) + +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +>generic1 : Symbol(generic1, Decl(arrowFunctionContexts.ts, 83, 3), Decl(arrowFunctionContexts.ts, 84, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 84, 20)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) + +var generic2 = (n: T) => { return [n]; }; +>generic2 : Symbol(generic2, Decl(arrowFunctionContexts.ts, 85, 3), Decl(arrowFunctionContexts.ts, 86, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 85, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 85, 19)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 85, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 85, 19)) + +var generic2: { (n: T): T[] }; +>generic2 : Symbol(generic2, Decl(arrowFunctionContexts.ts, 85, 3), Decl(arrowFunctionContexts.ts, 86, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 86, 20)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +>asserted1 : Symbol(asserted1, Decl(arrowFunctionContexts.ts, 89, 3), Decl(arrowFunctionContexts.ts, 90, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 89, 23)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 89, 23)) + +var asserted1: any; +>asserted1 : Symbol(asserted1, Decl(arrowFunctionContexts.ts, 89, 3), Decl(arrowFunctionContexts.ts, 90, 3)) + +var asserted2 = ((n) => { return n; }); +>asserted2 : Symbol(asserted2, Decl(arrowFunctionContexts.ts, 91, 3), Decl(arrowFunctionContexts.ts, 92, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 91, 23)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 91, 23)) + +var asserted2: any; +>asserted2 : Symbol(asserted2, Decl(arrowFunctionContexts.ts, 91, 3), Decl(arrowFunctionContexts.ts, 92, 3)) + + diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).types b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).types new file mode 100644 index 0000000000000..e51d001d126a5 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=false).types @@ -0,0 +1,383 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +=== arrowFunctionContexts.ts === +// Arrow function used in with statement +with (window) { +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ + + var p = () => this; +>p : any +> : ^^^ +>() => this : any +> : ^^^ +>this : any +> : ^^^ +} + +// Arrow function as argument to super call +class Base { +>Base : Base +> : ^^^^ + + constructor(n: any) { } +>n : any +> : ^^^ +} + +class Derived extends Base { +>Derived : Derived +> : ^^^^^^^ +>Base : Base +> : ^^^^ + + constructor() { + super(() => this); +>super(() => this) : void +> : ^^^^ +>super : typeof Base +> : ^^^^^^^^^^^ +>() => this : () => this +> : ^^^^^^^^^^ +>this : this +> : ^^^^ + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); +>window.setTimeout(() => null, 100) : number +> : ^^^^^^ +>window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>() => null : () => any +> : ^^^^^^^^^ +>100 : 100 +> : ^^^ + +// Arrow function as value in array literal + +var obj = (n: number) => ''; +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + +var obj: { (n: number): string; }; // OK +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ + +var arr = [(n: number) => '']; +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>[(n: number) => ''] : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>n : number +> : ^^^^^^ + +// Arrow function as enum value +enum E { +>E : E +> : ^ + + x = () => 4, // Error expected +>x : E.x +> : ^^^ +>() => 4 : () => number +> : ^^^^^^^^^^^^ +>4 : 4 +> : ^ + + y = (() => this).length // error, can't use this in enum +>y : E.y +> : ^^^ +>(() => this).length : number +> : ^^^^^^ +>(() => this) : () => any +> : ^^^^^^^^^ +>() => this : () => any +> : ^^^^^^^^^ +>this : any +> : ^^^ +>length : number +> : ^^^^^^ +} + +// Arrow function as module variable initializer +namespace M { +>M : typeof M +> : ^^^^^^^^ + + export var a = (s) => ''; +>a : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>(s) => '' : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>s : any +> : ^^^ +>'' : "" +> : ^^ + + var b = (s) => s; +>b : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>(s) => s : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>s : any +> : ^^^ +>s : any +> : ^^^ +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +namespace M2 { +>M2 : typeof M2 +> : ^^^^^^^^^ + + // Arrow function used in with statement + with (window) { +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ + + var p = () => this; +>p : any +> : ^^^ +>() => this : any +> : ^^^ +>this : any +> : ^^^ + } + + // Arrow function as argument to super call + class Base { +>Base : Base +> : ^^^^ + + constructor(n: any) { } +>n : any +> : ^^^ + } + + class Derived extends Base { +>Derived : Derived +> : ^^^^^^^ +>Base : Base +> : ^^^^ + + constructor() { + super(() => this); +>super(() => this) : void +> : ^^^^ +>super : typeof Base +> : ^^^^^^^^^^^ +>() => this : () => this +> : ^^^^^^^^^^ +>this : this +> : ^^^^ + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); +>window.setTimeout(() => null, 100) : number +> : ^^^^^^ +>window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>() => null : () => any +> : ^^^^^^^^^ +>100 : 100 +> : ^^^ + + // Arrow function as value in array literal + + var obj = (n: number) => ''; +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + + var obj: { (n: number): string; }; // OK +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ + + var arr = [(n: number) => '']; +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>[(n: number) => ''] : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>n : number +> : ^^^^^^ + + // Arrow function as enum value + enum E { +>E : E +> : ^ + + x = () => 4, // Error expected +>x : E.x +> : ^^^ +>() => 4 : () => number +> : ^^^^^^^^^^^^ +>4 : 4 +> : ^ + + y = (() => this).length +>y : E.y +> : ^^^ +>(() => this).length : number +> : ^^^^^^ +>(() => this) : () => any +> : ^^^^^^^^^ +>() => this : () => any +> : ^^^^^^^^^ +>this : any +> : ^^^ +>length : number +> : ^^^^^^ + } + + // Arrow function as module variable initializer + namespace M { +>M : typeof M +> : ^^^^^^^^ + + export var a = (s) => ''; +>a : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>(s) => '' : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>s : any +> : ^^^ +>'' : "" +> : ^^ + + var b = (s) => s; +>b : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>(s) => s : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>s : any +> : ^^^ +>s : any +> : ^^^ + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T) => [n]; +>generic1 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>(n: T) => [n] : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ +>[n] : T[] +> : ^^^ +>n : T +> : ^ + +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +>generic1 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ + +var generic2 = (n: T) => { return [n]; }; +>generic2 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>(n: T) => { return [n]; } : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ +>[n] : T[] +> : ^^^ +>n : T +> : ^ + +var generic2: { (n: T): T[] }; +>generic2 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +>asserted1 : any +> : ^^^ +>((n) => [n]) : any +> : ^^^ +>((n) => [n]) : (n: any) => any[] +> : ^ ^^^^^^^^^^^^^^^ +>(n) => [n] : (n: any) => any[] +> : ^ ^^^^^^^^^^^^^^^ +>n : any +> : ^^^ +>[n] : any[] +> : ^^^^^ +>n : any +> : ^^^ + +var asserted1: any; +>asserted1 : any +> : ^^^ + +var asserted2 = ((n) => { return n; }); +>asserted2 : any +> : ^^^ +>((n) => { return n; }) : any +> : ^^^ +>((n) => { return n; }) : (n: any) => any +> : ^ ^^^^^^^^^^^^^ +>(n) => { return n; } : (n: any) => any +> : ^ ^^^^^^^^^^^^^ +>n : any +> : ^^^ +>n : any +> : ^^^ + +var asserted2: any; +>asserted2 : any +> : ^^^ + + diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).errors.txt b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..bc9bbac6219bf --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).errors.txt @@ -0,0 +1,122 @@ +arrowFunctionContexts.ts(2,1): error TS1101: 'with' statements are not allowed in strict mode. +arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. +arrowFunctionContexts.ts(43,5): error TS1101: 'with' statements are not allowed in strict mode. +arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. + + +==== arrowFunctionContexts.ts (8 errors) ==== + // Arrow function used in with statement + with (window) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length // error, can't use this in enum + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + namespace M { + export var a = (s) => ''; + var b = (s) => s; + } + + // Repeat above for module members that are functions? (necessary to redo all of them?) + namespace M2 { + // Arrow function used in with statement + with (window) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + namespace M { + export var a = (s) => ''; + var b = (s) => s; + } + + } + + // (ParamList) => { ... } is a generic arrow function + var generic1 = (n: T) => [n]; + var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 + var generic2 = (n: T) => { return [n]; }; + var generic2: { (n: T): T[] }; + + // ((ParamList) => { ... } ) is a type assertion to an arrow function + var asserted1 = ((n) => [n]); + var asserted1: any; + var asserted2 = ((n) => { return n; }); + var asserted2: any; + + \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).symbols b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..3f0542e16a482 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).symbols @@ -0,0 +1,210 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +=== arrowFunctionContexts.ts === +// Arrow function used in with statement +with (window) { +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) + + var p = () => this; +} + +// Arrow function as argument to super call +class Base { +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) + + constructor(n: any) { } +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 7, 16)) +} + +class Derived extends Base { +>Derived : Symbol(Derived, Decl(arrowFunctionContexts.ts, 8, 1)) +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) + + constructor() { + super(() => this); +>super : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) +>this : Symbol(Derived, Decl(arrowFunctionContexts.ts, 8, 1)) + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); +>window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) +>setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) + +// Arrow function as value in array literal + +var obj = (n: number) => ''; +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 21, 3), Decl(arrowFunctionContexts.ts, 22, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 21, 11)) + +var obj: { (n: number): string; }; // OK +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 21, 3), Decl(arrowFunctionContexts.ts, 22, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 22, 12)) + +var arr = [(n: number) => '']; +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 24, 3), Decl(arrowFunctionContexts.ts, 25, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 24, 12)) + +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 24, 3), Decl(arrowFunctionContexts.ts, 25, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 25, 12)) + +// Arrow function as enum value +enum E { +>E : Symbol(E, Decl(arrowFunctionContexts.ts, 25, 36)) + + x = () => 4, // Error expected +>x : Symbol(E.x, Decl(arrowFunctionContexts.ts, 28, 8)) + + y = (() => this).length // error, can't use this in enum +>y : Symbol(E.y, Decl(arrowFunctionContexts.ts, 29, 16)) +>(() => this).length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) +>length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) +} + +// Arrow function as module variable initializer +namespace M { +>M : Symbol(M, Decl(arrowFunctionContexts.ts, 31, 1)) + + export var a = (s) => ''; +>a : Symbol(a, Decl(arrowFunctionContexts.ts, 35, 14)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 35, 20)) + + var b = (s) => s; +>b : Symbol(b, Decl(arrowFunctionContexts.ts, 36, 7)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 36, 13)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 36, 13)) +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +namespace M2 { +>M2 : Symbol(M2, Decl(arrowFunctionContexts.ts, 37, 1)) + + // Arrow function used in with statement + with (window) { +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) + + var p = () => this; + } + + // Arrow function as argument to super call + class Base { +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) + + constructor(n: any) { } +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 48, 20)) + } + + class Derived extends Base { +>Derived : Symbol(Derived, Decl(arrowFunctionContexts.ts, 49, 5)) +>Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) + + constructor() { + super(() => this); +>super : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) +>this : Symbol(Derived, Decl(arrowFunctionContexts.ts, 49, 5)) + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); +>window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) +>setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) + + // Arrow function as value in array literal + + var obj = (n: number) => ''; +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 62, 7), Decl(arrowFunctionContexts.ts, 63, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 62, 15)) + + var obj: { (n: number): string; }; // OK +>obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 62, 7), Decl(arrowFunctionContexts.ts, 63, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 63, 16)) + + var arr = [(n: number) => '']; +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 65, 7), Decl(arrowFunctionContexts.ts, 66, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 65, 16)) + + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 65, 7), Decl(arrowFunctionContexts.ts, 66, 7)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 66, 16)) + + // Arrow function as enum value + enum E { +>E : Symbol(E, Decl(arrowFunctionContexts.ts, 66, 40)) + + x = () => 4, // Error expected +>x : Symbol(E.x, Decl(arrowFunctionContexts.ts, 69, 12)) + + y = (() => this).length +>y : Symbol(E.y, Decl(arrowFunctionContexts.ts, 70, 20)) +>(() => this).length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) +>length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) + } + + // Arrow function as module variable initializer + namespace M { +>M : Symbol(M, Decl(arrowFunctionContexts.ts, 72, 5)) + + export var a = (s) => ''; +>a : Symbol(a, Decl(arrowFunctionContexts.ts, 76, 18)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 76, 24)) + + var b = (s) => s; +>b : Symbol(b, Decl(arrowFunctionContexts.ts, 77, 11)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 77, 17)) +>s : Symbol(s, Decl(arrowFunctionContexts.ts, 77, 17)) + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T) => [n]; +>generic1 : Symbol(generic1, Decl(arrowFunctionContexts.ts, 83, 3), Decl(arrowFunctionContexts.ts, 84, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 83, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 83, 19)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 83, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 83, 19)) + +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +>generic1 : Symbol(generic1, Decl(arrowFunctionContexts.ts, 83, 3), Decl(arrowFunctionContexts.ts, 84, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 84, 20)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) + +var generic2 = (n: T) => { return [n]; }; +>generic2 : Symbol(generic2, Decl(arrowFunctionContexts.ts, 85, 3), Decl(arrowFunctionContexts.ts, 86, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 85, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 85, 19)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 85, 16)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 85, 19)) + +var generic2: { (n: T): T[] }; +>generic2 : Symbol(generic2, Decl(arrowFunctionContexts.ts, 85, 3), Decl(arrowFunctionContexts.ts, 86, 3)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 86, 20)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) +>T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +>asserted1 : Symbol(asserted1, Decl(arrowFunctionContexts.ts, 89, 3), Decl(arrowFunctionContexts.ts, 90, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 89, 23)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 89, 23)) + +var asserted1: any; +>asserted1 : Symbol(asserted1, Decl(arrowFunctionContexts.ts, 89, 3), Decl(arrowFunctionContexts.ts, 90, 3)) + +var asserted2 = ((n) => { return n; }); +>asserted2 : Symbol(asserted2, Decl(arrowFunctionContexts.ts, 91, 3), Decl(arrowFunctionContexts.ts, 92, 3)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 91, 23)) +>n : Symbol(n, Decl(arrowFunctionContexts.ts, 91, 23)) + +var asserted2: any; +>asserted2 : Symbol(asserted2, Decl(arrowFunctionContexts.ts, 91, 3), Decl(arrowFunctionContexts.ts, 92, 3)) + + diff --git a/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).types b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).types new file mode 100644 index 0000000000000..e51d001d126a5 --- /dev/null +++ b/tests/baselines/reference/arrowFunctionContexts(alwaysstrict=true).types @@ -0,0 +1,383 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +=== arrowFunctionContexts.ts === +// Arrow function used in with statement +with (window) { +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ + + var p = () => this; +>p : any +> : ^^^ +>() => this : any +> : ^^^ +>this : any +> : ^^^ +} + +// Arrow function as argument to super call +class Base { +>Base : Base +> : ^^^^ + + constructor(n: any) { } +>n : any +> : ^^^ +} + +class Derived extends Base { +>Derived : Derived +> : ^^^^^^^ +>Base : Base +> : ^^^^ + + constructor() { + super(() => this); +>super(() => this) : void +> : ^^^^ +>super : typeof Base +> : ^^^^^^^^^^^ +>() => this : () => this +> : ^^^^^^^^^^ +>this : this +> : ^^^^ + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); +>window.setTimeout(() => null, 100) : number +> : ^^^^^^ +>window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>() => null : () => any +> : ^^^^^^^^^ +>100 : 100 +> : ^^^ + +// Arrow function as value in array literal + +var obj = (n: number) => ''; +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + +var obj: { (n: number): string; }; // OK +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ + +var arr = [(n: number) => '']; +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>[(n: number) => ''] : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>n : number +> : ^^^^^^ + +// Arrow function as enum value +enum E { +>E : E +> : ^ + + x = () => 4, // Error expected +>x : E.x +> : ^^^ +>() => 4 : () => number +> : ^^^^^^^^^^^^ +>4 : 4 +> : ^ + + y = (() => this).length // error, can't use this in enum +>y : E.y +> : ^^^ +>(() => this).length : number +> : ^^^^^^ +>(() => this) : () => any +> : ^^^^^^^^^ +>() => this : () => any +> : ^^^^^^^^^ +>this : any +> : ^^^ +>length : number +> : ^^^^^^ +} + +// Arrow function as module variable initializer +namespace M { +>M : typeof M +> : ^^^^^^^^ + + export var a = (s) => ''; +>a : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>(s) => '' : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>s : any +> : ^^^ +>'' : "" +> : ^^ + + var b = (s) => s; +>b : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>(s) => s : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>s : any +> : ^^^ +>s : any +> : ^^^ +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +namespace M2 { +>M2 : typeof M2 +> : ^^^^^^^^^ + + // Arrow function used in with statement + with (window) { +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ + + var p = () => this; +>p : any +> : ^^^ +>() => this : any +> : ^^^ +>this : any +> : ^^^ + } + + // Arrow function as argument to super call + class Base { +>Base : Base +> : ^^^^ + + constructor(n: any) { } +>n : any +> : ^^^ + } + + class Derived extends Base { +>Derived : Derived +> : ^^^^^^^ +>Base : Base +> : ^^^^ + + constructor() { + super(() => this); +>super(() => this) : void +> : ^^^^ +>super : typeof Base +> : ^^^^^^^^^^^ +>() => this : () => this +> : ^^^^^^^^^^ +>this : this +> : ^^^^ + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); +>window.setTimeout(() => null, 100) : number +> : ^^^^^^ +>window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>window : Window & typeof globalThis +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) +> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ +>() => null : () => any +> : ^^^^^^^^^ +>100 : 100 +> : ^^^ + + // Arrow function as value in array literal + + var obj = (n: number) => ''; +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + + var obj: { (n: number): string; }; // OK +>obj : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ + + var arr = [(n: number) => '']; +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>[(n: number) => ''] : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>(n: number) => '' : (n: number) => string +> : ^ ^^ ^^^^^^^^^^^ +>n : number +> : ^^^^^^ +>'' : "" +> : ^^ + + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) +>arr : ((n: number) => string)[] +> : ^^ ^^ ^^^^^^^^^^^^^^ +>n : number +> : ^^^^^^ + + // Arrow function as enum value + enum E { +>E : E +> : ^ + + x = () => 4, // Error expected +>x : E.x +> : ^^^ +>() => 4 : () => number +> : ^^^^^^^^^^^^ +>4 : 4 +> : ^ + + y = (() => this).length +>y : E.y +> : ^^^ +>(() => this).length : number +> : ^^^^^^ +>(() => this) : () => any +> : ^^^^^^^^^ +>() => this : () => any +> : ^^^^^^^^^ +>this : any +> : ^^^ +>length : number +> : ^^^^^^ + } + + // Arrow function as module variable initializer + namespace M { +>M : typeof M +> : ^^^^^^^^ + + export var a = (s) => ''; +>a : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>(s) => '' : (s: any) => string +> : ^ ^^^^^^^^^^^^^^^^ +>s : any +> : ^^^ +>'' : "" +> : ^^ + + var b = (s) => s; +>b : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>(s) => s : (s: any) => any +> : ^ ^^^^^^^^^^^^^ +>s : any +> : ^^^ +>s : any +> : ^^^ + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T) => [n]; +>generic1 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>(n: T) => [n] : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ +>[n] : T[] +> : ^^^ +>n : T +> : ^ + +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +>generic1 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ + +var generic2 = (n: T) => { return [n]; }; +>generic2 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>(n: T) => { return [n]; } : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ +>[n] : T[] +> : ^^^ +>n : T +> : ^ + +var generic2: { (n: T): T[] }; +>generic2 : (n: T) => T[] +> : ^ ^^ ^^ ^^^^^^^^ +>n : T +> : ^ + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +>asserted1 : any +> : ^^^ +>((n) => [n]) : any +> : ^^^ +>((n) => [n]) : (n: any) => any[] +> : ^ ^^^^^^^^^^^^^^^ +>(n) => [n] : (n: any) => any[] +> : ^ ^^^^^^^^^^^^^^^ +>n : any +> : ^^^ +>[n] : any[] +> : ^^^^^ +>n : any +> : ^^^ + +var asserted1: any; +>asserted1 : any +> : ^^^ + +var asserted2 = ((n) => { return n; }); +>asserted2 : any +> : ^^^ +>((n) => { return n; }) : any +> : ^^^ +>((n) => { return n; }) : (n: any) => any +> : ^ ^^^^^^^^^^^^^ +>(n) => { return n; } : (n: any) => any +> : ^ ^^^^^^^^^^^^^ +>n : any +> : ^^^ +>n : any +> : ^^^ + +var asserted2: any; +>asserted2 : any +> : ^^^ + + diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt index 5d9a5ef323759..b452b1fd5196e 100644 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ b/tests/baselines/reference/arrowFunctionContexts.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. @@ -6,6 +7,7 @@ arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assig arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== arrowFunctionContexts.ts (6 errors) ==== // Arrow function used in with statement with (window) { diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).errors.txt b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..c3653603ddc74 --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).errors.txt @@ -0,0 +1,52 @@ +asiPublicPrivateProtected.ts(1,1): error TS2304: Cannot find name 'public'. +asiPublicPrivateProtected.ts(12,1): error TS2304: Cannot find name 'private'. +asiPublicPrivateProtected.ts(23,1): error TS2304: Cannot find name 'protected'. + + +==== asiPublicPrivateProtected.ts (3 errors) ==== + public + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + class NonPublicClass { + public s() { + } + } + + class NonPublicClass2 { + public + private nonPublicFunction() { + } + } + private + ~~~~~~~ +!!! error TS2304: Cannot find name 'private'. + class NonPrivateClass { + private s() { + } + } + + class NonPrivateClass2 { + private + public nonPrivateFunction() { + } + } + protected + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'protected'. + class NonProtectedClass { + protected s() { + } + } + + class NonProtectedClass2 { + protected + public nonProtectedFunction() { + } + } + + class ClassWithThreeMembers { + public + private + protected + } + \ No newline at end of file diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).symbols b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..546fbb632777f --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).symbols @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +=== asiPublicPrivateProtected.ts === +public +class NonPublicClass { +>NonPublicClass : Symbol(NonPublicClass, Decl(asiPublicPrivateProtected.ts, 0, 6)) + + public s() { +>s : Symbol(NonPublicClass.s, Decl(asiPublicPrivateProtected.ts, 1, 22)) + } +} + +class NonPublicClass2 { +>NonPublicClass2 : Symbol(NonPublicClass2, Decl(asiPublicPrivateProtected.ts, 4, 1)) + + public +>public : Symbol(NonPublicClass2.public, Decl(asiPublicPrivateProtected.ts, 6, 23)) + + private nonPublicFunction() { +>nonPublicFunction : Symbol(NonPublicClass2.nonPublicFunction, Decl(asiPublicPrivateProtected.ts, 7, 10)) + } +} +private +class NonPrivateClass { +>NonPrivateClass : Symbol(NonPrivateClass, Decl(asiPublicPrivateProtected.ts, 11, 7)) + + private s() { +>s : Symbol(NonPrivateClass.s, Decl(asiPublicPrivateProtected.ts, 12, 23)) + } +} + +class NonPrivateClass2 { +>NonPrivateClass2 : Symbol(NonPrivateClass2, Decl(asiPublicPrivateProtected.ts, 15, 1)) + + private +>private : Symbol(NonPrivateClass2.private, Decl(asiPublicPrivateProtected.ts, 17, 24)) + + public nonPrivateFunction() { +>nonPrivateFunction : Symbol(NonPrivateClass2.nonPrivateFunction, Decl(asiPublicPrivateProtected.ts, 18, 11)) + } +} +protected +class NonProtectedClass { +>NonProtectedClass : Symbol(NonProtectedClass, Decl(asiPublicPrivateProtected.ts, 22, 9)) + + protected s() { +>s : Symbol(NonProtectedClass.s, Decl(asiPublicPrivateProtected.ts, 23, 25)) + } +} + +class NonProtectedClass2 { +>NonProtectedClass2 : Symbol(NonProtectedClass2, Decl(asiPublicPrivateProtected.ts, 26, 1)) + + protected +>protected : Symbol(NonProtectedClass2.protected, Decl(asiPublicPrivateProtected.ts, 28, 26)) + + public nonProtectedFunction() { +>nonProtectedFunction : Symbol(NonProtectedClass2.nonProtectedFunction, Decl(asiPublicPrivateProtected.ts, 29, 13)) + } +} + +class ClassWithThreeMembers { +>ClassWithThreeMembers : Symbol(ClassWithThreeMembers, Decl(asiPublicPrivateProtected.ts, 32, 1)) + + public +>public : Symbol(ClassWithThreeMembers.public, Decl(asiPublicPrivateProtected.ts, 34, 29)) + + private +>private : Symbol(ClassWithThreeMembers.private, Decl(asiPublicPrivateProtected.ts, 35, 10)) + + protected +>protected : Symbol(ClassWithThreeMembers.protected, Decl(asiPublicPrivateProtected.ts, 36, 11)) +} + diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).types b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).types new file mode 100644 index 0000000000000..31cd61c55aee3 --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=false).types @@ -0,0 +1,102 @@ +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +=== asiPublicPrivateProtected.ts === +public +>public : any +> : ^^^ + +class NonPublicClass { +>NonPublicClass : NonPublicClass +> : ^^^^^^^^^^^^^^ + + public s() { +>s : () => void +> : ^^^^^^^^^^ + } +} + +class NonPublicClass2 { +>NonPublicClass2 : NonPublicClass2 +> : ^^^^^^^^^^^^^^^ + + public +>public : any +> : ^^^ + + private nonPublicFunction() { +>nonPublicFunction : () => void +> : ^^^^^^^^^^ + } +} +private +>private : any +> : ^^^ + +class NonPrivateClass { +>NonPrivateClass : NonPrivateClass +> : ^^^^^^^^^^^^^^^ + + private s() { +>s : () => void +> : ^^^^^^^^^^ + } +} + +class NonPrivateClass2 { +>NonPrivateClass2 : NonPrivateClass2 +> : ^^^^^^^^^^^^^^^^ + + private +>private : any +> : ^^^ + + public nonPrivateFunction() { +>nonPrivateFunction : () => void +> : ^^^^^^^^^^ + } +} +protected +>protected : any +> : ^^^ + +class NonProtectedClass { +>NonProtectedClass : NonProtectedClass +> : ^^^^^^^^^^^^^^^^^ + + protected s() { +>s : () => void +> : ^^^^^^^^^^ + } +} + +class NonProtectedClass2 { +>NonProtectedClass2 : NonProtectedClass2 +> : ^^^^^^^^^^^^^^^^^^ + + protected +>protected : any +> : ^^^ + + public nonProtectedFunction() { +>nonProtectedFunction : () => void +> : ^^^^^^^^^^ + } +} + +class ClassWithThreeMembers { +>ClassWithThreeMembers : ClassWithThreeMembers +> : ^^^^^^^^^^^^^^^^^^^^^ + + public +>public : any +> : ^^^ + + private +>private : any +> : ^^^ + + protected +>protected : any +> : ^^^ +} + diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).errors.txt b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..73bb539683e31 --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).errors.txt @@ -0,0 +1,61 @@ +asiPublicPrivateProtected.ts(1,1): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +asiPublicPrivateProtected.ts(1,1): error TS2304: Cannot find name 'public'. +asiPublicPrivateProtected.ts(12,1): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +asiPublicPrivateProtected.ts(12,1): error TS2304: Cannot find name 'private'. +asiPublicPrivateProtected.ts(23,1): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. +asiPublicPrivateProtected.ts(23,1): error TS2304: Cannot find name 'protected'. + + +==== asiPublicPrivateProtected.ts (6 errors) ==== + public + ~~~~~~ +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + class NonPublicClass { + public s() { + } + } + + class NonPublicClass2 { + public + private nonPublicFunction() { + } + } + private + ~~~~~~~ +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. + ~~~~~~~ +!!! error TS2304: Cannot find name 'private'. + class NonPrivateClass { + private s() { + } + } + + class NonPrivateClass2 { + private + public nonPrivateFunction() { + } + } + protected + ~~~~~~~~~ +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'protected'. + class NonProtectedClass { + protected s() { + } + } + + class NonProtectedClass2 { + protected + public nonProtectedFunction() { + } + } + + class ClassWithThreeMembers { + public + private + protected + } + \ No newline at end of file diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).symbols b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..546fbb632777f --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).symbols @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +=== asiPublicPrivateProtected.ts === +public +class NonPublicClass { +>NonPublicClass : Symbol(NonPublicClass, Decl(asiPublicPrivateProtected.ts, 0, 6)) + + public s() { +>s : Symbol(NonPublicClass.s, Decl(asiPublicPrivateProtected.ts, 1, 22)) + } +} + +class NonPublicClass2 { +>NonPublicClass2 : Symbol(NonPublicClass2, Decl(asiPublicPrivateProtected.ts, 4, 1)) + + public +>public : Symbol(NonPublicClass2.public, Decl(asiPublicPrivateProtected.ts, 6, 23)) + + private nonPublicFunction() { +>nonPublicFunction : Symbol(NonPublicClass2.nonPublicFunction, Decl(asiPublicPrivateProtected.ts, 7, 10)) + } +} +private +class NonPrivateClass { +>NonPrivateClass : Symbol(NonPrivateClass, Decl(asiPublicPrivateProtected.ts, 11, 7)) + + private s() { +>s : Symbol(NonPrivateClass.s, Decl(asiPublicPrivateProtected.ts, 12, 23)) + } +} + +class NonPrivateClass2 { +>NonPrivateClass2 : Symbol(NonPrivateClass2, Decl(asiPublicPrivateProtected.ts, 15, 1)) + + private +>private : Symbol(NonPrivateClass2.private, Decl(asiPublicPrivateProtected.ts, 17, 24)) + + public nonPrivateFunction() { +>nonPrivateFunction : Symbol(NonPrivateClass2.nonPrivateFunction, Decl(asiPublicPrivateProtected.ts, 18, 11)) + } +} +protected +class NonProtectedClass { +>NonProtectedClass : Symbol(NonProtectedClass, Decl(asiPublicPrivateProtected.ts, 22, 9)) + + protected s() { +>s : Symbol(NonProtectedClass.s, Decl(asiPublicPrivateProtected.ts, 23, 25)) + } +} + +class NonProtectedClass2 { +>NonProtectedClass2 : Symbol(NonProtectedClass2, Decl(asiPublicPrivateProtected.ts, 26, 1)) + + protected +>protected : Symbol(NonProtectedClass2.protected, Decl(asiPublicPrivateProtected.ts, 28, 26)) + + public nonProtectedFunction() { +>nonProtectedFunction : Symbol(NonProtectedClass2.nonProtectedFunction, Decl(asiPublicPrivateProtected.ts, 29, 13)) + } +} + +class ClassWithThreeMembers { +>ClassWithThreeMembers : Symbol(ClassWithThreeMembers, Decl(asiPublicPrivateProtected.ts, 32, 1)) + + public +>public : Symbol(ClassWithThreeMembers.public, Decl(asiPublicPrivateProtected.ts, 34, 29)) + + private +>private : Symbol(ClassWithThreeMembers.private, Decl(asiPublicPrivateProtected.ts, 35, 10)) + + protected +>protected : Symbol(ClassWithThreeMembers.protected, Decl(asiPublicPrivateProtected.ts, 36, 11)) +} + diff --git a/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).types b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).types new file mode 100644 index 0000000000000..31cd61c55aee3 --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected(alwaysstrict=true).types @@ -0,0 +1,102 @@ +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +=== asiPublicPrivateProtected.ts === +public +>public : any +> : ^^^ + +class NonPublicClass { +>NonPublicClass : NonPublicClass +> : ^^^^^^^^^^^^^^ + + public s() { +>s : () => void +> : ^^^^^^^^^^ + } +} + +class NonPublicClass2 { +>NonPublicClass2 : NonPublicClass2 +> : ^^^^^^^^^^^^^^^ + + public +>public : any +> : ^^^ + + private nonPublicFunction() { +>nonPublicFunction : () => void +> : ^^^^^^^^^^ + } +} +private +>private : any +> : ^^^ + +class NonPrivateClass { +>NonPrivateClass : NonPrivateClass +> : ^^^^^^^^^^^^^^^ + + private s() { +>s : () => void +> : ^^^^^^^^^^ + } +} + +class NonPrivateClass2 { +>NonPrivateClass2 : NonPrivateClass2 +> : ^^^^^^^^^^^^^^^^ + + private +>private : any +> : ^^^ + + public nonPrivateFunction() { +>nonPrivateFunction : () => void +> : ^^^^^^^^^^ + } +} +protected +>protected : any +> : ^^^ + +class NonProtectedClass { +>NonProtectedClass : NonProtectedClass +> : ^^^^^^^^^^^^^^^^^ + + protected s() { +>s : () => void +> : ^^^^^^^^^^ + } +} + +class NonProtectedClass2 { +>NonProtectedClass2 : NonProtectedClass2 +> : ^^^^^^^^^^^^^^^^^^ + + protected +>protected : any +> : ^^^ + + public nonProtectedFunction() { +>nonProtectedFunction : () => void +> : ^^^^^^^^^^ + } +} + +class ClassWithThreeMembers { +>ClassWithThreeMembers : ClassWithThreeMembers +> : ^^^^^^^^^^^^^^^^^^^^^ + + public +>public : any +> : ^^^ + + private +>private : any +> : ^^^ + + protected +>protected : any +> : ^^^ +} + diff --git a/tests/baselines/reference/asiPublicPrivateProtected.errors.txt b/tests/baselines/reference/asiPublicPrivateProtected.errors.txt index c3653603ddc74..0e8ee32639698 100644 --- a/tests/baselines/reference/asiPublicPrivateProtected.errors.txt +++ b/tests/baselines/reference/asiPublicPrivateProtected.errors.txt @@ -1,8 +1,10 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. asiPublicPrivateProtected.ts(1,1): error TS2304: Cannot find name 'public'. asiPublicPrivateProtected.ts(12,1): error TS2304: Cannot find name 'private'. asiPublicPrivateProtected.ts(23,1): error TS2304: Cannot find name 'protected'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== asiPublicPrivateProtected.ts (3 errors) ==== public ~~~~~~ diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..9c3e817607a43 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsArrowFunctions.ts, 0, 3)) +>i : Symbol(i, Decl(collisionArgumentsArrowFunctions.ts, 0, 10)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsArrowFunctions.ts, 3, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsArrowFunctions.ts, 3, 29)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsArrowFunctions.ts, 6, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) +} + +var f2 = (...restParameters) => { +>f2 : Symbol(f2, Decl(collisionArgumentsArrowFunctions.ts, 10, 3)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsArrowFunctions.ts, 10, 10)) + + var arguments = 10; // No Error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 11, 7)) +} +var f2NoError = () => { +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsArrowFunctions.ts, 13, 3)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 14, 7)) +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..1d02346f69ebd --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es2015).types @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(i: number, ...arguments) => { //arguments is error var arguments: any[]; // no error} : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(arguments: number, ...rest) => { //arguments is error var arguments = 10; // no error} : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>(arguments: number) => { // no error var arguments = 10; // no error} : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +var f2 = (...restParameters) => { +>f2 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>(...restParameters) => { var arguments = 10; // No Error} : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // No Error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f2NoError = () => { +>f2NoError : () => void +> : ^^^^^^^^^^ +>() => { var arguments = 10; // no error} : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..c3ed9abd5f8b7 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,25 @@ +collisionArgumentsArrowFunctions.ts(1,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsArrowFunctions.ts(4,12): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + +==== collisionArgumentsArrowFunctions.ts (2 errors) ==== + var f1 = (i: number, ...arguments) => { //arguments is error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any[]; // no error + } + var f12 = (arguments: number, ...rest) => { //arguments is error + ~~~~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments = 10; // no error + } + var f1NoError = (arguments: number) => { // no error + var arguments = 10; // no error + } + + var f2 = (...restParameters) => { + var arguments = 10; // No Error + } + var f2NoError = () => { + var arguments = 10; // no error + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..9c3e817607a43 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsArrowFunctions.ts, 0, 3)) +>i : Symbol(i, Decl(collisionArgumentsArrowFunctions.ts, 0, 10)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsArrowFunctions.ts, 3, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsArrowFunctions.ts, 3, 29)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsArrowFunctions.ts, 6, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) +} + +var f2 = (...restParameters) => { +>f2 : Symbol(f2, Decl(collisionArgumentsArrowFunctions.ts, 10, 3)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsArrowFunctions.ts, 10, 10)) + + var arguments = 10; // No Error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 11, 7)) +} +var f2NoError = () => { +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsArrowFunctions.ts, 13, 3)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 14, 7)) +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).types b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..1d02346f69ebd --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=false,target=es5).types @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(i: number, ...arguments) => { //arguments is error var arguments: any[]; // no error} : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(arguments: number, ...rest) => { //arguments is error var arguments = 10; // no error} : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>(arguments: number) => { // no error var arguments = 10; // no error} : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +var f2 = (...restParameters) => { +>f2 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>(...restParameters) => { var arguments = 10; // No Error} : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // No Error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f2NoError = () => { +>f2NoError : () => void +> : ^^^^^^^^^^ +>() => { var arguments = 10; // no error} : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..8e907f7f316ad --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,43 @@ +collisionArgumentsArrowFunctions.ts(1,25): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(4,12): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(5,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(7,18): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(8,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(12,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(15,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsArrowFunctions.ts (8 errors) ==== + var f1 = (i: number, ...arguments) => { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + var f12 = (arguments: number, ...rest) => { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + var f1NoError = (arguments: number) => { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + var f2 = (...restParameters) => { + var arguments = 10; // No Error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + var f2NoError = () => { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..9c3e817607a43 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsArrowFunctions.ts, 0, 3)) +>i : Symbol(i, Decl(collisionArgumentsArrowFunctions.ts, 0, 10)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsArrowFunctions.ts, 3, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsArrowFunctions.ts, 3, 29)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsArrowFunctions.ts, 6, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) +} + +var f2 = (...restParameters) => { +>f2 : Symbol(f2, Decl(collisionArgumentsArrowFunctions.ts, 10, 3)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsArrowFunctions.ts, 10, 10)) + + var arguments = 10; // No Error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 11, 7)) +} +var f2NoError = () => { +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsArrowFunctions.ts, 13, 3)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 14, 7)) +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..1d02346f69ebd --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es2015).types @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(i: number, ...arguments) => { //arguments is error var arguments: any[]; // no error} : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(arguments: number, ...rest) => { //arguments is error var arguments = 10; // no error} : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>(arguments: number) => { // no error var arguments = 10; // no error} : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +var f2 = (...restParameters) => { +>f2 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>(...restParameters) => { var arguments = 10; // No Error} : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // No Error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f2NoError = () => { +>f2NoError : () => void +> : ^^^^^^^^^^ +>() => { var arguments = 10; // no error} : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..615931277062e --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,49 @@ +collisionArgumentsArrowFunctions.ts(1,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsArrowFunctions.ts(1,25): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(4,12): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(4,12): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsArrowFunctions.ts(5,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(7,18): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(8,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(12,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsArrowFunctions.ts(15,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsArrowFunctions.ts (10 errors) ==== + var f1 = (i: number, ...arguments) => { //arguments is error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + var f12 = (arguments: number, ...rest) => { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + var f1NoError = (arguments: number) => { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + var f2 = (...restParameters) => { + var arguments = 10; // No Error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + var f2NoError = () => { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..9c3e817607a43 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsArrowFunctions.ts, 0, 3)) +>i : Symbol(i, Decl(collisionArgumentsArrowFunctions.ts, 0, 10)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsArrowFunctions.ts, 3, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsArrowFunctions.ts, 3, 29)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsArrowFunctions.ts, 6, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) +} + +var f2 = (...restParameters) => { +>f2 : Symbol(f2, Decl(collisionArgumentsArrowFunctions.ts, 10, 3)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsArrowFunctions.ts, 10, 10)) + + var arguments = 10; // No Error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 11, 7)) +} +var f2NoError = () => { +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsArrowFunctions.ts, 13, 3)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 14, 7)) +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).types b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..1d02346f69ebd --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(alwaysstrict=true,target=es5).types @@ -0,0 +1,74 @@ +//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// + +=== collisionArgumentsArrowFunctions.ts === +var f1 = (i: number, ...arguments) => { //arguments is error +>f1 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(i: number, ...arguments) => { //arguments is error var arguments: any[]; // no error} : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +var f12 = (arguments: number, ...rest) => { //arguments is error +>f12 : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>(arguments: number, ...rest) => { //arguments is error var arguments = 10; // no error} : (arguments: number, ...rest: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f1NoError = (arguments: number) => { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>(arguments: number) => { // no error var arguments = 10; // no error} : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +var f2 = (...restParameters) => { +>f2 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>(...restParameters) => { var arguments = 10; // No Error} : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // No Error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +var f2NoError = () => { +>f2NoError : () => void +> : ^^^^^^^^^^ +>() => { var arguments = 10; // no error} : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt new file mode 100644 index 0000000000000..93224be35b1f5 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt @@ -0,0 +1,21 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== collisionArgumentsArrowFunctions.ts (0 errors) ==== + var f1 = (i: number, ...arguments) => { //arguments is error + var arguments: any[]; // no error + } + var f12 = (arguments: number, ...rest) => { //arguments is error + var arguments = 10; // no error + } + var f1NoError = (arguments: number) => { // no error + var arguments = 10; // no error + } + + var f2 = (...restParameters) => { + var arguments = 10; // No Error + } + var f2NoError = () => { + var arguments = 10; // no error + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt index cbde2985f06bd..c6df7ffcaba28 100644 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt @@ -1,8 +1,10 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. collisionArgumentsArrowFunctions.ts(1,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. collisionArgumentsArrowFunctions.ts(4,12): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== collisionArgumentsArrowFunctions.ts (2 errors) ==== var f1 = (i: number, ...arguments) => { //arguments is error diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..833fd4b0dedcc --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,136 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunction.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 1, 30)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunction.ts, 3, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 4, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) +} +function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunction.ts, 6, 1)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : Symbol(f2, Decl(collisionArgumentsFunction.ts, 9, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 11, 20)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 11, 30)) + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : Symbol(f21, Decl(collisionArgumentsFunction.ts, 11, 45)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 12, 21)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 12, 39)) + +declare function f2NoError(arguments: number); // no error +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsFunction.ts, 12, 49)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 13, 27)) + +function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunction.ts, 13, 46)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 15, 12)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 16, 7)) +} +function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunction.ts, 17, 1)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 19, 7)) +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 22, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 22, 30)) + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 23, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 23, 30)) + +function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 24, 27)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 27, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 27, 23)) + +function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 28, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 28, 23)) + +function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 29, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) +} +function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 32, 19)) + +function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 33, 19)) + +function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 38, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 38, 38)) + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 39, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 39, 38)) + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 40, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 40, 31)) + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 41, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 41, 31)) + +declare function f6(arguments: number); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 42, 20)) + +declare function f6(arguments: string); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 43, 20)) + diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..00149caf4329c --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es2015).types @@ -0,0 +1,206 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : (arguments: number, ...rest: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f2NoError(arguments: number); // no error +>f2NoError : (arguments: number) => any +> : ^ ^^ ^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ +} +function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + +function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any + + var arguments: any; // No error +>arguments : any +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f6(arguments: number); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +declare function f6(arguments: string); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..1d7d2b3c99b7f --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,59 @@ +collisionArgumentsFunction.ts(2,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunction.ts(5,25): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunction.ts(25,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunction.ts(30,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + +==== collisionArgumentsFunction.ts (4 errors) ==== + // Functions + function f1(arguments: number, ...restParameters) { //arguments is error + ~~~~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + declare function f2(i: number, ...arguments); // no error - no code gen + declare function f21(arguments: number, ...rest); // no error - no code gen + declare function f2NoError(arguments: number); // no error + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + ~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } + + declare function f5(arguments: number, ...rest); // no codegen no error + declare function f5(arguments: string, ...rest); // no codegen no error + declare function f52(i: number, ...arguments); // no codegen no error + declare function f52(i: string, ...arguments); // no codegen no error + declare function f6(arguments: number); // no codegen no error + declare function f6(arguments: string); // no codegen no error \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..833fd4b0dedcc --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,136 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunction.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 1, 30)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunction.ts, 3, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 4, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) +} +function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunction.ts, 6, 1)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : Symbol(f2, Decl(collisionArgumentsFunction.ts, 9, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 11, 20)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 11, 30)) + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : Symbol(f21, Decl(collisionArgumentsFunction.ts, 11, 45)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 12, 21)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 12, 39)) + +declare function f2NoError(arguments: number); // no error +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsFunction.ts, 12, 49)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 13, 27)) + +function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunction.ts, 13, 46)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 15, 12)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 16, 7)) +} +function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunction.ts, 17, 1)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 19, 7)) +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 22, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 22, 30)) + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 23, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 23, 30)) + +function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 24, 27)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 27, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 27, 23)) + +function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 28, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 28, 23)) + +function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 29, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) +} +function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 32, 19)) + +function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 33, 19)) + +function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 38, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 38, 38)) + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 39, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 39, 38)) + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 40, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 40, 31)) + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 41, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 41, 31)) + +declare function f6(arguments: number); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 42, 20)) + +declare function f6(arguments: string); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 43, 20)) + diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).types b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..88c4107b45ae9 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=false,target=es5).types @@ -0,0 +1,211 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : (arguments: number, ...rest: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f2NoError(arguments: number); // no error +>f2NoError : (arguments: number) => any +> : ^ ^^ ^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +> : ^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ +} +function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + +function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any +> : ^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f6(arguments: number); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +declare function f6(arguments: string); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..d0667533b3b4a --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,107 @@ +collisionArgumentsFunction.ts(2,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(3,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(5,28): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(8,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(9,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(17,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(20,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(23,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(24,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(25,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(26,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(28,28): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(29,28): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(30,25): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(31,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(33,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(34,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(35,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(36,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsFunction.ts (20 errors) ==== + // Functions + function f1(arguments: number, ...restParameters) { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f12(i: number, ...arguments) { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f1NoError(arguments: number) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + declare function f2(i: number, ...arguments); // no error - no code gen + declare function f21(arguments: number, ...rest); // no error - no code gen + declare function f2NoError(arguments: number); // no error + + function f3(...restParameters) { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f3NoError() { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + function f4(arguments: number, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: string, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: any, ...rest) { // error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f42(i: number, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: string, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: any, ...arguments) { // error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f4NoError(arguments: number); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: string); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: any) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + declare function f5(arguments: number, ...rest); // no codegen no error + declare function f5(arguments: string, ...rest); // no codegen no error + declare function f52(i: number, ...arguments); // no codegen no error + declare function f52(i: string, ...arguments); // no codegen no error + declare function f6(arguments: number); // no codegen no error + declare function f6(arguments: string); // no codegen no error \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..833fd4b0dedcc --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,136 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunction.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 1, 30)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunction.ts, 3, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 4, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) +} +function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunction.ts, 6, 1)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : Symbol(f2, Decl(collisionArgumentsFunction.ts, 9, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 11, 20)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 11, 30)) + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : Symbol(f21, Decl(collisionArgumentsFunction.ts, 11, 45)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 12, 21)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 12, 39)) + +declare function f2NoError(arguments: number); // no error +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsFunction.ts, 12, 49)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 13, 27)) + +function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunction.ts, 13, 46)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 15, 12)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 16, 7)) +} +function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunction.ts, 17, 1)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 19, 7)) +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 22, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 22, 30)) + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 23, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 23, 30)) + +function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 24, 27)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 27, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 27, 23)) + +function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 28, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 28, 23)) + +function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 29, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) +} +function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 32, 19)) + +function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 33, 19)) + +function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 38, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 38, 38)) + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 39, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 39, 38)) + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 40, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 40, 31)) + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 41, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 41, 31)) + +declare function f6(arguments: number); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 42, 20)) + +declare function f6(arguments: string); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 43, 20)) + diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..88c4107b45ae9 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es2015).types @@ -0,0 +1,211 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : (arguments: number, ...rest: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f2NoError(arguments: number); // no error +>f2NoError : (arguments: number) => any +> : ^ ^^ ^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +> : ^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ +} +function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + +function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any +> : ^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f6(arguments: number); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +declare function f6(arguments: string); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..a21a8d87b6317 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,119 @@ +collisionArgumentsFunction.ts(2,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(2,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunction.ts(3,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(5,25): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunction.ts(5,28): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(8,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(9,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(17,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(20,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(23,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(24,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(25,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(25,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunction.ts(26,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(28,28): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(29,28): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(30,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunction.ts(30,25): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(31,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(33,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(34,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(35,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunction.ts(36,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsFunction.ts (24 errors) ==== + // Functions + function f1(arguments: number, ...restParameters) { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f12(i: number, ...arguments) { //arguments is error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f1NoError(arguments: number) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + declare function f2(i: number, ...arguments); // no error - no code gen + declare function f21(arguments: number, ...rest); // no error - no code gen + declare function f2NoError(arguments: number); // no error + + function f3(...restParameters) { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f3NoError() { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + function f4(arguments: number, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: string, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: any, ...rest) { // error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f42(i: number, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: string, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: any, ...arguments) { // error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f4NoError(arguments: number); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: string); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: any) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + declare function f5(arguments: number, ...rest); // no codegen no error + declare function f5(arguments: string, ...rest); // no codegen no error + declare function f52(i: number, ...arguments); // no codegen no error + declare function f52(i: string, ...arguments); // no codegen no error + declare function f6(arguments: number); // no codegen no error + declare function f6(arguments: string); // no codegen no error \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..833fd4b0dedcc --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,136 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunction.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 1, 30)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunction.ts, 3, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 4, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) +} +function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunction.ts, 6, 1)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : Symbol(f2, Decl(collisionArgumentsFunction.ts, 9, 1)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 11, 20)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 11, 30)) + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : Symbol(f21, Decl(collisionArgumentsFunction.ts, 11, 45)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 12, 21)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 12, 39)) + +declare function f2NoError(arguments: number); // no error +>f2NoError : Symbol(f2NoError, Decl(collisionArgumentsFunction.ts, 12, 49)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 13, 27)) + +function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunction.ts, 13, 46)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 15, 12)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 16, 7)) +} +function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunction.ts, 17, 1)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 19, 7)) +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 22, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 22, 30)) + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 23, 12)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 23, 30)) + +function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 24, 27)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 27, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 27, 23)) + +function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 28, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 28, 23)) + +function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 29, 13)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) +} +function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 32, 19)) + +function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 33, 19)) + +function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 38, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 38, 38)) + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 39, 20)) +>rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 39, 38)) + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 40, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 40, 31)) + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) +>i : Symbol(i, Decl(collisionArgumentsFunction.ts, 41, 21)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 41, 31)) + +declare function f6(arguments: number); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 42, 20)) + +declare function f6(arguments: string); // no codegen no error +>f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 43, 20)) + diff --git a/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).types b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..88c4107b45ae9 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(alwaysstrict=true,target=es5).types @@ -0,0 +1,211 @@ +//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// + +=== collisionArgumentsFunction.ts === +// Functions +function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ +} +function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +declare function f2(i: number, ...arguments); // no error - no code gen +>f2 : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f21(arguments: number, ...rest); // no error - no code gen +>f21 : (arguments: number, ...rest: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f2NoError(arguments: number); // no error +>f2NoError : (arguments: number) => any +> : ^ ^^ ^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} +function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ +} +function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +> : ^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ +} +function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + +function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any +> : ^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ +} + +declare function f5(arguments: number, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f5(arguments: string, ...rest); // no codegen no error +>f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + +declare function f52(i: number, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f52(i: string, ...arguments); // no codegen no error +>f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +declare function f6(arguments: number); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + +declare function f6(arguments: string); // no codegen no error +>f6 : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt new file mode 100644 index 0000000000000..164196a14f4ce --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt @@ -0,0 +1,49 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== collisionArgumentsFunction.ts (0 errors) ==== + // Functions + function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + declare function f2(i: number, ...arguments); // no error - no code gen + declare function f21(arguments: number, ...rest); // no error - no code gen + declare function f2NoError(arguments: number); // no error + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } + + declare function f5(arguments: number, ...rest); // no codegen no error + declare function f5(arguments: string, ...rest); // no codegen no error + declare function f52(i: number, ...arguments); // no codegen no error + declare function f52(i: string, ...arguments); // no codegen no error + declare function f6(arguments: number); // no codegen no error + declare function f6(arguments: string); // no codegen no error \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).types b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).types index 00149caf4329c..88c4107b45ae9 100644 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).types +++ b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).types @@ -106,11 +106,13 @@ function f4(arguments: any, ...rest) { // error >f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ >arguments : any +> : ^^^ >rest : any[] > : ^^^^^ var arguments: any; // No error >arguments : any +> : ^^^ } function f42(i: number, ...arguments); // no codegen no error >f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } @@ -132,6 +134,7 @@ function f42(i: any, ...arguments) { // error >f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ >i : any +> : ^^^ >arguments : any[] > : ^^^^^ @@ -155,9 +158,11 @@ function f4NoError(arguments: any) { // no error >f4NoError : { (arguments: number): any; (arguments: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >arguments : any +> : ^^^ var arguments: any; // No error >arguments : any +> : ^^^ } declare function f5(arguments: number, ...rest); // no codegen no error diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt index bced0ca74e435..d09fada5e7d14 100644 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt +++ b/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. collisionArgumentsFunction.ts(2,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. collisionArgumentsFunction.ts(5,25): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. @@ -5,6 +6,7 @@ collisionArgumentsFunction.ts(25,13): error TS2396: Duplicate identifier 'argume collisionArgumentsFunction.ts(30,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== collisionArgumentsFunction.ts (4 errors) ==== // Functions diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..6538436c61ed7 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,96 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : Symbol(foo, Decl(collisionArgumentsFunctionExpressions.ts, 0, 0)) + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunctionExpressions.ts, 0, 16)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 1, 34)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunctionExpressions.ts, 3, 5)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 4, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + } + function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunctionExpressions.ts, 6, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + } + + function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunctionExpressions.ts, 9, 5)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 11, 16)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 12, 11)) + } + function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunctionExpressions.ts, 13, 5)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 15, 11)) + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 18, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 18, 34)) + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 19, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 19, 34)) + + function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 20, 31)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 23, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 23, 27)) + + function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 24, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 24, 27)) + + function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 25, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + } + function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 28, 23)) + + function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 29, 23)) + + function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..7cc3327ed029b --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es2015).types @@ -0,0 +1,143 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ + } + function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ + } + function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + + function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any + + var arguments: any; // No error +>arguments : any + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..f85bd42c754d8 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,49 @@ +collisionArgumentsFunctionExpressions.ts(2,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunctionExpressions.ts(5,29): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunctionExpressions.ts(21,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunctionExpressions.ts(26,26): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + + +==== collisionArgumentsFunctionExpressions.ts (4 errors) ==== + function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + ~~~~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + ~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..6538436c61ed7 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,96 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : Symbol(foo, Decl(collisionArgumentsFunctionExpressions.ts, 0, 0)) + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunctionExpressions.ts, 0, 16)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 1, 34)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunctionExpressions.ts, 3, 5)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 4, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + } + function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunctionExpressions.ts, 6, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + } + + function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunctionExpressions.ts, 9, 5)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 11, 16)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 12, 11)) + } + function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunctionExpressions.ts, 13, 5)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 15, 11)) + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 18, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 18, 34)) + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 19, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 19, 34)) + + function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 20, 31)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 23, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 23, 27)) + + function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 24, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 24, 27)) + + function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 25, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + } + function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 28, 23)) + + function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 29, 23)) + + function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).types b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..6ede79355c201 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=false,target=es5).types @@ -0,0 +1,148 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ + } + function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +> : ^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ + } + function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + + function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any +> : ^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..f580bf12b6ead --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,97 @@ +collisionArgumentsFunctionExpressions.ts(2,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(5,32): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(6,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(8,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(9,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(13,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(16,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(19,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(20,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(21,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(22,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(24,32): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(25,32): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(26,29): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(27,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(29,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(30,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(31,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(32,13): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsFunctionExpressions.ts (20 errors) ==== + function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f12(i: number, ...arguments) { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f1NoError(arguments: number) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + function f3(...restParameters) { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f3NoError() { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + function f4(arguments: number, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: string, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: any, ...rest) { // error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f42(i: number, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: string, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: any, ...arguments) { // error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f4NoError(arguments: number); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: string); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: any) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..6538436c61ed7 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,96 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : Symbol(foo, Decl(collisionArgumentsFunctionExpressions.ts, 0, 0)) + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunctionExpressions.ts, 0, 16)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 1, 34)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunctionExpressions.ts, 3, 5)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 4, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + } + function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunctionExpressions.ts, 6, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + } + + function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunctionExpressions.ts, 9, 5)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 11, 16)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 12, 11)) + } + function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunctionExpressions.ts, 13, 5)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 15, 11)) + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 18, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 18, 34)) + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 19, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 19, 34)) + + function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 20, 31)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 23, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 23, 27)) + + function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 24, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 24, 27)) + + function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 25, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + } + function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 28, 23)) + + function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 29, 23)) + + function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..6ede79355c201 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es2015).types @@ -0,0 +1,148 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ + } + function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +> : ^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ + } + function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + + function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any +> : ^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..33c1973c9fa23 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,109 @@ +collisionArgumentsFunctionExpressions.ts(2,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(2,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunctionExpressions.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(5,29): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunctionExpressions.ts(5,32): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(6,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(8,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(9,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(13,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(16,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(19,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(20,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(21,17): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(21,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunctionExpressions.ts(22,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(24,32): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(25,32): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(26,26): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +collisionArgumentsFunctionExpressions.ts(26,29): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(27,13): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(29,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(30,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(31,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsFunctionExpressions.ts(32,13): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsFunctionExpressions.ts (24 errors) ==== + function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f12(i: number, ...arguments) { //arguments is error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f1NoError(arguments: number) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + function f3(...restParameters) { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f3NoError() { + var arguments = 10; // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + function f4(arguments: number, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: string, ...rest); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4(arguments: any, ...rest) { // error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f42(i: number, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: string, ...arguments); // no codegen no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f42(i: any, ...arguments) { // error + ~~~~~~~~~~~~ +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any[]; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + function f4NoError(arguments: number); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: string); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + function f4NoError(arguments: any) { // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var arguments: any; // No error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..6538436c61ed7 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,96 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : Symbol(foo, Decl(collisionArgumentsFunctionExpressions.ts, 0, 0)) + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : Symbol(f1, Decl(collisionArgumentsFunctionExpressions.ts, 0, 16)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 1, 34)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : Symbol(f12, Decl(collisionArgumentsFunctionExpressions.ts, 3, 5)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 4, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + + var arguments: any[]; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) + } + function f1NoError(arguments: number) { // no error +>f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunctionExpressions.ts, 6, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) + } + + function f3(...restParameters) { +>f3 : Symbol(f3, Decl(collisionArgumentsFunctionExpressions.ts, 9, 5)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 11, 16)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 12, 11)) + } + function f3NoError() { +>f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunctionExpressions.ts, 13, 5)) + + var arguments = 10; // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 15, 11)) + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 18, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 18, 34)) + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 19, 16)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 19, 34)) + + function f4(arguments: any, ...rest) { // error +>f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) +>rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 20, 31)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 23, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 23, 27)) + + function f42(i: string, ...arguments); // no codegen no error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 24, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 24, 27)) + + function f42(i: any, ...arguments) { // error +>f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) +>i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 25, 17)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + + var arguments: any[]; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) + } + function f4NoError(arguments: number); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 28, 23)) + + function f4NoError(arguments: string); // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 29, 23)) + + function f4NoError(arguments: any) { // no error +>f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + + var arguments: any; // No error +>arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).types b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..6ede79355c201 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(alwaysstrict=true,target=es5).types @@ -0,0 +1,148 @@ +//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// + +=== collisionArgumentsFunctionExpressions.ts === +function foo() { +>foo : () => void +> : ^^^^^^^^^^ + + function f1(arguments: number, ...restParameters) { //arguments is error +>f1 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f12(i: number, ...arguments) { //arguments is error +>f12 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // no error +>arguments : any[] +> : ^^^^^ + } + function f1NoError(arguments: number) { // no error +>f1NoError : (arguments: number) => void +> : ^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f3(...restParameters) { +>f3 : (...restParameters: any[]) => void +> : ^^^^ ^^^^^^^^^^^^^^^^ +>restParameters : any[] +> : ^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + function f3NoError() { +>f3NoError : () => void +> : ^^^^^^^^^^ + + var arguments = 10; // no error +>arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + } + + function f4(arguments: number, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: string, ...rest); // no codegen no error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + function f4(arguments: any, ...rest) { // error +>f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>rest : any[] +> : ^^^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ + } + function f42(i: number, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: string, ...arguments); // no codegen no error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : string +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + function f42(i: any, ...arguments) { // error +>f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +>i : any +> : ^^^ +>arguments : any[] +> : ^^^^^ + + var arguments: any[]; // No error +>arguments : any[] +> : ^^^^^ + } + function f4NoError(arguments: number); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : number +> : ^^^^^^ + + function f4NoError(arguments: string); // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : string +> : ^^^^^^ + + function f4NoError(arguments: any) { // no error +>f4NoError : { (arguments: number): any; (arguments: string): any; } +> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ +>arguments : any +> : ^^^ + + var arguments: any; // No error +>arguments : any +> : ^^^ + } +} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt new file mode 100644 index 0000000000000..065c131b32a7b --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt @@ -0,0 +1,39 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== collisionArgumentsFunctionExpressions.ts (0 errors) ==== + function foo() { + function f1(arguments: number, ...restParameters) { //arguments is error + var arguments = 10; // no error + } + function f12(i: number, ...arguments) { //arguments is error + var arguments: any[]; // no error + } + function f1NoError(arguments: number) { // no error + var arguments = 10; // no error + } + + function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } + + function f4(arguments: number, ...rest); // no codegen no error + function f4(arguments: string, ...rest); // no codegen no error + function f4(arguments: any, ...rest) { // error + var arguments: any; // No error + } + function f42(i: number, ...arguments); // no codegen no error + function f42(i: string, ...arguments); // no codegen no error + function f42(i: any, ...arguments) { // error + var arguments: any[]; // No error + } + function f4NoError(arguments: number); // no error + function f4NoError(arguments: string); // no error + function f4NoError(arguments: any) { // no error + var arguments: any; // No error + } + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types index 7cc3327ed029b..6ede79355c201 100644 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types @@ -87,11 +87,13 @@ function foo() { >f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ >arguments : any +> : ^^^ >rest : any[] > : ^^^^^ var arguments: any; // No error >arguments : any +> : ^^^ } function f42(i: number, ...arguments); // no codegen no error >f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } @@ -113,6 +115,7 @@ function foo() { >f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } > : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ >i : any +> : ^^^ >arguments : any[] > : ^^^^^ @@ -136,8 +139,10 @@ function foo() { >f4NoError : { (arguments: number): any; (arguments: string): any; } > : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ >arguments : any +> : ^^^ var arguments: any; // No error >arguments : any +> : ^^^ } } diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt index 4ff7bf7317155..007fd652a0957 100644 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. collisionArgumentsFunctionExpressions.ts(2,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. collisionArgumentsFunctionExpressions.ts(5,29): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. @@ -5,6 +6,7 @@ collisionArgumentsFunctionExpressions.ts(21,17): error TS2396: Duplicate identif collisionArgumentsFunctionExpressions.ts(26,26): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== collisionArgumentsFunctionExpressions.ts (4 errors) ==== function foo() { diff --git a/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).symbols b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..1b614f0902ad0 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).symbols @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/collisionArgumentsInType.ts] //// + +=== collisionArgumentsInType.ts === +var v1: (i: number, ...arguments) => void; // no error - no code gen +>v1 : Symbol(v1, Decl(collisionArgumentsInType.ts, 0, 3)) +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 0, 9)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 0, 19)) + +var v12: (arguments: number, ...restParameters) => void; // no error - no code gen +>v12 : Symbol(v12, Decl(collisionArgumentsInType.ts, 1, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 1, 10)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 1, 28)) + +var v2: { +>v2 : Symbol(v2, Decl(collisionArgumentsInType.ts, 2, 3)) + + (arguments: number, ...restParameters); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 3, 5)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 3, 23)) + + new (arguments: number, ...restParameters); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 4, 9)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 4, 27)) + + foo(arguments: number, ...restParameters); // no error - no code gen +>foo : Symbol(foo, Decl(collisionArgumentsInType.ts, 4, 47)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 5, 8)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 5, 26)) + + prop: (arguments: number, ...restParameters) => void; // no error - no code gen +>prop : Symbol(prop, Decl(collisionArgumentsInType.ts, 5, 46)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 6, 11)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 6, 29)) +} +var v21: { +>v21 : Symbol(v21, Decl(collisionArgumentsInType.ts, 8, 3)) + + (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 9, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 9, 15)) + + new (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 10, 9)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 10, 19)) + + foo(i: number, ...arguments); // no error - no code gen +>foo : Symbol(foo, Decl(collisionArgumentsInType.ts, 10, 34)) +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 11, 8)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 11, 18)) + + prop: (i: number, ...arguments) => void; // no error - no code gen +>prop : Symbol(prop, Decl(collisionArgumentsInType.ts, 11, 33)) +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 12, 11)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 12, 21)) +} diff --git a/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).types b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).types new file mode 100644 index 0000000000000..c89460089758e --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=false).types @@ -0,0 +1,83 @@ +//// [tests/cases/compiler/collisionArgumentsInType.ts] //// + +=== collisionArgumentsInType.ts === +var v1: (i: number, ...arguments) => void; // no error - no code gen +>v1 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +var v12: (arguments: number, ...restParameters) => void; // no error - no code gen +>v12 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + +var v2: { +>v2 : { (arguments: number, ...restParameters: any[]): any; new (arguments: number, ...restParameters: any[]): any; foo(arguments: number, ...restParameters: any[]): any; prop: (arguments: number, ...restParameters: any) => void; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ + + (arguments: number, ...restParameters); // no error - no code gen +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + new (arguments: number, ...restParameters); // no error - no code gen +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + foo(arguments: number, ...restParameters); // no error - no code gen +>foo : (arguments: number, ...restParameters: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + prop: (arguments: number, ...restParameters) => void; // no error - no code gen +>prop : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ +} +var v21: { +>v21 : { (i: number, ...arguments: any[]): any; new (i: number, ...arguments: any[]): any; foo(i: number, ...arguments: any[]): any; prop: (i: number, ...arguments: any) => void; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ + + (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + new (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + foo(i: number, ...arguments); // no error - no code gen +>foo : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + prop: (i: number, ...arguments) => void; // no error - no code gen +>prop : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ +} diff --git a/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).errors.txt b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..51a0a82db76ff --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).errors.txt @@ -0,0 +1,47 @@ +collisionArgumentsInType.ts(1,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(2,11): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(4,6): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(5,10): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(7,12): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(10,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(11,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(12,23): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInType.ts(13,26): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsInType.ts (10 errors) ==== + var v1: (i: number, ...arguments) => void; // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var v12: (arguments: number, ...restParameters) => void; // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var v2: { + (arguments: number, ...restParameters); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + new (arguments: number, ...restParameters); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + foo(arguments: number, ...restParameters); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + prop: (arguments: number, ...restParameters) => void; // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + var v21: { + (i: number, ...arguments); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + new (i: number, ...arguments); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + foo(i: number, ...arguments); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + prop: (i: number, ...arguments) => void; // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).symbols b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..1b614f0902ad0 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).symbols @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/collisionArgumentsInType.ts] //// + +=== collisionArgumentsInType.ts === +var v1: (i: number, ...arguments) => void; // no error - no code gen +>v1 : Symbol(v1, Decl(collisionArgumentsInType.ts, 0, 3)) +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 0, 9)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 0, 19)) + +var v12: (arguments: number, ...restParameters) => void; // no error - no code gen +>v12 : Symbol(v12, Decl(collisionArgumentsInType.ts, 1, 3)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 1, 10)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 1, 28)) + +var v2: { +>v2 : Symbol(v2, Decl(collisionArgumentsInType.ts, 2, 3)) + + (arguments: number, ...restParameters); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 3, 5)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 3, 23)) + + new (arguments: number, ...restParameters); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 4, 9)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 4, 27)) + + foo(arguments: number, ...restParameters); // no error - no code gen +>foo : Symbol(foo, Decl(collisionArgumentsInType.ts, 4, 47)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 5, 8)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 5, 26)) + + prop: (arguments: number, ...restParameters) => void; // no error - no code gen +>prop : Symbol(prop, Decl(collisionArgumentsInType.ts, 5, 46)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 6, 11)) +>restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 6, 29)) +} +var v21: { +>v21 : Symbol(v21, Decl(collisionArgumentsInType.ts, 8, 3)) + + (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 9, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 9, 15)) + + new (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 10, 9)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 10, 19)) + + foo(i: number, ...arguments); // no error - no code gen +>foo : Symbol(foo, Decl(collisionArgumentsInType.ts, 10, 34)) +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 11, 8)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 11, 18)) + + prop: (i: number, ...arguments) => void; // no error - no code gen +>prop : Symbol(prop, Decl(collisionArgumentsInType.ts, 11, 33)) +>i : Symbol(i, Decl(collisionArgumentsInType.ts, 12, 11)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 12, 21)) +} diff --git a/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).types b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).types new file mode 100644 index 0000000000000..c89460089758e --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType(alwaysstrict=true).types @@ -0,0 +1,83 @@ +//// [tests/cases/compiler/collisionArgumentsInType.ts] //// + +=== collisionArgumentsInType.ts === +var v1: (i: number, ...arguments) => void; // no error - no code gen +>v1 : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + +var v12: (arguments: number, ...restParameters) => void; // no error - no code gen +>v12 : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + +var v2: { +>v2 : { (arguments: number, ...restParameters: any[]): any; new (arguments: number, ...restParameters: any[]): any; foo(arguments: number, ...restParameters: any[]): any; prop: (arguments: number, ...restParameters: any) => void; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ + + (arguments: number, ...restParameters); // no error - no code gen +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + new (arguments: number, ...restParameters); // no error - no code gen +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + foo(arguments: number, ...restParameters); // no error - no code gen +>foo : (arguments: number, ...restParameters: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ + + prop: (arguments: number, ...restParameters) => void; // no error - no code gen +>prop : (arguments: number, ...restParameters: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>restParameters : any[] +> : ^^^^^ +} +var v21: { +>v21 : { (i: number, ...arguments: any[]): any; new (i: number, ...arguments: any[]): any; foo(i: number, ...arguments: any[]): any; prop: (i: number, ...arguments: any) => void; } +> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ + + (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + new (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + foo(i: number, ...arguments); // no error - no code gen +>foo : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + prop: (i: number, ...arguments) => void; // no error - no code gen +>prop : (i: number, ...arguments: any[]) => void +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ +} diff --git a/tests/baselines/reference/collisionArgumentsInType.errors.txt b/tests/baselines/reference/collisionArgumentsInType.errors.txt new file mode 100644 index 0000000000000..b6fbcc0deabd5 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInType.errors.txt @@ -0,0 +1,19 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== collisionArgumentsInType.ts (0 errors) ==== + var v1: (i: number, ...arguments) => void; // no error - no code gen + var v12: (arguments: number, ...restParameters) => void; // no error - no code gen + var v2: { + (arguments: number, ...restParameters); // no error - no code gen + new (arguments: number, ...restParameters); // no error - no code gen + foo(arguments: number, ...restParameters); // no error - no code gen + prop: (arguments: number, ...restParameters) => void; // no error - no code gen + } + var v21: { + (i: number, ...arguments); // no error - no code gen + new (i: number, ...arguments); // no error - no code gen + foo(i: number, ...arguments); // no error - no code gen + prop: (i: number, ...arguments) => void; // no error - no code gen + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).symbols b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..890a134c92581 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).symbols @@ -0,0 +1,65 @@ +//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// + +=== collisionArgumentsInterfaceMembers.ts === +// call +interface i1 { +>i1 : Symbol(i1, Decl(collisionArgumentsInterfaceMembers.ts, 0, 0)) + + (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 2, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 2, 15)) +} +interface i12 { +>i12 : Symbol(i12, Decl(collisionArgumentsInterfaceMembers.ts, 3, 1)) + + (arguments: number, ...rest); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 5, 5)) +>rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 5, 23)) +} +interface i1NoError { +>i1NoError : Symbol(i1NoError, Decl(collisionArgumentsInterfaceMembers.ts, 6, 1)) + + (arguments: number); // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 8, 5)) +} + +// new +interface i2 { +>i2 : Symbol(i2, Decl(collisionArgumentsInterfaceMembers.ts, 9, 1)) + + new (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 13, 9)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 13, 19)) +} +interface i21 { +>i21 : Symbol(i21, Decl(collisionArgumentsInterfaceMembers.ts, 14, 1)) + + new (arguments: number, ...rest); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 16, 9)) +>rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 16, 27)) +} +interface i2NoError { +>i2NoError : Symbol(i2NoError, Decl(collisionArgumentsInterfaceMembers.ts, 17, 1)) + + new (arguments: number); // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 19, 9)) +} + +// method +interface i3 { +>i3 : Symbol(i3, Decl(collisionArgumentsInterfaceMembers.ts, 20, 1)) + + foo(i: number, ...arguments); // no error - no code gen +>foo : Symbol(i3.foo, Decl(collisionArgumentsInterfaceMembers.ts, 23, 14)) +>i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 24, 8)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 24, 18)) + + foo1(arguments: number, ...rest); // no error - no code gen +>foo1 : Symbol(i3.foo1, Decl(collisionArgumentsInterfaceMembers.ts, 24, 33)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 25, 9)) +>rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 25, 27)) + + fooNoError(arguments: number); // no error +>fooNoError : Symbol(i3.fooNoError, Decl(collisionArgumentsInterfaceMembers.ts, 25, 37)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 26, 15)) +} diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).types b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).types new file mode 100644 index 0000000000000..66030e9306cd5 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=false).types @@ -0,0 +1,69 @@ +//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// + +=== collisionArgumentsInterfaceMembers.ts === +// call +interface i1 { + (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ +} +interface i12 { + (arguments: number, ...rest); // no error - no code gen +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ +} +interface i1NoError { + (arguments: number); // no error +>arguments : number +> : ^^^^^^ +} + +// new +interface i2 { + new (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ +} +interface i21 { + new (arguments: number, ...rest); // no error - no code gen +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ +} +interface i2NoError { + new (arguments: number); // no error +>arguments : number +> : ^^^^^^ +} + +// method +interface i3 { + foo(i: number, ...arguments); // no error - no code gen +>foo : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + foo1(arguments: number, ...rest); // no error - no code gen +>foo1 : (arguments: number, ...rest: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + fooNoError(arguments: number); // no error +>fooNoError : (arguments: number) => any +> : ^ ^^ ^^^^^^^^ +>arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).errors.txt b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..d7bbdbfb10074 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).errors.txt @@ -0,0 +1,58 @@ +collisionArgumentsInterfaceMembers.ts(3,20): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(6,6): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(9,6): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(14,24): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(17,10): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(20,10): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(25,23): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(26,10): error TS1100: Invalid use of 'arguments' in strict mode. +collisionArgumentsInterfaceMembers.ts(27,16): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== collisionArgumentsInterfaceMembers.ts (9 errors) ==== + // call + interface i1 { + (i: number, ...arguments); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + interface i12 { + (arguments: number, ...rest); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + interface i1NoError { + (arguments: number); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + // new + interface i2 { + new (i: number, ...arguments); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + interface i21 { + new (arguments: number, ...rest); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + interface i2NoError { + new (arguments: number); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + + // method + interface i3 { + foo(i: number, ...arguments); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + foo1(arguments: number, ...rest); // no error - no code gen + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + fooNoError(arguments: number); // no error + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).symbols b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..890a134c92581 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).symbols @@ -0,0 +1,65 @@ +//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// + +=== collisionArgumentsInterfaceMembers.ts === +// call +interface i1 { +>i1 : Symbol(i1, Decl(collisionArgumentsInterfaceMembers.ts, 0, 0)) + + (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 2, 5)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 2, 15)) +} +interface i12 { +>i12 : Symbol(i12, Decl(collisionArgumentsInterfaceMembers.ts, 3, 1)) + + (arguments: number, ...rest); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 5, 5)) +>rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 5, 23)) +} +interface i1NoError { +>i1NoError : Symbol(i1NoError, Decl(collisionArgumentsInterfaceMembers.ts, 6, 1)) + + (arguments: number); // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 8, 5)) +} + +// new +interface i2 { +>i2 : Symbol(i2, Decl(collisionArgumentsInterfaceMembers.ts, 9, 1)) + + new (i: number, ...arguments); // no error - no code gen +>i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 13, 9)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 13, 19)) +} +interface i21 { +>i21 : Symbol(i21, Decl(collisionArgumentsInterfaceMembers.ts, 14, 1)) + + new (arguments: number, ...rest); // no error - no code gen +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 16, 9)) +>rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 16, 27)) +} +interface i2NoError { +>i2NoError : Symbol(i2NoError, Decl(collisionArgumentsInterfaceMembers.ts, 17, 1)) + + new (arguments: number); // no error +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 19, 9)) +} + +// method +interface i3 { +>i3 : Symbol(i3, Decl(collisionArgumentsInterfaceMembers.ts, 20, 1)) + + foo(i: number, ...arguments); // no error - no code gen +>foo : Symbol(i3.foo, Decl(collisionArgumentsInterfaceMembers.ts, 23, 14)) +>i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 24, 8)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 24, 18)) + + foo1(arguments: number, ...rest); // no error - no code gen +>foo1 : Symbol(i3.foo1, Decl(collisionArgumentsInterfaceMembers.ts, 24, 33)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 25, 9)) +>rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 25, 27)) + + fooNoError(arguments: number); // no error +>fooNoError : Symbol(i3.fooNoError, Decl(collisionArgumentsInterfaceMembers.ts, 25, 37)) +>arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 26, 15)) +} diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).types b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).types new file mode 100644 index 0000000000000..66030e9306cd5 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers(alwaysstrict=true).types @@ -0,0 +1,69 @@ +//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// + +=== collisionArgumentsInterfaceMembers.ts === +// call +interface i1 { + (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ +} +interface i12 { + (arguments: number, ...rest); // no error - no code gen +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ +} +interface i1NoError { + (arguments: number); // no error +>arguments : number +> : ^^^^^^ +} + +// new +interface i2 { + new (i: number, ...arguments); // no error - no code gen +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ +} +interface i21 { + new (arguments: number, ...rest); // no error - no code gen +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ +} +interface i2NoError { + new (arguments: number); // no error +>arguments : number +> : ^^^^^^ +} + +// method +interface i3 { + foo(i: number, ...arguments); // no error - no code gen +>foo : (i: number, ...arguments: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>i : number +> : ^^^^^^ +>arguments : any[] +> : ^^^^^ + + foo1(arguments: number, ...rest); // no error - no code gen +>foo1 : (arguments: number, ...rest: any[]) => any +> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ +>rest : any[] +> : ^^^^^ + + fooNoError(arguments: number); // no error +>fooNoError : (arguments: number) => any +> : ^ ^^ ^^^^^^^^ +>arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt b/tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt new file mode 100644 index 0000000000000..13a163d5bb541 --- /dev/null +++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt @@ -0,0 +1,33 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== collisionArgumentsInterfaceMembers.ts (0 errors) ==== + // call + interface i1 { + (i: number, ...arguments); // no error - no code gen + } + interface i12 { + (arguments: number, ...rest); // no error - no code gen + } + interface i1NoError { + (arguments: number); // no error + } + + // new + interface i2 { + new (i: number, ...arguments); // no error - no code gen + } + interface i21 { + new (arguments: number, ...rest); // no error - no code gen + } + interface i2NoError { + new (arguments: number); // no error + } + + // method + interface i3 { + foo(i: number, ...arguments); // no error - no code gen + foo1(arguments: number, ...rest); // no error - no code gen + fooNoError(arguments: number); // no error + } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).errors.txt b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..7134a60544137 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).errors.txt @@ -0,0 +1,62 @@ +constDeclarations-invalidContexts.ts(3,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(5,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(8,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(11,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(15,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +constDeclarations-invalidContexts.ts(19,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(22,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(25,12): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(28,29): error TS1156: 'const' declarations can only be declared inside a block. + + +==== constDeclarations-invalidContexts.ts (9 errors) ==== + // Errors, const must be defined inside a block + if (true) + const c1 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + else + const c2 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + while (true) + const c3 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + do + const c4 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + while (true); + + var obj; + with (obj) + ~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + const c5 = 0; // No Error will be reported here since we turn off all type checking + + for (var i = 0; i < 10; i++) + const c6 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + for (var i2 in {}) + const c7 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + if (true) + label: const c8 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + while (false) + label2: label3: label4: const c9 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + + + \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).symbols b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..f85a1f2738dab --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).symbols @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// + +=== constDeclarations-invalidContexts.ts === +// Errors, const must be defined inside a block +if (true) + const c1 = 0; +>c1 : Symbol(c1, Decl(constDeclarations-invalidContexts.ts, 2, 9)) + +else + const c2 = 0; +>c2 : Symbol(c2, Decl(constDeclarations-invalidContexts.ts, 4, 9)) + +while (true) + const c3 = 0; +>c3 : Symbol(c3, Decl(constDeclarations-invalidContexts.ts, 7, 9)) + +do + const c4 = 0; +>c4 : Symbol(c4, Decl(constDeclarations-invalidContexts.ts, 10, 9)) + +while (true); + +var obj; +>obj : Symbol(obj, Decl(constDeclarations-invalidContexts.ts, 13, 3)) + +with (obj) +>obj : Symbol(obj, Decl(constDeclarations-invalidContexts.ts, 13, 3)) + + const c5 = 0; // No Error will be reported here since we turn off all type checking + +for (var i = 0; i < 10; i++) +>i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) +>i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) +>i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) + + const c6 = 0; +>c6 : Symbol(c6, Decl(constDeclarations-invalidContexts.ts, 18, 9)) + +for (var i2 in {}) +>i2 : Symbol(i2, Decl(constDeclarations-invalidContexts.ts, 20, 8)) + + const c7 = 0; +>c7 : Symbol(c7, Decl(constDeclarations-invalidContexts.ts, 21, 9)) + +if (true) + label: const c8 = 0; +>c8 : Symbol(c8, Decl(constDeclarations-invalidContexts.ts, 24, 16)) + +while (false) + label2: label3: label4: const c9 = 0; +>c9 : Symbol(c9, Decl(constDeclarations-invalidContexts.ts, 27, 33)) + + + + diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).types b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).types new file mode 100644 index 0000000000000..c994ab6621eb4 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=false).types @@ -0,0 +1,121 @@ +//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// + +=== constDeclarations-invalidContexts.ts === +// Errors, const must be defined inside a block +if (true) +>true : true +> : ^^^^ + + const c1 = 0; +>c1 : 0 +> : ^ +>0 : 0 +> : ^ + +else + const c2 = 0; +>c2 : 0 +> : ^ +>0 : 0 +> : ^ + +while (true) +>true : true +> : ^^^^ + + const c3 = 0; +>c3 : 0 +> : ^ +>0 : 0 +> : ^ + +do + const c4 = 0; +>c4 : 0 +> : ^ +>0 : 0 +> : ^ + +while (true); +>true : true +> : ^^^^ + +var obj; +>obj : any +> : ^^^ + +with (obj) +>obj : any +> : ^^^ + + const c5 = 0; // No Error will be reported here since we turn off all type checking +>c5 : any +> : ^^^ +>0 : any +> : ^^^ + +for (var i = 0; i < 10; i++) +>i : number +> : ^^^^^^ +>0 : 0 +> : ^ +>i < 10 : boolean +> : ^^^^^^^ +>i : number +> : ^^^^^^ +>10 : 10 +> : ^^ +>i++ : number +> : ^^^^^^ +>i : number +> : ^^^^^^ + + const c6 = 0; +>c6 : 0 +> : ^ +>0 : 0 +> : ^ + +for (var i2 in {}) +>i2 : string +> : ^^^^^^ +>{} : {} +> : ^^ + + const c7 = 0; +>c7 : 0 +> : ^ +>0 : 0 +> : ^ + +if (true) +>true : true +> : ^^^^ + + label: const c8 = 0; +>label : any +> : ^^^ +>c8 : 0 +> : ^ +>0 : 0 +> : ^ + +while (false) +>false : false +> : ^^^^^ + + label2: label3: label4: const c9 = 0; +>label2 : any +> : ^^^ +>label3 : any +> : ^^^ +>label4 : any +> : ^^^ +>c9 : 0 +> : ^ +>0 : 0 +> : ^ + + + + diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).errors.txt b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..953604c1da149 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).errors.txt @@ -0,0 +1,71 @@ +constDeclarations-invalidContexts.ts(3,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(5,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(8,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(11,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(15,1): error TS1101: 'with' statements are not allowed in strict mode. +constDeclarations-invalidContexts.ts(15,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +constDeclarations-invalidContexts.ts(19,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(22,5): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(25,5): error TS1344: 'A label is not allowed here. +constDeclarations-invalidContexts.ts(25,12): error TS1156: 'const' declarations can only be declared inside a block. +constDeclarations-invalidContexts.ts(28,21): error TS1344: 'A label is not allowed here. +constDeclarations-invalidContexts.ts(28,29): error TS1156: 'const' declarations can only be declared inside a block. + + +==== constDeclarations-invalidContexts.ts (12 errors) ==== + // Errors, const must be defined inside a block + if (true) + const c1 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + else + const c2 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + while (true) + const c3 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + do + const c4 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + while (true); + + var obj; + with (obj) + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + const c5 = 0; // No Error will be reported here since we turn off all type checking + + for (var i = 0; i < 10; i++) + const c6 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + for (var i2 in {}) + const c7 = 0; + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + if (true) + label: const c8 = 0; + ~~~~~ +!!! error TS1344: 'A label is not allowed here. + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + while (false) + label2: label3: label4: const c9 = 0; + ~~~~~~ +!!! error TS1344: 'A label is not allowed here. + ~~~~~~~~~~~~~ +!!! error TS1156: 'const' declarations can only be declared inside a block. + + + + \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).symbols b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..f85a1f2738dab --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).symbols @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// + +=== constDeclarations-invalidContexts.ts === +// Errors, const must be defined inside a block +if (true) + const c1 = 0; +>c1 : Symbol(c1, Decl(constDeclarations-invalidContexts.ts, 2, 9)) + +else + const c2 = 0; +>c2 : Symbol(c2, Decl(constDeclarations-invalidContexts.ts, 4, 9)) + +while (true) + const c3 = 0; +>c3 : Symbol(c3, Decl(constDeclarations-invalidContexts.ts, 7, 9)) + +do + const c4 = 0; +>c4 : Symbol(c4, Decl(constDeclarations-invalidContexts.ts, 10, 9)) + +while (true); + +var obj; +>obj : Symbol(obj, Decl(constDeclarations-invalidContexts.ts, 13, 3)) + +with (obj) +>obj : Symbol(obj, Decl(constDeclarations-invalidContexts.ts, 13, 3)) + + const c5 = 0; // No Error will be reported here since we turn off all type checking + +for (var i = 0; i < 10; i++) +>i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) +>i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) +>i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) + + const c6 = 0; +>c6 : Symbol(c6, Decl(constDeclarations-invalidContexts.ts, 18, 9)) + +for (var i2 in {}) +>i2 : Symbol(i2, Decl(constDeclarations-invalidContexts.ts, 20, 8)) + + const c7 = 0; +>c7 : Symbol(c7, Decl(constDeclarations-invalidContexts.ts, 21, 9)) + +if (true) + label: const c8 = 0; +>c8 : Symbol(c8, Decl(constDeclarations-invalidContexts.ts, 24, 16)) + +while (false) + label2: label3: label4: const c9 = 0; +>c9 : Symbol(c9, Decl(constDeclarations-invalidContexts.ts, 27, 33)) + + + + diff --git a/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).types b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).types new file mode 100644 index 0000000000000..c994ab6621eb4 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-invalidContexts(alwaysstrict=true).types @@ -0,0 +1,121 @@ +//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// + +=== constDeclarations-invalidContexts.ts === +// Errors, const must be defined inside a block +if (true) +>true : true +> : ^^^^ + + const c1 = 0; +>c1 : 0 +> : ^ +>0 : 0 +> : ^ + +else + const c2 = 0; +>c2 : 0 +> : ^ +>0 : 0 +> : ^ + +while (true) +>true : true +> : ^^^^ + + const c3 = 0; +>c3 : 0 +> : ^ +>0 : 0 +> : ^ + +do + const c4 = 0; +>c4 : 0 +> : ^ +>0 : 0 +> : ^ + +while (true); +>true : true +> : ^^^^ + +var obj; +>obj : any +> : ^^^ + +with (obj) +>obj : any +> : ^^^ + + const c5 = 0; // No Error will be reported here since we turn off all type checking +>c5 : any +> : ^^^ +>0 : any +> : ^^^ + +for (var i = 0; i < 10; i++) +>i : number +> : ^^^^^^ +>0 : 0 +> : ^ +>i < 10 : boolean +> : ^^^^^^^ +>i : number +> : ^^^^^^ +>10 : 10 +> : ^^ +>i++ : number +> : ^^^^^^ +>i : number +> : ^^^^^^ + + const c6 = 0; +>c6 : 0 +> : ^ +>0 : 0 +> : ^ + +for (var i2 in {}) +>i2 : string +> : ^^^^^^ +>{} : {} +> : ^^ + + const c7 = 0; +>c7 : 0 +> : ^ +>0 : 0 +> : ^ + +if (true) +>true : true +> : ^^^^ + + label: const c8 = 0; +>label : any +> : ^^^ +>c8 : 0 +> : ^ +>0 : 0 +> : ^ + +while (false) +>false : false +> : ^^^^^ + + label2: label3: label4: const c9 = 0; +>label2 : any +> : ^^^ +>label3 : any +> : ^^^ +>label4 : any +> : ^^^ +>c9 : 0 +> : ^ +>0 : 0 +> : ^ + + + + diff --git a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt b/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt index 7134a60544137..267bc161474d1 100644 --- a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt +++ b/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. constDeclarations-invalidContexts.ts(3,5): error TS1156: 'const' declarations can only be declared inside a block. constDeclarations-invalidContexts.ts(5,5): error TS1156: 'const' declarations can only be declared inside a block. constDeclarations-invalidContexts.ts(8,5): error TS1156: 'const' declarations can only be declared inside a block. @@ -9,6 +10,7 @@ constDeclarations-invalidContexts.ts(25,12): error TS1156: 'const' declarations constDeclarations-invalidContexts.ts(28,29): error TS1156: 'const' declarations can only be declared inside a block. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== constDeclarations-invalidContexts.ts (9 errors) ==== // Errors, const must be defined inside a block if (true) diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).errors.txt b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..a715ebc860a44 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).errors.txt @@ -0,0 +1,152 @@ +constDeclarations-scopes.ts(27,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + + +==== constDeclarations-scopes.ts (1 errors) ==== + // global + const c = "string"; + + var n: number; + + // Control flow statements with blocks + if (true) { + const c = 0; + n = c; + } + else { + const c = 0; + n = c; + } + + while (true) { + const c = 0; + n = c; + } + + do { + const c = 0; + n = c; + } while (true); + + var obj; + with (obj) { + ~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + const c = 0; + n = c; + } + + for (var i = 0; i < 10; i++) { + const c = 0; + n = c; + } + + for (var i2 in {}) { + const c = 0; + n = c; + } + + if (true) { + label: const c = 0; + n = c; + } + + while (false) { + label2: label3: label4: const c = 0; + n = c; + } + + // Try/catch/finally + try { + const c = 0; + n = c; + } + catch (e) { + const c = 0; + n = c; + } + finally { + const c = 0; + n = c; + } + + // Switch + switch (0) { + case 0: + const c = 0; + n = c; + break; + } + + // blocks + { + const c = 0; + n = c; + { + const c = false; + var b: boolean = c; + } + } + + // functions + + function F() { + const c = 0; + n = c; + } + + var F2 = () => { + const c = 0; + n = c; + }; + + var F3 = function () { + const c = 0; + n = c; + }; + + // modules + namespace m { + const c = 0; + n = c; + + { + const c = false; + var b2: boolean = c; + } + } + + // methods + class C { + constructor() { + const c = 0; + n = c; + } + + method() { + const c = 0; + n = c; + } + + get v() { + const c = 0; + n = c; + return n; + } + + set v(value) { + const c = 0; + n = c; + } + } + + // object literals + var o = { + f() { + const c = 0; + n = c; + }, + f2: () => { + const c = 0; + n = c; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).symbols b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..6093e1a4ada4b --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).symbols @@ -0,0 +1,293 @@ +//// [tests/cases/compiler/constDeclarations-scopes.ts] //// + +=== constDeclarations-scopes.ts === +// global +const c = "string"; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 1, 5)) + +var n: number; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) + +// Control flow statements with blocks +if (true) { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 7, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 7, 9)) +} +else { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 11, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 11, 9)) +} + +while (true) { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 16, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 16, 9)) +} + +do { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 21, 8)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 21, 8)) + +} while (true); + +var obj; +>obj : Symbol(obj, Decl(constDeclarations-scopes.ts, 25, 3)) + +with (obj) { +>obj : Symbol(obj, Decl(constDeclarations-scopes.ts, 25, 3)) + + const c = 0; + n = c; +} + +for (var i = 0; i < 10; i++) { +>i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) +>i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) +>i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 32, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 32, 9)) +} + +for (var i2 in {}) { +>i2 : Symbol(i2, Decl(constDeclarations-scopes.ts, 36, 8)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 37, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 37, 9)) +} + +if (true) { + label: const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 42, 16)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 42, 16)) +} + +while (false) { + label2: label3: label4: const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 47, 33)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 47, 33)) +} + +// Try/catch/finally +try { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 53, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 53, 9)) +} +catch (e) { +>e : Symbol(e, Decl(constDeclarations-scopes.ts, 56, 7)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 57, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 57, 9)) +} +finally { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 61, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 61, 9)) +} + +// Switch +switch (0) { + case 0: + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 68, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 68, 13)) + + break; +} + +// blocks +{ + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 75, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 75, 9)) + { + const c = false; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 78, 13)) + + var b: boolean = c; +>b : Symbol(b, Decl(constDeclarations-scopes.ts, 79, 11)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 78, 13)) + } +} + +// functions + +function F() { +>F : Symbol(F, Decl(constDeclarations-scopes.ts, 81, 1)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 86, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 86, 9)) +} + +var F2 = () => { +>F2 : Symbol(F2, Decl(constDeclarations-scopes.ts, 90, 3)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 91, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 91, 9)) + +}; + +var F3 = function () { +>F3 : Symbol(F3, Decl(constDeclarations-scopes.ts, 95, 3)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 96, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 96, 9)) + +}; + +// modules +namespace m { +>m : Symbol(m, Decl(constDeclarations-scopes.ts, 98, 2)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 102, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 102, 9)) + + { + const c = false; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 106, 12)) + + var b2: boolean = c; +>b2 : Symbol(b2, Decl(constDeclarations-scopes.ts, 107, 10)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 106, 12)) + } +} + +// methods +class C { +>C : Symbol(C, Decl(constDeclarations-scopes.ts, 109, 1)) + + constructor() { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 114, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 114, 13)) + } + + method() { +>method : Symbol(C.method, Decl(constDeclarations-scopes.ts, 116, 5)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 119, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 119, 13)) + } + + get v() { +>v : Symbol(C.v, Decl(constDeclarations-scopes.ts, 121, 5), Decl(constDeclarations-scopes.ts, 127, 5)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 124, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 124, 13)) + + return n; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) + } + + set v(value) { +>v : Symbol(C.v, Decl(constDeclarations-scopes.ts, 121, 5), Decl(constDeclarations-scopes.ts, 127, 5)) +>value : Symbol(value, Decl(constDeclarations-scopes.ts, 129, 10)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 130, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 130, 13)) + } +} + +// object literals +var o = { +>o : Symbol(o, Decl(constDeclarations-scopes.ts, 136, 3)) + + f() { +>f : Symbol(f, Decl(constDeclarations-scopes.ts, 136, 9)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 138, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 138, 13)) + + }, + f2: () => { +>f2 : Symbol(f2, Decl(constDeclarations-scopes.ts, 140, 6)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 142, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 142, 13)) + } +} diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).types b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).types new file mode 100644 index 0000000000000..78aa5573412bc --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=false).types @@ -0,0 +1,545 @@ +//// [tests/cases/compiler/constDeclarations-scopes.ts] //// + +=== constDeclarations-scopes.ts === +// global +const c = "string"; +>c : "string" +> : ^^^^^^^^ +>"string" : "string" +> : ^^^^^^^^ + +var n: number; +>n : number +> : ^^^^^^ + +// Control flow statements with blocks +if (true) { +>true : true +> : ^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} +else { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +while (true) { +>true : true +> : ^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +do { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + +} while (true); +>true : true +> : ^^^^ + +var obj; +>obj : any +> : ^^^ + +with (obj) { +>obj : any +> : ^^^ + + const c = 0; +>c : any +> : ^^^ +>0 : any +> : ^^^ + + n = c; +>n = c : any +> : ^^^ +>n : any +> : ^^^ +>c : any +> : ^^^ +} + +for (var i = 0; i < 10; i++) { +>i : number +> : ^^^^^^ +>0 : 0 +> : ^ +>i < 10 : boolean +> : ^^^^^^^ +>i : number +> : ^^^^^^ +>10 : 10 +> : ^^ +>i++ : number +> : ^^^^^^ +>i : number +> : ^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +for (var i2 in {}) { +>i2 : string +> : ^^^^^^ +>{} : {} +> : ^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +if (true) { +>true : true +> : ^^^^ + + label: const c = 0; +>label : any +> : ^^^ +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +while (false) { +>false : false +> : ^^^^^ + + label2: label3: label4: const c = 0; +>label2 : any +> : ^^^ +>label3 : any +> : ^^^ +>label4 : any +> : ^^^ +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +// Try/catch/finally +try { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} +catch (e) { +>e : any +> : ^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} +finally { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +// Switch +switch (0) { +>0 : 0 +> : ^ + + case 0: +>0 : 0 +> : ^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + break; +} + +// blocks +{ + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + { + const c = false; +>c : false +> : ^^^^^ +>false : false +> : ^^^^^ + + var b: boolean = c; +>b : boolean +> : ^^^^^^^ +>c : false +> : ^^^^^ + } +} + +// functions + +function F() { +>F : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +var F2 = () => { +>F2 : () => void +> : ^^^^^^^^^^ +>() => { const c = 0; n = c;} : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + +}; + +var F3 = function () { +>F3 : () => void +> : ^^^^^^^^^^ +>function () { const c = 0; n = c;} : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + +}; + +// modules +namespace m { +>m : typeof m +> : ^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + { + const c = false; +>c : false +> : ^^^^^ +>false : false +> : ^^^^^ + + var b2: boolean = c; +>b2 : boolean +> : ^^^^^^^ +>c : false +> : ^^^^^ + } +} + +// methods +class C { +>C : C +> : ^ + + constructor() { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } + + method() { +>method : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } + + get v() { +>v : number +> : ^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + return n; +>n : number +> : ^^^^^^ + } + + set v(value) { +>v : number +> : ^^^^^^ +>value : number +> : ^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } +} + +// object literals +var o = { +>o : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ f() { const c = 0; n = c; }, f2: () => { const c = 0; n = c; }} : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + f() { +>f : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + }, + f2: () => { +>f2 : () => void +> : ^^^^^^^^^^ +>() => { const c = 0; n = c; } : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } +} diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).errors.txt b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..8b260da649e04 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).errors.txt @@ -0,0 +1,161 @@ +constDeclarations-scopes.ts(27,1): error TS1101: 'with' statements are not allowed in strict mode. +constDeclarations-scopes.ts(27,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +constDeclarations-scopes.ts(43,5): error TS1344: 'A label is not allowed here. +constDeclarations-scopes.ts(48,21): error TS1344: 'A label is not allowed here. + + +==== constDeclarations-scopes.ts (4 errors) ==== + // global + const c = "string"; + + var n: number; + + // Control flow statements with blocks + if (true) { + const c = 0; + n = c; + } + else { + const c = 0; + n = c; + } + + while (true) { + const c = 0; + n = c; + } + + do { + const c = 0; + n = c; + } while (true); + + var obj; + with (obj) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + const c = 0; + n = c; + } + + for (var i = 0; i < 10; i++) { + const c = 0; + n = c; + } + + for (var i2 in {}) { + const c = 0; + n = c; + } + + if (true) { + label: const c = 0; + ~~~~~ +!!! error TS1344: 'A label is not allowed here. + n = c; + } + + while (false) { + label2: label3: label4: const c = 0; + ~~~~~~ +!!! error TS1344: 'A label is not allowed here. + n = c; + } + + // Try/catch/finally + try { + const c = 0; + n = c; + } + catch (e) { + const c = 0; + n = c; + } + finally { + const c = 0; + n = c; + } + + // Switch + switch (0) { + case 0: + const c = 0; + n = c; + break; + } + + // blocks + { + const c = 0; + n = c; + { + const c = false; + var b: boolean = c; + } + } + + // functions + + function F() { + const c = 0; + n = c; + } + + var F2 = () => { + const c = 0; + n = c; + }; + + var F3 = function () { + const c = 0; + n = c; + }; + + // modules + namespace m { + const c = 0; + n = c; + + { + const c = false; + var b2: boolean = c; + } + } + + // methods + class C { + constructor() { + const c = 0; + n = c; + } + + method() { + const c = 0; + n = c; + } + + get v() { + const c = 0; + n = c; + return n; + } + + set v(value) { + const c = 0; + n = c; + } + } + + // object literals + var o = { + f() { + const c = 0; + n = c; + }, + f2: () => { + const c = 0; + n = c; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).symbols b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..6093e1a4ada4b --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).symbols @@ -0,0 +1,293 @@ +//// [tests/cases/compiler/constDeclarations-scopes.ts] //// + +=== constDeclarations-scopes.ts === +// global +const c = "string"; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 1, 5)) + +var n: number; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) + +// Control flow statements with blocks +if (true) { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 7, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 7, 9)) +} +else { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 11, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 11, 9)) +} + +while (true) { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 16, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 16, 9)) +} + +do { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 21, 8)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 21, 8)) + +} while (true); + +var obj; +>obj : Symbol(obj, Decl(constDeclarations-scopes.ts, 25, 3)) + +with (obj) { +>obj : Symbol(obj, Decl(constDeclarations-scopes.ts, 25, 3)) + + const c = 0; + n = c; +} + +for (var i = 0; i < 10; i++) { +>i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) +>i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) +>i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 32, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 32, 9)) +} + +for (var i2 in {}) { +>i2 : Symbol(i2, Decl(constDeclarations-scopes.ts, 36, 8)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 37, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 37, 9)) +} + +if (true) { + label: const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 42, 16)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 42, 16)) +} + +while (false) { + label2: label3: label4: const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 47, 33)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 47, 33)) +} + +// Try/catch/finally +try { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 53, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 53, 9)) +} +catch (e) { +>e : Symbol(e, Decl(constDeclarations-scopes.ts, 56, 7)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 57, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 57, 9)) +} +finally { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 61, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 61, 9)) +} + +// Switch +switch (0) { + case 0: + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 68, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 68, 13)) + + break; +} + +// blocks +{ + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 75, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 75, 9)) + { + const c = false; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 78, 13)) + + var b: boolean = c; +>b : Symbol(b, Decl(constDeclarations-scopes.ts, 79, 11)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 78, 13)) + } +} + +// functions + +function F() { +>F : Symbol(F, Decl(constDeclarations-scopes.ts, 81, 1)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 86, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 86, 9)) +} + +var F2 = () => { +>F2 : Symbol(F2, Decl(constDeclarations-scopes.ts, 90, 3)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 91, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 91, 9)) + +}; + +var F3 = function () { +>F3 : Symbol(F3, Decl(constDeclarations-scopes.ts, 95, 3)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 96, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 96, 9)) + +}; + +// modules +namespace m { +>m : Symbol(m, Decl(constDeclarations-scopes.ts, 98, 2)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 102, 9)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 102, 9)) + + { + const c = false; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 106, 12)) + + var b2: boolean = c; +>b2 : Symbol(b2, Decl(constDeclarations-scopes.ts, 107, 10)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 106, 12)) + } +} + +// methods +class C { +>C : Symbol(C, Decl(constDeclarations-scopes.ts, 109, 1)) + + constructor() { + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 114, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 114, 13)) + } + + method() { +>method : Symbol(C.method, Decl(constDeclarations-scopes.ts, 116, 5)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 119, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 119, 13)) + } + + get v() { +>v : Symbol(C.v, Decl(constDeclarations-scopes.ts, 121, 5), Decl(constDeclarations-scopes.ts, 127, 5)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 124, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 124, 13)) + + return n; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) + } + + set v(value) { +>v : Symbol(C.v, Decl(constDeclarations-scopes.ts, 121, 5), Decl(constDeclarations-scopes.ts, 127, 5)) +>value : Symbol(value, Decl(constDeclarations-scopes.ts, 129, 10)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 130, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 130, 13)) + } +} + +// object literals +var o = { +>o : Symbol(o, Decl(constDeclarations-scopes.ts, 136, 3)) + + f() { +>f : Symbol(f, Decl(constDeclarations-scopes.ts, 136, 9)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 138, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 138, 13)) + + }, + f2: () => { +>f2 : Symbol(f2, Decl(constDeclarations-scopes.ts, 140, 6)) + + const c = 0; +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 142, 13)) + + n = c; +>n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) +>c : Symbol(c, Decl(constDeclarations-scopes.ts, 142, 13)) + } +} diff --git a/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).types b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).types new file mode 100644 index 0000000000000..78aa5573412bc --- /dev/null +++ b/tests/baselines/reference/constDeclarations-scopes(alwaysstrict=true).types @@ -0,0 +1,545 @@ +//// [tests/cases/compiler/constDeclarations-scopes.ts] //// + +=== constDeclarations-scopes.ts === +// global +const c = "string"; +>c : "string" +> : ^^^^^^^^ +>"string" : "string" +> : ^^^^^^^^ + +var n: number; +>n : number +> : ^^^^^^ + +// Control flow statements with blocks +if (true) { +>true : true +> : ^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} +else { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +while (true) { +>true : true +> : ^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +do { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + +} while (true); +>true : true +> : ^^^^ + +var obj; +>obj : any +> : ^^^ + +with (obj) { +>obj : any +> : ^^^ + + const c = 0; +>c : any +> : ^^^ +>0 : any +> : ^^^ + + n = c; +>n = c : any +> : ^^^ +>n : any +> : ^^^ +>c : any +> : ^^^ +} + +for (var i = 0; i < 10; i++) { +>i : number +> : ^^^^^^ +>0 : 0 +> : ^ +>i < 10 : boolean +> : ^^^^^^^ +>i : number +> : ^^^^^^ +>10 : 10 +> : ^^ +>i++ : number +> : ^^^^^^ +>i : number +> : ^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +for (var i2 in {}) { +>i2 : string +> : ^^^^^^ +>{} : {} +> : ^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +if (true) { +>true : true +> : ^^^^ + + label: const c = 0; +>label : any +> : ^^^ +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +while (false) { +>false : false +> : ^^^^^ + + label2: label3: label4: const c = 0; +>label2 : any +> : ^^^ +>label3 : any +> : ^^^ +>label4 : any +> : ^^^ +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +// Try/catch/finally +try { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} +catch (e) { +>e : any +> : ^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} +finally { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +// Switch +switch (0) { +>0 : 0 +> : ^ + + case 0: +>0 : 0 +> : ^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + break; +} + +// blocks +{ + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + { + const c = false; +>c : false +> : ^^^^^ +>false : false +> : ^^^^^ + + var b: boolean = c; +>b : boolean +> : ^^^^^^^ +>c : false +> : ^^^^^ + } +} + +// functions + +function F() { +>F : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ +} + +var F2 = () => { +>F2 : () => void +> : ^^^^^^^^^^ +>() => { const c = 0; n = c;} : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + +}; + +var F3 = function () { +>F3 : () => void +> : ^^^^^^^^^^ +>function () { const c = 0; n = c;} : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + +}; + +// modules +namespace m { +>m : typeof m +> : ^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + { + const c = false; +>c : false +> : ^^^^^ +>false : false +> : ^^^^^ + + var b2: boolean = c; +>b2 : boolean +> : ^^^^^^^ +>c : false +> : ^^^^^ + } +} + +// methods +class C { +>C : C +> : ^ + + constructor() { + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } + + method() { +>method : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } + + get v() { +>v : number +> : ^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + return n; +>n : number +> : ^^^^^^ + } + + set v(value) { +>v : number +> : ^^^^^^ +>value : number +> : ^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } +} + +// object literals +var o = { +>o : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ f() { const c = 0; n = c; }, f2: () => { const c = 0; n = c; }} : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + f() { +>f : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + + }, + f2: () => { +>f2 : () => void +> : ^^^^^^^^^^ +>() => { const c = 0; n = c; } : () => void +> : ^^^^^^^^^^ + + const c = 0; +>c : 0 +> : ^ +>0 : 0 +> : ^ + + n = c; +>n = c : 0 +> : ^ +>n : number +> : ^^^^^^ +>c : 0 +> : ^ + } +} diff --git a/tests/baselines/reference/constDeclarations-scopes.errors.txt b/tests/baselines/reference/constDeclarations-scopes.errors.txt index a715ebc860a44..d3ca880a9cbda 100644 --- a/tests/baselines/reference/constDeclarations-scopes.errors.txt +++ b/tests/baselines/reference/constDeclarations-scopes.errors.txt @@ -1,6 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. constDeclarations-scopes.ts(27,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== constDeclarations-scopes.ts (1 errors) ==== // global const c = "string"; diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).errors.txt b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..ea2262681bf38 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).errors.txt @@ -0,0 +1,127 @@ +constDeclarations-validContexts.ts(18,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + + +==== constDeclarations-validContexts.ts (1 errors) ==== + // Control flow statements with blocks + if (true) { + const c1 = 0; + } + else { + const c2 = 0; + } + + while (true) { + const c3 = 0; + } + + do { + const c4 = 0; + } while (true); + + var obj; + with (obj) { + ~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + const c5 = 0; + } + + for (var i = 0; i < 10; i++) { + const c6 = 0; + } + + for (var i2 in {}) { + const c7 = 0; + } + + if (true) { + label: const c8 = 0; + } + + while (false) { + label2: label3: label4: const c9 = 0; + } + + // Try/catch/finally + try { + const c10 = 0; + } + catch (e) { + const c11 = 0; + } + finally { + const c12 = 0; + } + + // Switch + switch (0) { + case 0: + const c13 = 0; + break; + default: + const c14 = 0; + break; + } + + // blocks + { + const c15 = 0; + { + const c16 = 0 + label17: const c17 = 0; + } + } + + // global + const c18 = 0; + + // functions + function F() { + const c19 = 0; + } + + var F2 = () => { + const c20 = 0; + }; + + var F3 = function () { + const c21 = 0; + }; + + // modules + namespace m { + const c22 = 0; + + { + const c23 = 0; + } + } + + // methods + class C { + constructor() { + const c24 = 0; + } + + method() { + const c25 = 0; + } + + get v() { + const c26 = 0; + return c26; + } + + set v(value) { + const c27 = value; + } + } + + // object literals + var o = { + f() { + const c28 = 0; + }, + f2: () => { + const c29 = 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).symbols b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..3496aabc5bb02 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).symbols @@ -0,0 +1,197 @@ +//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// + +=== constDeclarations-validContexts.ts === +// Control flow statements with blocks +if (true) { + const c1 = 0; +>c1 : Symbol(c1, Decl(constDeclarations-validContexts.ts, 2, 9)) +} +else { + const c2 = 0; +>c2 : Symbol(c2, Decl(constDeclarations-validContexts.ts, 5, 9)) +} + +while (true) { + const c3 = 0; +>c3 : Symbol(c3, Decl(constDeclarations-validContexts.ts, 9, 9)) +} + +do { + const c4 = 0; +>c4 : Symbol(c4, Decl(constDeclarations-validContexts.ts, 13, 9)) + +} while (true); + +var obj; +>obj : Symbol(obj, Decl(constDeclarations-validContexts.ts, 16, 3)) + +with (obj) { +>obj : Symbol(obj, Decl(constDeclarations-validContexts.ts, 16, 3)) + + const c5 = 0; +} + +for (var i = 0; i < 10; i++) { +>i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) +>i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) +>i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) + + const c6 = 0; +>c6 : Symbol(c6, Decl(constDeclarations-validContexts.ts, 22, 9)) +} + +for (var i2 in {}) { +>i2 : Symbol(i2, Decl(constDeclarations-validContexts.ts, 25, 8)) + + const c7 = 0; +>c7 : Symbol(c7, Decl(constDeclarations-validContexts.ts, 26, 9)) +} + +if (true) { + label: const c8 = 0; +>c8 : Symbol(c8, Decl(constDeclarations-validContexts.ts, 30, 16)) +} + +while (false) { + label2: label3: label4: const c9 = 0; +>c9 : Symbol(c9, Decl(constDeclarations-validContexts.ts, 34, 33)) +} + +// Try/catch/finally +try { + const c10 = 0; +>c10 : Symbol(c10, Decl(constDeclarations-validContexts.ts, 39, 9)) +} +catch (e) { +>e : Symbol(e, Decl(constDeclarations-validContexts.ts, 41, 7)) + + const c11 = 0; +>c11 : Symbol(c11, Decl(constDeclarations-validContexts.ts, 42, 9)) +} +finally { + const c12 = 0; +>c12 : Symbol(c12, Decl(constDeclarations-validContexts.ts, 45, 9)) +} + +// Switch +switch (0) { + case 0: + const c13 = 0; +>c13 : Symbol(c13, Decl(constDeclarations-validContexts.ts, 51, 13)) + + break; + default: + const c14 = 0; +>c14 : Symbol(c14, Decl(constDeclarations-validContexts.ts, 54, 13)) + + break; +} + +// blocks +{ + const c15 = 0; +>c15 : Symbol(c15, Decl(constDeclarations-validContexts.ts, 60, 9)) + { + const c16 = 0 +>c16 : Symbol(c16, Decl(constDeclarations-validContexts.ts, 62, 13)) + + label17: const c17 = 0; +>c17 : Symbol(c17, Decl(constDeclarations-validContexts.ts, 63, 22)) + } +} + +// global +const c18 = 0; +>c18 : Symbol(c18, Decl(constDeclarations-validContexts.ts, 68, 5)) + +// functions +function F() { +>F : Symbol(F, Decl(constDeclarations-validContexts.ts, 68, 14)) + + const c19 = 0; +>c19 : Symbol(c19, Decl(constDeclarations-validContexts.ts, 72, 9)) +} + +var F2 = () => { +>F2 : Symbol(F2, Decl(constDeclarations-validContexts.ts, 75, 3)) + + const c20 = 0; +>c20 : Symbol(c20, Decl(constDeclarations-validContexts.ts, 76, 9)) + +}; + +var F3 = function () { +>F3 : Symbol(F3, Decl(constDeclarations-validContexts.ts, 79, 3)) + + const c21 = 0; +>c21 : Symbol(c21, Decl(constDeclarations-validContexts.ts, 80, 9)) + +}; + +// modules +namespace m { +>m : Symbol(m, Decl(constDeclarations-validContexts.ts, 81, 2)) + + const c22 = 0; +>c22 : Symbol(c22, Decl(constDeclarations-validContexts.ts, 85, 9)) + + { + const c23 = 0; +>c23 : Symbol(c23, Decl(constDeclarations-validContexts.ts, 88, 15)) + } +} + +// methods +class C { +>C : Symbol(C, Decl(constDeclarations-validContexts.ts, 90, 1)) + + constructor() { + const c24 = 0; +>c24 : Symbol(c24, Decl(constDeclarations-validContexts.ts, 95, 13)) + } + + method() { +>method : Symbol(C.method, Decl(constDeclarations-validContexts.ts, 96, 5)) + + const c25 = 0; +>c25 : Symbol(c25, Decl(constDeclarations-validContexts.ts, 99, 13)) + } + + get v() { +>v : Symbol(C.v, Decl(constDeclarations-validContexts.ts, 100, 5), Decl(constDeclarations-validContexts.ts, 105, 5)) + + const c26 = 0; +>c26 : Symbol(c26, Decl(constDeclarations-validContexts.ts, 103, 13)) + + return c26; +>c26 : Symbol(c26, Decl(constDeclarations-validContexts.ts, 103, 13)) + } + + set v(value) { +>v : Symbol(C.v, Decl(constDeclarations-validContexts.ts, 100, 5), Decl(constDeclarations-validContexts.ts, 105, 5)) +>value : Symbol(value, Decl(constDeclarations-validContexts.ts, 107, 10)) + + const c27 = value; +>c27 : Symbol(c27, Decl(constDeclarations-validContexts.ts, 108, 13)) +>value : Symbol(value, Decl(constDeclarations-validContexts.ts, 107, 10)) + } +} + +// object literals +var o = { +>o : Symbol(o, Decl(constDeclarations-validContexts.ts, 113, 3)) + + f() { +>f : Symbol(f, Decl(constDeclarations-validContexts.ts, 113, 9)) + + const c28 = 0; +>c28 : Symbol(c28, Decl(constDeclarations-validContexts.ts, 115, 13)) + + }, + f2: () => { +>f2 : Symbol(f2, Decl(constDeclarations-validContexts.ts, 116, 6)) + + const c29 = 0; +>c29 : Symbol(c29, Decl(constDeclarations-validContexts.ts, 118, 13)) + } +} diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).types b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).types new file mode 100644 index 0000000000000..7ca9c9b2f2dd3 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=false).types @@ -0,0 +1,352 @@ +//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// + +=== constDeclarations-validContexts.ts === +// Control flow statements with blocks +if (true) { +>true : true +> : ^^^^ + + const c1 = 0; +>c1 : 0 +> : ^ +>0 : 0 +> : ^ +} +else { + const c2 = 0; +>c2 : 0 +> : ^ +>0 : 0 +> : ^ +} + +while (true) { +>true : true +> : ^^^^ + + const c3 = 0; +>c3 : 0 +> : ^ +>0 : 0 +> : ^ +} + +do { + const c4 = 0; +>c4 : 0 +> : ^ +>0 : 0 +> : ^ + +} while (true); +>true : true +> : ^^^^ + +var obj; +>obj : any +> : ^^^ + +with (obj) { +>obj : any +> : ^^^ + + const c5 = 0; +>c5 : any +> : ^^^ +>0 : any +> : ^^^ +} + +for (var i = 0; i < 10; i++) { +>i : number +> : ^^^^^^ +>0 : 0 +> : ^ +>i < 10 : boolean +> : ^^^^^^^ +>i : number +> : ^^^^^^ +>10 : 10 +> : ^^ +>i++ : number +> : ^^^^^^ +>i : number +> : ^^^^^^ + + const c6 = 0; +>c6 : 0 +> : ^ +>0 : 0 +> : ^ +} + +for (var i2 in {}) { +>i2 : string +> : ^^^^^^ +>{} : {} +> : ^^ + + const c7 = 0; +>c7 : 0 +> : ^ +>0 : 0 +> : ^ +} + +if (true) { +>true : true +> : ^^^^ + + label: const c8 = 0; +>label : any +> : ^^^ +>c8 : 0 +> : ^ +>0 : 0 +> : ^ +} + +while (false) { +>false : false +> : ^^^^^ + + label2: label3: label4: const c9 = 0; +>label2 : any +> : ^^^ +>label3 : any +> : ^^^ +>label4 : any +> : ^^^ +>c9 : 0 +> : ^ +>0 : 0 +> : ^ +} + +// Try/catch/finally +try { + const c10 = 0; +>c10 : 0 +> : ^ +>0 : 0 +> : ^ +} +catch (e) { +>e : any +> : ^^^ + + const c11 = 0; +>c11 : 0 +> : ^ +>0 : 0 +> : ^ +} +finally { + const c12 = 0; +>c12 : 0 +> : ^ +>0 : 0 +> : ^ +} + +// Switch +switch (0) { +>0 : 0 +> : ^ + + case 0: +>0 : 0 +> : ^ + + const c13 = 0; +>c13 : 0 +> : ^ +>0 : 0 +> : ^ + + break; + default: + const c14 = 0; +>c14 : 0 +> : ^ +>0 : 0 +> : ^ + + break; +} + +// blocks +{ + const c15 = 0; +>c15 : 0 +> : ^ +>0 : 0 +> : ^ + { + const c16 = 0 +>c16 : 0 +> : ^ +>0 : 0 +> : ^ + + label17: const c17 = 0; +>label17 : any +> : ^^^ +>c17 : 0 +> : ^ +>0 : 0 +> : ^ + } +} + +// global +const c18 = 0; +>c18 : 0 +> : ^ +>0 : 0 +> : ^ + +// functions +function F() { +>F : () => void +> : ^^^^^^^^^^ + + const c19 = 0; +>c19 : 0 +> : ^ +>0 : 0 +> : ^ +} + +var F2 = () => { +>F2 : () => void +> : ^^^^^^^^^^ +>() => { const c20 = 0;} : () => void +> : ^^^^^^^^^^ + + const c20 = 0; +>c20 : 0 +> : ^ +>0 : 0 +> : ^ + +}; + +var F3 = function () { +>F3 : () => void +> : ^^^^^^^^^^ +>function () { const c21 = 0;} : () => void +> : ^^^^^^^^^^ + + const c21 = 0; +>c21 : 0 +> : ^ +>0 : 0 +> : ^ + +}; + +// modules +namespace m { +>m : typeof m +> : ^^^^^^^^ + + const c22 = 0; +>c22 : 0 +> : ^ +>0 : 0 +> : ^ + + { + const c23 = 0; +>c23 : 0 +> : ^ +>0 : 0 +> : ^ + } +} + +// methods +class C { +>C : C +> : ^ + + constructor() { + const c24 = 0; +>c24 : 0 +> : ^ +>0 : 0 +> : ^ + } + + method() { +>method : () => void +> : ^^^^^^^^^^ + + const c25 = 0; +>c25 : 0 +> : ^ +>0 : 0 +> : ^ + } + + get v() { +>v : number +> : ^^^^^^ + + const c26 = 0; +>c26 : 0 +> : ^ +>0 : 0 +> : ^ + + return c26; +>c26 : 0 +> : ^ + } + + set v(value) { +>v : number +> : ^^^^^^ +>value : number +> : ^^^^^^ + + const c27 = value; +>c27 : number +> : ^^^^^^ +>value : number +> : ^^^^^^ + } +} + +// object literals +var o = { +>o : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ f() { const c28 = 0; }, f2: () => { const c29 = 0; }} : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + f() { +>f : () => void +> : ^^^^^^^^^^ + + const c28 = 0; +>c28 : 0 +> : ^ +>0 : 0 +> : ^ + + }, + f2: () => { +>f2 : () => void +> : ^^^^^^^^^^ +>() => { const c29 = 0; } : () => void +> : ^^^^^^^^^^ + + const c29 = 0; +>c29 : 0 +> : ^ +>0 : 0 +> : ^ + } +} diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).errors.txt b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..24f9a4a91235a --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).errors.txt @@ -0,0 +1,139 @@ +constDeclarations-validContexts.ts(18,1): error TS1101: 'with' statements are not allowed in strict mode. +constDeclarations-validContexts.ts(18,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +constDeclarations-validContexts.ts(31,5): error TS1344: 'A label is not allowed here. +constDeclarations-validContexts.ts(35,21): error TS1344: 'A label is not allowed here. +constDeclarations-validContexts.ts(64,9): error TS1344: 'A label is not allowed here. + + +==== constDeclarations-validContexts.ts (5 errors) ==== + // Control flow statements with blocks + if (true) { + const c1 = 0; + } + else { + const c2 = 0; + } + + while (true) { + const c3 = 0; + } + + do { + const c4 = 0; + } while (true); + + var obj; + with (obj) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + const c5 = 0; + } + + for (var i = 0; i < 10; i++) { + const c6 = 0; + } + + for (var i2 in {}) { + const c7 = 0; + } + + if (true) { + label: const c8 = 0; + ~~~~~ +!!! error TS1344: 'A label is not allowed here. + } + + while (false) { + label2: label3: label4: const c9 = 0; + ~~~~~~ +!!! error TS1344: 'A label is not allowed here. + } + + // Try/catch/finally + try { + const c10 = 0; + } + catch (e) { + const c11 = 0; + } + finally { + const c12 = 0; + } + + // Switch + switch (0) { + case 0: + const c13 = 0; + break; + default: + const c14 = 0; + break; + } + + // blocks + { + const c15 = 0; + { + const c16 = 0 + label17: const c17 = 0; + ~~~~~~~ +!!! error TS1344: 'A label is not allowed here. + } + } + + // global + const c18 = 0; + + // functions + function F() { + const c19 = 0; + } + + var F2 = () => { + const c20 = 0; + }; + + var F3 = function () { + const c21 = 0; + }; + + // modules + namespace m { + const c22 = 0; + + { + const c23 = 0; + } + } + + // methods + class C { + constructor() { + const c24 = 0; + } + + method() { + const c25 = 0; + } + + get v() { + const c26 = 0; + return c26; + } + + set v(value) { + const c27 = value; + } + } + + // object literals + var o = { + f() { + const c28 = 0; + }, + f2: () => { + const c29 = 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).symbols b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..3496aabc5bb02 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).symbols @@ -0,0 +1,197 @@ +//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// + +=== constDeclarations-validContexts.ts === +// Control flow statements with blocks +if (true) { + const c1 = 0; +>c1 : Symbol(c1, Decl(constDeclarations-validContexts.ts, 2, 9)) +} +else { + const c2 = 0; +>c2 : Symbol(c2, Decl(constDeclarations-validContexts.ts, 5, 9)) +} + +while (true) { + const c3 = 0; +>c3 : Symbol(c3, Decl(constDeclarations-validContexts.ts, 9, 9)) +} + +do { + const c4 = 0; +>c4 : Symbol(c4, Decl(constDeclarations-validContexts.ts, 13, 9)) + +} while (true); + +var obj; +>obj : Symbol(obj, Decl(constDeclarations-validContexts.ts, 16, 3)) + +with (obj) { +>obj : Symbol(obj, Decl(constDeclarations-validContexts.ts, 16, 3)) + + const c5 = 0; +} + +for (var i = 0; i < 10; i++) { +>i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) +>i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) +>i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) + + const c6 = 0; +>c6 : Symbol(c6, Decl(constDeclarations-validContexts.ts, 22, 9)) +} + +for (var i2 in {}) { +>i2 : Symbol(i2, Decl(constDeclarations-validContexts.ts, 25, 8)) + + const c7 = 0; +>c7 : Symbol(c7, Decl(constDeclarations-validContexts.ts, 26, 9)) +} + +if (true) { + label: const c8 = 0; +>c8 : Symbol(c8, Decl(constDeclarations-validContexts.ts, 30, 16)) +} + +while (false) { + label2: label3: label4: const c9 = 0; +>c9 : Symbol(c9, Decl(constDeclarations-validContexts.ts, 34, 33)) +} + +// Try/catch/finally +try { + const c10 = 0; +>c10 : Symbol(c10, Decl(constDeclarations-validContexts.ts, 39, 9)) +} +catch (e) { +>e : Symbol(e, Decl(constDeclarations-validContexts.ts, 41, 7)) + + const c11 = 0; +>c11 : Symbol(c11, Decl(constDeclarations-validContexts.ts, 42, 9)) +} +finally { + const c12 = 0; +>c12 : Symbol(c12, Decl(constDeclarations-validContexts.ts, 45, 9)) +} + +// Switch +switch (0) { + case 0: + const c13 = 0; +>c13 : Symbol(c13, Decl(constDeclarations-validContexts.ts, 51, 13)) + + break; + default: + const c14 = 0; +>c14 : Symbol(c14, Decl(constDeclarations-validContexts.ts, 54, 13)) + + break; +} + +// blocks +{ + const c15 = 0; +>c15 : Symbol(c15, Decl(constDeclarations-validContexts.ts, 60, 9)) + { + const c16 = 0 +>c16 : Symbol(c16, Decl(constDeclarations-validContexts.ts, 62, 13)) + + label17: const c17 = 0; +>c17 : Symbol(c17, Decl(constDeclarations-validContexts.ts, 63, 22)) + } +} + +// global +const c18 = 0; +>c18 : Symbol(c18, Decl(constDeclarations-validContexts.ts, 68, 5)) + +// functions +function F() { +>F : Symbol(F, Decl(constDeclarations-validContexts.ts, 68, 14)) + + const c19 = 0; +>c19 : Symbol(c19, Decl(constDeclarations-validContexts.ts, 72, 9)) +} + +var F2 = () => { +>F2 : Symbol(F2, Decl(constDeclarations-validContexts.ts, 75, 3)) + + const c20 = 0; +>c20 : Symbol(c20, Decl(constDeclarations-validContexts.ts, 76, 9)) + +}; + +var F3 = function () { +>F3 : Symbol(F3, Decl(constDeclarations-validContexts.ts, 79, 3)) + + const c21 = 0; +>c21 : Symbol(c21, Decl(constDeclarations-validContexts.ts, 80, 9)) + +}; + +// modules +namespace m { +>m : Symbol(m, Decl(constDeclarations-validContexts.ts, 81, 2)) + + const c22 = 0; +>c22 : Symbol(c22, Decl(constDeclarations-validContexts.ts, 85, 9)) + + { + const c23 = 0; +>c23 : Symbol(c23, Decl(constDeclarations-validContexts.ts, 88, 15)) + } +} + +// methods +class C { +>C : Symbol(C, Decl(constDeclarations-validContexts.ts, 90, 1)) + + constructor() { + const c24 = 0; +>c24 : Symbol(c24, Decl(constDeclarations-validContexts.ts, 95, 13)) + } + + method() { +>method : Symbol(C.method, Decl(constDeclarations-validContexts.ts, 96, 5)) + + const c25 = 0; +>c25 : Symbol(c25, Decl(constDeclarations-validContexts.ts, 99, 13)) + } + + get v() { +>v : Symbol(C.v, Decl(constDeclarations-validContexts.ts, 100, 5), Decl(constDeclarations-validContexts.ts, 105, 5)) + + const c26 = 0; +>c26 : Symbol(c26, Decl(constDeclarations-validContexts.ts, 103, 13)) + + return c26; +>c26 : Symbol(c26, Decl(constDeclarations-validContexts.ts, 103, 13)) + } + + set v(value) { +>v : Symbol(C.v, Decl(constDeclarations-validContexts.ts, 100, 5), Decl(constDeclarations-validContexts.ts, 105, 5)) +>value : Symbol(value, Decl(constDeclarations-validContexts.ts, 107, 10)) + + const c27 = value; +>c27 : Symbol(c27, Decl(constDeclarations-validContexts.ts, 108, 13)) +>value : Symbol(value, Decl(constDeclarations-validContexts.ts, 107, 10)) + } +} + +// object literals +var o = { +>o : Symbol(o, Decl(constDeclarations-validContexts.ts, 113, 3)) + + f() { +>f : Symbol(f, Decl(constDeclarations-validContexts.ts, 113, 9)) + + const c28 = 0; +>c28 : Symbol(c28, Decl(constDeclarations-validContexts.ts, 115, 13)) + + }, + f2: () => { +>f2 : Symbol(f2, Decl(constDeclarations-validContexts.ts, 116, 6)) + + const c29 = 0; +>c29 : Symbol(c29, Decl(constDeclarations-validContexts.ts, 118, 13)) + } +} diff --git a/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).types b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).types new file mode 100644 index 0000000000000..7ca9c9b2f2dd3 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-validContexts(alwaysstrict=true).types @@ -0,0 +1,352 @@ +//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// + +=== constDeclarations-validContexts.ts === +// Control flow statements with blocks +if (true) { +>true : true +> : ^^^^ + + const c1 = 0; +>c1 : 0 +> : ^ +>0 : 0 +> : ^ +} +else { + const c2 = 0; +>c2 : 0 +> : ^ +>0 : 0 +> : ^ +} + +while (true) { +>true : true +> : ^^^^ + + const c3 = 0; +>c3 : 0 +> : ^ +>0 : 0 +> : ^ +} + +do { + const c4 = 0; +>c4 : 0 +> : ^ +>0 : 0 +> : ^ + +} while (true); +>true : true +> : ^^^^ + +var obj; +>obj : any +> : ^^^ + +with (obj) { +>obj : any +> : ^^^ + + const c5 = 0; +>c5 : any +> : ^^^ +>0 : any +> : ^^^ +} + +for (var i = 0; i < 10; i++) { +>i : number +> : ^^^^^^ +>0 : 0 +> : ^ +>i < 10 : boolean +> : ^^^^^^^ +>i : number +> : ^^^^^^ +>10 : 10 +> : ^^ +>i++ : number +> : ^^^^^^ +>i : number +> : ^^^^^^ + + const c6 = 0; +>c6 : 0 +> : ^ +>0 : 0 +> : ^ +} + +for (var i2 in {}) { +>i2 : string +> : ^^^^^^ +>{} : {} +> : ^^ + + const c7 = 0; +>c7 : 0 +> : ^ +>0 : 0 +> : ^ +} + +if (true) { +>true : true +> : ^^^^ + + label: const c8 = 0; +>label : any +> : ^^^ +>c8 : 0 +> : ^ +>0 : 0 +> : ^ +} + +while (false) { +>false : false +> : ^^^^^ + + label2: label3: label4: const c9 = 0; +>label2 : any +> : ^^^ +>label3 : any +> : ^^^ +>label4 : any +> : ^^^ +>c9 : 0 +> : ^ +>0 : 0 +> : ^ +} + +// Try/catch/finally +try { + const c10 = 0; +>c10 : 0 +> : ^ +>0 : 0 +> : ^ +} +catch (e) { +>e : any +> : ^^^ + + const c11 = 0; +>c11 : 0 +> : ^ +>0 : 0 +> : ^ +} +finally { + const c12 = 0; +>c12 : 0 +> : ^ +>0 : 0 +> : ^ +} + +// Switch +switch (0) { +>0 : 0 +> : ^ + + case 0: +>0 : 0 +> : ^ + + const c13 = 0; +>c13 : 0 +> : ^ +>0 : 0 +> : ^ + + break; + default: + const c14 = 0; +>c14 : 0 +> : ^ +>0 : 0 +> : ^ + + break; +} + +// blocks +{ + const c15 = 0; +>c15 : 0 +> : ^ +>0 : 0 +> : ^ + { + const c16 = 0 +>c16 : 0 +> : ^ +>0 : 0 +> : ^ + + label17: const c17 = 0; +>label17 : any +> : ^^^ +>c17 : 0 +> : ^ +>0 : 0 +> : ^ + } +} + +// global +const c18 = 0; +>c18 : 0 +> : ^ +>0 : 0 +> : ^ + +// functions +function F() { +>F : () => void +> : ^^^^^^^^^^ + + const c19 = 0; +>c19 : 0 +> : ^ +>0 : 0 +> : ^ +} + +var F2 = () => { +>F2 : () => void +> : ^^^^^^^^^^ +>() => { const c20 = 0;} : () => void +> : ^^^^^^^^^^ + + const c20 = 0; +>c20 : 0 +> : ^ +>0 : 0 +> : ^ + +}; + +var F3 = function () { +>F3 : () => void +> : ^^^^^^^^^^ +>function () { const c21 = 0;} : () => void +> : ^^^^^^^^^^ + + const c21 = 0; +>c21 : 0 +> : ^ +>0 : 0 +> : ^ + +}; + +// modules +namespace m { +>m : typeof m +> : ^^^^^^^^ + + const c22 = 0; +>c22 : 0 +> : ^ +>0 : 0 +> : ^ + + { + const c23 = 0; +>c23 : 0 +> : ^ +>0 : 0 +> : ^ + } +} + +// methods +class C { +>C : C +> : ^ + + constructor() { + const c24 = 0; +>c24 : 0 +> : ^ +>0 : 0 +> : ^ + } + + method() { +>method : () => void +> : ^^^^^^^^^^ + + const c25 = 0; +>c25 : 0 +> : ^ +>0 : 0 +> : ^ + } + + get v() { +>v : number +> : ^^^^^^ + + const c26 = 0; +>c26 : 0 +> : ^ +>0 : 0 +> : ^ + + return c26; +>c26 : 0 +> : ^ + } + + set v(value) { +>v : number +> : ^^^^^^ +>value : number +> : ^^^^^^ + + const c27 = value; +>c27 : number +> : ^^^^^^ +>value : number +> : ^^^^^^ + } +} + +// object literals +var o = { +>o : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ f() { const c28 = 0; }, f2: () => { const c29 = 0; }} : { f(): void; f2: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + f() { +>f : () => void +> : ^^^^^^^^^^ + + const c28 = 0; +>c28 : 0 +> : ^ +>0 : 0 +> : ^ + + }, + f2: () => { +>f2 : () => void +> : ^^^^^^^^^^ +>() => { const c29 = 0; } : () => void +> : ^^^^^^^^^^ + + const c29 = 0; +>c29 : 0 +> : ^ +>0 : 0 +> : ^ + } +} diff --git a/tests/baselines/reference/constDeclarations-validContexts.errors.txt b/tests/baselines/reference/constDeclarations-validContexts.errors.txt index ea2262681bf38..22a753be189f5 100644 --- a/tests/baselines/reference/constDeclarations-validContexts.errors.txt +++ b/tests/baselines/reference/constDeclarations-validContexts.errors.txt @@ -1,6 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. constDeclarations-validContexts.ts(18,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== constDeclarations-validContexts.ts (1 errors) ==== // Control flow statements with blocks if (true) { diff --git a/tests/baselines/reference/contextualTyping.js.map b/tests/baselines/reference/contextualTyping.js.map index 40ee25e4624d0..7c0a7f533bdad 100644 --- a/tests/baselines/reference/contextualTyping.js.map +++ b/tests/baselines/reference/contextualTyping.js.map @@ -1,3 +1,3 @@ //// [contextualTyping.js.map] -{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,MAAM,IAAI;IAAV;QACI,QAAG,GAAqC,UAAS,CAAC;YAC9C,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;CAAA;AAED,0CAA0C;AAC1C,IAAU,IAAI,CAIb;AAJD,WAAU,IAAI;IACC,QAAG,GAAqC,UAAS,CAAC;QACzD,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EAJS,IAAI,KAAJ,IAAI,QAIb;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC,MAAM,IAAI;IAEN;QACI,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;CACJ;AAED,yCAAyC;AACzC,IAAU,IAAI,CAKb;AALD,WAAU,IAAI;IAEV,KAAA,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;QACf,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EALS,IAAI,KAAJ,IAAI,QAKb;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAI,GAAW,EAAE,CAAC;AACtB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,IAAG,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,OAAa,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,cAAa,OAAO,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE/F,0BAA0B;AAC1B,MAAM,KAAK;IAAG,YAAY,CAAsB,IAAI,CAAC;CAAE;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,IAAI,OAAO,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,Ly8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCmNsYXNzIEMxVDUgew0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLmZvbyA9IGZ1bmN0aW9uIChpKSB7DQogICAgICAgICAgICByZXR1cm4gaTsNCiAgICAgICAgfTsNCiAgICB9DQp9DQovLyBDT05URVhUOiBOYW1lc3BhY2UgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KY2xhc3MgQzRUNSB7DQogICAgY29uc3RydWN0b3IoKSB7DQogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24gKGksIHMpIHsNCiAgICAgICAgICAgIHJldHVybiBzOw0KICAgICAgICB9Ow0KICAgIH0NCn0NCi8vIENPTlRFWFQ6IE5hbWVzcGFjZSBwcm9wZXJ0eSBhc3NpZ25tZW50DQp2YXIgQzVUNTsNCihmdW5jdGlvbiAoQzVUNSkgew0KICAgIEM1VDUuZm9vID0gZnVuY3Rpb24gKGksIHMpIHsNCiAgICAgICAgcmV0dXJuIHM7DQogICAgfTsNCn0pKEM1VDUgfHwgKEM1VDUgPSB7fSkpOw0KLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudA0KdmFyIGM2dDU7DQpjNnQ1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQovLyBDT05URVhUOiBBcnJheSBpbmRleCBhc3NpZ25tZW50DQp2YXIgYzd0MiA9IFtdOw0KYzd0MlswXSA9ICh7IG46IDEgfSk7DQp2YXIgb2JqYzggPSAoe30pOw0Kb2JqYzgudDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0Kb2JqYzgudDIgPSAoew0KICAgIG46IDENCn0pOw0Kb2JqYzgudDMgPSBbXTsNCm9iamM4LnQ0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCm9iamM4LnQ4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQpvYmpjOC50OSA9IFtbXSwgW11dOw0Kb2JqYzgudDEwID0gWyh7fSksICh7fSldOw0Kb2JqYzgudDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCm9iamM4LnQxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQpvYmpjOC50MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCm9iamM4LnQxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogRnVuY3Rpb24gY2FsbA0KZnVuY3Rpb24gYzl0NShmKSB7IH0NCjsNCmM5dDUoZnVuY3Rpb24gKG4pIHsNCiAgICByZXR1cm4gKHt9KTsNCn0pOw0KLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudA0KdmFyIGMxMHQ1ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07IH07DQovLyBDT05URVhUOiBOZXdpbmcgYSBjbGFzcw0KY2xhc3MgQzExdDUgew0KICAgIGNvbnN0cnVjdG9yKGYpIHsgfQ0KfQ0KOw0KdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH0pOw0KLy8gQ09OVEVYVDogVHlwZSBhbm5vdGF0ZWQgZXhwcmVzc2lvbg0KdmFyIGMxMnQxID0gKGZ1bmN0aW9uIChzKSB7IHJldHVybiBzOyB9KTsNCnZhciBjMTJ0MiA9ICh7DQogICAgbjogMQ0KfSk7DQp2YXIgYzEydDMgPSBbXTsNCnZhciBjMTJ0NCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDUgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ3ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzEydDggPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjMTJ0OSA9IFtbXSwgW11dOw0KdmFyIGMxMnQxMCA9IFsoe30pLCAoe30pXTsNCnZhciBjMTJ0MTEgPSBbZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuIHM7IH1dOw0KdmFyIGMxMnQxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzEydDEzID0gKHsNCiAgICBmOiBmdW5jdGlvbiAoaSwgcykgeyByZXR1cm4gczsgfQ0KfSk7DQp2YXIgYzEydDE0ID0gKHsNCiAgICBhOiBbXQ0KfSk7DQpmdW5jdGlvbiBFRjEoYSwgYikgeyByZXR1cm4gYSArIGI7IH0NCnZhciBlZnYgPSBFRjEoMSwgMik7DQpQb2ludC5vcmlnaW4gPSBuZXcgUG9pbnQoMCwgMCk7DQpQb2ludC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gKGR4LCBkeSkgew0KICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsNCn07DQpQb2ludC5wcm90b3R5cGUgPSB7DQogICAgeDogMCwNCiAgICB5OiAwLA0KICAgIGFkZDogZnVuY3Rpb24gKGR4LCBkeSkgew0KICAgICAgICByZXR1cm4gbmV3IFBvaW50KHRoaXMueCArIGR4LCB0aGlzLnkgKyBkeSk7DQogICAgfQ0KfTsNCnZhciB4ID0ge307DQovLyMgc291cmNlTWFwcGluZ1VSTD1jb250ZXh0dWFsVHlwaW5nLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWUEsc0NBQXNDO0FBQ3RDLE1BQU0sSUFBSTtJQUFWO1FBQ0ksUUFBRyxHQUFxQyxVQUFTLENBQUM7WUFDOUMsT0FBTyxDQUFDLENBQUM7UUFDYixDQUFDLENBQUE7SUFDTCxDQUFDO0NBQUE7QUFFRCwwQ0FBMEM7QUFDMUMsSUFBVSxJQUFJLENBSWI7QUFKRCxXQUFVLElBQUk7SUFDQyxRQUFHLEdBQXFDLFVBQVMsQ0FBQztRQUN6RCxPQUFPLENBQUMsQ0FBQztJQUNiLENBQUMsQ0FBQTtBQUNMLENBQUMsRUFKUyxJQUFJLEtBQUosSUFBSSxRQUliO0FBRUQsZ0NBQWdDO0FBQ2hDLElBQUksSUFBSSxHQUEwQixDQUFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDN0QsSUFBSSxJQUFJLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxJQUFJLEdBQWEsRUFBRSxDQUFDO0FBQ3hCLElBQUksSUFBSSxHQUFlLGNBQWEsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ3hELElBQUksSUFBSSxHQUF3QixVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDbEUsSUFBSSxJQUFJLEdBQW1DLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDaEYsSUFBSSxJQUFJLEdBR0osVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFFOUIsSUFBSSxJQUFJLEdBQXFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3ZFLElBQUksSUFBSSxHQUFlLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQy9CLElBQUksS0FBSyxHQUFXLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDNUMsSUFBSSxLQUFLLEdBQXdDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDaEYsSUFBSSxLQUFLLEdBQVM7SUFDZCxHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLEtBQUssR0FBUyxDQUFDO0lBQ2YsQ0FBQyxFQUFFLEVBQUU7Q0FDUixDQUFDLENBQUE7QUFFRixxQ0FBcUM7QUFDckMsTUFBTSxJQUFJO0lBRU47UUFDSSxJQUFJLENBQUMsR0FBRyxHQUFHLFVBQVMsQ0FBQyxFQUFFLENBQUM7WUFDcEIsT0FBTyxDQUFDLENBQUM7UUFDYixDQUFDLENBQUE7SUFDTCxDQUFDO0NBQ0o7QUFFRCx5Q0FBeUM7QUFDekMsSUFBVSxJQUFJLENBS2I7QUFMRCxXQUFVLElBQUk7SUFFVixLQUFBLEdBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDO1FBQ2YsT0FBTyxDQUFDLENBQUM7SUFDYixDQUFDLENBQUE7QUFDTCxDQUFDLEVBTFMsSUFBSSxLQUFKLElBQUksUUFLYjtBQUVELCtCQUErQjtBQUMvQixJQUFJLElBQXlCLENBQUM7QUFDOUIsSUFBSSxHQUF3QixVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFFOUQsa0NBQWtDO0FBQ2xDLElBQUksSUFBSSxHQUFXLEVBQUUsQ0FBQztBQUN0QixJQUFJLENBQUMsQ0FBQyxDQUFDLEdBQVMsQ0FBQyxFQUFDLENBQUMsRUFBRSxDQUFDLEVBQUMsQ0FBQyxDQUFDO0FBdUJ6QixJQUFJLEtBQUssR0FrQlMsQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUV2QixLQUFLLENBQUMsRUFBRSxHQUFHLENBQUMsVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUN0QyxLQUFLLENBQUMsRUFBRSxHQUFTLENBQUM7SUFDZCxDQUFDLEVBQUUsQ0FBQztDQUNQLENBQUMsQ0FBQztBQUNILEtBQUssQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ2QsS0FBSyxDQUFDLEVBQUUsR0FBRyxjQUFhLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUM1QyxLQUFLLENBQUMsRUFBRSxHQUFHLFVBQVMsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUM3QyxLQUFLLENBQUMsRUFBRSxHQUFHLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDaEQsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQVMsSUFBSSxPQUFPLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUU1QyxLQUFLLENBQUMsRUFBRSxHQUFHLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3JDLEtBQUssQ0FBQyxFQUFFLEdBQUcsQ0FBQyxFQUFFLEVBQUMsRUFBRSxDQUFDLENBQUM7QUFDbkIsS0FBSyxDQUFDLEdBQUcsR0FBRyxDQUFPLENBQUMsRUFBRSxDQUFDLEVBQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ3BDLEtBQUssQ0FBQyxHQUFHLEdBQUcsQ0FBQyxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUMzQyxLQUFLLENBQUMsR0FBRyxHQUFHO0lBQ1IsR0FBRyxFQUFRLENBQUMsRUFBRSxDQUFDO0NBQ2xCLENBQUE7QUFDRCxLQUFLLENBQUMsR0FBRyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztDQUNsQyxDQUFDLENBQUE7QUFDRixLQUFLLENBQUMsR0FBRyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsRUFBRTtDQUNSLENBQUMsQ0FBQTtBQUNGLHlCQUF5QjtBQUN6QixTQUFTLElBQUksQ0FBQyxDQUFzQixJQUFHLENBQUM7QUFBQSxDQUFDO0FBQ3pDLElBQUksQ0FBQyxVQUFTLENBQUM7SUFDWCxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUM7QUFDdEIsQ0FBQyxDQUFDLENBQUM7QUFFSCw0QkFBNEI7QUFDNUIsSUFBSSxLQUFLLEdBQThCLGNBQWEsT0FBTyxVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFFL0YsMEJBQTBCO0FBQzFCLE1BQU0sS0FBSztJQUFHLFlBQVksQ0FBc0IsSUFBSSxDQUFDO0NBQUU7QUFBQSxDQUFDO0FBQ3hELElBQUksQ0FBQyxHQUFHLElBQUksS0FBSyxDQUFDLFVBQVMsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBRXJELHFDQUFxQztBQUNyQyxJQUFJLEtBQUssR0FBMkIsQ0FBQyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQy9ELElBQUksS0FBSyxHQUFVLENBQUM7SUFDaEIsQ0FBQyxFQUFFLENBQUM7Q0FDUCxDQUFDLENBQUM7QUFDSCxJQUFJLEtBQUssR0FBYyxFQUFFLENBQUM7QUFDMUIsSUFBSSxLQUFLLEdBQWdCLGNBQWEsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQzFELElBQUksS0FBSyxHQUF5QixVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDcEUsSUFBSSxLQUFLLEdBQW9DLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDbEYsSUFBSSxLQUFLLEdBR04sVUFBUyxDQUFRLElBQUksT0FBTyxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFFbkMsSUFBSSxLQUFLLEdBQXNDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3pFLElBQUksS0FBSyxHQUFnQixDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUNqQyxJQUFJLE1BQU0sR0FBWSxDQUFPLENBQUMsRUFBRSxDQUFDLEVBQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQzlDLElBQUksTUFBTSxHQUF5QyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ2xGLElBQUksTUFBTSxHQUFVO0lBQ2hCLEdBQUcsRUFBUSxDQUFDLEVBQUUsQ0FBQztDQUNsQixDQUFBO0FBQ0QsSUFBSSxNQUFNLEdBQVUsQ0FBQztJQUNqQixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLE1BQU0sR0FBVSxDQUFDO0lBQ2pCLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBT0YsU0FBUyxHQUFHLENBQUMsQ0FBQyxFQUFDLENBQUMsSUFBSSxPQUFPLENBQUMsR0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBRWpDLElBQUksR0FBRyxHQUFHLEdBQUcsQ0FBQyxDQUFDLEVBQUMsQ0FBQyxDQUFDLENBQUM7QUFjbkIsS0FBSyxDQUFDLE1BQU0sR0FBRyxJQUFJLEtBQUssQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFFL0IsS0FBSyxDQUFDLFNBQVMsQ0FBQyxHQUFHLEdBQUcsVUFBUyxFQUFFLEVBQUUsRUFBRTtJQUNqQyxPQUFPLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7QUFDL0MsQ0FBQyxDQUFDO0FBRUYsS0FBSyxDQUFDLFNBQVMsR0FBRztJQUNkLENBQUMsRUFBRSxDQUFDO0lBQ0osQ0FBQyxFQUFFLENBQUM7SUFDSixHQUFHLEVBQUUsVUFBUyxFQUFFLEVBQUUsRUFBRTtRQUNoQixPQUFPLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7SUFDL0MsQ0FBQztDQUNKLENBQUM7QUFJRixJQUFJLENBQUMsR0FBTSxFQUFHLENBQUMifQ==,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE5hbWVzcGFjZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpuYW1lc3BhY2UgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE5hbWVzcGFjZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm5hbWVzcGFjZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXSA9IFtdOwpjN3QyWzBdID0gPElGb28+KHtuOiAxfSk7CgovLyBDT05URVhUOiBPYmplY3QgcHJvcGVydHkgYXNzaWdubWVudAppbnRlcmZhY2UgSVBsYWNlSG9sZGVyIHsKICAgIHQxOiAoczogc3RyaW5nKSA9PiBzdHJpbmc7CiAgICB0MjogSUZvbzsKICAgIHQzOiBudW1iZXJbXTsKICAgIHQ0OiAoKSA9PiBJRm9vOwogICAgdDU6IChuOiBudW1iZXIpID0+IElGb287CiAgICB0NjogKG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vOwogICAgdDc6IHsKICAgICAgICAgICAgKG46IG51bWJlciwgczogc3RyaW5nKTogbnVtYmVyOyAgICAKICAgICAgICAgICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKICAgICAgICB9OwogICAgdDg6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gbnVtYmVyOwogICAgdDk6IG51bWJlcltdW107CiAgICB0MTA6IElGb29bXTsKICAgIHQxMTogeyhuOiBudW1iZXIsIHM6IHN0cmluZyk6IHN0cmluZzt9W107CiAgICB0MTI6IElCYXI7CiAgICB0MTM6IElGb287CiAgICB0MTQ6IElGb287CiAgICB9Cgp2YXIgb2JqYzg6IHsKICAgIHQxOiAoczogc3RyaW5nKSA9PiBzdHJpbmc7CiAgICB0MjogSUZvbzsKICAgIHQzOiBudW1iZXJbXTsKICAgIHQ0OiAoKSA9PiBJRm9vOwogICAgdDU6IChuOiBudW1iZXIpID0+IElGb287CiAgICB0NjogKG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vOwogICAgdDc6IHsKICAgICAgICAgICAgKG46IG51bWJlciwgczogc3RyaW5nKTogbnVtYmVyOyAgICAKICAgICAgICAgICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKICAgICAgICB9OwogICAgdDg6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gbnVtYmVyOwogICAgdDk6IG51bWJlcltdW107CiAgICB0MTA6IElGb29bXTsKICAgIHQxMTogeyhuOiBudW1iZXIsIHM6IHN0cmluZyk6IHN0cmluZzt9W107CiAgICB0MTI6IElCYXI7CiAgICB0MTM6IElGb287CiAgICB0MTQ6IElGb287Cn0gPSA8SVBsYWNlSG9sZGVyPih7fSk7CgpvYmpjOC50MSA9IChmdW5jdGlvbihzKSB7IHJldHVybiBzIH0pOwpvYmpjOC50MiA9IDxJRm9vPih7CiAgICBuOiAxCn0pOwpvYmpjOC50MyA9IFtdOwpvYmpjOC50NCA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NSA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDYgPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ3ID0gZnVuY3Rpb24objogbnVtYmVyKSB7IHJldHVybiBuIH07CgpvYmpjOC50OCA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07Cm9iamM4LnQ5ID0gW1tdLFtdXTsKb2JqYzgudDEwID0gWzxJRm9vPih7fSksPElGb28+KHt9KV07Cm9iamM4LnQxMSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKb2JqYzgudDEyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0Kb2JqYzgudDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKb2JqYzgudDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCi8vIENPTlRFWFQ6IEZ1bmN0aW9uIGNhbGwKZnVuY3Rpb24gYzl0NShmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7fTsKYzl0NShmdW5jdGlvbihuKSB7CiAgICByZXR1cm4gPElGb28+KHt9KTsKfSk7CgovLyBDT05URVhUOiBSZXR1cm4gc3RhdGVtZW50CnZhciBjMTB0NTogKCkgPT4gKG46IG51bWJlcikgPT4gSUZvbyA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9IH07CgovLyBDT05URVhUOiBOZXdpbmcgYSBjbGFzcwpjbGFzcyBDMTF0NSB7IGNvbnN0cnVjdG9yKGY6IChuOiBudW1iZXIpID0+IElGb28pIHsgfSB9Owp2YXIgaSA9IG5ldyBDMTF0NShmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH0pOwoKLy8gQ09OVEVYVDogVHlwZSBhbm5vdGF0ZWQgZXhwcmVzc2lvbgp2YXIgYzEydDEgPSA8KHM6IHN0cmluZykgPT4gc3RyaW5nPiAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMxMnQyID0gPElGb28+ICh7CiAgICBuOiAxCn0pOwp2YXIgYzEydDMgPSA8bnVtYmVyW10+IFtdOwp2YXIgYzEydDQgPSA8KCkgPT4gSUZvbz4gZnVuY3Rpb24oKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPiBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NiA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28+IGZ1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMxMnQ3ID0gPHsKICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAvLyhzMTogc3RyaW5nLCBzMjogc3RyaW5nKTogbnVtYmVyOwp9PiBmdW5jdGlvbihuOm51bWJlcikgeyByZXR1cm4gbiB9OwoKdmFyIGMxMnQ4ID0gPChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gbnVtYmVyPiBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9Owp2YXIgYzEydDkgPSA8bnVtYmVyW11bXT4gW1tdLFtdXTsKdmFyIGMxMnQxMCA9IDxJRm9vW10+IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwp2YXIgYzEydDExID0gPHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdPiBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07CnZhciBjMTJ0MTIgPSA8SUJhcj4gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMxMnQxMyA9IDxJRm9vPiAoewogICAgZjogZnVuY3Rpb24oaSwgcykgeyByZXR1cm4gczsgfQp9KQp2YXIgYzEydDE0ID0gPElGb28+ICh7CiAgICBhOiBbXQp9KQoKLy8gQ09OVEVYVDogQ29udGV4dHVhbCB0eXBpbmcgZGVjbGFyYXRpb25zCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZ1bmN0aW9uIGRlY2xhcmF0aW9ucwpkZWNsYXJlIGZ1bmN0aW9uIEVGMShhOm51bWJlciwgYjpudW1iZXIpOm51bWJlcjsKCmZ1bmN0aW9uIEVGMShhLGIpIHsgcmV0dXJuIGErYjsgfQoKdmFyIGVmdiA9IEVGMSgxLDIpOwoKCi8vIGNvbnRleHR1YWxseSB0eXBpbmcgZnJvbSBhbWJpZW50IGNsYXNzIGRlY2xhcmF0aW9ucwpkZWNsYXJlIGNsYXNzIFBvaW50CnsKICAgICAgY29uc3RydWN0b3IoeDogbnVtYmVyLCB5OiBudW1iZXIpOwogICAgICB4OiBudW1iZXI7CiAgICAgIHk6IG51bWJlcjsKICAgICAgYWRkKGR4OiBudW1iZXIsIGR5OiBudW1iZXIpOiBQb2ludDsKICAgICAgc3RhdGljIG9yaWdpbjogUG9pbnQ7Cgp9CgpQb2ludC5vcmlnaW4gPSBuZXcgUG9pbnQoMCwgMCk7CgpQb2ludC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24oZHgsIGR5KSB7CiAgICByZXR1cm4gbmV3IFBvaW50KHRoaXMueCArIGR4LCB0aGlzLnkgKyBkeSk7Cn07CgpQb2ludC5wcm90b3R5cGUgPSB7CiAgICB4OiAwLAogICAgeTogMCwKICAgIGFkZDogZnVuY3Rpb24oZHgsIGR5KSB7CiAgICAgICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwogICAgfQp9OwoKaW50ZXJmYWNlIEEgeyB4OiBzdHJpbmc7IH0KaW50ZXJmYWNlIEIgZXh0ZW5kcyBBIHsgfQp2YXIgeDogQiA9IHsgfTsK +{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":";AAYA,sCAAsC;AACtC,MAAM,IAAI;IAAV;QACI,QAAG,GAAqC,UAAS,CAAC;YAC9C,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;CAAA;AAED,0CAA0C;AAC1C,IAAU,IAAI,CAIb;AAJD,WAAU,IAAI;IACC,QAAG,GAAqC,UAAS,CAAC;QACzD,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EAJS,IAAI,KAAJ,IAAI,QAIb;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC,MAAM,IAAI;IAEN;QACI,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;CACJ;AAED,yCAAyC;AACzC,IAAU,IAAI,CAKb;AALD,WAAU,IAAI;IAEV,KAAA,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;QACf,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EALS,IAAI,KAAJ,IAAI,QAKb;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAI,GAAW,EAAE,CAAC;AACtB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,IAAG,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,OAAa,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,cAAa,OAAO,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE/F,0BAA0B;AAC1B,MAAM,KAAK;IAAG,YAAY,CAAsB,IAAI,CAAC;CAAE;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,IAAI,OAAO,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCmNsYXNzIEMxVDUgew0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLmZvbyA9IGZ1bmN0aW9uIChpKSB7DQogICAgICAgICAgICByZXR1cm4gaTsNCiAgICAgICAgfTsNCiAgICB9DQp9DQovLyBDT05URVhUOiBOYW1lc3BhY2UgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KY2xhc3MgQzRUNSB7DQogICAgY29uc3RydWN0b3IoKSB7DQogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24gKGksIHMpIHsNCiAgICAgICAgICAgIHJldHVybiBzOw0KICAgICAgICB9Ow0KICAgIH0NCn0NCi8vIENPTlRFWFQ6IE5hbWVzcGFjZSBwcm9wZXJ0eSBhc3NpZ25tZW50DQp2YXIgQzVUNTsNCihmdW5jdGlvbiAoQzVUNSkgew0KICAgIEM1VDUuZm9vID0gZnVuY3Rpb24gKGksIHMpIHsNCiAgICAgICAgcmV0dXJuIHM7DQogICAgfTsNCn0pKEM1VDUgfHwgKEM1VDUgPSB7fSkpOw0KLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudA0KdmFyIGM2dDU7DQpjNnQ1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQovLyBDT05URVhUOiBBcnJheSBpbmRleCBhc3NpZ25tZW50DQp2YXIgYzd0MiA9IFtdOw0KYzd0MlswXSA9ICh7IG46IDEgfSk7DQp2YXIgb2JqYzggPSAoe30pOw0Kb2JqYzgudDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0Kb2JqYzgudDIgPSAoew0KICAgIG46IDENCn0pOw0Kb2JqYzgudDMgPSBbXTsNCm9iamM4LnQ0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCm9iamM4LnQ4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQpvYmpjOC50OSA9IFtbXSwgW11dOw0Kb2JqYzgudDEwID0gWyh7fSksICh7fSldOw0Kb2JqYzgudDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCm9iamM4LnQxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQpvYmpjOC50MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCm9iamM4LnQxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogRnVuY3Rpb24gY2FsbA0KZnVuY3Rpb24gYzl0NShmKSB7IH0NCjsNCmM5dDUoZnVuY3Rpb24gKG4pIHsNCiAgICByZXR1cm4gKHt9KTsNCn0pOw0KLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudA0KdmFyIGMxMHQ1ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07IH07DQovLyBDT05URVhUOiBOZXdpbmcgYSBjbGFzcw0KY2xhc3MgQzExdDUgew0KICAgIGNvbnN0cnVjdG9yKGYpIHsgfQ0KfQ0KOw0KdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH0pOw0KLy8gQ09OVEVYVDogVHlwZSBhbm5vdGF0ZWQgZXhwcmVzc2lvbg0KdmFyIGMxMnQxID0gKGZ1bmN0aW9uIChzKSB7IHJldHVybiBzOyB9KTsNCnZhciBjMTJ0MiA9ICh7DQogICAgbjogMQ0KfSk7DQp2YXIgYzEydDMgPSBbXTsNCnZhciBjMTJ0NCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDUgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ3ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzEydDggPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjMTJ0OSA9IFtbXSwgW11dOw0KdmFyIGMxMnQxMCA9IFsoe30pLCAoe30pXTsNCnZhciBjMTJ0MTEgPSBbZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuIHM7IH1dOw0KdmFyIGMxMnQxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzEydDEzID0gKHsNCiAgICBmOiBmdW5jdGlvbiAoaSwgcykgeyByZXR1cm4gczsgfQ0KfSk7DQp2YXIgYzEydDE0ID0gKHsNCiAgICBhOiBbXQ0KfSk7DQpmdW5jdGlvbiBFRjEoYSwgYikgeyByZXR1cm4gYSArIGI7IH0NCnZhciBlZnYgPSBFRjEoMSwgMik7DQpQb2ludC5vcmlnaW4gPSBuZXcgUG9pbnQoMCwgMCk7DQpQb2ludC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gKGR4LCBkeSkgew0KICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsNCn07DQpQb2ludC5wcm90b3R5cGUgPSB7DQogICAgeDogMCwNCiAgICB5OiAwLA0KICAgIGFkZDogZnVuY3Rpb24gKGR4LCBkeSkgew0KICAgICAgICByZXR1cm4gbmV3IFBvaW50KHRoaXMueCArIGR4LCB0aGlzLnkgKyBkeSk7DQogICAgfQ0KfTsNCnZhciB4ID0ge307DQovLyMgc291cmNlTWFwcGluZ1VSTD1jb250ZXh0dWFsVHlwaW5nLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQVlBLHNDQUFzQztBQUN0QyxNQUFNLElBQUk7SUFBVjtRQUNJLFFBQUcsR0FBcUMsVUFBUyxDQUFDO1lBQzlDLE9BQU8sQ0FBQyxDQUFDO1FBQ2IsQ0FBQyxDQUFBO0lBQ0wsQ0FBQztDQUFBO0FBRUQsMENBQTBDO0FBQzFDLElBQVUsSUFBSSxDQUliO0FBSkQsV0FBVSxJQUFJO0lBQ0MsUUFBRyxHQUFxQyxVQUFTLENBQUM7UUFDekQsT0FBTyxDQUFDLENBQUM7SUFDYixDQUFDLENBQUE7QUFDTCxDQUFDLEVBSlMsSUFBSSxLQUFKLElBQUksUUFJYjtBQUVELGdDQUFnQztBQUNoQyxJQUFJLElBQUksR0FBMEIsQ0FBQyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQzdELElBQUksSUFBSSxHQUFTLENBQUM7SUFDZCxDQUFDLEVBQUUsQ0FBQztDQUNQLENBQUMsQ0FBQTtBQUNGLElBQUksSUFBSSxHQUFhLEVBQUUsQ0FBQztBQUN4QixJQUFJLElBQUksR0FBZSxjQUFhLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUN4RCxJQUFJLElBQUksR0FBd0IsVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ2xFLElBQUksSUFBSSxHQUFtQyxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ2hGLElBQUksSUFBSSxHQUdKLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBRTlCLElBQUksSUFBSSxHQUFxQyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUN2RSxJQUFJLElBQUksR0FBZSxDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUMvQixJQUFJLEtBQUssR0FBVyxDQUFPLENBQUMsRUFBRSxDQUFDLEVBQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQzVDLElBQUksS0FBSyxHQUF3QyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ2hGLElBQUksS0FBSyxHQUFTO0lBQ2QsR0FBRyxFQUFRLENBQUMsRUFBRSxDQUFDO0NBQ2xCLENBQUE7QUFDRCxJQUFJLEtBQUssR0FBUyxDQUFDO0lBQ2YsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUM7Q0FDbEMsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxLQUFLLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBRUYscUNBQXFDO0FBQ3JDLE1BQU0sSUFBSTtJQUVOO1FBQ0ksSUFBSSxDQUFDLEdBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDO1lBQ3BCLE9BQU8sQ0FBQyxDQUFDO1FBQ2IsQ0FBQyxDQUFBO0lBQ0wsQ0FBQztDQUNKO0FBRUQseUNBQXlDO0FBQ3pDLElBQVUsSUFBSSxDQUtiO0FBTEQsV0FBVSxJQUFJO0lBRVYsS0FBQSxHQUFHLEdBQUcsVUFBUyxDQUFDLEVBQUUsQ0FBQztRQUNmLE9BQU8sQ0FBQyxDQUFDO0lBQ2IsQ0FBQyxDQUFBO0FBQ0wsQ0FBQyxFQUxTLElBQUksS0FBSixJQUFJLFFBS2I7QUFFRCwrQkFBK0I7QUFDL0IsSUFBSSxJQUF5QixDQUFDO0FBQzlCLElBQUksR0FBd0IsVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBRTlELGtDQUFrQztBQUNsQyxJQUFJLElBQUksR0FBVyxFQUFFLENBQUM7QUFDdEIsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFTLENBQUMsRUFBQyxDQUFDLEVBQUUsQ0FBQyxFQUFDLENBQUMsQ0FBQztBQXVCekIsSUFBSSxLQUFLLEdBa0JTLENBQUMsRUFBRSxDQUFDLENBQUM7QUFFdkIsS0FBSyxDQUFDLEVBQUUsR0FBRyxDQUFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDdEMsS0FBSyxDQUFDLEVBQUUsR0FBUyxDQUFDO0lBQ2QsQ0FBQyxFQUFFLENBQUM7Q0FDUCxDQUFDLENBQUM7QUFDSCxLQUFLLENBQUMsRUFBRSxHQUFHLEVBQUUsQ0FBQztBQUNkLEtBQUssQ0FBQyxFQUFFLEdBQUcsY0FBYSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDNUMsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDN0MsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ2hELEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFTLElBQUksT0FBTyxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFFNUMsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNyQyxLQUFLLENBQUMsRUFBRSxHQUFHLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ25CLEtBQUssQ0FBQyxHQUFHLEdBQUcsQ0FBTyxDQUFDLEVBQUUsQ0FBQyxFQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNwQyxLQUFLLENBQUMsR0FBRyxHQUFHLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDM0MsS0FBSyxDQUFDLEdBQUcsR0FBRztJQUNSLEdBQUcsRUFBUSxDQUFDLEVBQUUsQ0FBQztDQUNsQixDQUFBO0FBQ0QsS0FBSyxDQUFDLEdBQUcsR0FBUyxDQUFDO0lBQ2YsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUM7Q0FDbEMsQ0FBQyxDQUFBO0FBQ0YsS0FBSyxDQUFDLEdBQUcsR0FBUyxDQUFDO0lBQ2YsQ0FBQyxFQUFFLEVBQUU7Q0FDUixDQUFDLENBQUE7QUFDRix5QkFBeUI7QUFDekIsU0FBUyxJQUFJLENBQUMsQ0FBc0IsSUFBRyxDQUFDO0FBQUEsQ0FBQztBQUN6QyxJQUFJLENBQUMsVUFBUyxDQUFDO0lBQ1gsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ3RCLENBQUMsQ0FBQyxDQUFDO0FBRUgsNEJBQTRCO0FBQzVCLElBQUksS0FBSyxHQUE4QixjQUFhLE9BQU8sVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBRS9GLDBCQUEwQjtBQUMxQixNQUFNLEtBQUs7SUFBRyxZQUFZLENBQXNCLElBQUksQ0FBQztDQUFFO0FBQUEsQ0FBQztBQUN4RCxJQUFJLENBQUMsR0FBRyxJQUFJLEtBQUssQ0FBQyxVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUVyRCxxQ0FBcUM7QUFDckMsSUFBSSxLQUFLLEdBQTJCLENBQUMsVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUMvRCxJQUFJLEtBQUssR0FBVSxDQUFDO0lBQ2hCLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsSUFBSSxLQUFLLEdBQWMsRUFBRSxDQUFDO0FBQzFCLElBQUksS0FBSyxHQUFnQixjQUFhLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUMxRCxJQUFJLEtBQUssR0FBeUIsVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ3BFLElBQUksS0FBSyxHQUFvQyxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ2xGLElBQUksS0FBSyxHQUdOLFVBQVMsQ0FBUSxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBRW5DLElBQUksS0FBSyxHQUFzQyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUN6RSxJQUFJLEtBQUssR0FBZ0IsQ0FBQyxFQUFFLEVBQUMsRUFBRSxDQUFDLENBQUM7QUFDakMsSUFBSSxNQUFNLEdBQVksQ0FBTyxDQUFDLEVBQUUsQ0FBQyxFQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUM5QyxJQUFJLE1BQU0sR0FBeUMsQ0FBQyxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNsRixJQUFJLE1BQU0sR0FBVTtJQUNoQixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksTUFBTSxHQUFVLENBQUM7SUFDakIsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUM7Q0FDbEMsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxNQUFNLEdBQVUsQ0FBQztJQUNqQixDQUFDLEVBQUUsRUFBRTtDQUNSLENBQUMsQ0FBQTtBQU9GLFNBQVMsR0FBRyxDQUFDLENBQUMsRUFBQyxDQUFDLElBQUksT0FBTyxDQUFDLEdBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUVqQyxJQUFJLEdBQUcsR0FBRyxHQUFHLENBQUMsQ0FBQyxFQUFDLENBQUMsQ0FBQyxDQUFDO0FBY25CLEtBQUssQ0FBQyxNQUFNLEdBQUcsSUFBSSxLQUFLLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBRS9CLEtBQUssQ0FBQyxTQUFTLENBQUMsR0FBRyxHQUFHLFVBQVMsRUFBRSxFQUFFLEVBQUU7SUFDakMsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0FBQy9DLENBQUMsQ0FBQztBQUVGLEtBQUssQ0FBQyxTQUFTLEdBQUc7SUFDZCxDQUFDLEVBQUUsQ0FBQztJQUNKLENBQUMsRUFBRSxDQUFDO0lBQ0osR0FBRyxFQUFFLFVBQVMsRUFBRSxFQUFFLEVBQUU7UUFDaEIsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0lBQy9DLENBQUM7Q0FDSixDQUFDO0FBSUYsSUFBSSxDQUFDLEdBQU0sRUFBRyxDQUFDIn0=,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE5hbWVzcGFjZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpuYW1lc3BhY2UgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE5hbWVzcGFjZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm5hbWVzcGFjZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXSA9IFtdOwpjN3QyWzBdID0gPElGb28+KHtuOiAxfSk7CgovLyBDT05URVhUOiBPYmplY3QgcHJvcGVydHkgYXNzaWdubWVudAppbnRlcmZhY2UgSVBsYWNlSG9sZGVyIHsKICAgIHQxOiAoczogc3RyaW5nKSA9PiBzdHJpbmc7CiAgICB0MjogSUZvbzsKICAgIHQzOiBudW1iZXJbXTsKICAgIHQ0OiAoKSA9PiBJRm9vOwogICAgdDU6IChuOiBudW1iZXIpID0+IElGb287CiAgICB0NjogKG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vOwogICAgdDc6IHsKICAgICAgICAgICAgKG46IG51bWJlciwgczogc3RyaW5nKTogbnVtYmVyOyAgICAKICAgICAgICAgICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKICAgICAgICB9OwogICAgdDg6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gbnVtYmVyOwogICAgdDk6IG51bWJlcltdW107CiAgICB0MTA6IElGb29bXTsKICAgIHQxMTogeyhuOiBudW1iZXIsIHM6IHN0cmluZyk6IHN0cmluZzt9W107CiAgICB0MTI6IElCYXI7CiAgICB0MTM6IElGb287CiAgICB0MTQ6IElGb287CiAgICB9Cgp2YXIgb2JqYzg6IHsKICAgIHQxOiAoczogc3RyaW5nKSA9PiBzdHJpbmc7CiAgICB0MjogSUZvbzsKICAgIHQzOiBudW1iZXJbXTsKICAgIHQ0OiAoKSA9PiBJRm9vOwogICAgdDU6IChuOiBudW1iZXIpID0+IElGb287CiAgICB0NjogKG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vOwogICAgdDc6IHsKICAgICAgICAgICAgKG46IG51bWJlciwgczogc3RyaW5nKTogbnVtYmVyOyAgICAKICAgICAgICAgICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKICAgICAgICB9OwogICAgdDg6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gbnVtYmVyOwogICAgdDk6IG51bWJlcltdW107CiAgICB0MTA6IElGb29bXTsKICAgIHQxMTogeyhuOiBudW1iZXIsIHM6IHN0cmluZyk6IHN0cmluZzt9W107CiAgICB0MTI6IElCYXI7CiAgICB0MTM6IElGb287CiAgICB0MTQ6IElGb287Cn0gPSA8SVBsYWNlSG9sZGVyPih7fSk7CgpvYmpjOC50MSA9IChmdW5jdGlvbihzKSB7IHJldHVybiBzIH0pOwpvYmpjOC50MiA9IDxJRm9vPih7CiAgICBuOiAxCn0pOwpvYmpjOC50MyA9IFtdOwpvYmpjOC50NCA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NSA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDYgPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ3ID0gZnVuY3Rpb24objogbnVtYmVyKSB7IHJldHVybiBuIH07CgpvYmpjOC50OCA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07Cm9iamM4LnQ5ID0gW1tdLFtdXTsKb2JqYzgudDEwID0gWzxJRm9vPih7fSksPElGb28+KHt9KV07Cm9iamM4LnQxMSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKb2JqYzgudDEyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0Kb2JqYzgudDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKb2JqYzgudDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCi8vIENPTlRFWFQ6IEZ1bmN0aW9uIGNhbGwKZnVuY3Rpb24gYzl0NShmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7fTsKYzl0NShmdW5jdGlvbihuKSB7CiAgICByZXR1cm4gPElGb28+KHt9KTsKfSk7CgovLyBDT05URVhUOiBSZXR1cm4gc3RhdGVtZW50CnZhciBjMTB0NTogKCkgPT4gKG46IG51bWJlcikgPT4gSUZvbyA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9IH07CgovLyBDT05URVhUOiBOZXdpbmcgYSBjbGFzcwpjbGFzcyBDMTF0NSB7IGNvbnN0cnVjdG9yKGY6IChuOiBudW1iZXIpID0+IElGb28pIHsgfSB9Owp2YXIgaSA9IG5ldyBDMTF0NShmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH0pOwoKLy8gQ09OVEVYVDogVHlwZSBhbm5vdGF0ZWQgZXhwcmVzc2lvbgp2YXIgYzEydDEgPSA8KHM6IHN0cmluZykgPT4gc3RyaW5nPiAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMxMnQyID0gPElGb28+ICh7CiAgICBuOiAxCn0pOwp2YXIgYzEydDMgPSA8bnVtYmVyW10+IFtdOwp2YXIgYzEydDQgPSA8KCkgPT4gSUZvbz4gZnVuY3Rpb24oKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPiBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NiA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28+IGZ1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMxMnQ3ID0gPHsKICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAvLyhzMTogc3RyaW5nLCBzMjogc3RyaW5nKTogbnVtYmVyOwp9PiBmdW5jdGlvbihuOm51bWJlcikgeyByZXR1cm4gbiB9OwoKdmFyIGMxMnQ4ID0gPChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gbnVtYmVyPiBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9Owp2YXIgYzEydDkgPSA8bnVtYmVyW11bXT4gW1tdLFtdXTsKdmFyIGMxMnQxMCA9IDxJRm9vW10+IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwp2YXIgYzEydDExID0gPHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdPiBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07CnZhciBjMTJ0MTIgPSA8SUJhcj4gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMxMnQxMyA9IDxJRm9vPiAoewogICAgZjogZnVuY3Rpb24oaSwgcykgeyByZXR1cm4gczsgfQp9KQp2YXIgYzEydDE0ID0gPElGb28+ICh7CiAgICBhOiBbXQp9KQoKLy8gQ09OVEVYVDogQ29udGV4dHVhbCB0eXBpbmcgZGVjbGFyYXRpb25zCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZ1bmN0aW9uIGRlY2xhcmF0aW9ucwpkZWNsYXJlIGZ1bmN0aW9uIEVGMShhOm51bWJlciwgYjpudW1iZXIpOm51bWJlcjsKCmZ1bmN0aW9uIEVGMShhLGIpIHsgcmV0dXJuIGErYjsgfQoKdmFyIGVmdiA9IEVGMSgxLDIpOwoKCi8vIGNvbnRleHR1YWxseSB0eXBpbmcgZnJvbSBhbWJpZW50IGNsYXNzIGRlY2xhcmF0aW9ucwpkZWNsYXJlIGNsYXNzIFBvaW50CnsKICAgICAgY29uc3RydWN0b3IoeDogbnVtYmVyLCB5OiBudW1iZXIpOwogICAgICB4OiBudW1iZXI7CiAgICAgIHk6IG51bWJlcjsKICAgICAgYWRkKGR4OiBudW1iZXIsIGR5OiBudW1iZXIpOiBQb2ludDsKICAgICAgc3RhdGljIG9yaWdpbjogUG9pbnQ7Cgp9CgpQb2ludC5vcmlnaW4gPSBuZXcgUG9pbnQoMCwgMCk7CgpQb2ludC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24oZHgsIGR5KSB7CiAgICByZXR1cm4gbmV3IFBvaW50KHRoaXMueCArIGR4LCB0aGlzLnkgKyBkeSk7Cn07CgpQb2ludC5wcm90b3R5cGUgPSB7CiAgICB4OiAwLAogICAgeTogMCwKICAgIGFkZDogZnVuY3Rpb24oZHgsIGR5KSB7CiAgICAgICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwogICAgfQp9OwoKaW50ZXJmYWNlIEEgeyB4OiBzdHJpbmc7IH0KaW50ZXJmYWNlIEIgZXh0ZW5kcyBBIHsgfQp2YXIgeDogQiA9IHsgfTsK diff --git a/tests/baselines/reference/contextualTyping.sourcemap.txt b/tests/baselines/reference/contextualTyping.sourcemap.txt index 52f0ada5c8a32..6553f1e71cb35 100644 --- a/tests/baselines/reference/contextualTyping.sourcemap.txt +++ b/tests/baselines/reference/contextualTyping.sourcemap.txt @@ -8,6 +8,7 @@ sources: contextualTyping.ts emittedFile:contextualTyping.js sourceFile:contextualTyping.ts ------------------------------------------------------------------- +>>>"use strict"; >>>// CONTEXT: Class property declaration 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -25,8 +26,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Class property declaration -1 >Emitted(1, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(1, 39) Source(13, 39) + SourceIndex(0) +1 >Emitted(2, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(2, 39) Source(13, 39) + SourceIndex(0) --- >>>class C1T5 { 1 > @@ -37,15 +38,15 @@ sourceFile:contextualTyping.ts > 2 >class 3 > C1T5 -1 >Emitted(2, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(2, 7) Source(14, 7) + SourceIndex(0) -3 >Emitted(2, 11) Source(14, 11) + SourceIndex(0) +1 >Emitted(3, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(3, 7) Source(14, 7) + SourceIndex(0) +3 >Emitted(3, 11) Source(14, 11) + SourceIndex(0) --- >>> constructor() { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(3, 5) Source(14, 1) + SourceIndex(0) +1->Emitted(4, 5) Source(14, 1) + SourceIndex(0) --- >>> this.foo = function (i) { 1->^^^^^^^^ @@ -59,11 +60,11 @@ sourceFile:contextualTyping.ts 3 > : (i: number, s: string) => number = 4 > function( 5 > i -1->Emitted(4, 9) Source(15, 5) + SourceIndex(0) -2 >Emitted(4, 17) Source(15, 8) + SourceIndex(0) -3 >Emitted(4, 20) Source(15, 45) + SourceIndex(0) -4 >Emitted(4, 30) Source(15, 54) + SourceIndex(0) -5 >Emitted(4, 31) Source(15, 55) + SourceIndex(0) +1->Emitted(5, 9) Source(15, 5) + SourceIndex(0) +2 >Emitted(5, 17) Source(15, 8) + SourceIndex(0) +3 >Emitted(5, 20) Source(15, 45) + SourceIndex(0) +4 >Emitted(5, 30) Source(15, 54) + SourceIndex(0) +5 >Emitted(5, 31) Source(15, 55) + SourceIndex(0) --- >>> return i; 1 >^^^^^^^^^^^^ @@ -75,10 +76,10 @@ sourceFile:contextualTyping.ts 2 > return 3 > i 4 > ; -1 >Emitted(5, 13) Source(16, 9) + SourceIndex(0) -2 >Emitted(5, 20) Source(16, 16) + SourceIndex(0) -3 >Emitted(5, 21) Source(16, 17) + SourceIndex(0) -4 >Emitted(5, 22) Source(16, 18) + SourceIndex(0) +1 >Emitted(6, 13) Source(16, 9) + SourceIndex(0) +2 >Emitted(6, 20) Source(16, 16) + SourceIndex(0) +3 >Emitted(6, 21) Source(16, 17) + SourceIndex(0) +4 >Emitted(6, 22) Source(16, 18) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^ @@ -88,9 +89,9 @@ sourceFile:contextualTyping.ts > 2 > } 3 > -1 >Emitted(6, 9) Source(17, 5) + SourceIndex(0) -2 >Emitted(6, 10) Source(17, 6) + SourceIndex(0) -3 >Emitted(6, 11) Source(17, 6) + SourceIndex(0) +1 >Emitted(7, 9) Source(17, 5) + SourceIndex(0) +2 >Emitted(7, 10) Source(17, 6) + SourceIndex(0) +3 >Emitted(7, 11) Source(17, 6) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -98,14 +99,14 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(7, 5) Source(18, 1) + SourceIndex(0) -2 >Emitted(7, 6) Source(18, 2) + SourceIndex(0) +1 >Emitted(8, 5) Source(18, 1) + SourceIndex(0) +2 >Emitted(8, 6) Source(18, 2) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(8, 2) Source(18, 2) + SourceIndex(0) +1 >Emitted(9, 2) Source(18, 2) + SourceIndex(0) --- >>>// CONTEXT: Namespace property declaration 1-> @@ -114,8 +115,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Namespace property declaration -1->Emitted(9, 1) Source(20, 1) + SourceIndex(0) -2 >Emitted(9, 43) Source(20, 43) + SourceIndex(0) +1->Emitted(10, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(10, 43) Source(20, 43) + SourceIndex(0) --- >>>var C2T5; 1 > @@ -132,10 +133,10 @@ sourceFile:contextualTyping.ts > return i; > } > } -1 >Emitted(10, 1) Source(21, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(21, 11) + SourceIndex(0) -3 >Emitted(10, 9) Source(21, 15) + SourceIndex(0) -4 >Emitted(10, 10) Source(25, 2) + SourceIndex(0) +1 >Emitted(11, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(11, 5) Source(21, 11) + SourceIndex(0) +3 >Emitted(11, 9) Source(21, 15) + SourceIndex(0) +4 >Emitted(11, 10) Source(25, 2) + SourceIndex(0) --- >>>(function (C2T5) { 1-> @@ -145,9 +146,9 @@ sourceFile:contextualTyping.ts 1-> 2 >namespace 3 > C2T5 -1->Emitted(11, 1) Source(21, 1) + SourceIndex(0) -2 >Emitted(11, 12) Source(21, 11) + SourceIndex(0) -3 >Emitted(11, 16) Source(21, 15) + SourceIndex(0) +1->Emitted(12, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(12, 12) Source(21, 11) + SourceIndex(0) +3 >Emitted(12, 16) Source(21, 15) + SourceIndex(0) --- >>> C2T5.foo = function (i) { 1->^^^^ @@ -161,11 +162,11 @@ sourceFile:contextualTyping.ts 3 > : (i: number, s: string) => number = 4 > function( 5 > i -1->Emitted(12, 5) Source(22, 16) + SourceIndex(0) -2 >Emitted(12, 13) Source(22, 19) + SourceIndex(0) -3 >Emitted(12, 16) Source(22, 56) + SourceIndex(0) -4 >Emitted(12, 26) Source(22, 65) + SourceIndex(0) -5 >Emitted(12, 27) Source(22, 66) + SourceIndex(0) +1->Emitted(13, 5) Source(22, 16) + SourceIndex(0) +2 >Emitted(13, 13) Source(22, 19) + SourceIndex(0) +3 >Emitted(13, 16) Source(22, 56) + SourceIndex(0) +4 >Emitted(13, 26) Source(22, 65) + SourceIndex(0) +5 >Emitted(13, 27) Source(22, 66) + SourceIndex(0) --- >>> return i; 1 >^^^^^^^^ @@ -177,10 +178,10 @@ sourceFile:contextualTyping.ts 2 > return 3 > i 4 > ; -1 >Emitted(13, 9) Source(23, 9) + SourceIndex(0) -2 >Emitted(13, 16) Source(23, 16) + SourceIndex(0) -3 >Emitted(13, 17) Source(23, 17) + SourceIndex(0) -4 >Emitted(13, 18) Source(23, 18) + SourceIndex(0) +1 >Emitted(14, 9) Source(23, 9) + SourceIndex(0) +2 >Emitted(14, 16) Source(23, 16) + SourceIndex(0) +3 >Emitted(14, 17) Source(23, 17) + SourceIndex(0) +4 >Emitted(14, 18) Source(23, 18) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -191,9 +192,9 @@ sourceFile:contextualTyping.ts > 2 > } 3 > -1 >Emitted(14, 5) Source(24, 5) + SourceIndex(0) -2 >Emitted(14, 6) Source(24, 6) + SourceIndex(0) -3 >Emitted(14, 7) Source(24, 6) + SourceIndex(0) +1 >Emitted(15, 5) Source(24, 5) + SourceIndex(0) +2 >Emitted(15, 6) Source(24, 6) + SourceIndex(0) +3 >Emitted(15, 7) Source(24, 6) + SourceIndex(0) --- >>>})(C2T5 || (C2T5 = {})); 1-> @@ -216,13 +217,13 @@ sourceFile:contextualTyping.ts > return i; > } > } -1->Emitted(15, 1) Source(25, 1) + SourceIndex(0) -2 >Emitted(15, 2) Source(25, 2) + SourceIndex(0) -3 >Emitted(15, 4) Source(21, 11) + SourceIndex(0) -4 >Emitted(15, 8) Source(21, 15) + SourceIndex(0) -5 >Emitted(15, 13) Source(21, 11) + SourceIndex(0) -6 >Emitted(15, 17) Source(21, 15) + SourceIndex(0) -7 >Emitted(15, 25) Source(25, 2) + SourceIndex(0) +1->Emitted(16, 1) Source(25, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(25, 2) + SourceIndex(0) +3 >Emitted(16, 4) Source(21, 11) + SourceIndex(0) +4 >Emitted(16, 8) Source(21, 15) + SourceIndex(0) +5 >Emitted(16, 13) Source(21, 11) + SourceIndex(0) +6 >Emitted(16, 17) Source(21, 15) + SourceIndex(0) +7 >Emitted(16, 25) Source(25, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable declaration 1-> @@ -232,8 +233,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Variable declaration -1->Emitted(16, 1) Source(27, 1) + SourceIndex(0) -2 >Emitted(16, 33) Source(27, 33) + SourceIndex(0) +1->Emitted(17, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(17, 33) Source(27, 33) + SourceIndex(0) --- >>>var c3t1 = (function (s) { return s; }); 1-> @@ -267,21 +268,21 @@ sourceFile:contextualTyping.ts 13> } 14> ) 15> ; -1->Emitted(17, 1) Source(28, 1) + SourceIndex(0) -2 >Emitted(17, 5) Source(28, 5) + SourceIndex(0) -3 >Emitted(17, 9) Source(28, 9) + SourceIndex(0) -4 >Emitted(17, 12) Source(28, 35) + SourceIndex(0) -5 >Emitted(17, 13) Source(28, 36) + SourceIndex(0) -6 >Emitted(17, 23) Source(28, 45) + SourceIndex(0) -7 >Emitted(17, 24) Source(28, 46) + SourceIndex(0) -8 >Emitted(17, 28) Source(28, 50) + SourceIndex(0) -9 >Emitted(17, 35) Source(28, 57) + SourceIndex(0) -10>Emitted(17, 36) Source(28, 58) + SourceIndex(0) -11>Emitted(17, 37) Source(28, 58) + SourceIndex(0) -12>Emitted(17, 38) Source(28, 59) + SourceIndex(0) -13>Emitted(17, 39) Source(28, 60) + SourceIndex(0) -14>Emitted(17, 40) Source(28, 61) + SourceIndex(0) -15>Emitted(17, 41) Source(28, 62) + SourceIndex(0) +1->Emitted(18, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(18, 5) Source(28, 5) + SourceIndex(0) +3 >Emitted(18, 9) Source(28, 9) + SourceIndex(0) +4 >Emitted(18, 12) Source(28, 35) + SourceIndex(0) +5 >Emitted(18, 13) Source(28, 36) + SourceIndex(0) +6 >Emitted(18, 23) Source(28, 45) + SourceIndex(0) +7 >Emitted(18, 24) Source(28, 46) + SourceIndex(0) +8 >Emitted(18, 28) Source(28, 50) + SourceIndex(0) +9 >Emitted(18, 35) Source(28, 57) + SourceIndex(0) +10>Emitted(18, 36) Source(28, 58) + SourceIndex(0) +11>Emitted(18, 37) Source(28, 58) + SourceIndex(0) +12>Emitted(18, 38) Source(28, 59) + SourceIndex(0) +13>Emitted(18, 39) Source(28, 60) + SourceIndex(0) +14>Emitted(18, 40) Source(28, 61) + SourceIndex(0) +15>Emitted(18, 41) Source(28, 62) + SourceIndex(0) --- >>>var c3t2 = ({ 1 > @@ -295,11 +296,11 @@ sourceFile:contextualTyping.ts 3 > c3t2 4 > = 5 > ( -1 >Emitted(18, 1) Source(29, 1) + SourceIndex(0) -2 >Emitted(18, 5) Source(29, 5) + SourceIndex(0) -3 >Emitted(18, 9) Source(29, 9) + SourceIndex(0) -4 >Emitted(18, 12) Source(29, 18) + SourceIndex(0) -5 >Emitted(18, 13) Source(29, 19) + SourceIndex(0) +1 >Emitted(19, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(19, 9) Source(29, 9) + SourceIndex(0) +4 >Emitted(19, 12) Source(29, 18) + SourceIndex(0) +5 >Emitted(19, 13) Source(29, 19) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -311,10 +312,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(19, 5) Source(30, 5) + SourceIndex(0) -2 >Emitted(19, 6) Source(30, 6) + SourceIndex(0) -3 >Emitted(19, 8) Source(30, 8) + SourceIndex(0) -4 >Emitted(19, 9) Source(30, 9) + SourceIndex(0) +1 >Emitted(20, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(20, 6) Source(30, 6) + SourceIndex(0) +3 >Emitted(20, 8) Source(30, 8) + SourceIndex(0) +4 >Emitted(20, 9) Source(30, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -325,9 +326,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(20, 2) Source(31, 2) + SourceIndex(0) -2 >Emitted(20, 3) Source(31, 3) + SourceIndex(0) -3 >Emitted(20, 4) Source(31, 3) + SourceIndex(0) +1 >Emitted(21, 2) Source(31, 2) + SourceIndex(0) +2 >Emitted(21, 3) Source(31, 3) + SourceIndex(0) +3 >Emitted(21, 4) Source(31, 3) + SourceIndex(0) --- >>>var c3t3 = []; 1-> @@ -344,12 +345,12 @@ sourceFile:contextualTyping.ts 4 > : number[] = 5 > [] 6 > ; -1->Emitted(21, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(21, 5) Source(32, 5) + SourceIndex(0) -3 >Emitted(21, 9) Source(32, 9) + SourceIndex(0) -4 >Emitted(21, 12) Source(32, 22) + SourceIndex(0) -5 >Emitted(21, 14) Source(32, 24) + SourceIndex(0) -6 >Emitted(21, 15) Source(32, 25) + SourceIndex(0) +1->Emitted(22, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(22, 5) Source(32, 5) + SourceIndex(0) +3 >Emitted(22, 9) Source(32, 9) + SourceIndex(0) +4 >Emitted(22, 12) Source(32, 22) + SourceIndex(0) +5 >Emitted(22, 14) Source(32, 24) + SourceIndex(0) +6 >Emitted(22, 15) Source(32, 25) + SourceIndex(0) --- >>>var c3t4 = function () { return ({}); }; 1-> @@ -380,19 +381,19 @@ sourceFile:contextualTyping.ts 11> 12> } 13> ; -1->Emitted(22, 1) Source(33, 1) + SourceIndex(0) -2 >Emitted(22, 5) Source(33, 5) + SourceIndex(0) -3 >Emitted(22, 9) Source(33, 9) + SourceIndex(0) -4 >Emitted(22, 12) Source(33, 24) + SourceIndex(0) -5 >Emitted(22, 26) Source(33, 37) + SourceIndex(0) -6 >Emitted(22, 33) Source(33, 50) + SourceIndex(0) -7 >Emitted(22, 34) Source(33, 51) + SourceIndex(0) -8 >Emitted(22, 36) Source(33, 53) + SourceIndex(0) -9 >Emitted(22, 37) Source(33, 54) + SourceIndex(0) -10>Emitted(22, 38) Source(33, 54) + SourceIndex(0) -11>Emitted(22, 39) Source(33, 55) + SourceIndex(0) -12>Emitted(22, 40) Source(33, 56) + SourceIndex(0) -13>Emitted(22, 41) Source(33, 57) + SourceIndex(0) +1->Emitted(23, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(23, 5) Source(33, 5) + SourceIndex(0) +3 >Emitted(23, 9) Source(33, 9) + SourceIndex(0) +4 >Emitted(23, 12) Source(33, 24) + SourceIndex(0) +5 >Emitted(23, 26) Source(33, 37) + SourceIndex(0) +6 >Emitted(23, 33) Source(33, 50) + SourceIndex(0) +7 >Emitted(23, 34) Source(33, 51) + SourceIndex(0) +8 >Emitted(23, 36) Source(33, 53) + SourceIndex(0) +9 >Emitted(23, 37) Source(33, 54) + SourceIndex(0) +10>Emitted(23, 38) Source(33, 54) + SourceIndex(0) +11>Emitted(23, 39) Source(33, 55) + SourceIndex(0) +12>Emitted(23, 40) Source(33, 56) + SourceIndex(0) +13>Emitted(23, 41) Source(33, 57) + SourceIndex(0) --- >>>var c3t5 = function (n) { return ({}); }; 1-> @@ -427,21 +428,21 @@ sourceFile:contextualTyping.ts 13> 14> } 15> ; -1->Emitted(23, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(23, 5) Source(34, 5) + SourceIndex(0) -3 >Emitted(23, 9) Source(34, 9) + SourceIndex(0) -4 >Emitted(23, 12) Source(34, 33) + SourceIndex(0) -5 >Emitted(23, 22) Source(34, 42) + SourceIndex(0) -6 >Emitted(23, 23) Source(34, 43) + SourceIndex(0) -7 >Emitted(23, 27) Source(34, 47) + SourceIndex(0) -8 >Emitted(23, 34) Source(34, 60) + SourceIndex(0) -9 >Emitted(23, 35) Source(34, 61) + SourceIndex(0) -10>Emitted(23, 37) Source(34, 63) + SourceIndex(0) -11>Emitted(23, 38) Source(34, 64) + SourceIndex(0) -12>Emitted(23, 39) Source(34, 64) + SourceIndex(0) -13>Emitted(23, 40) Source(34, 65) + SourceIndex(0) -14>Emitted(23, 41) Source(34, 66) + SourceIndex(0) -15>Emitted(23, 42) Source(34, 67) + SourceIndex(0) +1->Emitted(24, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(24, 5) Source(34, 5) + SourceIndex(0) +3 >Emitted(24, 9) Source(34, 9) + SourceIndex(0) +4 >Emitted(24, 12) Source(34, 33) + SourceIndex(0) +5 >Emitted(24, 22) Source(34, 42) + SourceIndex(0) +6 >Emitted(24, 23) Source(34, 43) + SourceIndex(0) +7 >Emitted(24, 27) Source(34, 47) + SourceIndex(0) +8 >Emitted(24, 34) Source(34, 60) + SourceIndex(0) +9 >Emitted(24, 35) Source(34, 61) + SourceIndex(0) +10>Emitted(24, 37) Source(34, 63) + SourceIndex(0) +11>Emitted(24, 38) Source(34, 64) + SourceIndex(0) +12>Emitted(24, 39) Source(34, 64) + SourceIndex(0) +13>Emitted(24, 40) Source(34, 65) + SourceIndex(0) +14>Emitted(24, 41) Source(34, 66) + SourceIndex(0) +15>Emitted(24, 42) Source(34, 67) + SourceIndex(0) --- >>>var c3t6 = function (n, s) { return ({}); }; 1-> @@ -479,23 +480,23 @@ sourceFile:contextualTyping.ts 15> 16> } 17> ; -1->Emitted(24, 1) Source(35, 1) + SourceIndex(0) -2 >Emitted(24, 5) Source(35, 5) + SourceIndex(0) -3 >Emitted(24, 9) Source(35, 9) + SourceIndex(0) -4 >Emitted(24, 12) Source(35, 44) + SourceIndex(0) -5 >Emitted(24, 22) Source(35, 53) + SourceIndex(0) -6 >Emitted(24, 23) Source(35, 54) + SourceIndex(0) -7 >Emitted(24, 25) Source(35, 56) + SourceIndex(0) -8 >Emitted(24, 26) Source(35, 57) + SourceIndex(0) -9 >Emitted(24, 30) Source(35, 61) + SourceIndex(0) -10>Emitted(24, 37) Source(35, 74) + SourceIndex(0) -11>Emitted(24, 38) Source(35, 75) + SourceIndex(0) -12>Emitted(24, 40) Source(35, 77) + SourceIndex(0) -13>Emitted(24, 41) Source(35, 78) + SourceIndex(0) -14>Emitted(24, 42) Source(35, 78) + SourceIndex(0) -15>Emitted(24, 43) Source(35, 79) + SourceIndex(0) -16>Emitted(24, 44) Source(35, 80) + SourceIndex(0) -17>Emitted(24, 45) Source(35, 81) + SourceIndex(0) +1->Emitted(25, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(25, 5) Source(35, 5) + SourceIndex(0) +3 >Emitted(25, 9) Source(35, 9) + SourceIndex(0) +4 >Emitted(25, 12) Source(35, 44) + SourceIndex(0) +5 >Emitted(25, 22) Source(35, 53) + SourceIndex(0) +6 >Emitted(25, 23) Source(35, 54) + SourceIndex(0) +7 >Emitted(25, 25) Source(35, 56) + SourceIndex(0) +8 >Emitted(25, 26) Source(35, 57) + SourceIndex(0) +9 >Emitted(25, 30) Source(35, 61) + SourceIndex(0) +10>Emitted(25, 37) Source(35, 74) + SourceIndex(0) +11>Emitted(25, 38) Source(35, 75) + SourceIndex(0) +12>Emitted(25, 40) Source(35, 77) + SourceIndex(0) +13>Emitted(25, 41) Source(35, 78) + SourceIndex(0) +14>Emitted(25, 42) Source(35, 78) + SourceIndex(0) +15>Emitted(25, 43) Source(35, 79) + SourceIndex(0) +16>Emitted(25, 44) Source(35, 80) + SourceIndex(0) +17>Emitted(25, 45) Source(35, 81) + SourceIndex(0) --- >>>var c3t7 = function (n) { return n; }; 1 > @@ -529,19 +530,19 @@ sourceFile:contextualTyping.ts 11> 12> } 13> ; -1 >Emitted(25, 1) Source(36, 1) + SourceIndex(0) -2 >Emitted(25, 5) Source(36, 5) + SourceIndex(0) -3 >Emitted(25, 9) Source(36, 9) + SourceIndex(0) -4 >Emitted(25, 12) Source(39, 5) + SourceIndex(0) -5 >Emitted(25, 22) Source(39, 14) + SourceIndex(0) -6 >Emitted(25, 23) Source(39, 15) + SourceIndex(0) -7 >Emitted(25, 27) Source(39, 19) + SourceIndex(0) -8 >Emitted(25, 34) Source(39, 26) + SourceIndex(0) -9 >Emitted(25, 35) Source(39, 27) + SourceIndex(0) -10>Emitted(25, 36) Source(39, 28) + SourceIndex(0) -11>Emitted(25, 37) Source(39, 29) + SourceIndex(0) -12>Emitted(25, 38) Source(39, 30) + SourceIndex(0) -13>Emitted(25, 39) Source(39, 31) + SourceIndex(0) +1 >Emitted(26, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(26, 5) Source(36, 5) + SourceIndex(0) +3 >Emitted(26, 9) Source(36, 9) + SourceIndex(0) +4 >Emitted(26, 12) Source(39, 5) + SourceIndex(0) +5 >Emitted(26, 22) Source(39, 14) + SourceIndex(0) +6 >Emitted(26, 23) Source(39, 15) + SourceIndex(0) +7 >Emitted(26, 27) Source(39, 19) + SourceIndex(0) +8 >Emitted(26, 34) Source(39, 26) + SourceIndex(0) +9 >Emitted(26, 35) Source(39, 27) + SourceIndex(0) +10>Emitted(26, 36) Source(39, 28) + SourceIndex(0) +11>Emitted(26, 37) Source(39, 29) + SourceIndex(0) +12>Emitted(26, 38) Source(39, 30) + SourceIndex(0) +13>Emitted(26, 39) Source(39, 31) + SourceIndex(0) --- >>>var c3t8 = function (n) { return n; }; 1-> @@ -572,19 +573,19 @@ sourceFile:contextualTyping.ts 11> 12> } 13> ; -1->Emitted(26, 1) Source(41, 1) + SourceIndex(0) -2 >Emitted(26, 5) Source(41, 5) + SourceIndex(0) -3 >Emitted(26, 9) Source(41, 9) + SourceIndex(0) -4 >Emitted(26, 12) Source(41, 46) + SourceIndex(0) -5 >Emitted(26, 22) Source(41, 55) + SourceIndex(0) -6 >Emitted(26, 23) Source(41, 56) + SourceIndex(0) -7 >Emitted(26, 27) Source(41, 60) + SourceIndex(0) -8 >Emitted(26, 34) Source(41, 67) + SourceIndex(0) -9 >Emitted(26, 35) Source(41, 68) + SourceIndex(0) -10>Emitted(26, 36) Source(41, 69) + SourceIndex(0) -11>Emitted(26, 37) Source(41, 70) + SourceIndex(0) -12>Emitted(26, 38) Source(41, 71) + SourceIndex(0) -13>Emitted(26, 39) Source(41, 72) + SourceIndex(0) +1->Emitted(27, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(27, 5) Source(41, 5) + SourceIndex(0) +3 >Emitted(27, 9) Source(41, 9) + SourceIndex(0) +4 >Emitted(27, 12) Source(41, 46) + SourceIndex(0) +5 >Emitted(27, 22) Source(41, 55) + SourceIndex(0) +6 >Emitted(27, 23) Source(41, 56) + SourceIndex(0) +7 >Emitted(27, 27) Source(41, 60) + SourceIndex(0) +8 >Emitted(27, 34) Source(41, 67) + SourceIndex(0) +9 >Emitted(27, 35) Source(41, 68) + SourceIndex(0) +10>Emitted(27, 36) Source(41, 69) + SourceIndex(0) +11>Emitted(27, 37) Source(41, 70) + SourceIndex(0) +12>Emitted(27, 38) Source(41, 71) + SourceIndex(0) +13>Emitted(27, 39) Source(41, 72) + SourceIndex(0) --- >>>var c3t9 = [[], []]; 1 > @@ -609,16 +610,16 @@ sourceFile:contextualTyping.ts 8 > [] 9 > ] 10> ; -1 >Emitted(27, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(27, 5) Source(42, 5) + SourceIndex(0) -3 >Emitted(27, 9) Source(42, 9) + SourceIndex(0) -4 >Emitted(27, 12) Source(42, 24) + SourceIndex(0) -5 >Emitted(27, 13) Source(42, 25) + SourceIndex(0) -6 >Emitted(27, 15) Source(42, 27) + SourceIndex(0) -7 >Emitted(27, 17) Source(42, 28) + SourceIndex(0) -8 >Emitted(27, 19) Source(42, 30) + SourceIndex(0) -9 >Emitted(27, 20) Source(42, 31) + SourceIndex(0) -10>Emitted(27, 21) Source(42, 32) + SourceIndex(0) +1 >Emitted(28, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(28, 5) Source(42, 5) + SourceIndex(0) +3 >Emitted(28, 9) Source(42, 9) + SourceIndex(0) +4 >Emitted(28, 12) Source(42, 24) + SourceIndex(0) +5 >Emitted(28, 13) Source(42, 25) + SourceIndex(0) +6 >Emitted(28, 15) Source(42, 27) + SourceIndex(0) +7 >Emitted(28, 17) Source(42, 28) + SourceIndex(0) +8 >Emitted(28, 19) Source(42, 30) + SourceIndex(0) +9 >Emitted(28, 20) Source(42, 31) + SourceIndex(0) +10>Emitted(28, 21) Source(42, 32) + SourceIndex(0) --- >>>var c3t10 = [({}), ({})]; 1-> @@ -651,20 +652,20 @@ sourceFile:contextualTyping.ts 12> ) 13> ] 14> ; -1->Emitted(28, 1) Source(43, 1) + SourceIndex(0) -2 >Emitted(28, 5) Source(43, 5) + SourceIndex(0) -3 >Emitted(28, 10) Source(43, 10) + SourceIndex(0) -4 >Emitted(28, 13) Source(43, 21) + SourceIndex(0) -5 >Emitted(28, 14) Source(43, 28) + SourceIndex(0) -6 >Emitted(28, 15) Source(43, 29) + SourceIndex(0) -7 >Emitted(28, 17) Source(43, 31) + SourceIndex(0) -8 >Emitted(28, 18) Source(43, 32) + SourceIndex(0) -9 >Emitted(28, 20) Source(43, 39) + SourceIndex(0) -10>Emitted(28, 21) Source(43, 40) + SourceIndex(0) -11>Emitted(28, 23) Source(43, 42) + SourceIndex(0) -12>Emitted(28, 24) Source(43, 43) + SourceIndex(0) -13>Emitted(28, 25) Source(43, 44) + SourceIndex(0) -14>Emitted(28, 26) Source(43, 45) + SourceIndex(0) +1->Emitted(29, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(29, 5) Source(43, 5) + SourceIndex(0) +3 >Emitted(29, 10) Source(43, 10) + SourceIndex(0) +4 >Emitted(29, 13) Source(43, 21) + SourceIndex(0) +5 >Emitted(29, 14) Source(43, 28) + SourceIndex(0) +6 >Emitted(29, 15) Source(43, 29) + SourceIndex(0) +7 >Emitted(29, 17) Source(43, 31) + SourceIndex(0) +8 >Emitted(29, 18) Source(43, 32) + SourceIndex(0) +9 >Emitted(29, 20) Source(43, 39) + SourceIndex(0) +10>Emitted(29, 21) Source(43, 40) + SourceIndex(0) +11>Emitted(29, 23) Source(43, 42) + SourceIndex(0) +12>Emitted(29, 24) Source(43, 43) + SourceIndex(0) +13>Emitted(29, 25) Source(43, 44) + SourceIndex(0) +14>Emitted(29, 26) Source(43, 45) + SourceIndex(0) --- >>>var c3t11 = [function (n, s) { return s; }]; 1-> @@ -702,23 +703,23 @@ sourceFile:contextualTyping.ts 15> } 16> ] 17> ; -1->Emitted(29, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(29, 5) Source(44, 5) + SourceIndex(0) -3 >Emitted(29, 10) Source(44, 10) + SourceIndex(0) -4 >Emitted(29, 13) Source(44, 50) + SourceIndex(0) -5 >Emitted(29, 14) Source(44, 51) + SourceIndex(0) -6 >Emitted(29, 24) Source(44, 60) + SourceIndex(0) -7 >Emitted(29, 25) Source(44, 61) + SourceIndex(0) -8 >Emitted(29, 27) Source(44, 63) + SourceIndex(0) -9 >Emitted(29, 28) Source(44, 64) + SourceIndex(0) -10>Emitted(29, 32) Source(44, 68) + SourceIndex(0) -11>Emitted(29, 39) Source(44, 75) + SourceIndex(0) -12>Emitted(29, 40) Source(44, 76) + SourceIndex(0) -13>Emitted(29, 41) Source(44, 77) + SourceIndex(0) -14>Emitted(29, 42) Source(44, 78) + SourceIndex(0) -15>Emitted(29, 43) Source(44, 79) + SourceIndex(0) -16>Emitted(29, 44) Source(44, 80) + SourceIndex(0) -17>Emitted(29, 45) Source(44, 81) + SourceIndex(0) +1->Emitted(30, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) +3 >Emitted(30, 10) Source(44, 10) + SourceIndex(0) +4 >Emitted(30, 13) Source(44, 50) + SourceIndex(0) +5 >Emitted(30, 14) Source(44, 51) + SourceIndex(0) +6 >Emitted(30, 24) Source(44, 60) + SourceIndex(0) +7 >Emitted(30, 25) Source(44, 61) + SourceIndex(0) +8 >Emitted(30, 27) Source(44, 63) + SourceIndex(0) +9 >Emitted(30, 28) Source(44, 64) + SourceIndex(0) +10>Emitted(30, 32) Source(44, 68) + SourceIndex(0) +11>Emitted(30, 39) Source(44, 75) + SourceIndex(0) +12>Emitted(30, 40) Source(44, 76) + SourceIndex(0) +13>Emitted(30, 41) Source(44, 77) + SourceIndex(0) +14>Emitted(30, 42) Source(44, 78) + SourceIndex(0) +15>Emitted(30, 43) Source(44, 79) + SourceIndex(0) +16>Emitted(30, 44) Source(44, 80) + SourceIndex(0) +17>Emitted(30, 45) Source(44, 81) + SourceIndex(0) --- >>>var c3t12 = { 1 > @@ -731,10 +732,10 @@ sourceFile:contextualTyping.ts 2 >var 3 > c3t12 4 > : IBar = -1 >Emitted(30, 1) Source(45, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(45, 5) + SourceIndex(0) -3 >Emitted(30, 10) Source(45, 10) + SourceIndex(0) -4 >Emitted(30, 13) Source(45, 19) + SourceIndex(0) +1 >Emitted(31, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(31, 5) Source(45, 5) + SourceIndex(0) +3 >Emitted(31, 10) Source(45, 10) + SourceIndex(0) +4 >Emitted(31, 13) Source(45, 19) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -750,12 +751,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(31, 5) Source(46, 5) + SourceIndex(0) -2 >Emitted(31, 8) Source(46, 8) + SourceIndex(0) -3 >Emitted(31, 10) Source(46, 16) + SourceIndex(0) -4 >Emitted(31, 11) Source(46, 17) + SourceIndex(0) -5 >Emitted(31, 13) Source(46, 19) + SourceIndex(0) -6 >Emitted(31, 14) Source(46, 20) + SourceIndex(0) +1->Emitted(32, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(32, 8) Source(46, 8) + SourceIndex(0) +3 >Emitted(32, 10) Source(46, 16) + SourceIndex(0) +4 >Emitted(32, 11) Source(46, 17) + SourceIndex(0) +5 >Emitted(32, 13) Source(46, 19) + SourceIndex(0) +6 >Emitted(32, 14) Source(46, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -764,8 +765,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(32, 2) Source(47, 2) + SourceIndex(0) -2 >Emitted(32, 3) Source(47, 2) + SourceIndex(0) +1 >Emitted(33, 2) Source(47, 2) + SourceIndex(0) +2 >Emitted(33, 3) Source(47, 2) + SourceIndex(0) --- >>>var c3t13 = ({ 1-> @@ -780,11 +781,11 @@ sourceFile:contextualTyping.ts 3 > c3t13 4 > = 5 > ( -1->Emitted(33, 1) Source(48, 1) + SourceIndex(0) -2 >Emitted(33, 5) Source(48, 5) + SourceIndex(0) -3 >Emitted(33, 10) Source(48, 10) + SourceIndex(0) -4 >Emitted(33, 13) Source(48, 19) + SourceIndex(0) -5 >Emitted(33, 14) Source(48, 20) + SourceIndex(0) +1->Emitted(34, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(34, 5) Source(48, 5) + SourceIndex(0) +3 >Emitted(34, 10) Source(48, 10) + SourceIndex(0) +4 >Emitted(34, 13) Source(48, 19) + SourceIndex(0) +5 >Emitted(34, 14) Source(48, 20) + SourceIndex(0) --- >>> f: function (i, s) { return s; } 1->^^^^ @@ -814,19 +815,19 @@ sourceFile:contextualTyping.ts 11> ; 12> 13> } -1->Emitted(34, 5) Source(49, 5) + SourceIndex(0) -2 >Emitted(34, 6) Source(49, 6) + SourceIndex(0) -3 >Emitted(34, 8) Source(49, 8) + SourceIndex(0) -4 >Emitted(34, 18) Source(49, 17) + SourceIndex(0) -5 >Emitted(34, 19) Source(49, 18) + SourceIndex(0) -6 >Emitted(34, 21) Source(49, 20) + SourceIndex(0) -7 >Emitted(34, 22) Source(49, 21) + SourceIndex(0) -8 >Emitted(34, 26) Source(49, 25) + SourceIndex(0) -9 >Emitted(34, 33) Source(49, 32) + SourceIndex(0) -10>Emitted(34, 34) Source(49, 33) + SourceIndex(0) -11>Emitted(34, 35) Source(49, 34) + SourceIndex(0) -12>Emitted(34, 36) Source(49, 35) + SourceIndex(0) -13>Emitted(34, 37) Source(49, 36) + SourceIndex(0) +1->Emitted(35, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(35, 6) Source(49, 6) + SourceIndex(0) +3 >Emitted(35, 8) Source(49, 8) + SourceIndex(0) +4 >Emitted(35, 18) Source(49, 17) + SourceIndex(0) +5 >Emitted(35, 19) Source(49, 18) + SourceIndex(0) +6 >Emitted(35, 21) Source(49, 20) + SourceIndex(0) +7 >Emitted(35, 22) Source(49, 21) + SourceIndex(0) +8 >Emitted(35, 26) Source(49, 25) + SourceIndex(0) +9 >Emitted(35, 33) Source(49, 32) + SourceIndex(0) +10>Emitted(35, 34) Source(49, 33) + SourceIndex(0) +11>Emitted(35, 35) Source(49, 34) + SourceIndex(0) +12>Emitted(35, 36) Source(49, 35) + SourceIndex(0) +13>Emitted(35, 37) Source(49, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -837,9 +838,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(35, 2) Source(50, 2) + SourceIndex(0) -2 >Emitted(35, 3) Source(50, 3) + SourceIndex(0) -3 >Emitted(35, 4) Source(50, 3) + SourceIndex(0) +1 >Emitted(36, 2) Source(50, 2) + SourceIndex(0) +2 >Emitted(36, 3) Source(50, 3) + SourceIndex(0) +3 >Emitted(36, 4) Source(50, 3) + SourceIndex(0) --- >>>var c3t14 = ({ 1-> @@ -853,11 +854,11 @@ sourceFile:contextualTyping.ts 3 > c3t14 4 > = 5 > ( -1->Emitted(36, 1) Source(51, 1) + SourceIndex(0) -2 >Emitted(36, 5) Source(51, 5) + SourceIndex(0) -3 >Emitted(36, 10) Source(51, 10) + SourceIndex(0) -4 >Emitted(36, 13) Source(51, 19) + SourceIndex(0) -5 >Emitted(36, 14) Source(51, 20) + SourceIndex(0) +1->Emitted(37, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(37, 5) Source(51, 5) + SourceIndex(0) +3 >Emitted(37, 10) Source(51, 10) + SourceIndex(0) +4 >Emitted(37, 13) Source(51, 19) + SourceIndex(0) +5 >Emitted(37, 14) Source(51, 20) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -869,10 +870,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(37, 5) Source(52, 5) + SourceIndex(0) -2 >Emitted(37, 6) Source(52, 6) + SourceIndex(0) -3 >Emitted(37, 8) Source(52, 8) + SourceIndex(0) -4 >Emitted(37, 10) Source(52, 10) + SourceIndex(0) +1 >Emitted(38, 5) Source(52, 5) + SourceIndex(0) +2 >Emitted(38, 6) Source(52, 6) + SourceIndex(0) +3 >Emitted(38, 8) Source(52, 8) + SourceIndex(0) +4 >Emitted(38, 10) Source(52, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -883,9 +884,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(38, 2) Source(53, 2) + SourceIndex(0) -2 >Emitted(38, 3) Source(53, 3) + SourceIndex(0) -3 >Emitted(38, 4) Source(53, 3) + SourceIndex(0) +1 >Emitted(39, 2) Source(53, 2) + SourceIndex(0) +2 >Emitted(39, 3) Source(53, 3) + SourceIndex(0) +3 >Emitted(39, 4) Source(53, 3) + SourceIndex(0) --- >>>// CONTEXT: Class property assignment 1-> @@ -894,8 +895,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Class property assignment -1->Emitted(39, 1) Source(55, 1) + SourceIndex(0) -2 >Emitted(39, 38) Source(55, 38) + SourceIndex(0) +1->Emitted(40, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(40, 38) Source(55, 38) + SourceIndex(0) --- >>>class C4T5 { 1 > @@ -906,9 +907,9 @@ sourceFile:contextualTyping.ts > 2 >class 3 > C4T5 -1 >Emitted(40, 1) Source(56, 1) + SourceIndex(0) -2 >Emitted(40, 7) Source(56, 7) + SourceIndex(0) -3 >Emitted(40, 11) Source(56, 11) + SourceIndex(0) +1 >Emitted(41, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(41, 7) Source(56, 7) + SourceIndex(0) +3 >Emitted(41, 11) Source(56, 11) + SourceIndex(0) --- >>> constructor() { 1->^^^^ @@ -916,7 +917,7 @@ sourceFile:contextualTyping.ts 1-> { > foo: (i: number, s: string) => string; > -1->Emitted(41, 5) Source(58, 5) + SourceIndex(0) +1->Emitted(42, 5) Source(58, 5) + SourceIndex(0) --- >>> this.foo = function (i, s) { 1->^^^^^^^^ @@ -938,15 +939,15 @@ sourceFile:contextualTyping.ts 7 > i 8 > , 9 > s -1->Emitted(42, 9) Source(59, 9) + SourceIndex(0) -2 >Emitted(42, 13) Source(59, 13) + SourceIndex(0) -3 >Emitted(42, 14) Source(59, 14) + SourceIndex(0) -4 >Emitted(42, 17) Source(59, 17) + SourceIndex(0) -5 >Emitted(42, 20) Source(59, 20) + SourceIndex(0) -6 >Emitted(42, 30) Source(59, 29) + SourceIndex(0) -7 >Emitted(42, 31) Source(59, 30) + SourceIndex(0) -8 >Emitted(42, 33) Source(59, 32) + SourceIndex(0) -9 >Emitted(42, 34) Source(59, 33) + SourceIndex(0) +1->Emitted(43, 9) Source(59, 9) + SourceIndex(0) +2 >Emitted(43, 13) Source(59, 13) + SourceIndex(0) +3 >Emitted(43, 14) Source(59, 14) + SourceIndex(0) +4 >Emitted(43, 17) Source(59, 17) + SourceIndex(0) +5 >Emitted(43, 20) Source(59, 20) + SourceIndex(0) +6 >Emitted(43, 30) Source(59, 29) + SourceIndex(0) +7 >Emitted(43, 31) Source(59, 30) + SourceIndex(0) +8 >Emitted(43, 33) Source(59, 32) + SourceIndex(0) +9 >Emitted(43, 34) Source(59, 33) + SourceIndex(0) --- >>> return s; 1 >^^^^^^^^^^^^ @@ -958,10 +959,10 @@ sourceFile:contextualTyping.ts 2 > return 3 > s 4 > ; -1 >Emitted(43, 13) Source(60, 13) + SourceIndex(0) -2 >Emitted(43, 20) Source(60, 20) + SourceIndex(0) -3 >Emitted(43, 21) Source(60, 21) + SourceIndex(0) -4 >Emitted(43, 22) Source(60, 22) + SourceIndex(0) +1 >Emitted(44, 13) Source(60, 13) + SourceIndex(0) +2 >Emitted(44, 20) Source(60, 20) + SourceIndex(0) +3 >Emitted(44, 21) Source(60, 21) + SourceIndex(0) +4 >Emitted(44, 22) Source(60, 22) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^ @@ -971,9 +972,9 @@ sourceFile:contextualTyping.ts > 2 > } 3 > -1 >Emitted(44, 9) Source(61, 9) + SourceIndex(0) -2 >Emitted(44, 10) Source(61, 10) + SourceIndex(0) -3 >Emitted(44, 11) Source(61, 10) + SourceIndex(0) +1 >Emitted(45, 9) Source(61, 9) + SourceIndex(0) +2 >Emitted(45, 10) Source(61, 10) + SourceIndex(0) +3 >Emitted(45, 11) Source(61, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -981,15 +982,15 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(45, 5) Source(62, 5) + SourceIndex(0) -2 >Emitted(45, 6) Source(62, 6) + SourceIndex(0) +1 >Emitted(46, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(46, 6) Source(62, 6) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(46, 2) Source(63, 2) + SourceIndex(0) +1 >Emitted(47, 2) Source(63, 2) + SourceIndex(0) --- >>>// CONTEXT: Namespace property assignment 1-> @@ -998,8 +999,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Namespace property assignment -1->Emitted(47, 1) Source(65, 1) + SourceIndex(0) -2 >Emitted(47, 42) Source(65, 42) + SourceIndex(0) +1->Emitted(48, 1) Source(65, 1) + SourceIndex(0) +2 >Emitted(48, 42) Source(65, 42) + SourceIndex(0) --- >>>var C5T5; 1 > @@ -1017,10 +1018,10 @@ sourceFile:contextualTyping.ts > return s; > } > } -1 >Emitted(48, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(48, 5) Source(66, 11) + SourceIndex(0) -3 >Emitted(48, 9) Source(66, 15) + SourceIndex(0) -4 >Emitted(48, 10) Source(71, 2) + SourceIndex(0) +1 >Emitted(49, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(49, 5) Source(66, 11) + SourceIndex(0) +3 >Emitted(49, 9) Source(66, 15) + SourceIndex(0) +4 >Emitted(49, 10) Source(71, 2) + SourceIndex(0) --- >>>(function (C5T5) { 1-> @@ -1030,9 +1031,9 @@ sourceFile:contextualTyping.ts 1-> 2 >namespace 3 > C5T5 -1->Emitted(49, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(49, 12) Source(66, 11) + SourceIndex(0) -3 >Emitted(49, 16) Source(66, 15) + SourceIndex(0) +1->Emitted(50, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(50, 12) Source(66, 11) + SourceIndex(0) +3 >Emitted(50, 16) Source(66, 15) + SourceIndex(0) --- >>> C5T5.foo = function (i, s) { 1->^^^^ @@ -1053,14 +1054,14 @@ sourceFile:contextualTyping.ts 6 > i 7 > , 8 > s -1->Emitted(50, 5) Source(68, 5) + SourceIndex(0) -2 >Emitted(50, 10) Source(68, 5) + SourceIndex(0) -3 >Emitted(50, 13) Source(68, 8) + SourceIndex(0) -4 >Emitted(50, 16) Source(68, 11) + SourceIndex(0) -5 >Emitted(50, 26) Source(68, 20) + SourceIndex(0) -6 >Emitted(50, 27) Source(68, 21) + SourceIndex(0) -7 >Emitted(50, 29) Source(68, 23) + SourceIndex(0) -8 >Emitted(50, 30) Source(68, 24) + SourceIndex(0) +1->Emitted(51, 5) Source(68, 5) + SourceIndex(0) +2 >Emitted(51, 10) Source(68, 5) + SourceIndex(0) +3 >Emitted(51, 13) Source(68, 8) + SourceIndex(0) +4 >Emitted(51, 16) Source(68, 11) + SourceIndex(0) +5 >Emitted(51, 26) Source(68, 20) + SourceIndex(0) +6 >Emitted(51, 27) Source(68, 21) + SourceIndex(0) +7 >Emitted(51, 29) Source(68, 23) + SourceIndex(0) +8 >Emitted(51, 30) Source(68, 24) + SourceIndex(0) --- >>> return s; 1 >^^^^^^^^ @@ -1072,10 +1073,10 @@ sourceFile:contextualTyping.ts 2 > return 3 > s 4 > ; -1 >Emitted(51, 9) Source(69, 9) + SourceIndex(0) -2 >Emitted(51, 16) Source(69, 16) + SourceIndex(0) -3 >Emitted(51, 17) Source(69, 17) + SourceIndex(0) -4 >Emitted(51, 18) Source(69, 18) + SourceIndex(0) +1 >Emitted(52, 9) Source(69, 9) + SourceIndex(0) +2 >Emitted(52, 16) Source(69, 16) + SourceIndex(0) +3 >Emitted(52, 17) Source(69, 17) + SourceIndex(0) +4 >Emitted(52, 18) Source(69, 18) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -1086,9 +1087,9 @@ sourceFile:contextualTyping.ts > 2 > } 3 > -1 >Emitted(52, 5) Source(70, 5) + SourceIndex(0) -2 >Emitted(52, 6) Source(70, 6) + SourceIndex(0) -3 >Emitted(52, 7) Source(70, 6) + SourceIndex(0) +1 >Emitted(53, 5) Source(70, 5) + SourceIndex(0) +2 >Emitted(53, 6) Source(70, 6) + SourceIndex(0) +3 >Emitted(53, 7) Source(70, 6) + SourceIndex(0) --- >>>})(C5T5 || (C5T5 = {})); 1-> @@ -1112,13 +1113,13 @@ sourceFile:contextualTyping.ts > return s; > } > } -1->Emitted(53, 1) Source(71, 1) + SourceIndex(0) -2 >Emitted(53, 2) Source(71, 2) + SourceIndex(0) -3 >Emitted(53, 4) Source(66, 11) + SourceIndex(0) -4 >Emitted(53, 8) Source(66, 15) + SourceIndex(0) -5 >Emitted(53, 13) Source(66, 11) + SourceIndex(0) -6 >Emitted(53, 17) Source(66, 15) + SourceIndex(0) -7 >Emitted(53, 25) Source(71, 2) + SourceIndex(0) +1->Emitted(54, 1) Source(71, 1) + SourceIndex(0) +2 >Emitted(54, 2) Source(71, 2) + SourceIndex(0) +3 >Emitted(54, 4) Source(66, 11) + SourceIndex(0) +4 >Emitted(54, 8) Source(66, 15) + SourceIndex(0) +5 >Emitted(54, 13) Source(66, 11) + SourceIndex(0) +6 >Emitted(54, 17) Source(66, 15) + SourceIndex(0) +7 >Emitted(54, 25) Source(71, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable assignment 1-> @@ -1127,8 +1128,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Variable assignment -1->Emitted(54, 1) Source(73, 1) + SourceIndex(0) -2 >Emitted(54, 32) Source(73, 32) + SourceIndex(0) +1->Emitted(55, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(55, 32) Source(73, 32) + SourceIndex(0) --- >>>var c6t5; 1 > @@ -1141,10 +1142,10 @@ sourceFile:contextualTyping.ts 2 >var 3 > c6t5: (n: number) => IFoo 4 > ; -1 >Emitted(55, 1) Source(74, 1) + SourceIndex(0) -2 >Emitted(55, 5) Source(74, 5) + SourceIndex(0) -3 >Emitted(55, 9) Source(74, 30) + SourceIndex(0) -4 >Emitted(55, 10) Source(74, 31) + SourceIndex(0) +1 >Emitted(56, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(56, 5) Source(74, 5) + SourceIndex(0) +3 >Emitted(56, 9) Source(74, 30) + SourceIndex(0) +4 >Emitted(56, 10) Source(74, 31) + SourceIndex(0) --- >>>c6t5 = function (n) { return ({}); }; 1-> @@ -1176,20 +1177,20 @@ sourceFile:contextualTyping.ts 12> 13> } 14> ; -1->Emitted(56, 1) Source(75, 1) + SourceIndex(0) -2 >Emitted(56, 5) Source(75, 5) + SourceIndex(0) -3 >Emitted(56, 8) Source(75, 29) + SourceIndex(0) -4 >Emitted(56, 18) Source(75, 38) + SourceIndex(0) -5 >Emitted(56, 19) Source(75, 39) + SourceIndex(0) -6 >Emitted(56, 23) Source(75, 43) + SourceIndex(0) -7 >Emitted(56, 30) Source(75, 56) + SourceIndex(0) -8 >Emitted(56, 31) Source(75, 57) + SourceIndex(0) -9 >Emitted(56, 33) Source(75, 59) + SourceIndex(0) -10>Emitted(56, 34) Source(75, 60) + SourceIndex(0) -11>Emitted(56, 35) Source(75, 60) + SourceIndex(0) -12>Emitted(56, 36) Source(75, 61) + SourceIndex(0) -13>Emitted(56, 37) Source(75, 62) + SourceIndex(0) -14>Emitted(56, 38) Source(75, 63) + SourceIndex(0) +1->Emitted(57, 1) Source(75, 1) + SourceIndex(0) +2 >Emitted(57, 5) Source(75, 5) + SourceIndex(0) +3 >Emitted(57, 8) Source(75, 29) + SourceIndex(0) +4 >Emitted(57, 18) Source(75, 38) + SourceIndex(0) +5 >Emitted(57, 19) Source(75, 39) + SourceIndex(0) +6 >Emitted(57, 23) Source(75, 43) + SourceIndex(0) +7 >Emitted(57, 30) Source(75, 56) + SourceIndex(0) +8 >Emitted(57, 31) Source(75, 57) + SourceIndex(0) +9 >Emitted(57, 33) Source(75, 59) + SourceIndex(0) +10>Emitted(57, 34) Source(75, 60) + SourceIndex(0) +11>Emitted(57, 35) Source(75, 60) + SourceIndex(0) +12>Emitted(57, 36) Source(75, 61) + SourceIndex(0) +13>Emitted(57, 37) Source(75, 62) + SourceIndex(0) +14>Emitted(57, 38) Source(75, 63) + SourceIndex(0) --- >>>// CONTEXT: Array index assignment 1 > @@ -1198,8 +1199,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Array index assignment -1 >Emitted(57, 1) Source(77, 1) + SourceIndex(0) -2 >Emitted(57, 35) Source(77, 35) + SourceIndex(0) +1 >Emitted(58, 1) Source(77, 1) + SourceIndex(0) +2 >Emitted(58, 35) Source(77, 35) + SourceIndex(0) --- >>>var c7t2 = []; 1 > @@ -1216,12 +1217,12 @@ sourceFile:contextualTyping.ts 4 > : IFoo[] = 5 > [] 6 > ; -1 >Emitted(58, 1) Source(78, 1) + SourceIndex(0) -2 >Emitted(58, 5) Source(78, 5) + SourceIndex(0) -3 >Emitted(58, 9) Source(78, 9) + SourceIndex(0) -4 >Emitted(58, 12) Source(78, 20) + SourceIndex(0) -5 >Emitted(58, 14) Source(78, 22) + SourceIndex(0) -6 >Emitted(58, 15) Source(78, 23) + SourceIndex(0) +1 >Emitted(59, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(59, 5) Source(78, 5) + SourceIndex(0) +3 >Emitted(59, 9) Source(78, 9) + SourceIndex(0) +4 >Emitted(59, 12) Source(78, 20) + SourceIndex(0) +5 >Emitted(59, 14) Source(78, 22) + SourceIndex(0) +6 >Emitted(59, 15) Source(78, 23) + SourceIndex(0) --- >>>c7t2[0] = ({ n: 1 }); 1-> @@ -1253,20 +1254,20 @@ sourceFile:contextualTyping.ts 12> } 13> ) 14> ; -1->Emitted(59, 1) Source(79, 1) + SourceIndex(0) -2 >Emitted(59, 5) Source(79, 5) + SourceIndex(0) -3 >Emitted(59, 6) Source(79, 6) + SourceIndex(0) -4 >Emitted(59, 7) Source(79, 7) + SourceIndex(0) -5 >Emitted(59, 8) Source(79, 8) + SourceIndex(0) -6 >Emitted(59, 11) Source(79, 17) + SourceIndex(0) -7 >Emitted(59, 12) Source(79, 18) + SourceIndex(0) -8 >Emitted(59, 14) Source(79, 19) + SourceIndex(0) -9 >Emitted(59, 15) Source(79, 20) + SourceIndex(0) -10>Emitted(59, 17) Source(79, 22) + SourceIndex(0) -11>Emitted(59, 18) Source(79, 23) + SourceIndex(0) -12>Emitted(59, 20) Source(79, 24) + SourceIndex(0) -13>Emitted(59, 21) Source(79, 25) + SourceIndex(0) -14>Emitted(59, 22) Source(79, 26) + SourceIndex(0) +1->Emitted(60, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(60, 5) Source(79, 5) + SourceIndex(0) +3 >Emitted(60, 6) Source(79, 6) + SourceIndex(0) +4 >Emitted(60, 7) Source(79, 7) + SourceIndex(0) +5 >Emitted(60, 8) Source(79, 8) + SourceIndex(0) +6 >Emitted(60, 11) Source(79, 17) + SourceIndex(0) +7 >Emitted(60, 12) Source(79, 18) + SourceIndex(0) +8 >Emitted(60, 14) Source(79, 19) + SourceIndex(0) +9 >Emitted(60, 15) Source(79, 20) + SourceIndex(0) +10>Emitted(60, 17) Source(79, 22) + SourceIndex(0) +11>Emitted(60, 18) Source(79, 23) + SourceIndex(0) +12>Emitted(60, 20) Source(79, 24) + SourceIndex(0) +13>Emitted(60, 21) Source(79, 25) + SourceIndex(0) +14>Emitted(60, 22) Source(79, 26) + SourceIndex(0) --- >>>var objc8 = ({}); 1 > @@ -1327,14 +1328,14 @@ sourceFile:contextualTyping.ts 6 > {} 7 > ) 8 > ; -1 >Emitted(60, 1) Source(102, 1) + SourceIndex(0) -2 >Emitted(60, 5) Source(102, 5) + SourceIndex(0) -3 >Emitted(60, 10) Source(102, 10) + SourceIndex(0) -4 >Emitted(60, 13) Source(120, 19) + SourceIndex(0) -5 >Emitted(60, 14) Source(120, 20) + SourceIndex(0) -6 >Emitted(60, 16) Source(120, 22) + SourceIndex(0) -7 >Emitted(60, 17) Source(120, 23) + SourceIndex(0) -8 >Emitted(60, 18) Source(120, 24) + SourceIndex(0) +1 >Emitted(61, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(61, 5) Source(102, 5) + SourceIndex(0) +3 >Emitted(61, 10) Source(102, 10) + SourceIndex(0) +4 >Emitted(61, 13) Source(120, 19) + SourceIndex(0) +5 >Emitted(61, 14) Source(120, 20) + SourceIndex(0) +6 >Emitted(61, 16) Source(120, 22) + SourceIndex(0) +7 >Emitted(61, 17) Source(120, 23) + SourceIndex(0) +8 >Emitted(61, 18) Source(120, 24) + SourceIndex(0) --- >>>objc8.t1 = (function (s) { return s; }); 1-> @@ -1371,22 +1372,22 @@ sourceFile:contextualTyping.ts 14> } 15> ) 16> ; -1->Emitted(61, 1) Source(122, 1) + SourceIndex(0) -2 >Emitted(61, 6) Source(122, 6) + SourceIndex(0) -3 >Emitted(61, 7) Source(122, 7) + SourceIndex(0) -4 >Emitted(61, 9) Source(122, 9) + SourceIndex(0) -5 >Emitted(61, 12) Source(122, 12) + SourceIndex(0) -6 >Emitted(61, 13) Source(122, 13) + SourceIndex(0) -7 >Emitted(61, 23) Source(122, 22) + SourceIndex(0) -8 >Emitted(61, 24) Source(122, 23) + SourceIndex(0) -9 >Emitted(61, 28) Source(122, 27) + SourceIndex(0) -10>Emitted(61, 35) Source(122, 34) + SourceIndex(0) -11>Emitted(61, 36) Source(122, 35) + SourceIndex(0) -12>Emitted(61, 37) Source(122, 35) + SourceIndex(0) -13>Emitted(61, 38) Source(122, 36) + SourceIndex(0) -14>Emitted(61, 39) Source(122, 37) + SourceIndex(0) -15>Emitted(61, 40) Source(122, 38) + SourceIndex(0) -16>Emitted(61, 41) Source(122, 39) + SourceIndex(0) +1->Emitted(62, 1) Source(122, 1) + SourceIndex(0) +2 >Emitted(62, 6) Source(122, 6) + SourceIndex(0) +3 >Emitted(62, 7) Source(122, 7) + SourceIndex(0) +4 >Emitted(62, 9) Source(122, 9) + SourceIndex(0) +5 >Emitted(62, 12) Source(122, 12) + SourceIndex(0) +6 >Emitted(62, 13) Source(122, 13) + SourceIndex(0) +7 >Emitted(62, 23) Source(122, 22) + SourceIndex(0) +8 >Emitted(62, 24) Source(122, 23) + SourceIndex(0) +9 >Emitted(62, 28) Source(122, 27) + SourceIndex(0) +10>Emitted(62, 35) Source(122, 34) + SourceIndex(0) +11>Emitted(62, 36) Source(122, 35) + SourceIndex(0) +12>Emitted(62, 37) Source(122, 35) + SourceIndex(0) +13>Emitted(62, 38) Source(122, 36) + SourceIndex(0) +14>Emitted(62, 39) Source(122, 37) + SourceIndex(0) +15>Emitted(62, 40) Source(122, 38) + SourceIndex(0) +16>Emitted(62, 41) Source(122, 39) + SourceIndex(0) --- >>>objc8.t2 = ({ 1 > @@ -1402,12 +1403,12 @@ sourceFile:contextualTyping.ts 4 > t2 5 > = 6 > ( -1 >Emitted(62, 1) Source(123, 1) + SourceIndex(0) -2 >Emitted(62, 6) Source(123, 6) + SourceIndex(0) -3 >Emitted(62, 7) Source(123, 7) + SourceIndex(0) -4 >Emitted(62, 9) Source(123, 9) + SourceIndex(0) -5 >Emitted(62, 12) Source(123, 18) + SourceIndex(0) -6 >Emitted(62, 13) Source(123, 19) + SourceIndex(0) +1 >Emitted(63, 1) Source(123, 1) + SourceIndex(0) +2 >Emitted(63, 6) Source(123, 6) + SourceIndex(0) +3 >Emitted(63, 7) Source(123, 7) + SourceIndex(0) +4 >Emitted(63, 9) Source(123, 9) + SourceIndex(0) +5 >Emitted(63, 12) Source(123, 18) + SourceIndex(0) +6 >Emitted(63, 13) Source(123, 19) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -1419,10 +1420,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(63, 5) Source(124, 5) + SourceIndex(0) -2 >Emitted(63, 6) Source(124, 6) + SourceIndex(0) -3 >Emitted(63, 8) Source(124, 8) + SourceIndex(0) -4 >Emitted(63, 9) Source(124, 9) + SourceIndex(0) +1 >Emitted(64, 5) Source(124, 5) + SourceIndex(0) +2 >Emitted(64, 6) Source(124, 6) + SourceIndex(0) +3 >Emitted(64, 8) Source(124, 8) + SourceIndex(0) +4 >Emitted(64, 9) Source(124, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -1433,9 +1434,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > ; -1 >Emitted(64, 2) Source(125, 2) + SourceIndex(0) -2 >Emitted(64, 3) Source(125, 3) + SourceIndex(0) -3 >Emitted(64, 4) Source(125, 4) + SourceIndex(0) +1 >Emitted(65, 2) Source(125, 2) + SourceIndex(0) +2 >Emitted(65, 3) Source(125, 3) + SourceIndex(0) +3 >Emitted(65, 4) Source(125, 4) + SourceIndex(0) --- >>>objc8.t3 = []; 1-> @@ -1454,13 +1455,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > [] 7 > ; -1->Emitted(65, 1) Source(126, 1) + SourceIndex(0) -2 >Emitted(65, 6) Source(126, 6) + SourceIndex(0) -3 >Emitted(65, 7) Source(126, 7) + SourceIndex(0) -4 >Emitted(65, 9) Source(126, 9) + SourceIndex(0) -5 >Emitted(65, 12) Source(126, 12) + SourceIndex(0) -6 >Emitted(65, 14) Source(126, 14) + SourceIndex(0) -7 >Emitted(65, 15) Source(126, 15) + SourceIndex(0) +1->Emitted(66, 1) Source(126, 1) + SourceIndex(0) +2 >Emitted(66, 6) Source(126, 6) + SourceIndex(0) +3 >Emitted(66, 7) Source(126, 7) + SourceIndex(0) +4 >Emitted(66, 9) Source(126, 9) + SourceIndex(0) +5 >Emitted(66, 12) Source(126, 12) + SourceIndex(0) +6 >Emitted(66, 14) Source(126, 14) + SourceIndex(0) +7 >Emitted(66, 15) Source(126, 15) + SourceIndex(0) --- >>>objc8.t4 = function () { return ({}); }; 1-> @@ -1493,20 +1494,20 @@ sourceFile:contextualTyping.ts 12> 13> } 14> ; -1->Emitted(66, 1) Source(127, 1) + SourceIndex(0) -2 >Emitted(66, 6) Source(127, 6) + SourceIndex(0) -3 >Emitted(66, 7) Source(127, 7) + SourceIndex(0) -4 >Emitted(66, 9) Source(127, 9) + SourceIndex(0) -5 >Emitted(66, 12) Source(127, 12) + SourceIndex(0) -6 >Emitted(66, 26) Source(127, 25) + SourceIndex(0) -7 >Emitted(66, 33) Source(127, 38) + SourceIndex(0) -8 >Emitted(66, 34) Source(127, 39) + SourceIndex(0) -9 >Emitted(66, 36) Source(127, 41) + SourceIndex(0) -10>Emitted(66, 37) Source(127, 42) + SourceIndex(0) -11>Emitted(66, 38) Source(127, 42) + SourceIndex(0) -12>Emitted(66, 39) Source(127, 43) + SourceIndex(0) -13>Emitted(66, 40) Source(127, 44) + SourceIndex(0) -14>Emitted(66, 41) Source(127, 45) + SourceIndex(0) +1->Emitted(67, 1) Source(127, 1) + SourceIndex(0) +2 >Emitted(67, 6) Source(127, 6) + SourceIndex(0) +3 >Emitted(67, 7) Source(127, 7) + SourceIndex(0) +4 >Emitted(67, 9) Source(127, 9) + SourceIndex(0) +5 >Emitted(67, 12) Source(127, 12) + SourceIndex(0) +6 >Emitted(67, 26) Source(127, 25) + SourceIndex(0) +7 >Emitted(67, 33) Source(127, 38) + SourceIndex(0) +8 >Emitted(67, 34) Source(127, 39) + SourceIndex(0) +9 >Emitted(67, 36) Source(127, 41) + SourceIndex(0) +10>Emitted(67, 37) Source(127, 42) + SourceIndex(0) +11>Emitted(67, 38) Source(127, 42) + SourceIndex(0) +12>Emitted(67, 39) Source(127, 43) + SourceIndex(0) +13>Emitted(67, 40) Source(127, 44) + SourceIndex(0) +14>Emitted(67, 41) Source(127, 45) + SourceIndex(0) --- >>>objc8.t5 = function (n) { return ({}); }; 1-> @@ -1543,22 +1544,22 @@ sourceFile:contextualTyping.ts 14> 15> } 16> ; -1->Emitted(67, 1) Source(128, 1) + SourceIndex(0) -2 >Emitted(67, 6) Source(128, 6) + SourceIndex(0) -3 >Emitted(67, 7) Source(128, 7) + SourceIndex(0) -4 >Emitted(67, 9) Source(128, 9) + SourceIndex(0) -5 >Emitted(67, 12) Source(128, 12) + SourceIndex(0) -6 >Emitted(67, 22) Source(128, 21) + SourceIndex(0) -7 >Emitted(67, 23) Source(128, 22) + SourceIndex(0) -8 >Emitted(67, 27) Source(128, 26) + SourceIndex(0) -9 >Emitted(67, 34) Source(128, 39) + SourceIndex(0) -10>Emitted(67, 35) Source(128, 40) + SourceIndex(0) -11>Emitted(67, 37) Source(128, 42) + SourceIndex(0) -12>Emitted(67, 38) Source(128, 43) + SourceIndex(0) -13>Emitted(67, 39) Source(128, 43) + SourceIndex(0) -14>Emitted(67, 40) Source(128, 44) + SourceIndex(0) -15>Emitted(67, 41) Source(128, 45) + SourceIndex(0) -16>Emitted(67, 42) Source(128, 46) + SourceIndex(0) +1->Emitted(68, 1) Source(128, 1) + SourceIndex(0) +2 >Emitted(68, 6) Source(128, 6) + SourceIndex(0) +3 >Emitted(68, 7) Source(128, 7) + SourceIndex(0) +4 >Emitted(68, 9) Source(128, 9) + SourceIndex(0) +5 >Emitted(68, 12) Source(128, 12) + SourceIndex(0) +6 >Emitted(68, 22) Source(128, 21) + SourceIndex(0) +7 >Emitted(68, 23) Source(128, 22) + SourceIndex(0) +8 >Emitted(68, 27) Source(128, 26) + SourceIndex(0) +9 >Emitted(68, 34) Source(128, 39) + SourceIndex(0) +10>Emitted(68, 35) Source(128, 40) + SourceIndex(0) +11>Emitted(68, 37) Source(128, 42) + SourceIndex(0) +12>Emitted(68, 38) Source(128, 43) + SourceIndex(0) +13>Emitted(68, 39) Source(128, 43) + SourceIndex(0) +14>Emitted(68, 40) Source(128, 44) + SourceIndex(0) +15>Emitted(68, 41) Source(128, 45) + SourceIndex(0) +16>Emitted(68, 42) Source(128, 46) + SourceIndex(0) --- >>>objc8.t6 = function (n, s) { return ({}); }; 1-> @@ -1598,24 +1599,24 @@ sourceFile:contextualTyping.ts 16> 17> } 18> ; -1->Emitted(68, 1) Source(129, 1) + SourceIndex(0) -2 >Emitted(68, 6) Source(129, 6) + SourceIndex(0) -3 >Emitted(68, 7) Source(129, 7) + SourceIndex(0) -4 >Emitted(68, 9) Source(129, 9) + SourceIndex(0) -5 >Emitted(68, 12) Source(129, 12) + SourceIndex(0) -6 >Emitted(68, 22) Source(129, 21) + SourceIndex(0) -7 >Emitted(68, 23) Source(129, 22) + SourceIndex(0) -8 >Emitted(68, 25) Source(129, 24) + SourceIndex(0) -9 >Emitted(68, 26) Source(129, 25) + SourceIndex(0) -10>Emitted(68, 30) Source(129, 29) + SourceIndex(0) -11>Emitted(68, 37) Source(129, 42) + SourceIndex(0) -12>Emitted(68, 38) Source(129, 43) + SourceIndex(0) -13>Emitted(68, 40) Source(129, 45) + SourceIndex(0) -14>Emitted(68, 41) Source(129, 46) + SourceIndex(0) -15>Emitted(68, 42) Source(129, 46) + SourceIndex(0) -16>Emitted(68, 43) Source(129, 47) + SourceIndex(0) -17>Emitted(68, 44) Source(129, 48) + SourceIndex(0) -18>Emitted(68, 45) Source(129, 49) + SourceIndex(0) +1->Emitted(69, 1) Source(129, 1) + SourceIndex(0) +2 >Emitted(69, 6) Source(129, 6) + SourceIndex(0) +3 >Emitted(69, 7) Source(129, 7) + SourceIndex(0) +4 >Emitted(69, 9) Source(129, 9) + SourceIndex(0) +5 >Emitted(69, 12) Source(129, 12) + SourceIndex(0) +6 >Emitted(69, 22) Source(129, 21) + SourceIndex(0) +7 >Emitted(69, 23) Source(129, 22) + SourceIndex(0) +8 >Emitted(69, 25) Source(129, 24) + SourceIndex(0) +9 >Emitted(69, 26) Source(129, 25) + SourceIndex(0) +10>Emitted(69, 30) Source(129, 29) + SourceIndex(0) +11>Emitted(69, 37) Source(129, 42) + SourceIndex(0) +12>Emitted(69, 38) Source(129, 43) + SourceIndex(0) +13>Emitted(69, 40) Source(129, 45) + SourceIndex(0) +14>Emitted(69, 41) Source(129, 46) + SourceIndex(0) +15>Emitted(69, 42) Source(129, 46) + SourceIndex(0) +16>Emitted(69, 43) Source(129, 47) + SourceIndex(0) +17>Emitted(69, 44) Source(129, 48) + SourceIndex(0) +18>Emitted(69, 45) Source(129, 49) + SourceIndex(0) --- >>>objc8.t7 = function (n) { return n; }; 1 > @@ -1648,20 +1649,20 @@ sourceFile:contextualTyping.ts 12> 13> } 14> ; -1 >Emitted(69, 1) Source(130, 1) + SourceIndex(0) -2 >Emitted(69, 6) Source(130, 6) + SourceIndex(0) -3 >Emitted(69, 7) Source(130, 7) + SourceIndex(0) -4 >Emitted(69, 9) Source(130, 9) + SourceIndex(0) -5 >Emitted(69, 12) Source(130, 12) + SourceIndex(0) -6 >Emitted(69, 22) Source(130, 21) + SourceIndex(0) -7 >Emitted(69, 23) Source(130, 30) + SourceIndex(0) -8 >Emitted(69, 27) Source(130, 34) + SourceIndex(0) -9 >Emitted(69, 34) Source(130, 41) + SourceIndex(0) -10>Emitted(69, 35) Source(130, 42) + SourceIndex(0) -11>Emitted(69, 36) Source(130, 42) + SourceIndex(0) -12>Emitted(69, 37) Source(130, 43) + SourceIndex(0) -13>Emitted(69, 38) Source(130, 44) + SourceIndex(0) -14>Emitted(69, 39) Source(130, 45) + SourceIndex(0) +1 >Emitted(70, 1) Source(130, 1) + SourceIndex(0) +2 >Emitted(70, 6) Source(130, 6) + SourceIndex(0) +3 >Emitted(70, 7) Source(130, 7) + SourceIndex(0) +4 >Emitted(70, 9) Source(130, 9) + SourceIndex(0) +5 >Emitted(70, 12) Source(130, 12) + SourceIndex(0) +6 >Emitted(70, 22) Source(130, 21) + SourceIndex(0) +7 >Emitted(70, 23) Source(130, 30) + SourceIndex(0) +8 >Emitted(70, 27) Source(130, 34) + SourceIndex(0) +9 >Emitted(70, 34) Source(130, 41) + SourceIndex(0) +10>Emitted(70, 35) Source(130, 42) + SourceIndex(0) +11>Emitted(70, 36) Source(130, 42) + SourceIndex(0) +12>Emitted(70, 37) Source(130, 43) + SourceIndex(0) +13>Emitted(70, 38) Source(130, 44) + SourceIndex(0) +14>Emitted(70, 39) Source(130, 45) + SourceIndex(0) --- >>>objc8.t8 = function (n) { return n; }; 1-> @@ -1694,20 +1695,20 @@ sourceFile:contextualTyping.ts 12> 13> } 14> ; -1->Emitted(70, 1) Source(132, 1) + SourceIndex(0) -2 >Emitted(70, 6) Source(132, 6) + SourceIndex(0) -3 >Emitted(70, 7) Source(132, 7) + SourceIndex(0) -4 >Emitted(70, 9) Source(132, 9) + SourceIndex(0) -5 >Emitted(70, 12) Source(132, 12) + SourceIndex(0) -6 >Emitted(70, 22) Source(132, 21) + SourceIndex(0) -7 >Emitted(70, 23) Source(132, 22) + SourceIndex(0) -8 >Emitted(70, 27) Source(132, 26) + SourceIndex(0) -9 >Emitted(70, 34) Source(132, 33) + SourceIndex(0) -10>Emitted(70, 35) Source(132, 34) + SourceIndex(0) -11>Emitted(70, 36) Source(132, 35) + SourceIndex(0) -12>Emitted(70, 37) Source(132, 36) + SourceIndex(0) -13>Emitted(70, 38) Source(132, 37) + SourceIndex(0) -14>Emitted(70, 39) Source(132, 38) + SourceIndex(0) +1->Emitted(71, 1) Source(132, 1) + SourceIndex(0) +2 >Emitted(71, 6) Source(132, 6) + SourceIndex(0) +3 >Emitted(71, 7) Source(132, 7) + SourceIndex(0) +4 >Emitted(71, 9) Source(132, 9) + SourceIndex(0) +5 >Emitted(71, 12) Source(132, 12) + SourceIndex(0) +6 >Emitted(71, 22) Source(132, 21) + SourceIndex(0) +7 >Emitted(71, 23) Source(132, 22) + SourceIndex(0) +8 >Emitted(71, 27) Source(132, 26) + SourceIndex(0) +9 >Emitted(71, 34) Source(132, 33) + SourceIndex(0) +10>Emitted(71, 35) Source(132, 34) + SourceIndex(0) +11>Emitted(71, 36) Source(132, 35) + SourceIndex(0) +12>Emitted(71, 37) Source(132, 36) + SourceIndex(0) +13>Emitted(71, 38) Source(132, 37) + SourceIndex(0) +14>Emitted(71, 39) Source(132, 38) + SourceIndex(0) --- >>>objc8.t9 = [[], []]; 1 > @@ -1734,17 +1735,17 @@ sourceFile:contextualTyping.ts 9 > [] 10> ] 11> ; -1 >Emitted(71, 1) Source(133, 1) + SourceIndex(0) -2 >Emitted(71, 6) Source(133, 6) + SourceIndex(0) -3 >Emitted(71, 7) Source(133, 7) + SourceIndex(0) -4 >Emitted(71, 9) Source(133, 9) + SourceIndex(0) -5 >Emitted(71, 12) Source(133, 12) + SourceIndex(0) -6 >Emitted(71, 13) Source(133, 13) + SourceIndex(0) -7 >Emitted(71, 15) Source(133, 15) + SourceIndex(0) -8 >Emitted(71, 17) Source(133, 16) + SourceIndex(0) -9 >Emitted(71, 19) Source(133, 18) + SourceIndex(0) -10>Emitted(71, 20) Source(133, 19) + SourceIndex(0) -11>Emitted(71, 21) Source(133, 20) + SourceIndex(0) +1 >Emitted(72, 1) Source(133, 1) + SourceIndex(0) +2 >Emitted(72, 6) Source(133, 6) + SourceIndex(0) +3 >Emitted(72, 7) Source(133, 7) + SourceIndex(0) +4 >Emitted(72, 9) Source(133, 9) + SourceIndex(0) +5 >Emitted(72, 12) Source(133, 12) + SourceIndex(0) +6 >Emitted(72, 13) Source(133, 13) + SourceIndex(0) +7 >Emitted(72, 15) Source(133, 15) + SourceIndex(0) +8 >Emitted(72, 17) Source(133, 16) + SourceIndex(0) +9 >Emitted(72, 19) Source(133, 18) + SourceIndex(0) +10>Emitted(72, 20) Source(133, 19) + SourceIndex(0) +11>Emitted(72, 21) Source(133, 20) + SourceIndex(0) --- >>>objc8.t10 = [({}), ({})]; 1-> @@ -1779,21 +1780,21 @@ sourceFile:contextualTyping.ts 13> ) 14> ] 15> ; -1->Emitted(72, 1) Source(134, 1) + SourceIndex(0) -2 >Emitted(72, 6) Source(134, 6) + SourceIndex(0) -3 >Emitted(72, 7) Source(134, 7) + SourceIndex(0) -4 >Emitted(72, 10) Source(134, 10) + SourceIndex(0) -5 >Emitted(72, 13) Source(134, 13) + SourceIndex(0) -6 >Emitted(72, 14) Source(134, 20) + SourceIndex(0) -7 >Emitted(72, 15) Source(134, 21) + SourceIndex(0) -8 >Emitted(72, 17) Source(134, 23) + SourceIndex(0) -9 >Emitted(72, 18) Source(134, 24) + SourceIndex(0) -10>Emitted(72, 20) Source(134, 31) + SourceIndex(0) -11>Emitted(72, 21) Source(134, 32) + SourceIndex(0) -12>Emitted(72, 23) Source(134, 34) + SourceIndex(0) -13>Emitted(72, 24) Source(134, 35) + SourceIndex(0) -14>Emitted(72, 25) Source(134, 36) + SourceIndex(0) -15>Emitted(72, 26) Source(134, 37) + SourceIndex(0) +1->Emitted(73, 1) Source(134, 1) + SourceIndex(0) +2 >Emitted(73, 6) Source(134, 6) + SourceIndex(0) +3 >Emitted(73, 7) Source(134, 7) + SourceIndex(0) +4 >Emitted(73, 10) Source(134, 10) + SourceIndex(0) +5 >Emitted(73, 13) Source(134, 13) + SourceIndex(0) +6 >Emitted(73, 14) Source(134, 20) + SourceIndex(0) +7 >Emitted(73, 15) Source(134, 21) + SourceIndex(0) +8 >Emitted(73, 17) Source(134, 23) + SourceIndex(0) +9 >Emitted(73, 18) Source(134, 24) + SourceIndex(0) +10>Emitted(73, 20) Source(134, 31) + SourceIndex(0) +11>Emitted(73, 21) Source(134, 32) + SourceIndex(0) +12>Emitted(73, 23) Source(134, 34) + SourceIndex(0) +13>Emitted(73, 24) Source(134, 35) + SourceIndex(0) +14>Emitted(73, 25) Source(134, 36) + SourceIndex(0) +15>Emitted(73, 26) Source(134, 37) + SourceIndex(0) --- >>>objc8.t11 = [function (n, s) { return s; }]; 1-> @@ -1833,24 +1834,24 @@ sourceFile:contextualTyping.ts 16> } 17> ] 18> ; -1->Emitted(73, 1) Source(135, 1) + SourceIndex(0) -2 >Emitted(73, 6) Source(135, 6) + SourceIndex(0) -3 >Emitted(73, 7) Source(135, 7) + SourceIndex(0) -4 >Emitted(73, 10) Source(135, 10) + SourceIndex(0) -5 >Emitted(73, 13) Source(135, 13) + SourceIndex(0) -6 >Emitted(73, 14) Source(135, 14) + SourceIndex(0) -7 >Emitted(73, 24) Source(135, 23) + SourceIndex(0) -8 >Emitted(73, 25) Source(135, 24) + SourceIndex(0) -9 >Emitted(73, 27) Source(135, 26) + SourceIndex(0) -10>Emitted(73, 28) Source(135, 27) + SourceIndex(0) -11>Emitted(73, 32) Source(135, 31) + SourceIndex(0) -12>Emitted(73, 39) Source(135, 38) + SourceIndex(0) -13>Emitted(73, 40) Source(135, 39) + SourceIndex(0) -14>Emitted(73, 41) Source(135, 40) + SourceIndex(0) -15>Emitted(73, 42) Source(135, 41) + SourceIndex(0) -16>Emitted(73, 43) Source(135, 42) + SourceIndex(0) -17>Emitted(73, 44) Source(135, 43) + SourceIndex(0) -18>Emitted(73, 45) Source(135, 44) + SourceIndex(0) +1->Emitted(74, 1) Source(135, 1) + SourceIndex(0) +2 >Emitted(74, 6) Source(135, 6) + SourceIndex(0) +3 >Emitted(74, 7) Source(135, 7) + SourceIndex(0) +4 >Emitted(74, 10) Source(135, 10) + SourceIndex(0) +5 >Emitted(74, 13) Source(135, 13) + SourceIndex(0) +6 >Emitted(74, 14) Source(135, 14) + SourceIndex(0) +7 >Emitted(74, 24) Source(135, 23) + SourceIndex(0) +8 >Emitted(74, 25) Source(135, 24) + SourceIndex(0) +9 >Emitted(74, 27) Source(135, 26) + SourceIndex(0) +10>Emitted(74, 28) Source(135, 27) + SourceIndex(0) +11>Emitted(74, 32) Source(135, 31) + SourceIndex(0) +12>Emitted(74, 39) Source(135, 38) + SourceIndex(0) +13>Emitted(74, 40) Source(135, 39) + SourceIndex(0) +14>Emitted(74, 41) Source(135, 40) + SourceIndex(0) +15>Emitted(74, 42) Source(135, 41) + SourceIndex(0) +16>Emitted(74, 43) Source(135, 42) + SourceIndex(0) +17>Emitted(74, 44) Source(135, 43) + SourceIndex(0) +18>Emitted(74, 45) Source(135, 44) + SourceIndex(0) --- >>>objc8.t12 = { 1 > @@ -1865,11 +1866,11 @@ sourceFile:contextualTyping.ts 3 > . 4 > t12 5 > = -1 >Emitted(74, 1) Source(136, 1) + SourceIndex(0) -2 >Emitted(74, 6) Source(136, 6) + SourceIndex(0) -3 >Emitted(74, 7) Source(136, 7) + SourceIndex(0) -4 >Emitted(74, 10) Source(136, 10) + SourceIndex(0) -5 >Emitted(74, 13) Source(136, 13) + SourceIndex(0) +1 >Emitted(75, 1) Source(136, 1) + SourceIndex(0) +2 >Emitted(75, 6) Source(136, 6) + SourceIndex(0) +3 >Emitted(75, 7) Source(136, 7) + SourceIndex(0) +4 >Emitted(75, 10) Source(136, 10) + SourceIndex(0) +5 >Emitted(75, 13) Source(136, 13) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -1885,12 +1886,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(75, 5) Source(137, 5) + SourceIndex(0) -2 >Emitted(75, 8) Source(137, 8) + SourceIndex(0) -3 >Emitted(75, 10) Source(137, 16) + SourceIndex(0) -4 >Emitted(75, 11) Source(137, 17) + SourceIndex(0) -5 >Emitted(75, 13) Source(137, 19) + SourceIndex(0) -6 >Emitted(75, 14) Source(137, 20) + SourceIndex(0) +1->Emitted(76, 5) Source(137, 5) + SourceIndex(0) +2 >Emitted(76, 8) Source(137, 8) + SourceIndex(0) +3 >Emitted(76, 10) Source(137, 16) + SourceIndex(0) +4 >Emitted(76, 11) Source(137, 17) + SourceIndex(0) +5 >Emitted(76, 13) Source(137, 19) + SourceIndex(0) +6 >Emitted(76, 14) Source(137, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -1899,8 +1900,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(76, 2) Source(138, 2) + SourceIndex(0) -2 >Emitted(76, 3) Source(138, 2) + SourceIndex(0) +1 >Emitted(77, 2) Source(138, 2) + SourceIndex(0) +2 >Emitted(77, 3) Source(138, 2) + SourceIndex(0) --- >>>objc8.t13 = ({ 1-> @@ -1917,12 +1918,12 @@ sourceFile:contextualTyping.ts 4 > t13 5 > = 6 > ( -1->Emitted(77, 1) Source(139, 1) + SourceIndex(0) -2 >Emitted(77, 6) Source(139, 6) + SourceIndex(0) -3 >Emitted(77, 7) Source(139, 7) + SourceIndex(0) -4 >Emitted(77, 10) Source(139, 10) + SourceIndex(0) -5 >Emitted(77, 13) Source(139, 19) + SourceIndex(0) -6 >Emitted(77, 14) Source(139, 20) + SourceIndex(0) +1->Emitted(78, 1) Source(139, 1) + SourceIndex(0) +2 >Emitted(78, 6) Source(139, 6) + SourceIndex(0) +3 >Emitted(78, 7) Source(139, 7) + SourceIndex(0) +4 >Emitted(78, 10) Source(139, 10) + SourceIndex(0) +5 >Emitted(78, 13) Source(139, 19) + SourceIndex(0) +6 >Emitted(78, 14) Source(139, 20) + SourceIndex(0) --- >>> f: function (i, s) { return s; } 1->^^^^ @@ -1952,19 +1953,19 @@ sourceFile:contextualTyping.ts 11> ; 12> 13> } -1->Emitted(78, 5) Source(140, 5) + SourceIndex(0) -2 >Emitted(78, 6) Source(140, 6) + SourceIndex(0) -3 >Emitted(78, 8) Source(140, 8) + SourceIndex(0) -4 >Emitted(78, 18) Source(140, 17) + SourceIndex(0) -5 >Emitted(78, 19) Source(140, 18) + SourceIndex(0) -6 >Emitted(78, 21) Source(140, 20) + SourceIndex(0) -7 >Emitted(78, 22) Source(140, 21) + SourceIndex(0) -8 >Emitted(78, 26) Source(140, 25) + SourceIndex(0) -9 >Emitted(78, 33) Source(140, 32) + SourceIndex(0) -10>Emitted(78, 34) Source(140, 33) + SourceIndex(0) -11>Emitted(78, 35) Source(140, 34) + SourceIndex(0) -12>Emitted(78, 36) Source(140, 35) + SourceIndex(0) -13>Emitted(78, 37) Source(140, 36) + SourceIndex(0) +1->Emitted(79, 5) Source(140, 5) + SourceIndex(0) +2 >Emitted(79, 6) Source(140, 6) + SourceIndex(0) +3 >Emitted(79, 8) Source(140, 8) + SourceIndex(0) +4 >Emitted(79, 18) Source(140, 17) + SourceIndex(0) +5 >Emitted(79, 19) Source(140, 18) + SourceIndex(0) +6 >Emitted(79, 21) Source(140, 20) + SourceIndex(0) +7 >Emitted(79, 22) Source(140, 21) + SourceIndex(0) +8 >Emitted(79, 26) Source(140, 25) + SourceIndex(0) +9 >Emitted(79, 33) Source(140, 32) + SourceIndex(0) +10>Emitted(79, 34) Source(140, 33) + SourceIndex(0) +11>Emitted(79, 35) Source(140, 34) + SourceIndex(0) +12>Emitted(79, 36) Source(140, 35) + SourceIndex(0) +13>Emitted(79, 37) Source(140, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -1975,9 +1976,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(79, 2) Source(141, 2) + SourceIndex(0) -2 >Emitted(79, 3) Source(141, 3) + SourceIndex(0) -3 >Emitted(79, 4) Source(141, 3) + SourceIndex(0) +1 >Emitted(80, 2) Source(141, 2) + SourceIndex(0) +2 >Emitted(80, 3) Source(141, 3) + SourceIndex(0) +3 >Emitted(80, 4) Source(141, 3) + SourceIndex(0) --- >>>objc8.t14 = ({ 1-> @@ -1993,12 +1994,12 @@ sourceFile:contextualTyping.ts 4 > t14 5 > = 6 > ( -1->Emitted(80, 1) Source(142, 1) + SourceIndex(0) -2 >Emitted(80, 6) Source(142, 6) + SourceIndex(0) -3 >Emitted(80, 7) Source(142, 7) + SourceIndex(0) -4 >Emitted(80, 10) Source(142, 10) + SourceIndex(0) -5 >Emitted(80, 13) Source(142, 19) + SourceIndex(0) -6 >Emitted(80, 14) Source(142, 20) + SourceIndex(0) +1->Emitted(81, 1) Source(142, 1) + SourceIndex(0) +2 >Emitted(81, 6) Source(142, 6) + SourceIndex(0) +3 >Emitted(81, 7) Source(142, 7) + SourceIndex(0) +4 >Emitted(81, 10) Source(142, 10) + SourceIndex(0) +5 >Emitted(81, 13) Source(142, 19) + SourceIndex(0) +6 >Emitted(81, 14) Source(142, 20) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -2010,10 +2011,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(81, 5) Source(143, 5) + SourceIndex(0) -2 >Emitted(81, 6) Source(143, 6) + SourceIndex(0) -3 >Emitted(81, 8) Source(143, 8) + SourceIndex(0) -4 >Emitted(81, 10) Source(143, 10) + SourceIndex(0) +1 >Emitted(82, 5) Source(143, 5) + SourceIndex(0) +2 >Emitted(82, 6) Source(143, 6) + SourceIndex(0) +3 >Emitted(82, 8) Source(143, 8) + SourceIndex(0) +4 >Emitted(82, 10) Source(143, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -2024,9 +2025,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(82, 2) Source(144, 2) + SourceIndex(0) -2 >Emitted(82, 3) Source(144, 3) + SourceIndex(0) -3 >Emitted(82, 4) Source(144, 3) + SourceIndex(0) +1 >Emitted(83, 2) Source(144, 2) + SourceIndex(0) +2 >Emitted(83, 3) Source(144, 3) + SourceIndex(0) +3 >Emitted(83, 4) Source(144, 3) + SourceIndex(0) --- >>>// CONTEXT: Function call 1-> @@ -2034,8 +2035,8 @@ sourceFile:contextualTyping.ts 1-> > 2 >// CONTEXT: Function call -1->Emitted(83, 1) Source(145, 1) + SourceIndex(0) -2 >Emitted(83, 26) Source(145, 26) + SourceIndex(0) +1->Emitted(84, 1) Source(145, 1) + SourceIndex(0) +2 >Emitted(84, 26) Source(145, 26) + SourceIndex(0) --- >>>function c9t5(f) { } 1 > @@ -2053,13 +2054,13 @@ sourceFile:contextualTyping.ts 5 > f: (n: number) => IFoo 6 > ) { 7 > } -1 >Emitted(84, 1) Source(146, 1) + SourceIndex(0) -2 >Emitted(84, 10) Source(146, 10) + SourceIndex(0) -3 >Emitted(84, 14) Source(146, 14) + SourceIndex(0) -4 >Emitted(84, 15) Source(146, 15) + SourceIndex(0) -5 >Emitted(84, 16) Source(146, 37) + SourceIndex(0) -6 >Emitted(84, 20) Source(146, 40) + SourceIndex(0) -7 >Emitted(84, 21) Source(146, 41) + SourceIndex(0) +1 >Emitted(85, 1) Source(146, 1) + SourceIndex(0) +2 >Emitted(85, 10) Source(146, 10) + SourceIndex(0) +3 >Emitted(85, 14) Source(146, 14) + SourceIndex(0) +4 >Emitted(85, 15) Source(146, 15) + SourceIndex(0) +5 >Emitted(85, 16) Source(146, 37) + SourceIndex(0) +6 >Emitted(85, 20) Source(146, 40) + SourceIndex(0) +7 >Emitted(85, 21) Source(146, 41) + SourceIndex(0) --- >>>; 1 > @@ -2067,8 +2068,8 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^^^^^^^-> 1 > 2 >; -1 >Emitted(85, 1) Source(146, 41) + SourceIndex(0) -2 >Emitted(85, 2) Source(146, 42) + SourceIndex(0) +1 >Emitted(86, 1) Source(146, 41) + SourceIndex(0) +2 >Emitted(86, 2) Source(146, 42) + SourceIndex(0) --- >>>c9t5(function (n) { 1-> @@ -2083,11 +2084,11 @@ sourceFile:contextualTyping.ts 3 > ( 4 > function( 5 > n -1->Emitted(86, 1) Source(147, 1) + SourceIndex(0) -2 >Emitted(86, 5) Source(147, 5) + SourceIndex(0) -3 >Emitted(86, 6) Source(147, 6) + SourceIndex(0) -4 >Emitted(86, 16) Source(147, 15) + SourceIndex(0) -5 >Emitted(86, 17) Source(147, 16) + SourceIndex(0) +1->Emitted(87, 1) Source(147, 1) + SourceIndex(0) +2 >Emitted(87, 5) Source(147, 5) + SourceIndex(0) +3 >Emitted(87, 6) Source(147, 6) + SourceIndex(0) +4 >Emitted(87, 16) Source(147, 15) + SourceIndex(0) +5 >Emitted(87, 17) Source(147, 16) + SourceIndex(0) --- >>> return ({}); 1->^^^^ @@ -2103,12 +2104,12 @@ sourceFile:contextualTyping.ts 4 > {} 5 > ) 6 > ; -1->Emitted(87, 5) Source(148, 5) + SourceIndex(0) -2 >Emitted(87, 12) Source(148, 18) + SourceIndex(0) -3 >Emitted(87, 13) Source(148, 19) + SourceIndex(0) -4 >Emitted(87, 15) Source(148, 21) + SourceIndex(0) -5 >Emitted(87, 16) Source(148, 22) + SourceIndex(0) -6 >Emitted(87, 17) Source(148, 23) + SourceIndex(0) +1->Emitted(88, 5) Source(148, 5) + SourceIndex(0) +2 >Emitted(88, 12) Source(148, 18) + SourceIndex(0) +3 >Emitted(88, 13) Source(148, 19) + SourceIndex(0) +4 >Emitted(88, 15) Source(148, 21) + SourceIndex(0) +5 >Emitted(88, 16) Source(148, 22) + SourceIndex(0) +6 >Emitted(88, 17) Source(148, 23) + SourceIndex(0) --- >>>}); 1 > @@ -2121,10 +2122,10 @@ sourceFile:contextualTyping.ts 2 >} 3 > ) 4 > ; -1 >Emitted(88, 1) Source(149, 1) + SourceIndex(0) -2 >Emitted(88, 2) Source(149, 2) + SourceIndex(0) -3 >Emitted(88, 3) Source(149, 3) + SourceIndex(0) -4 >Emitted(88, 4) Source(149, 4) + SourceIndex(0) +1 >Emitted(89, 1) Source(149, 1) + SourceIndex(0) +2 >Emitted(89, 2) Source(149, 2) + SourceIndex(0) +3 >Emitted(89, 3) Source(149, 3) + SourceIndex(0) +4 >Emitted(89, 4) Source(149, 4) + SourceIndex(0) --- >>>// CONTEXT: Return statement 1-> @@ -2134,8 +2135,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Return statement -1->Emitted(89, 1) Source(151, 1) + SourceIndex(0) -2 >Emitted(89, 29) Source(151, 29) + SourceIndex(0) +1->Emitted(90, 1) Source(151, 1) + SourceIndex(0) +2 >Emitted(90, 29) Source(151, 29) + SourceIndex(0) --- >>>var c10t5 = function () { return function (n) { return ({}); }; }; 1-> @@ -2179,26 +2180,26 @@ sourceFile:contextualTyping.ts 18> 19> } 20> ; -1->Emitted(90, 1) Source(152, 1) + SourceIndex(0) -2 >Emitted(90, 5) Source(152, 5) + SourceIndex(0) -3 >Emitted(90, 10) Source(152, 10) + SourceIndex(0) -4 >Emitted(90, 13) Source(152, 40) + SourceIndex(0) -5 >Emitted(90, 27) Source(152, 53) + SourceIndex(0) -6 >Emitted(90, 34) Source(152, 60) + SourceIndex(0) -7 >Emitted(90, 44) Source(152, 69) + SourceIndex(0) -8 >Emitted(90, 45) Source(152, 70) + SourceIndex(0) -9 >Emitted(90, 49) Source(152, 74) + SourceIndex(0) -10>Emitted(90, 56) Source(152, 87) + SourceIndex(0) -11>Emitted(90, 57) Source(152, 88) + SourceIndex(0) -12>Emitted(90, 59) Source(152, 90) + SourceIndex(0) -13>Emitted(90, 60) Source(152, 91) + SourceIndex(0) -14>Emitted(90, 61) Source(152, 91) + SourceIndex(0) -15>Emitted(90, 62) Source(152, 92) + SourceIndex(0) -16>Emitted(90, 63) Source(152, 93) + SourceIndex(0) -17>Emitted(90, 64) Source(152, 93) + SourceIndex(0) -18>Emitted(90, 65) Source(152, 94) + SourceIndex(0) -19>Emitted(90, 66) Source(152, 95) + SourceIndex(0) -20>Emitted(90, 67) Source(152, 96) + SourceIndex(0) +1->Emitted(91, 1) Source(152, 1) + SourceIndex(0) +2 >Emitted(91, 5) Source(152, 5) + SourceIndex(0) +3 >Emitted(91, 10) Source(152, 10) + SourceIndex(0) +4 >Emitted(91, 13) Source(152, 40) + SourceIndex(0) +5 >Emitted(91, 27) Source(152, 53) + SourceIndex(0) +6 >Emitted(91, 34) Source(152, 60) + SourceIndex(0) +7 >Emitted(91, 44) Source(152, 69) + SourceIndex(0) +8 >Emitted(91, 45) Source(152, 70) + SourceIndex(0) +9 >Emitted(91, 49) Source(152, 74) + SourceIndex(0) +10>Emitted(91, 56) Source(152, 87) + SourceIndex(0) +11>Emitted(91, 57) Source(152, 88) + SourceIndex(0) +12>Emitted(91, 59) Source(152, 90) + SourceIndex(0) +13>Emitted(91, 60) Source(152, 91) + SourceIndex(0) +14>Emitted(91, 61) Source(152, 91) + SourceIndex(0) +15>Emitted(91, 62) Source(152, 92) + SourceIndex(0) +16>Emitted(91, 63) Source(152, 93) + SourceIndex(0) +17>Emitted(91, 64) Source(152, 93) + SourceIndex(0) +18>Emitted(91, 65) Source(152, 94) + SourceIndex(0) +19>Emitted(91, 66) Source(152, 95) + SourceIndex(0) +20>Emitted(91, 67) Source(152, 96) + SourceIndex(0) --- >>>// CONTEXT: Newing a class 1 > @@ -2207,8 +2208,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Newing a class -1 >Emitted(91, 1) Source(154, 1) + SourceIndex(0) -2 >Emitted(91, 27) Source(154, 27) + SourceIndex(0) +1 >Emitted(92, 1) Source(154, 1) + SourceIndex(0) +2 >Emitted(92, 27) Source(154, 27) + SourceIndex(0) --- >>>class C11t5 { 1 > @@ -2219,9 +2220,9 @@ sourceFile:contextualTyping.ts > 2 >class 3 > C11t5 -1 >Emitted(92, 1) Source(155, 1) + SourceIndex(0) -2 >Emitted(92, 7) Source(155, 7) + SourceIndex(0) -3 >Emitted(92, 12) Source(155, 12) + SourceIndex(0) +1 >Emitted(93, 1) Source(155, 1) + SourceIndex(0) +2 >Emitted(93, 7) Source(155, 7) + SourceIndex(0) +3 >Emitted(93, 12) Source(155, 12) + SourceIndex(0) --- >>> constructor(f) { } 1->^^^^ @@ -2234,17 +2235,17 @@ sourceFile:contextualTyping.ts 3 > f: (n: number) => IFoo 4 > ) { 5 > } -1->Emitted(93, 5) Source(155, 15) + SourceIndex(0) -2 >Emitted(93, 17) Source(155, 27) + SourceIndex(0) -3 >Emitted(93, 18) Source(155, 49) + SourceIndex(0) -4 >Emitted(93, 22) Source(155, 53) + SourceIndex(0) -5 >Emitted(93, 23) Source(155, 54) + SourceIndex(0) +1->Emitted(94, 5) Source(155, 15) + SourceIndex(0) +2 >Emitted(94, 17) Source(155, 27) + SourceIndex(0) +3 >Emitted(94, 18) Source(155, 49) + SourceIndex(0) +4 >Emitted(94, 22) Source(155, 53) + SourceIndex(0) +5 >Emitted(94, 23) Source(155, 54) + SourceIndex(0) --- >>>} 1 >^ 2 > ^-> 1 > } -1 >Emitted(94, 2) Source(155, 56) + SourceIndex(0) +1 >Emitted(95, 2) Source(155, 56) + SourceIndex(0) --- >>>; 1-> @@ -2252,8 +2253,8 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 >; -1->Emitted(95, 1) Source(155, 56) + SourceIndex(0) -2 >Emitted(95, 2) Source(155, 57) + SourceIndex(0) +1->Emitted(96, 1) Source(155, 56) + SourceIndex(0) +2 >Emitted(96, 2) Source(155, 57) + SourceIndex(0) --- >>>var i = new C11t5(function (n) { return ({}); }); 1-> @@ -2295,25 +2296,25 @@ sourceFile:contextualTyping.ts 17> } 18> ) 19> ; -1->Emitted(96, 1) Source(156, 1) + SourceIndex(0) -2 >Emitted(96, 5) Source(156, 5) + SourceIndex(0) -3 >Emitted(96, 6) Source(156, 6) + SourceIndex(0) -4 >Emitted(96, 9) Source(156, 9) + SourceIndex(0) -5 >Emitted(96, 13) Source(156, 13) + SourceIndex(0) -6 >Emitted(96, 18) Source(156, 18) + SourceIndex(0) -7 >Emitted(96, 19) Source(156, 19) + SourceIndex(0) -8 >Emitted(96, 29) Source(156, 28) + SourceIndex(0) -9 >Emitted(96, 30) Source(156, 29) + SourceIndex(0) -10>Emitted(96, 34) Source(156, 33) + SourceIndex(0) -11>Emitted(96, 41) Source(156, 46) + SourceIndex(0) -12>Emitted(96, 42) Source(156, 47) + SourceIndex(0) -13>Emitted(96, 44) Source(156, 49) + SourceIndex(0) -14>Emitted(96, 45) Source(156, 50) + SourceIndex(0) -15>Emitted(96, 46) Source(156, 50) + SourceIndex(0) -16>Emitted(96, 47) Source(156, 51) + SourceIndex(0) -17>Emitted(96, 48) Source(156, 52) + SourceIndex(0) -18>Emitted(96, 49) Source(156, 53) + SourceIndex(0) -19>Emitted(96, 50) Source(156, 54) + SourceIndex(0) +1->Emitted(97, 1) Source(156, 1) + SourceIndex(0) +2 >Emitted(97, 5) Source(156, 5) + SourceIndex(0) +3 >Emitted(97, 6) Source(156, 6) + SourceIndex(0) +4 >Emitted(97, 9) Source(156, 9) + SourceIndex(0) +5 >Emitted(97, 13) Source(156, 13) + SourceIndex(0) +6 >Emitted(97, 18) Source(156, 18) + SourceIndex(0) +7 >Emitted(97, 19) Source(156, 19) + SourceIndex(0) +8 >Emitted(97, 29) Source(156, 28) + SourceIndex(0) +9 >Emitted(97, 30) Source(156, 29) + SourceIndex(0) +10>Emitted(97, 34) Source(156, 33) + SourceIndex(0) +11>Emitted(97, 41) Source(156, 46) + SourceIndex(0) +12>Emitted(97, 42) Source(156, 47) + SourceIndex(0) +13>Emitted(97, 44) Source(156, 49) + SourceIndex(0) +14>Emitted(97, 45) Source(156, 50) + SourceIndex(0) +15>Emitted(97, 46) Source(156, 50) + SourceIndex(0) +16>Emitted(97, 47) Source(156, 51) + SourceIndex(0) +17>Emitted(97, 48) Source(156, 52) + SourceIndex(0) +18>Emitted(97, 49) Source(156, 53) + SourceIndex(0) +19>Emitted(97, 50) Source(156, 54) + SourceIndex(0) --- >>>// CONTEXT: Type annotated expression 1 > @@ -2323,8 +2324,8 @@ sourceFile:contextualTyping.ts > > 2 >// CONTEXT: Type annotated expression -1 >Emitted(97, 1) Source(158, 1) + SourceIndex(0) -2 >Emitted(97, 38) Source(158, 38) + SourceIndex(0) +1 >Emitted(98, 1) Source(158, 1) + SourceIndex(0) +2 >Emitted(98, 38) Source(158, 38) + SourceIndex(0) --- >>>var c12t1 = (function (s) { return s; }); 1-> @@ -2358,21 +2359,21 @@ sourceFile:contextualTyping.ts 13> } 14> ) 15> ; -1->Emitted(98, 1) Source(159, 1) + SourceIndex(0) -2 >Emitted(98, 5) Source(159, 5) + SourceIndex(0) -3 >Emitted(98, 10) Source(159, 10) + SourceIndex(0) -4 >Emitted(98, 13) Source(159, 37) + SourceIndex(0) -5 >Emitted(98, 14) Source(159, 38) + SourceIndex(0) -6 >Emitted(98, 24) Source(159, 47) + SourceIndex(0) -7 >Emitted(98, 25) Source(159, 48) + SourceIndex(0) -8 >Emitted(98, 29) Source(159, 52) + SourceIndex(0) -9 >Emitted(98, 36) Source(159, 59) + SourceIndex(0) -10>Emitted(98, 37) Source(159, 60) + SourceIndex(0) -11>Emitted(98, 38) Source(159, 60) + SourceIndex(0) -12>Emitted(98, 39) Source(159, 61) + SourceIndex(0) -13>Emitted(98, 40) Source(159, 62) + SourceIndex(0) -14>Emitted(98, 41) Source(159, 63) + SourceIndex(0) -15>Emitted(98, 42) Source(159, 64) + SourceIndex(0) +1->Emitted(99, 1) Source(159, 1) + SourceIndex(0) +2 >Emitted(99, 5) Source(159, 5) + SourceIndex(0) +3 >Emitted(99, 10) Source(159, 10) + SourceIndex(0) +4 >Emitted(99, 13) Source(159, 37) + SourceIndex(0) +5 >Emitted(99, 14) Source(159, 38) + SourceIndex(0) +6 >Emitted(99, 24) Source(159, 47) + SourceIndex(0) +7 >Emitted(99, 25) Source(159, 48) + SourceIndex(0) +8 >Emitted(99, 29) Source(159, 52) + SourceIndex(0) +9 >Emitted(99, 36) Source(159, 59) + SourceIndex(0) +10>Emitted(99, 37) Source(159, 60) + SourceIndex(0) +11>Emitted(99, 38) Source(159, 60) + SourceIndex(0) +12>Emitted(99, 39) Source(159, 61) + SourceIndex(0) +13>Emitted(99, 40) Source(159, 62) + SourceIndex(0) +14>Emitted(99, 41) Source(159, 63) + SourceIndex(0) +15>Emitted(99, 42) Source(159, 64) + SourceIndex(0) --- >>>var c12t2 = ({ 1 > @@ -2386,11 +2387,11 @@ sourceFile:contextualTyping.ts 3 > c12t2 4 > = 5 > ( -1 >Emitted(99, 1) Source(160, 1) + SourceIndex(0) -2 >Emitted(99, 5) Source(160, 5) + SourceIndex(0) -3 >Emitted(99, 10) Source(160, 10) + SourceIndex(0) -4 >Emitted(99, 13) Source(160, 20) + SourceIndex(0) -5 >Emitted(99, 14) Source(160, 21) + SourceIndex(0) +1 >Emitted(100, 1) Source(160, 1) + SourceIndex(0) +2 >Emitted(100, 5) Source(160, 5) + SourceIndex(0) +3 >Emitted(100, 10) Source(160, 10) + SourceIndex(0) +4 >Emitted(100, 13) Source(160, 20) + SourceIndex(0) +5 >Emitted(100, 14) Source(160, 21) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -2402,10 +2403,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(100, 5) Source(161, 5) + SourceIndex(0) -2 >Emitted(100, 6) Source(161, 6) + SourceIndex(0) -3 >Emitted(100, 8) Source(161, 8) + SourceIndex(0) -4 >Emitted(100, 9) Source(161, 9) + SourceIndex(0) +1 >Emitted(101, 5) Source(161, 5) + SourceIndex(0) +2 >Emitted(101, 6) Source(161, 6) + SourceIndex(0) +3 >Emitted(101, 8) Source(161, 8) + SourceIndex(0) +4 >Emitted(101, 9) Source(161, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -2416,9 +2417,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > ; -1 >Emitted(101, 2) Source(162, 2) + SourceIndex(0) -2 >Emitted(101, 3) Source(162, 3) + SourceIndex(0) -3 >Emitted(101, 4) Source(162, 4) + SourceIndex(0) +1 >Emitted(102, 2) Source(162, 2) + SourceIndex(0) +2 >Emitted(102, 3) Source(162, 3) + SourceIndex(0) +3 >Emitted(102, 4) Source(162, 4) + SourceIndex(0) --- >>>var c12t3 = []; 1-> @@ -2435,12 +2436,12 @@ sourceFile:contextualTyping.ts 4 > = 5 > [] 6 > ; -1->Emitted(102, 1) Source(163, 1) + SourceIndex(0) -2 >Emitted(102, 5) Source(163, 5) + SourceIndex(0) -3 >Emitted(102, 10) Source(163, 10) + SourceIndex(0) -4 >Emitted(102, 13) Source(163, 24) + SourceIndex(0) -5 >Emitted(102, 15) Source(163, 26) + SourceIndex(0) -6 >Emitted(102, 16) Source(163, 27) + SourceIndex(0) +1->Emitted(103, 1) Source(163, 1) + SourceIndex(0) +2 >Emitted(103, 5) Source(163, 5) + SourceIndex(0) +3 >Emitted(103, 10) Source(163, 10) + SourceIndex(0) +4 >Emitted(103, 13) Source(163, 24) + SourceIndex(0) +5 >Emitted(103, 15) Source(163, 26) + SourceIndex(0) +6 >Emitted(103, 16) Source(163, 27) + SourceIndex(0) --- >>>var c12t4 = function () { return ({}); }; 1-> @@ -2471,19 +2472,19 @@ sourceFile:contextualTyping.ts 11> 12> } 13> ; -1->Emitted(103, 1) Source(164, 1) + SourceIndex(0) -2 >Emitted(103, 5) Source(164, 5) + SourceIndex(0) -3 >Emitted(103, 10) Source(164, 10) + SourceIndex(0) -4 >Emitted(103, 13) Source(164, 26) + SourceIndex(0) -5 >Emitted(103, 27) Source(164, 39) + SourceIndex(0) -6 >Emitted(103, 34) Source(164, 52) + SourceIndex(0) -7 >Emitted(103, 35) Source(164, 53) + SourceIndex(0) -8 >Emitted(103, 37) Source(164, 55) + SourceIndex(0) -9 >Emitted(103, 38) Source(164, 56) + SourceIndex(0) -10>Emitted(103, 39) Source(164, 56) + SourceIndex(0) -11>Emitted(103, 40) Source(164, 57) + SourceIndex(0) -12>Emitted(103, 41) Source(164, 58) + SourceIndex(0) -13>Emitted(103, 42) Source(164, 59) + SourceIndex(0) +1->Emitted(104, 1) Source(164, 1) + SourceIndex(0) +2 >Emitted(104, 5) Source(164, 5) + SourceIndex(0) +3 >Emitted(104, 10) Source(164, 10) + SourceIndex(0) +4 >Emitted(104, 13) Source(164, 26) + SourceIndex(0) +5 >Emitted(104, 27) Source(164, 39) + SourceIndex(0) +6 >Emitted(104, 34) Source(164, 52) + SourceIndex(0) +7 >Emitted(104, 35) Source(164, 53) + SourceIndex(0) +8 >Emitted(104, 37) Source(164, 55) + SourceIndex(0) +9 >Emitted(104, 38) Source(164, 56) + SourceIndex(0) +10>Emitted(104, 39) Source(164, 56) + SourceIndex(0) +11>Emitted(104, 40) Source(164, 57) + SourceIndex(0) +12>Emitted(104, 41) Source(164, 58) + SourceIndex(0) +13>Emitted(104, 42) Source(164, 59) + SourceIndex(0) --- >>>var c12t5 = function (n) { return ({}); }; 1-> @@ -2518,21 +2519,21 @@ sourceFile:contextualTyping.ts 13> 14> } 15> ; -1->Emitted(104, 1) Source(165, 1) + SourceIndex(0) -2 >Emitted(104, 5) Source(165, 5) + SourceIndex(0) -3 >Emitted(104, 10) Source(165, 10) + SourceIndex(0) -4 >Emitted(104, 13) Source(165, 35) + SourceIndex(0) -5 >Emitted(104, 23) Source(165, 44) + SourceIndex(0) -6 >Emitted(104, 24) Source(165, 45) + SourceIndex(0) -7 >Emitted(104, 28) Source(165, 49) + SourceIndex(0) -8 >Emitted(104, 35) Source(165, 62) + SourceIndex(0) -9 >Emitted(104, 36) Source(165, 63) + SourceIndex(0) -10>Emitted(104, 38) Source(165, 65) + SourceIndex(0) -11>Emitted(104, 39) Source(165, 66) + SourceIndex(0) -12>Emitted(104, 40) Source(165, 66) + SourceIndex(0) -13>Emitted(104, 41) Source(165, 67) + SourceIndex(0) -14>Emitted(104, 42) Source(165, 68) + SourceIndex(0) -15>Emitted(104, 43) Source(165, 69) + SourceIndex(0) +1->Emitted(105, 1) Source(165, 1) + SourceIndex(0) +2 >Emitted(105, 5) Source(165, 5) + SourceIndex(0) +3 >Emitted(105, 10) Source(165, 10) + SourceIndex(0) +4 >Emitted(105, 13) Source(165, 35) + SourceIndex(0) +5 >Emitted(105, 23) Source(165, 44) + SourceIndex(0) +6 >Emitted(105, 24) Source(165, 45) + SourceIndex(0) +7 >Emitted(105, 28) Source(165, 49) + SourceIndex(0) +8 >Emitted(105, 35) Source(165, 62) + SourceIndex(0) +9 >Emitted(105, 36) Source(165, 63) + SourceIndex(0) +10>Emitted(105, 38) Source(165, 65) + SourceIndex(0) +11>Emitted(105, 39) Source(165, 66) + SourceIndex(0) +12>Emitted(105, 40) Source(165, 66) + SourceIndex(0) +13>Emitted(105, 41) Source(165, 67) + SourceIndex(0) +14>Emitted(105, 42) Source(165, 68) + SourceIndex(0) +15>Emitted(105, 43) Source(165, 69) + SourceIndex(0) --- >>>var c12t6 = function (n, s) { return ({}); }; 1-> @@ -2570,23 +2571,23 @@ sourceFile:contextualTyping.ts 15> 16> } 17> ; -1->Emitted(105, 1) Source(166, 1) + SourceIndex(0) -2 >Emitted(105, 5) Source(166, 5) + SourceIndex(0) -3 >Emitted(105, 10) Source(166, 10) + SourceIndex(0) -4 >Emitted(105, 13) Source(166, 46) + SourceIndex(0) -5 >Emitted(105, 23) Source(166, 55) + SourceIndex(0) -6 >Emitted(105, 24) Source(166, 56) + SourceIndex(0) -7 >Emitted(105, 26) Source(166, 58) + SourceIndex(0) -8 >Emitted(105, 27) Source(166, 59) + SourceIndex(0) -9 >Emitted(105, 31) Source(166, 63) + SourceIndex(0) -10>Emitted(105, 38) Source(166, 76) + SourceIndex(0) -11>Emitted(105, 39) Source(166, 77) + SourceIndex(0) -12>Emitted(105, 41) Source(166, 79) + SourceIndex(0) -13>Emitted(105, 42) Source(166, 80) + SourceIndex(0) -14>Emitted(105, 43) Source(166, 80) + SourceIndex(0) -15>Emitted(105, 44) Source(166, 81) + SourceIndex(0) -16>Emitted(105, 45) Source(166, 82) + SourceIndex(0) -17>Emitted(105, 46) Source(166, 83) + SourceIndex(0) +1->Emitted(106, 1) Source(166, 1) + SourceIndex(0) +2 >Emitted(106, 5) Source(166, 5) + SourceIndex(0) +3 >Emitted(106, 10) Source(166, 10) + SourceIndex(0) +4 >Emitted(106, 13) Source(166, 46) + SourceIndex(0) +5 >Emitted(106, 23) Source(166, 55) + SourceIndex(0) +6 >Emitted(106, 24) Source(166, 56) + SourceIndex(0) +7 >Emitted(106, 26) Source(166, 58) + SourceIndex(0) +8 >Emitted(106, 27) Source(166, 59) + SourceIndex(0) +9 >Emitted(106, 31) Source(166, 63) + SourceIndex(0) +10>Emitted(106, 38) Source(166, 76) + SourceIndex(0) +11>Emitted(106, 39) Source(166, 77) + SourceIndex(0) +12>Emitted(106, 41) Source(166, 79) + SourceIndex(0) +13>Emitted(106, 42) Source(166, 80) + SourceIndex(0) +14>Emitted(106, 43) Source(166, 80) + SourceIndex(0) +15>Emitted(106, 44) Source(166, 81) + SourceIndex(0) +16>Emitted(106, 45) Source(166, 82) + SourceIndex(0) +17>Emitted(106, 46) Source(166, 83) + SourceIndex(0) --- >>>var c12t7 = function (n) { return n; }; 1 > @@ -2620,19 +2621,19 @@ sourceFile:contextualTyping.ts 11> 12> } 13> ; -1 >Emitted(106, 1) Source(167, 1) + SourceIndex(0) -2 >Emitted(106, 5) Source(167, 5) + SourceIndex(0) -3 >Emitted(106, 10) Source(167, 10) + SourceIndex(0) -4 >Emitted(106, 13) Source(170, 4) + SourceIndex(0) -5 >Emitted(106, 23) Source(170, 13) + SourceIndex(0) -6 >Emitted(106, 24) Source(170, 21) + SourceIndex(0) -7 >Emitted(106, 28) Source(170, 25) + SourceIndex(0) -8 >Emitted(106, 35) Source(170, 32) + SourceIndex(0) -9 >Emitted(106, 36) Source(170, 33) + SourceIndex(0) -10>Emitted(106, 37) Source(170, 33) + SourceIndex(0) -11>Emitted(106, 38) Source(170, 34) + SourceIndex(0) -12>Emitted(106, 39) Source(170, 35) + SourceIndex(0) -13>Emitted(106, 40) Source(170, 36) + SourceIndex(0) +1 >Emitted(107, 1) Source(167, 1) + SourceIndex(0) +2 >Emitted(107, 5) Source(167, 5) + SourceIndex(0) +3 >Emitted(107, 10) Source(167, 10) + SourceIndex(0) +4 >Emitted(107, 13) Source(170, 4) + SourceIndex(0) +5 >Emitted(107, 23) Source(170, 13) + SourceIndex(0) +6 >Emitted(107, 24) Source(170, 21) + SourceIndex(0) +7 >Emitted(107, 28) Source(170, 25) + SourceIndex(0) +8 >Emitted(107, 35) Source(170, 32) + SourceIndex(0) +9 >Emitted(107, 36) Source(170, 33) + SourceIndex(0) +10>Emitted(107, 37) Source(170, 33) + SourceIndex(0) +11>Emitted(107, 38) Source(170, 34) + SourceIndex(0) +12>Emitted(107, 39) Source(170, 35) + SourceIndex(0) +13>Emitted(107, 40) Source(170, 36) + SourceIndex(0) --- >>>var c12t8 = function (n) { return n; }; 1-> @@ -2663,19 +2664,19 @@ sourceFile:contextualTyping.ts 11> 12> } 13> ; -1->Emitted(107, 1) Source(172, 1) + SourceIndex(0) -2 >Emitted(107, 5) Source(172, 5) + SourceIndex(0) -3 >Emitted(107, 10) Source(172, 10) + SourceIndex(0) -4 >Emitted(107, 13) Source(172, 48) + SourceIndex(0) -5 >Emitted(107, 23) Source(172, 57) + SourceIndex(0) -6 >Emitted(107, 24) Source(172, 58) + SourceIndex(0) -7 >Emitted(107, 28) Source(172, 62) + SourceIndex(0) -8 >Emitted(107, 35) Source(172, 69) + SourceIndex(0) -9 >Emitted(107, 36) Source(172, 70) + SourceIndex(0) -10>Emitted(107, 37) Source(172, 71) + SourceIndex(0) -11>Emitted(107, 38) Source(172, 72) + SourceIndex(0) -12>Emitted(107, 39) Source(172, 73) + SourceIndex(0) -13>Emitted(107, 40) Source(172, 74) + SourceIndex(0) +1->Emitted(108, 1) Source(172, 1) + SourceIndex(0) +2 >Emitted(108, 5) Source(172, 5) + SourceIndex(0) +3 >Emitted(108, 10) Source(172, 10) + SourceIndex(0) +4 >Emitted(108, 13) Source(172, 48) + SourceIndex(0) +5 >Emitted(108, 23) Source(172, 57) + SourceIndex(0) +6 >Emitted(108, 24) Source(172, 58) + SourceIndex(0) +7 >Emitted(108, 28) Source(172, 62) + SourceIndex(0) +8 >Emitted(108, 35) Source(172, 69) + SourceIndex(0) +9 >Emitted(108, 36) Source(172, 70) + SourceIndex(0) +10>Emitted(108, 37) Source(172, 71) + SourceIndex(0) +11>Emitted(108, 38) Source(172, 72) + SourceIndex(0) +12>Emitted(108, 39) Source(172, 73) + SourceIndex(0) +13>Emitted(108, 40) Source(172, 74) + SourceIndex(0) --- >>>var c12t9 = [[], []]; 1 > @@ -2700,16 +2701,16 @@ sourceFile:contextualTyping.ts 8 > [] 9 > ] 10> ; -1 >Emitted(108, 1) Source(173, 1) + SourceIndex(0) -2 >Emitted(108, 5) Source(173, 5) + SourceIndex(0) -3 >Emitted(108, 10) Source(173, 10) + SourceIndex(0) -4 >Emitted(108, 13) Source(173, 26) + SourceIndex(0) -5 >Emitted(108, 14) Source(173, 27) + SourceIndex(0) -6 >Emitted(108, 16) Source(173, 29) + SourceIndex(0) -7 >Emitted(108, 18) Source(173, 30) + SourceIndex(0) -8 >Emitted(108, 20) Source(173, 32) + SourceIndex(0) -9 >Emitted(108, 21) Source(173, 33) + SourceIndex(0) -10>Emitted(108, 22) Source(173, 34) + SourceIndex(0) +1 >Emitted(109, 1) Source(173, 1) + SourceIndex(0) +2 >Emitted(109, 5) Source(173, 5) + SourceIndex(0) +3 >Emitted(109, 10) Source(173, 10) + SourceIndex(0) +4 >Emitted(109, 13) Source(173, 26) + SourceIndex(0) +5 >Emitted(109, 14) Source(173, 27) + SourceIndex(0) +6 >Emitted(109, 16) Source(173, 29) + SourceIndex(0) +7 >Emitted(109, 18) Source(173, 30) + SourceIndex(0) +8 >Emitted(109, 20) Source(173, 32) + SourceIndex(0) +9 >Emitted(109, 21) Source(173, 33) + SourceIndex(0) +10>Emitted(109, 22) Source(173, 34) + SourceIndex(0) --- >>>var c12t10 = [({}), ({})]; 1-> @@ -2742,20 +2743,20 @@ sourceFile:contextualTyping.ts 12> ) 13> ] 14> ; -1->Emitted(109, 1) Source(174, 1) + SourceIndex(0) -2 >Emitted(109, 5) Source(174, 5) + SourceIndex(0) -3 >Emitted(109, 11) Source(174, 11) + SourceIndex(0) -4 >Emitted(109, 14) Source(174, 23) + SourceIndex(0) -5 >Emitted(109, 15) Source(174, 30) + SourceIndex(0) -6 >Emitted(109, 16) Source(174, 31) + SourceIndex(0) -7 >Emitted(109, 18) Source(174, 33) + SourceIndex(0) -8 >Emitted(109, 19) Source(174, 34) + SourceIndex(0) -9 >Emitted(109, 21) Source(174, 41) + SourceIndex(0) -10>Emitted(109, 22) Source(174, 42) + SourceIndex(0) -11>Emitted(109, 24) Source(174, 44) + SourceIndex(0) -12>Emitted(109, 25) Source(174, 45) + SourceIndex(0) -13>Emitted(109, 26) Source(174, 46) + SourceIndex(0) -14>Emitted(109, 27) Source(174, 47) + SourceIndex(0) +1->Emitted(110, 1) Source(174, 1) + SourceIndex(0) +2 >Emitted(110, 5) Source(174, 5) + SourceIndex(0) +3 >Emitted(110, 11) Source(174, 11) + SourceIndex(0) +4 >Emitted(110, 14) Source(174, 23) + SourceIndex(0) +5 >Emitted(110, 15) Source(174, 30) + SourceIndex(0) +6 >Emitted(110, 16) Source(174, 31) + SourceIndex(0) +7 >Emitted(110, 18) Source(174, 33) + SourceIndex(0) +8 >Emitted(110, 19) Source(174, 34) + SourceIndex(0) +9 >Emitted(110, 21) Source(174, 41) + SourceIndex(0) +10>Emitted(110, 22) Source(174, 42) + SourceIndex(0) +11>Emitted(110, 24) Source(174, 44) + SourceIndex(0) +12>Emitted(110, 25) Source(174, 45) + SourceIndex(0) +13>Emitted(110, 26) Source(174, 46) + SourceIndex(0) +14>Emitted(110, 27) Source(174, 47) + SourceIndex(0) --- >>>var c12t11 = [function (n, s) { return s; }]; 1-> @@ -2793,23 +2794,23 @@ sourceFile:contextualTyping.ts 15> } 16> ] 17> ; -1->Emitted(110, 1) Source(175, 1) + SourceIndex(0) -2 >Emitted(110, 5) Source(175, 5) + SourceIndex(0) -3 >Emitted(110, 11) Source(175, 11) + SourceIndex(0) -4 >Emitted(110, 14) Source(175, 52) + SourceIndex(0) -5 >Emitted(110, 15) Source(175, 53) + SourceIndex(0) -6 >Emitted(110, 25) Source(175, 62) + SourceIndex(0) -7 >Emitted(110, 26) Source(175, 63) + SourceIndex(0) -8 >Emitted(110, 28) Source(175, 65) + SourceIndex(0) -9 >Emitted(110, 29) Source(175, 66) + SourceIndex(0) -10>Emitted(110, 33) Source(175, 70) + SourceIndex(0) -11>Emitted(110, 40) Source(175, 77) + SourceIndex(0) -12>Emitted(110, 41) Source(175, 78) + SourceIndex(0) -13>Emitted(110, 42) Source(175, 79) + SourceIndex(0) -14>Emitted(110, 43) Source(175, 80) + SourceIndex(0) -15>Emitted(110, 44) Source(175, 81) + SourceIndex(0) -16>Emitted(110, 45) Source(175, 82) + SourceIndex(0) -17>Emitted(110, 46) Source(175, 83) + SourceIndex(0) +1->Emitted(111, 1) Source(175, 1) + SourceIndex(0) +2 >Emitted(111, 5) Source(175, 5) + SourceIndex(0) +3 >Emitted(111, 11) Source(175, 11) + SourceIndex(0) +4 >Emitted(111, 14) Source(175, 52) + SourceIndex(0) +5 >Emitted(111, 15) Source(175, 53) + SourceIndex(0) +6 >Emitted(111, 25) Source(175, 62) + SourceIndex(0) +7 >Emitted(111, 26) Source(175, 63) + SourceIndex(0) +8 >Emitted(111, 28) Source(175, 65) + SourceIndex(0) +9 >Emitted(111, 29) Source(175, 66) + SourceIndex(0) +10>Emitted(111, 33) Source(175, 70) + SourceIndex(0) +11>Emitted(111, 40) Source(175, 77) + SourceIndex(0) +12>Emitted(111, 41) Source(175, 78) + SourceIndex(0) +13>Emitted(111, 42) Source(175, 79) + SourceIndex(0) +14>Emitted(111, 43) Source(175, 80) + SourceIndex(0) +15>Emitted(111, 44) Source(175, 81) + SourceIndex(0) +16>Emitted(111, 45) Source(175, 82) + SourceIndex(0) +17>Emitted(111, 46) Source(175, 83) + SourceIndex(0) --- >>>var c12t12 = { 1 > @@ -2822,10 +2823,10 @@ sourceFile:contextualTyping.ts 2 >var 3 > c12t12 4 > = -1 >Emitted(111, 1) Source(176, 1) + SourceIndex(0) -2 >Emitted(111, 5) Source(176, 5) + SourceIndex(0) -3 >Emitted(111, 11) Source(176, 11) + SourceIndex(0) -4 >Emitted(111, 14) Source(176, 21) + SourceIndex(0) +1 >Emitted(112, 1) Source(176, 1) + SourceIndex(0) +2 >Emitted(112, 5) Source(176, 5) + SourceIndex(0) +3 >Emitted(112, 11) Source(176, 11) + SourceIndex(0) +4 >Emitted(112, 14) Source(176, 21) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -2841,12 +2842,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(112, 5) Source(177, 5) + SourceIndex(0) -2 >Emitted(112, 8) Source(177, 8) + SourceIndex(0) -3 >Emitted(112, 10) Source(177, 16) + SourceIndex(0) -4 >Emitted(112, 11) Source(177, 17) + SourceIndex(0) -5 >Emitted(112, 13) Source(177, 19) + SourceIndex(0) -6 >Emitted(112, 14) Source(177, 20) + SourceIndex(0) +1->Emitted(113, 5) Source(177, 5) + SourceIndex(0) +2 >Emitted(113, 8) Source(177, 8) + SourceIndex(0) +3 >Emitted(113, 10) Source(177, 16) + SourceIndex(0) +4 >Emitted(113, 11) Source(177, 17) + SourceIndex(0) +5 >Emitted(113, 13) Source(177, 19) + SourceIndex(0) +6 >Emitted(113, 14) Source(177, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -2855,8 +2856,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(113, 2) Source(178, 2) + SourceIndex(0) -2 >Emitted(113, 3) Source(178, 2) + SourceIndex(0) +1 >Emitted(114, 2) Source(178, 2) + SourceIndex(0) +2 >Emitted(114, 3) Source(178, 2) + SourceIndex(0) --- >>>var c12t13 = ({ 1-> @@ -2871,11 +2872,11 @@ sourceFile:contextualTyping.ts 3 > c12t13 4 > = 5 > ( -1->Emitted(114, 1) Source(179, 1) + SourceIndex(0) -2 >Emitted(114, 5) Source(179, 5) + SourceIndex(0) -3 >Emitted(114, 11) Source(179, 11) + SourceIndex(0) -4 >Emitted(114, 14) Source(179, 21) + SourceIndex(0) -5 >Emitted(114, 15) Source(179, 22) + SourceIndex(0) +1->Emitted(115, 1) Source(179, 1) + SourceIndex(0) +2 >Emitted(115, 5) Source(179, 5) + SourceIndex(0) +3 >Emitted(115, 11) Source(179, 11) + SourceIndex(0) +4 >Emitted(115, 14) Source(179, 21) + SourceIndex(0) +5 >Emitted(115, 15) Source(179, 22) + SourceIndex(0) --- >>> f: function (i, s) { return s; } 1->^^^^ @@ -2905,19 +2906,19 @@ sourceFile:contextualTyping.ts 11> ; 12> 13> } -1->Emitted(115, 5) Source(180, 5) + SourceIndex(0) -2 >Emitted(115, 6) Source(180, 6) + SourceIndex(0) -3 >Emitted(115, 8) Source(180, 8) + SourceIndex(0) -4 >Emitted(115, 18) Source(180, 17) + SourceIndex(0) -5 >Emitted(115, 19) Source(180, 18) + SourceIndex(0) -6 >Emitted(115, 21) Source(180, 20) + SourceIndex(0) -7 >Emitted(115, 22) Source(180, 21) + SourceIndex(0) -8 >Emitted(115, 26) Source(180, 25) + SourceIndex(0) -9 >Emitted(115, 33) Source(180, 32) + SourceIndex(0) -10>Emitted(115, 34) Source(180, 33) + SourceIndex(0) -11>Emitted(115, 35) Source(180, 34) + SourceIndex(0) -12>Emitted(115, 36) Source(180, 35) + SourceIndex(0) -13>Emitted(115, 37) Source(180, 36) + SourceIndex(0) +1->Emitted(116, 5) Source(180, 5) + SourceIndex(0) +2 >Emitted(116, 6) Source(180, 6) + SourceIndex(0) +3 >Emitted(116, 8) Source(180, 8) + SourceIndex(0) +4 >Emitted(116, 18) Source(180, 17) + SourceIndex(0) +5 >Emitted(116, 19) Source(180, 18) + SourceIndex(0) +6 >Emitted(116, 21) Source(180, 20) + SourceIndex(0) +7 >Emitted(116, 22) Source(180, 21) + SourceIndex(0) +8 >Emitted(116, 26) Source(180, 25) + SourceIndex(0) +9 >Emitted(116, 33) Source(180, 32) + SourceIndex(0) +10>Emitted(116, 34) Source(180, 33) + SourceIndex(0) +11>Emitted(116, 35) Source(180, 34) + SourceIndex(0) +12>Emitted(116, 36) Source(180, 35) + SourceIndex(0) +13>Emitted(116, 37) Source(180, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -2928,9 +2929,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(116, 2) Source(181, 2) + SourceIndex(0) -2 >Emitted(116, 3) Source(181, 3) + SourceIndex(0) -3 >Emitted(116, 4) Source(181, 3) + SourceIndex(0) +1 >Emitted(117, 2) Source(181, 2) + SourceIndex(0) +2 >Emitted(117, 3) Source(181, 3) + SourceIndex(0) +3 >Emitted(117, 4) Source(181, 3) + SourceIndex(0) --- >>>var c12t14 = ({ 1-> @@ -2944,11 +2945,11 @@ sourceFile:contextualTyping.ts 3 > c12t14 4 > = 5 > ( -1->Emitted(117, 1) Source(182, 1) + SourceIndex(0) -2 >Emitted(117, 5) Source(182, 5) + SourceIndex(0) -3 >Emitted(117, 11) Source(182, 11) + SourceIndex(0) -4 >Emitted(117, 14) Source(182, 21) + SourceIndex(0) -5 >Emitted(117, 15) Source(182, 22) + SourceIndex(0) +1->Emitted(118, 1) Source(182, 1) + SourceIndex(0) +2 >Emitted(118, 5) Source(182, 5) + SourceIndex(0) +3 >Emitted(118, 11) Source(182, 11) + SourceIndex(0) +4 >Emitted(118, 14) Source(182, 21) + SourceIndex(0) +5 >Emitted(118, 15) Source(182, 22) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -2960,10 +2961,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(118, 5) Source(183, 5) + SourceIndex(0) -2 >Emitted(118, 6) Source(183, 6) + SourceIndex(0) -3 >Emitted(118, 8) Source(183, 8) + SourceIndex(0) -4 >Emitted(118, 10) Source(183, 10) + SourceIndex(0) +1 >Emitted(119, 5) Source(183, 5) + SourceIndex(0) +2 >Emitted(119, 6) Source(183, 6) + SourceIndex(0) +3 >Emitted(119, 8) Source(183, 8) + SourceIndex(0) +4 >Emitted(119, 10) Source(183, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -2974,9 +2975,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(119, 2) Source(184, 2) + SourceIndex(0) -2 >Emitted(119, 3) Source(184, 3) + SourceIndex(0) -3 >Emitted(119, 4) Source(184, 3) + SourceIndex(0) +1 >Emitted(120, 2) Source(184, 2) + SourceIndex(0) +2 >Emitted(120, 3) Source(184, 3) + SourceIndex(0) +3 >Emitted(120, 4) Source(184, 3) + SourceIndex(0) --- >>>function EF1(a, b) { return a + b; } 1-> @@ -3016,21 +3017,21 @@ sourceFile:contextualTyping.ts 13> ; 14> 15> } -1->Emitted(120, 1) Source(191, 1) + SourceIndex(0) -2 >Emitted(120, 10) Source(191, 10) + SourceIndex(0) -3 >Emitted(120, 13) Source(191, 13) + SourceIndex(0) -4 >Emitted(120, 14) Source(191, 14) + SourceIndex(0) -5 >Emitted(120, 15) Source(191, 15) + SourceIndex(0) -6 >Emitted(120, 17) Source(191, 16) + SourceIndex(0) -7 >Emitted(120, 18) Source(191, 17) + SourceIndex(0) -8 >Emitted(120, 22) Source(191, 21) + SourceIndex(0) -9 >Emitted(120, 29) Source(191, 28) + SourceIndex(0) -10>Emitted(120, 30) Source(191, 29) + SourceIndex(0) -11>Emitted(120, 33) Source(191, 30) + SourceIndex(0) -12>Emitted(120, 34) Source(191, 31) + SourceIndex(0) -13>Emitted(120, 35) Source(191, 32) + SourceIndex(0) -14>Emitted(120, 36) Source(191, 33) + SourceIndex(0) -15>Emitted(120, 37) Source(191, 34) + SourceIndex(0) +1->Emitted(121, 1) Source(191, 1) + SourceIndex(0) +2 >Emitted(121, 10) Source(191, 10) + SourceIndex(0) +3 >Emitted(121, 13) Source(191, 13) + SourceIndex(0) +4 >Emitted(121, 14) Source(191, 14) + SourceIndex(0) +5 >Emitted(121, 15) Source(191, 15) + SourceIndex(0) +6 >Emitted(121, 17) Source(191, 16) + SourceIndex(0) +7 >Emitted(121, 18) Source(191, 17) + SourceIndex(0) +8 >Emitted(121, 22) Source(191, 21) + SourceIndex(0) +9 >Emitted(121, 29) Source(191, 28) + SourceIndex(0) +10>Emitted(121, 30) Source(191, 29) + SourceIndex(0) +11>Emitted(121, 33) Source(191, 30) + SourceIndex(0) +12>Emitted(121, 34) Source(191, 31) + SourceIndex(0) +13>Emitted(121, 35) Source(191, 32) + SourceIndex(0) +14>Emitted(121, 36) Source(191, 33) + SourceIndex(0) +15>Emitted(121, 37) Source(191, 34) + SourceIndex(0) --- >>>var efv = EF1(1, 2); 1 > @@ -3058,17 +3059,17 @@ sourceFile:contextualTyping.ts 9 > 2 10> ) 11> ; -1 >Emitted(121, 1) Source(193, 1) + SourceIndex(0) -2 >Emitted(121, 5) Source(193, 5) + SourceIndex(0) -3 >Emitted(121, 8) Source(193, 8) + SourceIndex(0) -4 >Emitted(121, 11) Source(193, 11) + SourceIndex(0) -5 >Emitted(121, 14) Source(193, 14) + SourceIndex(0) -6 >Emitted(121, 15) Source(193, 15) + SourceIndex(0) -7 >Emitted(121, 16) Source(193, 16) + SourceIndex(0) -8 >Emitted(121, 18) Source(193, 17) + SourceIndex(0) -9 >Emitted(121, 19) Source(193, 18) + SourceIndex(0) -10>Emitted(121, 20) Source(193, 19) + SourceIndex(0) -11>Emitted(121, 21) Source(193, 20) + SourceIndex(0) +1 >Emitted(122, 1) Source(193, 1) + SourceIndex(0) +2 >Emitted(122, 5) Source(193, 5) + SourceIndex(0) +3 >Emitted(122, 8) Source(193, 8) + SourceIndex(0) +4 >Emitted(122, 11) Source(193, 11) + SourceIndex(0) +5 >Emitted(122, 14) Source(193, 14) + SourceIndex(0) +6 >Emitted(122, 15) Source(193, 15) + SourceIndex(0) +7 >Emitted(122, 16) Source(193, 16) + SourceIndex(0) +8 >Emitted(122, 18) Source(193, 17) + SourceIndex(0) +9 >Emitted(122, 19) Source(193, 18) + SourceIndex(0) +10>Emitted(122, 20) Source(193, 19) + SourceIndex(0) +11>Emitted(122, 21) Source(193, 20) + SourceIndex(0) --- >>>Point.origin = new Point(0, 0); 1-> @@ -3112,19 +3113,19 @@ sourceFile:contextualTyping.ts 11> 0 12> ) 13> ; -1->Emitted(122, 1) Source(207, 1) + SourceIndex(0) -2 >Emitted(122, 6) Source(207, 6) + SourceIndex(0) -3 >Emitted(122, 7) Source(207, 7) + SourceIndex(0) -4 >Emitted(122, 13) Source(207, 13) + SourceIndex(0) -5 >Emitted(122, 16) Source(207, 16) + SourceIndex(0) -6 >Emitted(122, 20) Source(207, 20) + SourceIndex(0) -7 >Emitted(122, 25) Source(207, 25) + SourceIndex(0) -8 >Emitted(122, 26) Source(207, 26) + SourceIndex(0) -9 >Emitted(122, 27) Source(207, 27) + SourceIndex(0) -10>Emitted(122, 29) Source(207, 29) + SourceIndex(0) -11>Emitted(122, 30) Source(207, 30) + SourceIndex(0) -12>Emitted(122, 31) Source(207, 31) + SourceIndex(0) -13>Emitted(122, 32) Source(207, 32) + SourceIndex(0) +1->Emitted(123, 1) Source(207, 1) + SourceIndex(0) +2 >Emitted(123, 6) Source(207, 6) + SourceIndex(0) +3 >Emitted(123, 7) Source(207, 7) + SourceIndex(0) +4 >Emitted(123, 13) Source(207, 13) + SourceIndex(0) +5 >Emitted(123, 16) Source(207, 16) + SourceIndex(0) +6 >Emitted(123, 20) Source(207, 20) + SourceIndex(0) +7 >Emitted(123, 25) Source(207, 25) + SourceIndex(0) +8 >Emitted(123, 26) Source(207, 26) + SourceIndex(0) +9 >Emitted(123, 27) Source(207, 27) + SourceIndex(0) +10>Emitted(123, 29) Source(207, 29) + SourceIndex(0) +11>Emitted(123, 30) Source(207, 30) + SourceIndex(0) +12>Emitted(123, 31) Source(207, 31) + SourceIndex(0) +13>Emitted(123, 32) Source(207, 32) + SourceIndex(0) --- >>>Point.prototype.add = function (dx, dy) { 1-> @@ -3152,17 +3153,17 @@ sourceFile:contextualTyping.ts 9 > dx 10> , 11> dy -1->Emitted(123, 1) Source(209, 1) + SourceIndex(0) -2 >Emitted(123, 6) Source(209, 6) + SourceIndex(0) -3 >Emitted(123, 7) Source(209, 7) + SourceIndex(0) -4 >Emitted(123, 16) Source(209, 16) + SourceIndex(0) -5 >Emitted(123, 17) Source(209, 17) + SourceIndex(0) -6 >Emitted(123, 20) Source(209, 20) + SourceIndex(0) -7 >Emitted(123, 23) Source(209, 23) + SourceIndex(0) -8 >Emitted(123, 33) Source(209, 32) + SourceIndex(0) -9 >Emitted(123, 35) Source(209, 34) + SourceIndex(0) -10>Emitted(123, 37) Source(209, 36) + SourceIndex(0) -11>Emitted(123, 39) Source(209, 38) + SourceIndex(0) +1->Emitted(124, 1) Source(209, 1) + SourceIndex(0) +2 >Emitted(124, 6) Source(209, 6) + SourceIndex(0) +3 >Emitted(124, 7) Source(209, 7) + SourceIndex(0) +4 >Emitted(124, 16) Source(209, 16) + SourceIndex(0) +5 >Emitted(124, 17) Source(209, 17) + SourceIndex(0) +6 >Emitted(124, 20) Source(209, 20) + SourceIndex(0) +7 >Emitted(124, 23) Source(209, 23) + SourceIndex(0) +8 >Emitted(124, 33) Source(209, 32) + SourceIndex(0) +9 >Emitted(124, 35) Source(209, 34) + SourceIndex(0) +10>Emitted(124, 37) Source(209, 36) + SourceIndex(0) +11>Emitted(124, 39) Source(209, 38) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^ @@ -3202,24 +3203,24 @@ sourceFile:contextualTyping.ts 16> dy 17> ) 18> ; -1->Emitted(124, 5) Source(210, 5) + SourceIndex(0) -2 >Emitted(124, 12) Source(210, 12) + SourceIndex(0) -3 >Emitted(124, 16) Source(210, 16) + SourceIndex(0) -4 >Emitted(124, 21) Source(210, 21) + SourceIndex(0) -5 >Emitted(124, 22) Source(210, 22) + SourceIndex(0) -6 >Emitted(124, 26) Source(210, 26) + SourceIndex(0) -7 >Emitted(124, 27) Source(210, 27) + SourceIndex(0) -8 >Emitted(124, 28) Source(210, 28) + SourceIndex(0) -9 >Emitted(124, 31) Source(210, 31) + SourceIndex(0) -10>Emitted(124, 33) Source(210, 33) + SourceIndex(0) -11>Emitted(124, 35) Source(210, 35) + SourceIndex(0) -12>Emitted(124, 39) Source(210, 39) + SourceIndex(0) -13>Emitted(124, 40) Source(210, 40) + SourceIndex(0) -14>Emitted(124, 41) Source(210, 41) + SourceIndex(0) -15>Emitted(124, 44) Source(210, 44) + SourceIndex(0) -16>Emitted(124, 46) Source(210, 46) + SourceIndex(0) -17>Emitted(124, 47) Source(210, 47) + SourceIndex(0) -18>Emitted(124, 48) Source(210, 48) + SourceIndex(0) +1->Emitted(125, 5) Source(210, 5) + SourceIndex(0) +2 >Emitted(125, 12) Source(210, 12) + SourceIndex(0) +3 >Emitted(125, 16) Source(210, 16) + SourceIndex(0) +4 >Emitted(125, 21) Source(210, 21) + SourceIndex(0) +5 >Emitted(125, 22) Source(210, 22) + SourceIndex(0) +6 >Emitted(125, 26) Source(210, 26) + SourceIndex(0) +7 >Emitted(125, 27) Source(210, 27) + SourceIndex(0) +8 >Emitted(125, 28) Source(210, 28) + SourceIndex(0) +9 >Emitted(125, 31) Source(210, 31) + SourceIndex(0) +10>Emitted(125, 33) Source(210, 33) + SourceIndex(0) +11>Emitted(125, 35) Source(210, 35) + SourceIndex(0) +12>Emitted(125, 39) Source(210, 39) + SourceIndex(0) +13>Emitted(125, 40) Source(210, 40) + SourceIndex(0) +14>Emitted(125, 41) Source(210, 41) + SourceIndex(0) +15>Emitted(125, 44) Source(210, 44) + SourceIndex(0) +16>Emitted(125, 46) Source(210, 46) + SourceIndex(0) +17>Emitted(125, 47) Source(210, 47) + SourceIndex(0) +18>Emitted(125, 48) Source(210, 48) + SourceIndex(0) --- >>>}; 1 > @@ -3230,9 +3231,9 @@ sourceFile:contextualTyping.ts > 2 >} 3 > ; -1 >Emitted(125, 1) Source(211, 1) + SourceIndex(0) -2 >Emitted(125, 2) Source(211, 2) + SourceIndex(0) -3 >Emitted(125, 3) Source(211, 3) + SourceIndex(0) +1 >Emitted(126, 1) Source(211, 1) + SourceIndex(0) +2 >Emitted(126, 2) Source(211, 2) + SourceIndex(0) +3 >Emitted(126, 3) Source(211, 3) + SourceIndex(0) --- >>>Point.prototype = { 1-> @@ -3247,11 +3248,11 @@ sourceFile:contextualTyping.ts 3 > . 4 > prototype 5 > = -1->Emitted(126, 1) Source(213, 1) + SourceIndex(0) -2 >Emitted(126, 6) Source(213, 6) + SourceIndex(0) -3 >Emitted(126, 7) Source(213, 7) + SourceIndex(0) -4 >Emitted(126, 16) Source(213, 16) + SourceIndex(0) -5 >Emitted(126, 19) Source(213, 19) + SourceIndex(0) +1->Emitted(127, 1) Source(213, 1) + SourceIndex(0) +2 >Emitted(127, 6) Source(213, 6) + SourceIndex(0) +3 >Emitted(127, 7) Source(213, 7) + SourceIndex(0) +4 >Emitted(127, 16) Source(213, 16) + SourceIndex(0) +5 >Emitted(127, 19) Source(213, 19) + SourceIndex(0) --- >>> x: 0, 1 >^^^^ @@ -3264,10 +3265,10 @@ sourceFile:contextualTyping.ts 2 > x 3 > : 4 > 0 -1 >Emitted(127, 5) Source(214, 5) + SourceIndex(0) -2 >Emitted(127, 6) Source(214, 6) + SourceIndex(0) -3 >Emitted(127, 8) Source(214, 8) + SourceIndex(0) -4 >Emitted(127, 9) Source(214, 9) + SourceIndex(0) +1 >Emitted(128, 5) Source(214, 5) + SourceIndex(0) +2 >Emitted(128, 6) Source(214, 6) + SourceIndex(0) +3 >Emitted(128, 8) Source(214, 8) + SourceIndex(0) +4 >Emitted(128, 9) Source(214, 9) + SourceIndex(0) --- >>> y: 0, 1->^^^^ @@ -3280,10 +3281,10 @@ sourceFile:contextualTyping.ts 2 > y 3 > : 4 > 0 -1->Emitted(128, 5) Source(215, 5) + SourceIndex(0) -2 >Emitted(128, 6) Source(215, 6) + SourceIndex(0) -3 >Emitted(128, 8) Source(215, 8) + SourceIndex(0) -4 >Emitted(128, 9) Source(215, 9) + SourceIndex(0) +1->Emitted(129, 5) Source(215, 5) + SourceIndex(0) +2 >Emitted(129, 6) Source(215, 6) + SourceIndex(0) +3 >Emitted(129, 8) Source(215, 8) + SourceIndex(0) +4 >Emitted(129, 9) Source(215, 9) + SourceIndex(0) --- >>> add: function (dx, dy) { 1->^^^^ @@ -3302,13 +3303,13 @@ sourceFile:contextualTyping.ts 5 > dx 6 > , 7 > dy -1->Emitted(129, 5) Source(216, 5) + SourceIndex(0) -2 >Emitted(129, 8) Source(216, 8) + SourceIndex(0) -3 >Emitted(129, 10) Source(216, 10) + SourceIndex(0) -4 >Emitted(129, 20) Source(216, 19) + SourceIndex(0) -5 >Emitted(129, 22) Source(216, 21) + SourceIndex(0) -6 >Emitted(129, 24) Source(216, 23) + SourceIndex(0) -7 >Emitted(129, 26) Source(216, 25) + SourceIndex(0) +1->Emitted(130, 5) Source(216, 5) + SourceIndex(0) +2 >Emitted(130, 8) Source(216, 8) + SourceIndex(0) +3 >Emitted(130, 10) Source(216, 10) + SourceIndex(0) +4 >Emitted(130, 20) Source(216, 19) + SourceIndex(0) +5 >Emitted(130, 22) Source(216, 21) + SourceIndex(0) +6 >Emitted(130, 24) Source(216, 23) + SourceIndex(0) +7 >Emitted(130, 26) Source(216, 25) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^^^^^ @@ -3348,24 +3349,24 @@ sourceFile:contextualTyping.ts 16> dy 17> ) 18> ; -1->Emitted(130, 9) Source(217, 9) + SourceIndex(0) -2 >Emitted(130, 16) Source(217, 16) + SourceIndex(0) -3 >Emitted(130, 20) Source(217, 20) + SourceIndex(0) -4 >Emitted(130, 25) Source(217, 25) + SourceIndex(0) -5 >Emitted(130, 26) Source(217, 26) + SourceIndex(0) -6 >Emitted(130, 30) Source(217, 30) + SourceIndex(0) -7 >Emitted(130, 31) Source(217, 31) + SourceIndex(0) -8 >Emitted(130, 32) Source(217, 32) + SourceIndex(0) -9 >Emitted(130, 35) Source(217, 35) + SourceIndex(0) -10>Emitted(130, 37) Source(217, 37) + SourceIndex(0) -11>Emitted(130, 39) Source(217, 39) + SourceIndex(0) -12>Emitted(130, 43) Source(217, 43) + SourceIndex(0) -13>Emitted(130, 44) Source(217, 44) + SourceIndex(0) -14>Emitted(130, 45) Source(217, 45) + SourceIndex(0) -15>Emitted(130, 48) Source(217, 48) + SourceIndex(0) -16>Emitted(130, 50) Source(217, 50) + SourceIndex(0) -17>Emitted(130, 51) Source(217, 51) + SourceIndex(0) -18>Emitted(130, 52) Source(217, 52) + SourceIndex(0) +1->Emitted(131, 9) Source(217, 9) + SourceIndex(0) +2 >Emitted(131, 16) Source(217, 16) + SourceIndex(0) +3 >Emitted(131, 20) Source(217, 20) + SourceIndex(0) +4 >Emitted(131, 25) Source(217, 25) + SourceIndex(0) +5 >Emitted(131, 26) Source(217, 26) + SourceIndex(0) +6 >Emitted(131, 30) Source(217, 30) + SourceIndex(0) +7 >Emitted(131, 31) Source(217, 31) + SourceIndex(0) +8 >Emitted(131, 32) Source(217, 32) + SourceIndex(0) +9 >Emitted(131, 35) Source(217, 35) + SourceIndex(0) +10>Emitted(131, 37) Source(217, 37) + SourceIndex(0) +11>Emitted(131, 39) Source(217, 39) + SourceIndex(0) +12>Emitted(131, 43) Source(217, 43) + SourceIndex(0) +13>Emitted(131, 44) Source(217, 44) + SourceIndex(0) +14>Emitted(131, 45) Source(217, 45) + SourceIndex(0) +15>Emitted(131, 48) Source(217, 48) + SourceIndex(0) +16>Emitted(131, 50) Source(217, 50) + SourceIndex(0) +17>Emitted(131, 51) Source(217, 51) + SourceIndex(0) +18>Emitted(131, 52) Source(217, 52) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -3373,8 +3374,8 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(131, 5) Source(218, 5) + SourceIndex(0) -2 >Emitted(131, 6) Source(218, 6) + SourceIndex(0) +1 >Emitted(132, 5) Source(218, 5) + SourceIndex(0) +2 >Emitted(132, 6) Source(218, 6) + SourceIndex(0) --- >>>}; 1 >^ @@ -3383,8 +3384,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > ; -1 >Emitted(132, 2) Source(219, 2) + SourceIndex(0) -2 >Emitted(132, 3) Source(219, 3) + SourceIndex(0) +1 >Emitted(133, 2) Source(219, 2) + SourceIndex(0) +2 >Emitted(133, 3) Source(219, 3) + SourceIndex(0) --- >>>var x = {}; 1-> @@ -3404,11 +3405,11 @@ sourceFile:contextualTyping.ts 4 > : B = 5 > { } 6 > ; -1->Emitted(133, 1) Source(223, 1) + SourceIndex(0) -2 >Emitted(133, 5) Source(223, 5) + SourceIndex(0) -3 >Emitted(133, 6) Source(223, 6) + SourceIndex(0) -4 >Emitted(133, 9) Source(223, 12) + SourceIndex(0) -5 >Emitted(133, 11) Source(223, 15) + SourceIndex(0) -6 >Emitted(133, 12) Source(223, 16) + SourceIndex(0) +1->Emitted(134, 1) Source(223, 1) + SourceIndex(0) +2 >Emitted(134, 5) Source(223, 5) + SourceIndex(0) +3 >Emitted(134, 6) Source(223, 6) + SourceIndex(0) +4 >Emitted(134, 9) Source(223, 12) + SourceIndex(0) +5 >Emitted(134, 11) Source(223, 15) + SourceIndex(0) +6 >Emitted(134, 12) Source(223, 16) + SourceIndex(0) --- >>>//# sourceMappingURL=contextualTyping.js.map \ No newline at end of file diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).errors.txt b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..de9cad2cb2484 --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).errors.txt @@ -0,0 +1,338 @@ +convertKeywordsYes.ts(175,12): error TS18006: Classes may not have a field named 'constructor'. +convertKeywordsYes.ts(292,11): error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(293,11): error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(294,11): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(296,11): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(297,11): error TS1213: Identifier expected. 'private' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(298,11): error TS1213: Identifier expected. 'protected' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(299,11): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(301,11): error TS1213: Identifier expected. 'static' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(303,11): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + + +==== convertKeywordsYes.ts (10 errors) ==== + // reserved ES5 future in strict mode + + var constructor = 0; + var any = 0; + var boolean = 0; + var implements = 0; + var interface = 0; + var let = 0; + var module = 0; + var number = 0; + var package = 0; + var private = 0; + var protected = 0; + var public = 0; + var set = 0; + var static = 0; + var string = 0; + var get = 0; + var yield = 0; + var declare = 0; + + function bigGeneric< + constructor, + implements , + interface , + let, + module , + package, + private , + protected, + public , + set , + static , + get , + yield, + declare + >(c: constructor, + a: any, + b2: boolean, + i: implements , + i2: interface , + l: let, + m: module , + n: number, + p: package, + p2: private , + p3: protected, + p4: public , + s: set , + s2: static , + s3: string, + g: get , + y: yield, + d: declare ) { } + + var bigObject = { + constructor: 0, + any: 0, + boolean: 0, + implements: 0, + interface: 0, + let: 0, + module: 0, + number: 0, + package: 0, + private: 0, + protected: 0, + public: 0, + set: 0, + static: 0, + string: 0, + get: 0, + yield: 0, + break: 0, + case: 0, + catch: 0, + class: 0, + continue: 0, + const: 0, + + debugger: 0, + declare: 0, + default: 0, + delete: 0, + do: 0, + else: 0, + enum: 0, + export: 0, + extends: 0, + false: 0, + finally: 0, + for: 0, + function: 0, + if: 0, + + import: 0, + in: 0, + instanceof: 0, + new: 0, + null: 0, + return: 0, + super: 0, + switch: 0, + this: 0, + throw: 0, + true: 0, + try: 0, + typeof: 0, + var: 0, + void: 0, + while: 0, + with: 0, + }; + + interface bigInterface { + constructor; + any; + boolean; + implements; + interface; + let; + module; + number; + package; + private; + protected; + public; + set; + static; + string; + get; + yield; + break; + case; + catch; + class; + continue; + const; + + debugger; + declare; + default; + delete; + do; + else; + enum; + export; + extends; + false; + finally; + for; + function; + if; + + import; + in; + instanceof; + new; + null; + return; + super; + switch; + this; + throw; + true; + try; + typeof; + var; + void; + while; + with; + } + + class bigClass { + public "constructor" = 0; + ~~~~~~~~~~~~~ +!!! error TS18006: Classes may not have a field named 'constructor'. + public any = 0; + public boolean = 0; + public implements = 0; + public interface = 0; + public let = 0; + public module = 0; + public number = 0; + public package = 0; + public private = 0; + public protected = 0; + public public = 0; + public set = 0; + public static = 0; + public string = 0; + public get = 0; + public yield = 0; + public break = 0; + public case = 0; + public catch = 0; + public class = 0; + public continue = 0; + public const = 0; + public debugger = 0; + public declare = 0; + public default = 0; + public delete = 0; + public do = 0; + public else = 0; + public enum = 0; + public export = 0; + public extends = 0; + public false = 0; + public finally = 0; + public for = 0; + public function = 0; + public if = 0; + public import = 0; + public in = 0; + public instanceof = 0; + public new = 0; + public null = 0; + public return = 0; + public super = 0; + public switch = 0; + public this = 0; + public throw = 0; + public true = 0; + public try = 0; + public typeof = 0; + public var = 0; + public void = 0; + public while = 0; + public with = 0; + } + + enum bigEnum { + constructor, + any, + boolean, + implements, + interface, + let, + module, + number, + package, + private, + protected, + public, + set, + static, + string, + get, + yield, + break, + case, + catch, + class, + continue, + const, + + debugger, + declare, + default, + delete, + do, + else, + enum, + export, + extends, + false, + finally, + for, + function, + if, + + import, + in, + instanceof, + new, + null, + return, + super, + switch, + this, + throw, + true, + try, + typeof, + var, + void, + while, + with, + } + + namespace bigModule { + class constructor { } + class implements { } + ~~~~~~~~~~ +!!! error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class interface { } + ~~~~~~~~~ +!!! error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class let { } + ~~~ +!!! error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class module { } + class package { } + ~~~~~~~ +!!! error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class private { } + ~~~~~~~ +!!! error TS1213: Identifier expected. 'private' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class protected { } + ~~~~~~~~~ +!!! error TS1213: Identifier expected. 'protected' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class public { } + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class set { } + class static { } + ~~~~~~ +!!! error TS1213: Identifier expected. 'static' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class get { } + class yield { } + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class declare { } + } \ No newline at end of file diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).symbols b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..62d0a7f5df65b --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).symbols @@ -0,0 +1,882 @@ +//// [tests/cases/compiler/convertKeywordsYes.ts] //// + +=== convertKeywordsYes.ts === +// reserved ES5 future in strict mode + +var constructor = 0; +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 2, 3)) + +var any = 0; +>any : Symbol(any, Decl(convertKeywordsYes.ts, 3, 3)) + +var boolean = 0; +>boolean : Symbol(boolean, Decl(convertKeywordsYes.ts, 4, 3)) + +var implements = 0; +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 5, 3)) + +var interface = 0; +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 6, 3)) + +var let = 0; +>let : Symbol(let, Decl(convertKeywordsYes.ts, 7, 3)) + +var module = 0; +>module : Symbol(module, Decl(convertKeywordsYes.ts, 8, 3)) + +var number = 0; +>number : Symbol(number, Decl(convertKeywordsYes.ts, 9, 3)) + +var package = 0; +>package : Symbol(package, Decl(convertKeywordsYes.ts, 10, 3)) + +var private = 0; +>private : Symbol(private, Decl(convertKeywordsYes.ts, 11, 3)) + +var protected = 0; +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 12, 3)) + +var public = 0; +>public : Symbol(public, Decl(convertKeywordsYes.ts, 13, 3)) + +var set = 0; +>set : Symbol(set, Decl(convertKeywordsYes.ts, 14, 3)) + +var static = 0; +>static : Symbol(static, Decl(convertKeywordsYes.ts, 15, 3)) + +var string = 0; +>string : Symbol(string, Decl(convertKeywordsYes.ts, 16, 3)) + +var get = 0; +>get : Symbol(get, Decl(convertKeywordsYes.ts, 17, 3)) + +var yield = 0; +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 18, 3)) + +var declare = 0; +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 19, 3)) + +function bigGeneric< +>bigGeneric : Symbol(bigGeneric, Decl(convertKeywordsYes.ts, 19, 16)) + + constructor, +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 21, 20)) + + implements , +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 22, 16)) + + interface , +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 23, 16)) + + let, +>let : Symbol(let, Decl(convertKeywordsYes.ts, 24, 15)) + + module , +>module : Symbol(module, Decl(convertKeywordsYes.ts, 25, 8)) + + package, +>package : Symbol(package, Decl(convertKeywordsYes.ts, 26, 12)) + + private , +>private : Symbol(private, Decl(convertKeywordsYes.ts, 27, 12)) + + protected, +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 28, 13)) + + public , +>public : Symbol(public, Decl(convertKeywordsYes.ts, 29, 14)) + + set , +>set : Symbol(set, Decl(convertKeywordsYes.ts, 30, 12)) + + static , +>static : Symbol(static, Decl(convertKeywordsYes.ts, 31, 9)) + + get , +>get : Symbol(get, Decl(convertKeywordsYes.ts, 32, 12)) + + yield, +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 33, 9)) + + declare +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 34, 10)) + + >(c: constructor, +>c : Symbol(c, Decl(convertKeywordsYes.ts, 36, 6)) +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 21, 20)) + + a: any, +>a : Symbol(a, Decl(convertKeywordsYes.ts, 36, 21)) + + b2: boolean, +>b2 : Symbol(b2, Decl(convertKeywordsYes.ts, 37, 11)) + + i: implements , +>i : Symbol(i, Decl(convertKeywordsYes.ts, 38, 16)) +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 22, 16)) + + i2: interface , +>i2 : Symbol(i2, Decl(convertKeywordsYes.ts, 39, 19)) +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 23, 16)) + + l: let, +>l : Symbol(l, Decl(convertKeywordsYes.ts, 40, 19)) +>let : Symbol(let, Decl(convertKeywordsYes.ts, 24, 15)) + + m: module , +>m : Symbol(m, Decl(convertKeywordsYes.ts, 41, 11)) +>module : Symbol(module, Decl(convertKeywordsYes.ts, 25, 8)) + + n: number, +>n : Symbol(n, Decl(convertKeywordsYes.ts, 42, 15)) + + p: package, +>p : Symbol(p, Decl(convertKeywordsYes.ts, 43, 14)) +>package : Symbol(package, Decl(convertKeywordsYes.ts, 26, 12)) + + p2: private , +>p2 : Symbol(p2, Decl(convertKeywordsYes.ts, 44, 15)) +>private : Symbol(private, Decl(convertKeywordsYes.ts, 27, 12)) + + p3: protected, +>p3 : Symbol(p3, Decl(convertKeywordsYes.ts, 45, 17)) +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 28, 13)) + + p4: public , +>p4 : Symbol(p4, Decl(convertKeywordsYes.ts, 46, 18)) +>public : Symbol(public, Decl(convertKeywordsYes.ts, 29, 14)) + + s: set , +>s : Symbol(s, Decl(convertKeywordsYes.ts, 47, 16)) +>set : Symbol(set, Decl(convertKeywordsYes.ts, 30, 12)) + + s2: static , +>s2 : Symbol(s2, Decl(convertKeywordsYes.ts, 48, 12)) +>static : Symbol(static, Decl(convertKeywordsYes.ts, 31, 9)) + + s3: string, +>s3 : Symbol(s3, Decl(convertKeywordsYes.ts, 49, 16)) + + g: get , +>g : Symbol(g, Decl(convertKeywordsYes.ts, 50, 15)) +>get : Symbol(get, Decl(convertKeywordsYes.ts, 32, 12)) + + y: yield, +>y : Symbol(y, Decl(convertKeywordsYes.ts, 51, 12)) +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 33, 9)) + + d: declare ) { } +>d : Symbol(d, Decl(convertKeywordsYes.ts, 52, 13)) +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 34, 10)) + +var bigObject = { +>bigObject : Symbol(bigObject, Decl(convertKeywordsYes.ts, 55, 3)) + + constructor: 0, +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 55, 17)) + + any: 0, +>any : Symbol(any, Decl(convertKeywordsYes.ts, 56, 19)) + + boolean: 0, +>boolean : Symbol(boolean, Decl(convertKeywordsYes.ts, 57, 11)) + + implements: 0, +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 58, 15)) + + interface: 0, +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 59, 18)) + + let: 0, +>let : Symbol(let, Decl(convertKeywordsYes.ts, 60, 17)) + + module: 0, +>module : Symbol(module, Decl(convertKeywordsYes.ts, 61, 11)) + + number: 0, +>number : Symbol(number, Decl(convertKeywordsYes.ts, 62, 14)) + + package: 0, +>package : Symbol(package, Decl(convertKeywordsYes.ts, 63, 14)) + + private: 0, +>private : Symbol(private, Decl(convertKeywordsYes.ts, 64, 15)) + + protected: 0, +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 65, 15)) + + public: 0, +>public : Symbol(public, Decl(convertKeywordsYes.ts, 66, 17)) + + set: 0, +>set : Symbol(set, Decl(convertKeywordsYes.ts, 67, 14)) + + static: 0, +>static : Symbol(static, Decl(convertKeywordsYes.ts, 68, 11)) + + string: 0, +>string : Symbol(string, Decl(convertKeywordsYes.ts, 69, 14)) + + get: 0, +>get : Symbol(get, Decl(convertKeywordsYes.ts, 70, 14)) + + yield: 0, +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 71, 11)) + + break: 0, +>break : Symbol(break, Decl(convertKeywordsYes.ts, 72, 13)) + + case: 0, +>case : Symbol(case, Decl(convertKeywordsYes.ts, 73, 13)) + + catch: 0, +>catch : Symbol(catch, Decl(convertKeywordsYes.ts, 74, 12)) + + class: 0, +>class : Symbol(class, Decl(convertKeywordsYes.ts, 75, 13)) + + continue: 0, +>continue : Symbol(continue, Decl(convertKeywordsYes.ts, 76, 13)) + + const: 0, +>const : Symbol(const, Decl(convertKeywordsYes.ts, 77, 16)) + + debugger: 0, +>debugger : Symbol(debugger, Decl(convertKeywordsYes.ts, 78, 13)) + + declare: 0, +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 80, 16)) + + default: 0, +>default : Symbol(default, Decl(convertKeywordsYes.ts, 81, 15)) + + delete: 0, +>delete : Symbol(delete, Decl(convertKeywordsYes.ts, 82, 15)) + + do: 0, +>do : Symbol(do, Decl(convertKeywordsYes.ts, 83, 14)) + + else: 0, +>else : Symbol(else, Decl(convertKeywordsYes.ts, 84, 10)) + + enum: 0, +>enum : Symbol(enum, Decl(convertKeywordsYes.ts, 85, 12)) + + export: 0, +>export : Symbol(export, Decl(convertKeywordsYes.ts, 86, 12)) + + extends: 0, +>extends : Symbol(extends, Decl(convertKeywordsYes.ts, 87, 14)) + + false: 0, +>false : Symbol(false, Decl(convertKeywordsYes.ts, 88, 15)) + + finally: 0, +>finally : Symbol(finally, Decl(convertKeywordsYes.ts, 89, 13)) + + for: 0, +>for : Symbol(for, Decl(convertKeywordsYes.ts, 90, 15)) + + function: 0, +>function : Symbol(function, Decl(convertKeywordsYes.ts, 91, 11)) + + if: 0, +>if : Symbol(if, Decl(convertKeywordsYes.ts, 92, 16)) + + import: 0, +>import : Symbol(import, Decl(convertKeywordsYes.ts, 93, 10)) + + in: 0, +>in : Symbol(in, Decl(convertKeywordsYes.ts, 95, 14)) + + instanceof: 0, +>instanceof : Symbol(instanceof, Decl(convertKeywordsYes.ts, 96, 10)) + + new: 0, +>new : Symbol(new, Decl(convertKeywordsYes.ts, 97, 18)) + + null: 0, +>null : Symbol(null, Decl(convertKeywordsYes.ts, 98, 11)) + + return: 0, +>return : Symbol(return, Decl(convertKeywordsYes.ts, 99, 12)) + + super: 0, +>super : Symbol(super, Decl(convertKeywordsYes.ts, 100, 14)) + + switch: 0, +>switch : Symbol(switch, Decl(convertKeywordsYes.ts, 101, 13)) + + this: 0, +>this : Symbol(this, Decl(convertKeywordsYes.ts, 102, 14)) + + throw: 0, +>throw : Symbol(throw, Decl(convertKeywordsYes.ts, 103, 12)) + + true: 0, +>true : Symbol(true, Decl(convertKeywordsYes.ts, 104, 13)) + + try: 0, +>try : Symbol(try, Decl(convertKeywordsYes.ts, 105, 12)) + + typeof: 0, +>typeof : Symbol(typeof, Decl(convertKeywordsYes.ts, 106, 11)) + + var: 0, +>var : Symbol(var, Decl(convertKeywordsYes.ts, 107, 14)) + + void: 0, +>void : Symbol(void, Decl(convertKeywordsYes.ts, 108, 11)) + + while: 0, +>while : Symbol(while, Decl(convertKeywordsYes.ts, 109, 12)) + + with: 0, +>with : Symbol(with, Decl(convertKeywordsYes.ts, 110, 13)) + +}; + +interface bigInterface { +>bigInterface : Symbol(bigInterface, Decl(convertKeywordsYes.ts, 112, 2)) + + constructor; +>constructor : Symbol(bigInterface.constructor, Decl(convertKeywordsYes.ts, 114, 24)) + + any; +>any : Symbol(bigInterface.any, Decl(convertKeywordsYes.ts, 115, 16)) + + boolean; +>boolean : Symbol(bigInterface.boolean, Decl(convertKeywordsYes.ts, 116, 8)) + + implements; +>implements : Symbol(bigInterface.implements, Decl(convertKeywordsYes.ts, 117, 12)) + + interface; +>interface : Symbol(bigInterface.interface, Decl(convertKeywordsYes.ts, 118, 15)) + + let; +>let : Symbol(bigInterface.let, Decl(convertKeywordsYes.ts, 119, 14)) + + module; +>module : Symbol(bigInterface.module, Decl(convertKeywordsYes.ts, 120, 8)) + + number; +>number : Symbol(bigInterface.number, Decl(convertKeywordsYes.ts, 121, 11)) + + package; +>package : Symbol(bigInterface.package, Decl(convertKeywordsYes.ts, 122, 11)) + + private; +>private : Symbol(bigInterface.private, Decl(convertKeywordsYes.ts, 123, 12)) + + protected; +>protected : Symbol(bigInterface.protected, Decl(convertKeywordsYes.ts, 124, 12)) + + public; +>public : Symbol(bigInterface.public, Decl(convertKeywordsYes.ts, 125, 14)) + + set; +>set : Symbol(bigInterface.set, Decl(convertKeywordsYes.ts, 126, 11)) + + static; +>static : Symbol(bigInterface.static, Decl(convertKeywordsYes.ts, 127, 8)) + + string; +>string : Symbol(bigInterface.string, Decl(convertKeywordsYes.ts, 128, 11)) + + get; +>get : Symbol(bigInterface.get, Decl(convertKeywordsYes.ts, 129, 11)) + + yield; +>yield : Symbol(bigInterface.yield, Decl(convertKeywordsYes.ts, 130, 8)) + + break; +>break : Symbol(bigInterface.break, Decl(convertKeywordsYes.ts, 131, 10)) + + case; +>case : Symbol(bigInterface.case, Decl(convertKeywordsYes.ts, 132, 10)) + + catch; +>catch : Symbol(bigInterface.catch, Decl(convertKeywordsYes.ts, 133, 9)) + + class; +>class : Symbol(bigInterface.class, Decl(convertKeywordsYes.ts, 134, 10)) + + continue; +>continue : Symbol(bigInterface.continue, Decl(convertKeywordsYes.ts, 135, 10)) + + const; +>const : Symbol(bigInterface.const, Decl(convertKeywordsYes.ts, 136, 13)) + + debugger; +>debugger : Symbol(bigInterface.debugger, Decl(convertKeywordsYes.ts, 137, 10)) + + declare; +>declare : Symbol(bigInterface.declare, Decl(convertKeywordsYes.ts, 139, 13)) + + default; +>default : Symbol(bigInterface.default, Decl(convertKeywordsYes.ts, 140, 12)) + + delete; +>delete : Symbol(bigInterface.delete, Decl(convertKeywordsYes.ts, 141, 12)) + + do; +>do : Symbol(bigInterface.do, Decl(convertKeywordsYes.ts, 142, 11)) + + else; +>else : Symbol(bigInterface.else, Decl(convertKeywordsYes.ts, 143, 7)) + + enum; +>enum : Symbol(bigInterface.enum, Decl(convertKeywordsYes.ts, 144, 9)) + + export; +>export : Symbol(bigInterface.export, Decl(convertKeywordsYes.ts, 145, 9)) + + extends; +>extends : Symbol(bigInterface.extends, Decl(convertKeywordsYes.ts, 146, 11)) + + false; +>false : Symbol(bigInterface.false, Decl(convertKeywordsYes.ts, 147, 12)) + + finally; +>finally : Symbol(bigInterface.finally, Decl(convertKeywordsYes.ts, 148, 10)) + + for; +>for : Symbol(bigInterface.for, Decl(convertKeywordsYes.ts, 149, 12)) + + function; +>function : Symbol(bigInterface.function, Decl(convertKeywordsYes.ts, 150, 8)) + + if; +>if : Symbol(bigInterface.if, Decl(convertKeywordsYes.ts, 151, 13)) + + import; +>import : Symbol(bigInterface.import, Decl(convertKeywordsYes.ts, 152, 7)) + + in; +>in : Symbol(bigInterface.in, Decl(convertKeywordsYes.ts, 154, 11)) + + instanceof; +>instanceof : Symbol(bigInterface.instanceof, Decl(convertKeywordsYes.ts, 155, 7)) + + new; +>new : Symbol(bigInterface.new, Decl(convertKeywordsYes.ts, 156, 15)) + + null; +>null : Symbol(bigInterface.null, Decl(convertKeywordsYes.ts, 157, 8)) + + return; +>return : Symbol(bigInterface.return, Decl(convertKeywordsYes.ts, 158, 9)) + + super; +>super : Symbol(bigInterface.super, Decl(convertKeywordsYes.ts, 159, 11)) + + switch; +>switch : Symbol(bigInterface.switch, Decl(convertKeywordsYes.ts, 160, 10)) + + this; +>this : Symbol(bigInterface.this, Decl(convertKeywordsYes.ts, 161, 11)) + + throw; +>throw : Symbol(bigInterface.throw, Decl(convertKeywordsYes.ts, 162, 9)) + + true; +>true : Symbol(bigInterface.true, Decl(convertKeywordsYes.ts, 163, 10)) + + try; +>try : Symbol(bigInterface.try, Decl(convertKeywordsYes.ts, 164, 9)) + + typeof; +>typeof : Symbol(bigInterface.typeof, Decl(convertKeywordsYes.ts, 165, 8)) + + var; +>var : Symbol(bigInterface.var, Decl(convertKeywordsYes.ts, 166, 11)) + + void; +>void : Symbol(bigInterface.void, Decl(convertKeywordsYes.ts, 167, 8)) + + while; +>while : Symbol(bigInterface.while, Decl(convertKeywordsYes.ts, 168, 9)) + + with; +>with : Symbol(bigInterface.with, Decl(convertKeywordsYes.ts, 169, 10)) +} + +class bigClass { +>bigClass : Symbol(bigClass, Decl(convertKeywordsYes.ts, 171, 1)) + + public "constructor" = 0; +>"constructor" : Symbol(bigClass["constructor"], Decl(convertKeywordsYes.ts, 173, 16)) + + public any = 0; +>any : Symbol(bigClass.any, Decl(convertKeywordsYes.ts, 174, 29)) + + public boolean = 0; +>boolean : Symbol(bigClass.boolean, Decl(convertKeywordsYes.ts, 175, 19)) + + public implements = 0; +>implements : Symbol(bigClass.implements, Decl(convertKeywordsYes.ts, 176, 23)) + + public interface = 0; +>interface : Symbol(bigClass.interface, Decl(convertKeywordsYes.ts, 177, 26)) + + public let = 0; +>let : Symbol(bigClass.let, Decl(convertKeywordsYes.ts, 178, 25)) + + public module = 0; +>module : Symbol(bigClass.module, Decl(convertKeywordsYes.ts, 179, 19)) + + public number = 0; +>number : Symbol(bigClass.number, Decl(convertKeywordsYes.ts, 180, 22)) + + public package = 0; +>package : Symbol(bigClass.package, Decl(convertKeywordsYes.ts, 181, 22)) + + public private = 0; +>private : Symbol(bigClass.private, Decl(convertKeywordsYes.ts, 182, 23)) + + public protected = 0; +>protected : Symbol(bigClass.protected, Decl(convertKeywordsYes.ts, 183, 23)) + + public public = 0; +>public : Symbol(bigClass.public, Decl(convertKeywordsYes.ts, 184, 25)) + + public set = 0; +>set : Symbol(bigClass.set, Decl(convertKeywordsYes.ts, 185, 22)) + + public static = 0; +>static : Symbol(bigClass.static, Decl(convertKeywordsYes.ts, 186, 19)) + + public string = 0; +>string : Symbol(bigClass.string, Decl(convertKeywordsYes.ts, 187, 22)) + + public get = 0; +>get : Symbol(bigClass.get, Decl(convertKeywordsYes.ts, 188, 22)) + + public yield = 0; +>yield : Symbol(bigClass.yield, Decl(convertKeywordsYes.ts, 189, 19)) + + public break = 0; +>break : Symbol(bigClass.break, Decl(convertKeywordsYes.ts, 190, 21)) + + public case = 0; +>case : Symbol(bigClass.case, Decl(convertKeywordsYes.ts, 191, 21)) + + public catch = 0; +>catch : Symbol(bigClass.catch, Decl(convertKeywordsYes.ts, 192, 20)) + + public class = 0; +>class : Symbol(bigClass.class, Decl(convertKeywordsYes.ts, 193, 21)) + + public continue = 0; +>continue : Symbol(bigClass.continue, Decl(convertKeywordsYes.ts, 194, 21)) + + public const = 0; +>const : Symbol(bigClass.const, Decl(convertKeywordsYes.ts, 195, 24)) + + public debugger = 0; +>debugger : Symbol(bigClass.debugger, Decl(convertKeywordsYes.ts, 196, 21)) + + public declare = 0; +>declare : Symbol(bigClass.declare, Decl(convertKeywordsYes.ts, 197, 24)) + + public default = 0; +>default : Symbol(bigClass.default, Decl(convertKeywordsYes.ts, 198, 23)) + + public delete = 0; +>delete : Symbol(bigClass.delete, Decl(convertKeywordsYes.ts, 199, 23)) + + public do = 0; +>do : Symbol(bigClass.do, Decl(convertKeywordsYes.ts, 200, 22)) + + public else = 0; +>else : Symbol(bigClass.else, Decl(convertKeywordsYes.ts, 201, 18)) + + public enum = 0; +>enum : Symbol(bigClass.enum, Decl(convertKeywordsYes.ts, 202, 20)) + + public export = 0; +>export : Symbol(bigClass.export, Decl(convertKeywordsYes.ts, 203, 20)) + + public extends = 0; +>extends : Symbol(bigClass.extends, Decl(convertKeywordsYes.ts, 204, 22)) + + public false = 0; +>false : Symbol(bigClass.false, Decl(convertKeywordsYes.ts, 205, 23)) + + public finally = 0; +>finally : Symbol(bigClass.finally, Decl(convertKeywordsYes.ts, 206, 21)) + + public for = 0; +>for : Symbol(bigClass.for, Decl(convertKeywordsYes.ts, 207, 23)) + + public function = 0; +>function : Symbol(bigClass.function, Decl(convertKeywordsYes.ts, 208, 19)) + + public if = 0; +>if : Symbol(bigClass.if, Decl(convertKeywordsYes.ts, 209, 24)) + + public import = 0; +>import : Symbol(bigClass.import, Decl(convertKeywordsYes.ts, 210, 18)) + + public in = 0; +>in : Symbol(bigClass.in, Decl(convertKeywordsYes.ts, 211, 22)) + + public instanceof = 0; +>instanceof : Symbol(bigClass.instanceof, Decl(convertKeywordsYes.ts, 212, 18)) + + public new = 0; +>new : Symbol(bigClass.new, Decl(convertKeywordsYes.ts, 213, 26)) + + public null = 0; +>null : Symbol(bigClass.null, Decl(convertKeywordsYes.ts, 214, 19)) + + public return = 0; +>return : Symbol(bigClass.return, Decl(convertKeywordsYes.ts, 215, 20)) + + public super = 0; +>super : Symbol(bigClass.super, Decl(convertKeywordsYes.ts, 216, 22)) + + public switch = 0; +>switch : Symbol(bigClass.switch, Decl(convertKeywordsYes.ts, 217, 21)) + + public this = 0; +>this : Symbol(bigClass.this, Decl(convertKeywordsYes.ts, 218, 22)) + + public throw = 0; +>throw : Symbol(bigClass.throw, Decl(convertKeywordsYes.ts, 219, 20)) + + public true = 0; +>true : Symbol(bigClass.true, Decl(convertKeywordsYes.ts, 220, 21)) + + public try = 0; +>try : Symbol(bigClass.try, Decl(convertKeywordsYes.ts, 221, 20)) + + public typeof = 0; +>typeof : Symbol(bigClass.typeof, Decl(convertKeywordsYes.ts, 222, 19)) + + public var = 0; +>var : Symbol(bigClass.var, Decl(convertKeywordsYes.ts, 223, 22)) + + public void = 0; +>void : Symbol(bigClass.void, Decl(convertKeywordsYes.ts, 224, 19)) + + public while = 0; +>while : Symbol(bigClass.while, Decl(convertKeywordsYes.ts, 225, 20)) + + public with = 0; +>with : Symbol(bigClass.with, Decl(convertKeywordsYes.ts, 226, 21)) +} + +enum bigEnum { +>bigEnum : Symbol(bigEnum, Decl(convertKeywordsYes.ts, 228, 1)) + + constructor, +>constructor : Symbol(bigEnum.constructor, Decl(convertKeywordsYes.ts, 230, 14)) + + any, +>any : Symbol(bigEnum.any, Decl(convertKeywordsYes.ts, 231, 16)) + + boolean, +>boolean : Symbol(bigEnum.boolean, Decl(convertKeywordsYes.ts, 232, 8)) + + implements, +>implements : Symbol(bigEnum.implements, Decl(convertKeywordsYes.ts, 233, 12)) + + interface, +>interface : Symbol(bigEnum.interface, Decl(convertKeywordsYes.ts, 234, 15)) + + let, +>let : Symbol(bigEnum.let, Decl(convertKeywordsYes.ts, 235, 14)) + + module, +>module : Symbol(bigEnum.module, Decl(convertKeywordsYes.ts, 236, 8)) + + number, +>number : Symbol(bigEnum.number, Decl(convertKeywordsYes.ts, 237, 11)) + + package, +>package : Symbol(bigEnum.package, Decl(convertKeywordsYes.ts, 238, 11)) + + private, +>private : Symbol(bigEnum.private, Decl(convertKeywordsYes.ts, 239, 12)) + + protected, +>protected : Symbol(bigEnum.protected, Decl(convertKeywordsYes.ts, 240, 12)) + + public, +>public : Symbol(bigEnum.public, Decl(convertKeywordsYes.ts, 241, 14)) + + set, +>set : Symbol(bigEnum.set, Decl(convertKeywordsYes.ts, 242, 11)) + + static, +>static : Symbol(bigEnum.static, Decl(convertKeywordsYes.ts, 243, 8)) + + string, +>string : Symbol(bigEnum.string, Decl(convertKeywordsYes.ts, 244, 11)) + + get, +>get : Symbol(bigEnum.get, Decl(convertKeywordsYes.ts, 245, 11)) + + yield, +>yield : Symbol(bigEnum.yield, Decl(convertKeywordsYes.ts, 246, 8)) + + break, +>break : Symbol(bigEnum.break, Decl(convertKeywordsYes.ts, 247, 10)) + + case, +>case : Symbol(bigEnum.case, Decl(convertKeywordsYes.ts, 248, 10)) + + catch, +>catch : Symbol(bigEnum.catch, Decl(convertKeywordsYes.ts, 249, 9)) + + class, +>class : Symbol(bigEnum.class, Decl(convertKeywordsYes.ts, 250, 10)) + + continue, +>continue : Symbol(bigEnum.continue, Decl(convertKeywordsYes.ts, 251, 10)) + + const, +>const : Symbol(bigEnum.const, Decl(convertKeywordsYes.ts, 252, 13)) + + debugger, +>debugger : Symbol(bigEnum.debugger, Decl(convertKeywordsYes.ts, 253, 10)) + + declare, +>declare : Symbol(bigEnum.declare, Decl(convertKeywordsYes.ts, 255, 13)) + + default, +>default : Symbol(bigEnum.default, Decl(convertKeywordsYes.ts, 256, 12)) + + delete, +>delete : Symbol(bigEnum.delete, Decl(convertKeywordsYes.ts, 257, 12)) + + do, +>do : Symbol(bigEnum.do, Decl(convertKeywordsYes.ts, 258, 11)) + + else, +>else : Symbol(bigEnum.else, Decl(convertKeywordsYes.ts, 259, 7)) + + enum, +>enum : Symbol(bigEnum.enum, Decl(convertKeywordsYes.ts, 260, 9)) + + export, +>export : Symbol(bigEnum.export, Decl(convertKeywordsYes.ts, 261, 9)) + + extends, +>extends : Symbol(bigEnum.extends, Decl(convertKeywordsYes.ts, 262, 11)) + + false, +>false : Symbol(bigEnum.false, Decl(convertKeywordsYes.ts, 263, 12)) + + finally, +>finally : Symbol(bigEnum.finally, Decl(convertKeywordsYes.ts, 264, 10)) + + for, +>for : Symbol(bigEnum.for, Decl(convertKeywordsYes.ts, 265, 12)) + + function, +>function : Symbol(bigEnum.function, Decl(convertKeywordsYes.ts, 266, 8)) + + if, +>if : Symbol(bigEnum.if, Decl(convertKeywordsYes.ts, 267, 13)) + + import, +>import : Symbol(bigEnum.import, Decl(convertKeywordsYes.ts, 268, 7)) + + in, +>in : Symbol(bigEnum.in, Decl(convertKeywordsYes.ts, 270, 11)) + + instanceof, +>instanceof : Symbol(bigEnum.instanceof, Decl(convertKeywordsYes.ts, 271, 7)) + + new, +>new : Symbol(bigEnum.new, Decl(convertKeywordsYes.ts, 272, 15)) + + null, +>null : Symbol(bigEnum.null, Decl(convertKeywordsYes.ts, 273, 8)) + + return, +>return : Symbol(bigEnum.return, Decl(convertKeywordsYes.ts, 274, 9)) + + super, +>super : Symbol(bigEnum.super, Decl(convertKeywordsYes.ts, 275, 11)) + + switch, +>switch : Symbol(bigEnum.switch, Decl(convertKeywordsYes.ts, 276, 10)) + + this, +>this : Symbol(bigEnum.this, Decl(convertKeywordsYes.ts, 277, 11)) + + throw, +>throw : Symbol(bigEnum.throw, Decl(convertKeywordsYes.ts, 278, 9)) + + true, +>true : Symbol(bigEnum.true, Decl(convertKeywordsYes.ts, 279, 10)) + + try, +>try : Symbol(bigEnum.try, Decl(convertKeywordsYes.ts, 280, 9)) + + typeof, +>typeof : Symbol(bigEnum.typeof, Decl(convertKeywordsYes.ts, 281, 8)) + + var, +>var : Symbol(bigEnum.var, Decl(convertKeywordsYes.ts, 282, 11)) + + void, +>void : Symbol(bigEnum.void, Decl(convertKeywordsYes.ts, 283, 8)) + + while, +>while : Symbol(bigEnum.while, Decl(convertKeywordsYes.ts, 284, 9)) + + with, +>with : Symbol(bigEnum.with, Decl(convertKeywordsYes.ts, 285, 10)) +} + +namespace bigModule { +>bigModule : Symbol(bigModule, Decl(convertKeywordsYes.ts, 287, 1)) + + class constructor { } +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 289, 21)) + + class implements { } +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 290, 25)) + + class interface { } +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 291, 24)) + + class let { } +>let : Symbol(let, Decl(convertKeywordsYes.ts, 292, 23)) + + class module { } +>module : Symbol(module, Decl(convertKeywordsYes.ts, 293, 17)) + + class package { } +>package : Symbol(package, Decl(convertKeywordsYes.ts, 294, 20)) + + class private { } +>private : Symbol(private, Decl(convertKeywordsYes.ts, 295, 21)) + + class protected { } +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 296, 21)) + + class public { } +>public : Symbol(public, Decl(convertKeywordsYes.ts, 297, 23)) + + class set { } +>set : Symbol(set, Decl(convertKeywordsYes.ts, 298, 20)) + + class static { } +>static : Symbol(static, Decl(convertKeywordsYes.ts, 299, 17)) + + class get { } +>get : Symbol(get, Decl(convertKeywordsYes.ts, 300, 20)) + + class yield { } +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 301, 17)) + + class declare { } +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 302, 19)) +} diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).types b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).types new file mode 100644 index 0000000000000..8526b317c275e --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=false).types @@ -0,0 +1,1363 @@ +//// [tests/cases/compiler/convertKeywordsYes.ts] //// + +=== convertKeywordsYes.ts === +// reserved ES5 future in strict mode + +var constructor = 0; +>constructor : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var any = 0; +>any : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var boolean = 0; +>boolean : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var implements = 0; +>implements : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var interface = 0; +>interface : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var let = 0; +>let : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var module = 0; +>module : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var number = 0; +>number : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var package = 0; +>package : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var private = 0; +>private : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var protected = 0; +>protected : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var public = 0; +>public : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var set = 0; +>set : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var static = 0; +>static : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var string = 0; +>string : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var get = 0; +>get : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var yield = 0; +>yield : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var declare = 0; +>declare : number +> : ^^^^^^ +>0 : 0 +> : ^ + +function bigGeneric< +>bigGeneric : (c: constructor, a: any, b2: boolean, i: implements, i2: interface, l: let, m: module, n: number, p: package, p2: private, p3: protected, p4: public, s: set, s2: static, s3: string, g: get, y: yield, d: declare) => void +> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ + + constructor, + implements , + interface , + let, + module , + package, + private , + protected, + public , + set , + static , + get , + yield, + declare + >(c: constructor, +>c : constructor +> : ^^^^^^^^^^^ + + a: any, +>a : any +> : ^^^ + + b2: boolean, +>b2 : boolean +> : ^^^^^^^ + + i: implements , +>i : implements +> : ^^^^^^^^^^ + + i2: interface , +>i2 : interface +> : ^^^^^^^^^ + + l: let, +>l : let +> : ^^^ + + m: module , +>m : module +> : ^^^^^^ + + n: number, +>n : number +> : ^^^^^^ + + p: package, +>p : package +> : ^^^^^^^ + + p2: private , +>p2 : private +> : ^^^^^^^ + + p3: protected, +>p3 : protected +> : ^^^^^^^^^ + + p4: public , +>p4 : public +> : ^^^^^^ + + s: set , +>s : set +> : ^^^ + + s2: static , +>s2 : static +> : ^^^^^^ + + s3: string, +>s3 : string +> : ^^^^^^ + + g: get , +>g : get +> : ^^^ + + y: yield, +>y : yield +> : ^^^^^ + + d: declare ) { } +>d : declare +> : ^^^^^^^ + +var bigObject = { +>bigObject : { constructor: number; any: number; boolean: number; implements: number; interface: number; let: number; module: number; number: number; package: number; private: number; protected: number; public: number; set: number; static: number; string: number; get: number; yield: number; break: number; case: number; catch: number; class: number; continue: number; const: number; debugger: number; declare: number; default: number; delete: number; do: number; else: number; enum: number; export: number; extends: number; false: number; finally: number; for: number; function: number; if: number; import: number; in: number; instanceof: number; new: number; null: number; return: number; super: number; switch: number; this: number; throw: number; true: number; try: number; typeof: number; var: number; void: number; while: number; with: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ constructor: 0, any: 0, boolean: 0, implements: 0, interface: 0, let: 0, module: 0, number: 0, package: 0, private: 0, protected: 0, public: 0, set: 0, static: 0, string: 0, get: 0, yield: 0, break: 0, case: 0, catch: 0, class: 0, continue: 0, const: 0, debugger: 0, declare: 0, default: 0, delete: 0, do: 0, else: 0, enum: 0, export: 0, extends: 0, false: 0, finally: 0, for: 0, function: 0, if: 0, import: 0, in: 0, instanceof: 0, new: 0, null: 0, return: 0, super: 0, switch: 0, this: 0, throw: 0, true: 0, try: 0, typeof: 0, var: 0, void: 0, while: 0, with: 0,} : { constructor: number; any: number; boolean: number; implements: number; interface: number; let: number; module: number; number: number; package: number; private: number; protected: number; public: number; set: number; static: number; string: number; get: number; yield: number; break: number; case: number; catch: number; class: number; continue: number; const: number; debugger: number; declare: number; default: number; delete: number; do: number; else: number; enum: number; export: number; extends: number; false: number; finally: number; for: number; function: number; if: number; import: number; in: number; instanceof: number; new: number; null: number; return: number; super: number; switch: number; this: number; throw: number; true: number; try: number; typeof: number; var: number; void: number; while: number; with: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + constructor: 0, +>constructor : number +> : ^^^^^^ +>0 : 0 +> : ^ + + any: 0, +>any : number +> : ^^^^^^ +>0 : 0 +> : ^ + + boolean: 0, +>boolean : number +> : ^^^^^^ +>0 : 0 +> : ^ + + implements: 0, +>implements : number +> : ^^^^^^ +>0 : 0 +> : ^ + + interface: 0, +>interface : number +> : ^^^^^^ +>0 : 0 +> : ^ + + let: 0, +>let : number +> : ^^^^^^ +>0 : 0 +> : ^ + + module: 0, +>module : number +> : ^^^^^^ +>0 : 0 +> : ^ + + number: 0, +>number : number +> : ^^^^^^ +>0 : 0 +> : ^ + + package: 0, +>package : number +> : ^^^^^^ +>0 : 0 +> : ^ + + private: 0, +>private : number +> : ^^^^^^ +>0 : 0 +> : ^ + + protected: 0, +>protected : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public: 0, +>public : number +> : ^^^^^^ +>0 : 0 +> : ^ + + set: 0, +>set : number +> : ^^^^^^ +>0 : 0 +> : ^ + + static: 0, +>static : number +> : ^^^^^^ +>0 : 0 +> : ^ + + string: 0, +>string : number +> : ^^^^^^ +>0 : 0 +> : ^ + + get: 0, +>get : number +> : ^^^^^^ +>0 : 0 +> : ^ + + yield: 0, +>yield : number +> : ^^^^^^ +>0 : 0 +> : ^ + + break: 0, +>break : number +> : ^^^^^^ +>0 : 0 +> : ^ + + case: 0, +>case : number +> : ^^^^^^ +>0 : 0 +> : ^ + + catch: 0, +>catch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + class: 0, +>class : number +> : ^^^^^^ +>0 : 0 +> : ^ + + continue: 0, +>continue : number +> : ^^^^^^ +>0 : 0 +> : ^ + + const: 0, +>const : number +> : ^^^^^^ +>0 : 0 +> : ^ + + debugger: 0, +>debugger : number +> : ^^^^^^ +>0 : 0 +> : ^ + + declare: 0, +>declare : number +> : ^^^^^^ +>0 : 0 +> : ^ + + default: 0, +>default : number +> : ^^^^^^ +>0 : 0 +> : ^ + + delete: 0, +>delete : number +> : ^^^^^^ +>0 : 0 +> : ^ + + do: 0, +>do : number +> : ^^^^^^ +>0 : 0 +> : ^ + + else: 0, +>else : number +> : ^^^^^^ +>0 : 0 +> : ^ + + enum: 0, +>enum : number +> : ^^^^^^ +>0 : 0 +> : ^ + + export: 0, +>export : number +> : ^^^^^^ +>0 : 0 +> : ^ + + extends: 0, +>extends : number +> : ^^^^^^ +>0 : 0 +> : ^ + + false: 0, +>false : number +> : ^^^^^^ +>0 : 0 +> : ^ + + finally: 0, +>finally : number +> : ^^^^^^ +>0 : 0 +> : ^ + + for: 0, +>for : number +> : ^^^^^^ +>0 : 0 +> : ^ + + function: 0, +>function : number +> : ^^^^^^ +>0 : 0 +> : ^ + + if: 0, +>if : number +> : ^^^^^^ +>0 : 0 +> : ^ + + import: 0, +>import : number +> : ^^^^^^ +>0 : 0 +> : ^ + + in: 0, +>in : number +> : ^^^^^^ +>0 : 0 +> : ^ + + instanceof: 0, +>instanceof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + new: 0, +>new : number +> : ^^^^^^ +>0 : 0 +> : ^ + + null: 0, +>null : number +> : ^^^^^^ +>0 : 0 +> : ^ + + return: 0, +>return : number +> : ^^^^^^ +>0 : 0 +> : ^ + + super: 0, +>super : number +> : ^^^^^^ +>0 : 0 +> : ^ + + switch: 0, +>switch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + this: 0, +>this : number +> : ^^^^^^ +>0 : 0 +> : ^ + + throw: 0, +>throw : number +> : ^^^^^^ +>0 : 0 +> : ^ + + true: 0, +>true : number +> : ^^^^^^ +>0 : 0 +> : ^ + + try: 0, +>try : number +> : ^^^^^^ +>0 : 0 +> : ^ + + typeof: 0, +>typeof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + var: 0, +>var : number +> : ^^^^^^ +>0 : 0 +> : ^ + + void: 0, +>void : number +> : ^^^^^^ +>0 : 0 +> : ^ + + while: 0, +>while : number +> : ^^^^^^ +>0 : 0 +> : ^ + + with: 0, +>with : number +> : ^^^^^^ +>0 : 0 +> : ^ + +}; + +interface bigInterface { + constructor; +>constructor : any +> : ^^^ + + any; +>any : any +> : ^^^ + + boolean; +>boolean : any +> : ^^^ + + implements; +>implements : any +> : ^^^ + + interface; +>interface : any +> : ^^^ + + let; +>let : any +> : ^^^ + + module; +>module : any +> : ^^^ + + number; +>number : any +> : ^^^ + + package; +>package : any +> : ^^^ + + private; +>private : any +> : ^^^ + + protected; +>protected : any +> : ^^^ + + public; +>public : any +> : ^^^ + + set; +>set : any +> : ^^^ + + static; +>static : any +> : ^^^ + + string; +>string : any +> : ^^^ + + get; +>get : any +> : ^^^ + + yield; +>yield : any +> : ^^^ + + break; +>break : any +> : ^^^ + + case; +>case : any +> : ^^^ + + catch; +>catch : any +> : ^^^ + + class; +>class : any +> : ^^^ + + continue; +>continue : any +> : ^^^ + + const; +>const : any +> : ^^^ + + debugger; +>debugger : any +> : ^^^ + + declare; +>declare : any +> : ^^^ + + default; +>default : any +> : ^^^ + + delete; +>delete : any +> : ^^^ + + do; +>do : any +> : ^^^ + + else; +>else : any +> : ^^^ + + enum; +>enum : any +> : ^^^ + + export; +>export : any +> : ^^^ + + extends; +>extends : any +> : ^^^ + + false; +>false : any +> : ^^^ + + finally; +>finally : any +> : ^^^ + + for; +>for : any +> : ^^^ + + function; +>function : any +> : ^^^ + + if; +>if : any +> : ^^^ + + import; +>import : any +> : ^^^ + + in; +>in : any +> : ^^^ + + instanceof; +>instanceof : any +> : ^^^ + + new; +>new : any +> : ^^^ + + null; +>null : any +> : ^^^ + + return; +>return : any +> : ^^^ + + super; +>super : any +> : ^^^ + + switch; +>switch : any +> : ^^^ + + this; +>this : any +> : ^^^ + + throw; +>throw : any +> : ^^^ + + true; +>true : any +> : ^^^ + + try; +>try : any +> : ^^^ + + typeof; +>typeof : any +> : ^^^ + + var; +>var : any +> : ^^^ + + void; +>void : any +> : ^^^ + + while; +>while : any +> : ^^^ + + with; +>with : any +> : ^^^ +} + +class bigClass { +>bigClass : bigClass +> : ^^^^^^^^ + + public "constructor" = 0; +>"constructor" : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public any = 0; +>any : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public boolean = 0; +>boolean : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public implements = 0; +>implements : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public interface = 0; +>interface : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public let = 0; +>let : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public module = 0; +>module : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public number = 0; +>number : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public package = 0; +>package : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public private = 0; +>private : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public protected = 0; +>protected : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public public = 0; +>public : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public set = 0; +>set : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public static = 0; +>static : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public string = 0; +>string : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public get = 0; +>get : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public yield = 0; +>yield : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public break = 0; +>break : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public case = 0; +>case : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public catch = 0; +>catch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public class = 0; +>class : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public continue = 0; +>continue : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public const = 0; +>const : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public debugger = 0; +>debugger : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public declare = 0; +>declare : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public default = 0; +>default : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public delete = 0; +>delete : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public do = 0; +>do : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public else = 0; +>else : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public enum = 0; +>enum : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public export = 0; +>export : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public extends = 0; +>extends : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public false = 0; +>false : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public finally = 0; +>finally : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public for = 0; +>for : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public function = 0; +>function : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public if = 0; +>if : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public import = 0; +>import : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public in = 0; +>in : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public instanceof = 0; +>instanceof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public new = 0; +>new : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public null = 0; +>null : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public return = 0; +>return : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public super = 0; +>super : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public switch = 0; +>switch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public this = 0; +>this : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public throw = 0; +>throw : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public true = 0; +>true : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public try = 0; +>try : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public typeof = 0; +>typeof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public var = 0; +>var : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public void = 0; +>void : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public while = 0; +>while : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public with = 0; +>with : number +> : ^^^^^^ +>0 : 0 +> : ^ +} + +enum bigEnum { +>bigEnum : bigEnum +> : ^^^^^^^ + + constructor, +>constructor : bigEnum.constructor +> : ^^^^^^^^^^^^^^^^^^^ + + any, +>any : bigEnum.any +> : ^^^^^^^^^^^ + + boolean, +>boolean : bigEnum.boolean +> : ^^^^^^^^^^^^^^^ + + implements, +>implements : bigEnum.implements +> : ^^^^^^^^^^^^^^^^^^ + + interface, +>interface : bigEnum.interface +> : ^^^^^^^^^^^^^^^^^ + + let, +>let : bigEnum.let +> : ^^^^^^^^^^^ + + module, +>module : bigEnum.module +> : ^^^^^^^^^^^^^^ + + number, +>number : bigEnum.number +> : ^^^^^^^^^^^^^^ + + package, +>package : bigEnum.package +> : ^^^^^^^^^^^^^^^ + + private, +>private : bigEnum.private +> : ^^^^^^^^^^^^^^^ + + protected, +>protected : bigEnum.protected +> : ^^^^^^^^^^^^^^^^^ + + public, +>public : bigEnum.public +> : ^^^^^^^^^^^^^^ + + set, +>set : bigEnum.set +> : ^^^^^^^^^^^ + + static, +>static : bigEnum.static +> : ^^^^^^^^^^^^^^ + + string, +>string : bigEnum.string +> : ^^^^^^^^^^^^^^ + + get, +>get : bigEnum.get +> : ^^^^^^^^^^^ + + yield, +>yield : bigEnum.yield +> : ^^^^^^^^^^^^^ + + break, +>break : bigEnum.break +> : ^^^^^^^^^^^^^ + + case, +>case : bigEnum.case +> : ^^^^^^^^^^^^ + + catch, +>catch : bigEnum.catch +> : ^^^^^^^^^^^^^ + + class, +>class : bigEnum.class +> : ^^^^^^^^^^^^^ + + continue, +>continue : bigEnum.continue +> : ^^^^^^^^^^^^^^^^ + + const, +>const : bigEnum.const +> : ^^^^^^^^^^^^^ + + debugger, +>debugger : bigEnum.debugger +> : ^^^^^^^^^^^^^^^^ + + declare, +>declare : bigEnum.declare +> : ^^^^^^^^^^^^^^^ + + default, +>default : bigEnum.default +> : ^^^^^^^^^^^^^^^ + + delete, +>delete : bigEnum.delete +> : ^^^^^^^^^^^^^^ + + do, +>do : bigEnum.do +> : ^^^^^^^^^^ + + else, +>else : bigEnum.else +> : ^^^^^^^^^^^^ + + enum, +>enum : bigEnum.enum +> : ^^^^^^^^^^^^ + + export, +>export : bigEnum.export +> : ^^^^^^^^^^^^^^ + + extends, +>extends : bigEnum.extends +> : ^^^^^^^^^^^^^^^ + + false, +>false : bigEnum.false +> : ^^^^^^^^^^^^^ + + finally, +>finally : bigEnum.finally +> : ^^^^^^^^^^^^^^^ + + for, +>for : bigEnum.for +> : ^^^^^^^^^^^ + + function, +>function : bigEnum.function +> : ^^^^^^^^^^^^^^^^ + + if, +>if : bigEnum.if +> : ^^^^^^^^^^ + + import, +>import : bigEnum.import +> : ^^^^^^^^^^^^^^ + + in, +>in : bigEnum.in +> : ^^^^^^^^^^ + + instanceof, +>instanceof : bigEnum.instanceof +> : ^^^^^^^^^^^^^^^^^^ + + new, +>new : bigEnum.new +> : ^^^^^^^^^^^ + + null, +>null : bigEnum.null +> : ^^^^^^^^^^^^ + + return, +>return : bigEnum.return +> : ^^^^^^^^^^^^^^ + + super, +>super : bigEnum.super +> : ^^^^^^^^^^^^^ + + switch, +>switch : bigEnum.switch +> : ^^^^^^^^^^^^^^ + + this, +>this : bigEnum.this +> : ^^^^^^^^^^^^ + + throw, +>throw : bigEnum.throw +> : ^^^^^^^^^^^^^ + + true, +>true : bigEnum.true +> : ^^^^^^^^^^^^ + + try, +>try : bigEnum.try +> : ^^^^^^^^^^^ + + typeof, +>typeof : bigEnum.typeof +> : ^^^^^^^^^^^^^^ + + var, +>var : bigEnum.var +> : ^^^^^^^^^^^ + + void, +>void : bigEnum.void +> : ^^^^^^^^^^^^ + + while, +>while : bigEnum.while +> : ^^^^^^^^^^^^^ + + with, +>with : bigEnum.with +> : ^^^^^^^^^^^^ +} + +namespace bigModule { +>bigModule : typeof bigModule +> : ^^^^^^^^^^^^^^^^ + + class constructor { } +>constructor : constructor +> : ^^^^^^^^^^^ + + class implements { } +>implements : implements +> : ^^^^^^^^^^ + + class interface { } +>interface : interface +> : ^^^^^^^^^ + + class let { } +>let : let +> : ^^^ + + class module { } +>module : module +> : ^^^^^^ + + class package { } +>package : package +> : ^^^^^^^ + + class private { } +>private : private +> : ^^^^^^^ + + class protected { } +>protected : protected +> : ^^^^^^^^^ + + class public { } +>public : public +> : ^^^^^^ + + class set { } +>set : set +> : ^^^ + + class static { } +>static : static +> : ^^^^^^ + + class get { } +>get : get +> : ^^^ + + class yield { } +>yield : yield +> : ^^^^^ + + class declare { } +>declare : declare +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).errors.txt b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..42978b89c9438 --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).errors.txt @@ -0,0 +1,419 @@ +convertKeywordsYes.ts(6,5): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. +convertKeywordsYes.ts(7,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. +convertKeywordsYes.ts(8,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. +convertKeywordsYes.ts(11,5): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +convertKeywordsYes.ts(12,5): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +convertKeywordsYes.ts(13,5): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. +convertKeywordsYes.ts(14,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +convertKeywordsYes.ts(16,5): error TS1212: Identifier expected. 'static' is a reserved word in strict mode. +convertKeywordsYes.ts(19,5): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +convertKeywordsYes.ts(24,5): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. +convertKeywordsYes.ts(25,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. +convertKeywordsYes.ts(26,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. +convertKeywordsYes.ts(28,5): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +convertKeywordsYes.ts(29,5): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +convertKeywordsYes.ts(30,5): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. +convertKeywordsYes.ts(31,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +convertKeywordsYes.ts(33,5): error TS1212: Identifier expected. 'static' is a reserved word in strict mode. +convertKeywordsYes.ts(35,5): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +convertKeywordsYes.ts(40,8): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. +convertKeywordsYes.ts(41,9): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. +convertKeywordsYes.ts(42,8): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. +convertKeywordsYes.ts(45,8): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +convertKeywordsYes.ts(46,9): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +convertKeywordsYes.ts(47,9): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. +convertKeywordsYes.ts(48,9): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +convertKeywordsYes.ts(50,9): error TS1212: Identifier expected. 'static' is a reserved word in strict mode. +convertKeywordsYes.ts(53,8): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +convertKeywordsYes.ts(175,12): error TS18006: Classes may not have a field named 'constructor'. +convertKeywordsYes.ts(292,11): error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(293,11): error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(294,11): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(296,11): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(297,11): error TS1213: Identifier expected. 'private' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(298,11): error TS1213: Identifier expected. 'protected' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(299,11): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(301,11): error TS1213: Identifier expected. 'static' is a reserved word in strict mode. Class definitions are automatically in strict mode. +convertKeywordsYes.ts(303,11): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + + +==== convertKeywordsYes.ts (37 errors) ==== + // reserved ES5 future in strict mode + + var constructor = 0; + var any = 0; + var boolean = 0; + var implements = 0; + ~~~~~~~~~~ +!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. + var interface = 0; + ~~~~~~~~~ +!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. + var let = 0; + ~~~ +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. + var module = 0; + var number = 0; + var package = 0; + ~~~~~~~ +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. + var private = 0; + ~~~~~~~ +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. + var protected = 0; + ~~~~~~~~~ +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. + var public = 0; + ~~~~~~ +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. + var set = 0; + var static = 0; + ~~~~~~ +!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. + var string = 0; + var get = 0; + var yield = 0; + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + var declare = 0; + + function bigGeneric< + constructor, + implements , + ~~~~~~~~~~ +!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. + interface , + ~~~~~~~~~ +!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. + let, + ~~~ +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. + module , + package, + ~~~~~~~ +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. + private , + ~~~~~~~ +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. + protected, + ~~~~~~~~~ +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. + public , + ~~~~~~ +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. + set , + static , + ~~~~~~ +!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. + get , + yield, + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + declare + >(c: constructor, + a: any, + b2: boolean, + i: implements , + ~~~~~~~~~~ +!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. + i2: interface , + ~~~~~~~~~ +!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. + l: let, + ~~~ +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. + m: module , + n: number, + p: package, + ~~~~~~~ +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. + p2: private , + ~~~~~~~ +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. + p3: protected, + ~~~~~~~~~ +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. + p4: public , + ~~~~~~ +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. + s: set , + s2: static , + ~~~~~~ +!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. + s3: string, + g: get , + y: yield, + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + d: declare ) { } + + var bigObject = { + constructor: 0, + any: 0, + boolean: 0, + implements: 0, + interface: 0, + let: 0, + module: 0, + number: 0, + package: 0, + private: 0, + protected: 0, + public: 0, + set: 0, + static: 0, + string: 0, + get: 0, + yield: 0, + break: 0, + case: 0, + catch: 0, + class: 0, + continue: 0, + const: 0, + + debugger: 0, + declare: 0, + default: 0, + delete: 0, + do: 0, + else: 0, + enum: 0, + export: 0, + extends: 0, + false: 0, + finally: 0, + for: 0, + function: 0, + if: 0, + + import: 0, + in: 0, + instanceof: 0, + new: 0, + null: 0, + return: 0, + super: 0, + switch: 0, + this: 0, + throw: 0, + true: 0, + try: 0, + typeof: 0, + var: 0, + void: 0, + while: 0, + with: 0, + }; + + interface bigInterface { + constructor; + any; + boolean; + implements; + interface; + let; + module; + number; + package; + private; + protected; + public; + set; + static; + string; + get; + yield; + break; + case; + catch; + class; + continue; + const; + + debugger; + declare; + default; + delete; + do; + else; + enum; + export; + extends; + false; + finally; + for; + function; + if; + + import; + in; + instanceof; + new; + null; + return; + super; + switch; + this; + throw; + true; + try; + typeof; + var; + void; + while; + with; + } + + class bigClass { + public "constructor" = 0; + ~~~~~~~~~~~~~ +!!! error TS18006: Classes may not have a field named 'constructor'. + public any = 0; + public boolean = 0; + public implements = 0; + public interface = 0; + public let = 0; + public module = 0; + public number = 0; + public package = 0; + public private = 0; + public protected = 0; + public public = 0; + public set = 0; + public static = 0; + public string = 0; + public get = 0; + public yield = 0; + public break = 0; + public case = 0; + public catch = 0; + public class = 0; + public continue = 0; + public const = 0; + public debugger = 0; + public declare = 0; + public default = 0; + public delete = 0; + public do = 0; + public else = 0; + public enum = 0; + public export = 0; + public extends = 0; + public false = 0; + public finally = 0; + public for = 0; + public function = 0; + public if = 0; + public import = 0; + public in = 0; + public instanceof = 0; + public new = 0; + public null = 0; + public return = 0; + public super = 0; + public switch = 0; + public this = 0; + public throw = 0; + public true = 0; + public try = 0; + public typeof = 0; + public var = 0; + public void = 0; + public while = 0; + public with = 0; + } + + enum bigEnum { + constructor, + any, + boolean, + implements, + interface, + let, + module, + number, + package, + private, + protected, + public, + set, + static, + string, + get, + yield, + break, + case, + catch, + class, + continue, + const, + + debugger, + declare, + default, + delete, + do, + else, + enum, + export, + extends, + false, + finally, + for, + function, + if, + + import, + in, + instanceof, + new, + null, + return, + super, + switch, + this, + throw, + true, + try, + typeof, + var, + void, + while, + with, + } + + namespace bigModule { + class constructor { } + class implements { } + ~~~~~~~~~~ +!!! error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class interface { } + ~~~~~~~~~ +!!! error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class let { } + ~~~ +!!! error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class module { } + class package { } + ~~~~~~~ +!!! error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class private { } + ~~~~~~~ +!!! error TS1213: Identifier expected. 'private' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class protected { } + ~~~~~~~~~ +!!! error TS1213: Identifier expected. 'protected' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class public { } + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class set { } + class static { } + ~~~~~~ +!!! error TS1213: Identifier expected. 'static' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class get { } + class yield { } + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + class declare { } + } \ No newline at end of file diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).symbols b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..62d0a7f5df65b --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).symbols @@ -0,0 +1,882 @@ +//// [tests/cases/compiler/convertKeywordsYes.ts] //// + +=== convertKeywordsYes.ts === +// reserved ES5 future in strict mode + +var constructor = 0; +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 2, 3)) + +var any = 0; +>any : Symbol(any, Decl(convertKeywordsYes.ts, 3, 3)) + +var boolean = 0; +>boolean : Symbol(boolean, Decl(convertKeywordsYes.ts, 4, 3)) + +var implements = 0; +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 5, 3)) + +var interface = 0; +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 6, 3)) + +var let = 0; +>let : Symbol(let, Decl(convertKeywordsYes.ts, 7, 3)) + +var module = 0; +>module : Symbol(module, Decl(convertKeywordsYes.ts, 8, 3)) + +var number = 0; +>number : Symbol(number, Decl(convertKeywordsYes.ts, 9, 3)) + +var package = 0; +>package : Symbol(package, Decl(convertKeywordsYes.ts, 10, 3)) + +var private = 0; +>private : Symbol(private, Decl(convertKeywordsYes.ts, 11, 3)) + +var protected = 0; +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 12, 3)) + +var public = 0; +>public : Symbol(public, Decl(convertKeywordsYes.ts, 13, 3)) + +var set = 0; +>set : Symbol(set, Decl(convertKeywordsYes.ts, 14, 3)) + +var static = 0; +>static : Symbol(static, Decl(convertKeywordsYes.ts, 15, 3)) + +var string = 0; +>string : Symbol(string, Decl(convertKeywordsYes.ts, 16, 3)) + +var get = 0; +>get : Symbol(get, Decl(convertKeywordsYes.ts, 17, 3)) + +var yield = 0; +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 18, 3)) + +var declare = 0; +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 19, 3)) + +function bigGeneric< +>bigGeneric : Symbol(bigGeneric, Decl(convertKeywordsYes.ts, 19, 16)) + + constructor, +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 21, 20)) + + implements , +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 22, 16)) + + interface , +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 23, 16)) + + let, +>let : Symbol(let, Decl(convertKeywordsYes.ts, 24, 15)) + + module , +>module : Symbol(module, Decl(convertKeywordsYes.ts, 25, 8)) + + package, +>package : Symbol(package, Decl(convertKeywordsYes.ts, 26, 12)) + + private , +>private : Symbol(private, Decl(convertKeywordsYes.ts, 27, 12)) + + protected, +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 28, 13)) + + public , +>public : Symbol(public, Decl(convertKeywordsYes.ts, 29, 14)) + + set , +>set : Symbol(set, Decl(convertKeywordsYes.ts, 30, 12)) + + static , +>static : Symbol(static, Decl(convertKeywordsYes.ts, 31, 9)) + + get , +>get : Symbol(get, Decl(convertKeywordsYes.ts, 32, 12)) + + yield, +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 33, 9)) + + declare +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 34, 10)) + + >(c: constructor, +>c : Symbol(c, Decl(convertKeywordsYes.ts, 36, 6)) +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 21, 20)) + + a: any, +>a : Symbol(a, Decl(convertKeywordsYes.ts, 36, 21)) + + b2: boolean, +>b2 : Symbol(b2, Decl(convertKeywordsYes.ts, 37, 11)) + + i: implements , +>i : Symbol(i, Decl(convertKeywordsYes.ts, 38, 16)) +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 22, 16)) + + i2: interface , +>i2 : Symbol(i2, Decl(convertKeywordsYes.ts, 39, 19)) +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 23, 16)) + + l: let, +>l : Symbol(l, Decl(convertKeywordsYes.ts, 40, 19)) +>let : Symbol(let, Decl(convertKeywordsYes.ts, 24, 15)) + + m: module , +>m : Symbol(m, Decl(convertKeywordsYes.ts, 41, 11)) +>module : Symbol(module, Decl(convertKeywordsYes.ts, 25, 8)) + + n: number, +>n : Symbol(n, Decl(convertKeywordsYes.ts, 42, 15)) + + p: package, +>p : Symbol(p, Decl(convertKeywordsYes.ts, 43, 14)) +>package : Symbol(package, Decl(convertKeywordsYes.ts, 26, 12)) + + p2: private , +>p2 : Symbol(p2, Decl(convertKeywordsYes.ts, 44, 15)) +>private : Symbol(private, Decl(convertKeywordsYes.ts, 27, 12)) + + p3: protected, +>p3 : Symbol(p3, Decl(convertKeywordsYes.ts, 45, 17)) +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 28, 13)) + + p4: public , +>p4 : Symbol(p4, Decl(convertKeywordsYes.ts, 46, 18)) +>public : Symbol(public, Decl(convertKeywordsYes.ts, 29, 14)) + + s: set , +>s : Symbol(s, Decl(convertKeywordsYes.ts, 47, 16)) +>set : Symbol(set, Decl(convertKeywordsYes.ts, 30, 12)) + + s2: static , +>s2 : Symbol(s2, Decl(convertKeywordsYes.ts, 48, 12)) +>static : Symbol(static, Decl(convertKeywordsYes.ts, 31, 9)) + + s3: string, +>s3 : Symbol(s3, Decl(convertKeywordsYes.ts, 49, 16)) + + g: get , +>g : Symbol(g, Decl(convertKeywordsYes.ts, 50, 15)) +>get : Symbol(get, Decl(convertKeywordsYes.ts, 32, 12)) + + y: yield, +>y : Symbol(y, Decl(convertKeywordsYes.ts, 51, 12)) +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 33, 9)) + + d: declare ) { } +>d : Symbol(d, Decl(convertKeywordsYes.ts, 52, 13)) +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 34, 10)) + +var bigObject = { +>bigObject : Symbol(bigObject, Decl(convertKeywordsYes.ts, 55, 3)) + + constructor: 0, +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 55, 17)) + + any: 0, +>any : Symbol(any, Decl(convertKeywordsYes.ts, 56, 19)) + + boolean: 0, +>boolean : Symbol(boolean, Decl(convertKeywordsYes.ts, 57, 11)) + + implements: 0, +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 58, 15)) + + interface: 0, +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 59, 18)) + + let: 0, +>let : Symbol(let, Decl(convertKeywordsYes.ts, 60, 17)) + + module: 0, +>module : Symbol(module, Decl(convertKeywordsYes.ts, 61, 11)) + + number: 0, +>number : Symbol(number, Decl(convertKeywordsYes.ts, 62, 14)) + + package: 0, +>package : Symbol(package, Decl(convertKeywordsYes.ts, 63, 14)) + + private: 0, +>private : Symbol(private, Decl(convertKeywordsYes.ts, 64, 15)) + + protected: 0, +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 65, 15)) + + public: 0, +>public : Symbol(public, Decl(convertKeywordsYes.ts, 66, 17)) + + set: 0, +>set : Symbol(set, Decl(convertKeywordsYes.ts, 67, 14)) + + static: 0, +>static : Symbol(static, Decl(convertKeywordsYes.ts, 68, 11)) + + string: 0, +>string : Symbol(string, Decl(convertKeywordsYes.ts, 69, 14)) + + get: 0, +>get : Symbol(get, Decl(convertKeywordsYes.ts, 70, 14)) + + yield: 0, +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 71, 11)) + + break: 0, +>break : Symbol(break, Decl(convertKeywordsYes.ts, 72, 13)) + + case: 0, +>case : Symbol(case, Decl(convertKeywordsYes.ts, 73, 13)) + + catch: 0, +>catch : Symbol(catch, Decl(convertKeywordsYes.ts, 74, 12)) + + class: 0, +>class : Symbol(class, Decl(convertKeywordsYes.ts, 75, 13)) + + continue: 0, +>continue : Symbol(continue, Decl(convertKeywordsYes.ts, 76, 13)) + + const: 0, +>const : Symbol(const, Decl(convertKeywordsYes.ts, 77, 16)) + + debugger: 0, +>debugger : Symbol(debugger, Decl(convertKeywordsYes.ts, 78, 13)) + + declare: 0, +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 80, 16)) + + default: 0, +>default : Symbol(default, Decl(convertKeywordsYes.ts, 81, 15)) + + delete: 0, +>delete : Symbol(delete, Decl(convertKeywordsYes.ts, 82, 15)) + + do: 0, +>do : Symbol(do, Decl(convertKeywordsYes.ts, 83, 14)) + + else: 0, +>else : Symbol(else, Decl(convertKeywordsYes.ts, 84, 10)) + + enum: 0, +>enum : Symbol(enum, Decl(convertKeywordsYes.ts, 85, 12)) + + export: 0, +>export : Symbol(export, Decl(convertKeywordsYes.ts, 86, 12)) + + extends: 0, +>extends : Symbol(extends, Decl(convertKeywordsYes.ts, 87, 14)) + + false: 0, +>false : Symbol(false, Decl(convertKeywordsYes.ts, 88, 15)) + + finally: 0, +>finally : Symbol(finally, Decl(convertKeywordsYes.ts, 89, 13)) + + for: 0, +>for : Symbol(for, Decl(convertKeywordsYes.ts, 90, 15)) + + function: 0, +>function : Symbol(function, Decl(convertKeywordsYes.ts, 91, 11)) + + if: 0, +>if : Symbol(if, Decl(convertKeywordsYes.ts, 92, 16)) + + import: 0, +>import : Symbol(import, Decl(convertKeywordsYes.ts, 93, 10)) + + in: 0, +>in : Symbol(in, Decl(convertKeywordsYes.ts, 95, 14)) + + instanceof: 0, +>instanceof : Symbol(instanceof, Decl(convertKeywordsYes.ts, 96, 10)) + + new: 0, +>new : Symbol(new, Decl(convertKeywordsYes.ts, 97, 18)) + + null: 0, +>null : Symbol(null, Decl(convertKeywordsYes.ts, 98, 11)) + + return: 0, +>return : Symbol(return, Decl(convertKeywordsYes.ts, 99, 12)) + + super: 0, +>super : Symbol(super, Decl(convertKeywordsYes.ts, 100, 14)) + + switch: 0, +>switch : Symbol(switch, Decl(convertKeywordsYes.ts, 101, 13)) + + this: 0, +>this : Symbol(this, Decl(convertKeywordsYes.ts, 102, 14)) + + throw: 0, +>throw : Symbol(throw, Decl(convertKeywordsYes.ts, 103, 12)) + + true: 0, +>true : Symbol(true, Decl(convertKeywordsYes.ts, 104, 13)) + + try: 0, +>try : Symbol(try, Decl(convertKeywordsYes.ts, 105, 12)) + + typeof: 0, +>typeof : Symbol(typeof, Decl(convertKeywordsYes.ts, 106, 11)) + + var: 0, +>var : Symbol(var, Decl(convertKeywordsYes.ts, 107, 14)) + + void: 0, +>void : Symbol(void, Decl(convertKeywordsYes.ts, 108, 11)) + + while: 0, +>while : Symbol(while, Decl(convertKeywordsYes.ts, 109, 12)) + + with: 0, +>with : Symbol(with, Decl(convertKeywordsYes.ts, 110, 13)) + +}; + +interface bigInterface { +>bigInterface : Symbol(bigInterface, Decl(convertKeywordsYes.ts, 112, 2)) + + constructor; +>constructor : Symbol(bigInterface.constructor, Decl(convertKeywordsYes.ts, 114, 24)) + + any; +>any : Symbol(bigInterface.any, Decl(convertKeywordsYes.ts, 115, 16)) + + boolean; +>boolean : Symbol(bigInterface.boolean, Decl(convertKeywordsYes.ts, 116, 8)) + + implements; +>implements : Symbol(bigInterface.implements, Decl(convertKeywordsYes.ts, 117, 12)) + + interface; +>interface : Symbol(bigInterface.interface, Decl(convertKeywordsYes.ts, 118, 15)) + + let; +>let : Symbol(bigInterface.let, Decl(convertKeywordsYes.ts, 119, 14)) + + module; +>module : Symbol(bigInterface.module, Decl(convertKeywordsYes.ts, 120, 8)) + + number; +>number : Symbol(bigInterface.number, Decl(convertKeywordsYes.ts, 121, 11)) + + package; +>package : Symbol(bigInterface.package, Decl(convertKeywordsYes.ts, 122, 11)) + + private; +>private : Symbol(bigInterface.private, Decl(convertKeywordsYes.ts, 123, 12)) + + protected; +>protected : Symbol(bigInterface.protected, Decl(convertKeywordsYes.ts, 124, 12)) + + public; +>public : Symbol(bigInterface.public, Decl(convertKeywordsYes.ts, 125, 14)) + + set; +>set : Symbol(bigInterface.set, Decl(convertKeywordsYes.ts, 126, 11)) + + static; +>static : Symbol(bigInterface.static, Decl(convertKeywordsYes.ts, 127, 8)) + + string; +>string : Symbol(bigInterface.string, Decl(convertKeywordsYes.ts, 128, 11)) + + get; +>get : Symbol(bigInterface.get, Decl(convertKeywordsYes.ts, 129, 11)) + + yield; +>yield : Symbol(bigInterface.yield, Decl(convertKeywordsYes.ts, 130, 8)) + + break; +>break : Symbol(bigInterface.break, Decl(convertKeywordsYes.ts, 131, 10)) + + case; +>case : Symbol(bigInterface.case, Decl(convertKeywordsYes.ts, 132, 10)) + + catch; +>catch : Symbol(bigInterface.catch, Decl(convertKeywordsYes.ts, 133, 9)) + + class; +>class : Symbol(bigInterface.class, Decl(convertKeywordsYes.ts, 134, 10)) + + continue; +>continue : Symbol(bigInterface.continue, Decl(convertKeywordsYes.ts, 135, 10)) + + const; +>const : Symbol(bigInterface.const, Decl(convertKeywordsYes.ts, 136, 13)) + + debugger; +>debugger : Symbol(bigInterface.debugger, Decl(convertKeywordsYes.ts, 137, 10)) + + declare; +>declare : Symbol(bigInterface.declare, Decl(convertKeywordsYes.ts, 139, 13)) + + default; +>default : Symbol(bigInterface.default, Decl(convertKeywordsYes.ts, 140, 12)) + + delete; +>delete : Symbol(bigInterface.delete, Decl(convertKeywordsYes.ts, 141, 12)) + + do; +>do : Symbol(bigInterface.do, Decl(convertKeywordsYes.ts, 142, 11)) + + else; +>else : Symbol(bigInterface.else, Decl(convertKeywordsYes.ts, 143, 7)) + + enum; +>enum : Symbol(bigInterface.enum, Decl(convertKeywordsYes.ts, 144, 9)) + + export; +>export : Symbol(bigInterface.export, Decl(convertKeywordsYes.ts, 145, 9)) + + extends; +>extends : Symbol(bigInterface.extends, Decl(convertKeywordsYes.ts, 146, 11)) + + false; +>false : Symbol(bigInterface.false, Decl(convertKeywordsYes.ts, 147, 12)) + + finally; +>finally : Symbol(bigInterface.finally, Decl(convertKeywordsYes.ts, 148, 10)) + + for; +>for : Symbol(bigInterface.for, Decl(convertKeywordsYes.ts, 149, 12)) + + function; +>function : Symbol(bigInterface.function, Decl(convertKeywordsYes.ts, 150, 8)) + + if; +>if : Symbol(bigInterface.if, Decl(convertKeywordsYes.ts, 151, 13)) + + import; +>import : Symbol(bigInterface.import, Decl(convertKeywordsYes.ts, 152, 7)) + + in; +>in : Symbol(bigInterface.in, Decl(convertKeywordsYes.ts, 154, 11)) + + instanceof; +>instanceof : Symbol(bigInterface.instanceof, Decl(convertKeywordsYes.ts, 155, 7)) + + new; +>new : Symbol(bigInterface.new, Decl(convertKeywordsYes.ts, 156, 15)) + + null; +>null : Symbol(bigInterface.null, Decl(convertKeywordsYes.ts, 157, 8)) + + return; +>return : Symbol(bigInterface.return, Decl(convertKeywordsYes.ts, 158, 9)) + + super; +>super : Symbol(bigInterface.super, Decl(convertKeywordsYes.ts, 159, 11)) + + switch; +>switch : Symbol(bigInterface.switch, Decl(convertKeywordsYes.ts, 160, 10)) + + this; +>this : Symbol(bigInterface.this, Decl(convertKeywordsYes.ts, 161, 11)) + + throw; +>throw : Symbol(bigInterface.throw, Decl(convertKeywordsYes.ts, 162, 9)) + + true; +>true : Symbol(bigInterface.true, Decl(convertKeywordsYes.ts, 163, 10)) + + try; +>try : Symbol(bigInterface.try, Decl(convertKeywordsYes.ts, 164, 9)) + + typeof; +>typeof : Symbol(bigInterface.typeof, Decl(convertKeywordsYes.ts, 165, 8)) + + var; +>var : Symbol(bigInterface.var, Decl(convertKeywordsYes.ts, 166, 11)) + + void; +>void : Symbol(bigInterface.void, Decl(convertKeywordsYes.ts, 167, 8)) + + while; +>while : Symbol(bigInterface.while, Decl(convertKeywordsYes.ts, 168, 9)) + + with; +>with : Symbol(bigInterface.with, Decl(convertKeywordsYes.ts, 169, 10)) +} + +class bigClass { +>bigClass : Symbol(bigClass, Decl(convertKeywordsYes.ts, 171, 1)) + + public "constructor" = 0; +>"constructor" : Symbol(bigClass["constructor"], Decl(convertKeywordsYes.ts, 173, 16)) + + public any = 0; +>any : Symbol(bigClass.any, Decl(convertKeywordsYes.ts, 174, 29)) + + public boolean = 0; +>boolean : Symbol(bigClass.boolean, Decl(convertKeywordsYes.ts, 175, 19)) + + public implements = 0; +>implements : Symbol(bigClass.implements, Decl(convertKeywordsYes.ts, 176, 23)) + + public interface = 0; +>interface : Symbol(bigClass.interface, Decl(convertKeywordsYes.ts, 177, 26)) + + public let = 0; +>let : Symbol(bigClass.let, Decl(convertKeywordsYes.ts, 178, 25)) + + public module = 0; +>module : Symbol(bigClass.module, Decl(convertKeywordsYes.ts, 179, 19)) + + public number = 0; +>number : Symbol(bigClass.number, Decl(convertKeywordsYes.ts, 180, 22)) + + public package = 0; +>package : Symbol(bigClass.package, Decl(convertKeywordsYes.ts, 181, 22)) + + public private = 0; +>private : Symbol(bigClass.private, Decl(convertKeywordsYes.ts, 182, 23)) + + public protected = 0; +>protected : Symbol(bigClass.protected, Decl(convertKeywordsYes.ts, 183, 23)) + + public public = 0; +>public : Symbol(bigClass.public, Decl(convertKeywordsYes.ts, 184, 25)) + + public set = 0; +>set : Symbol(bigClass.set, Decl(convertKeywordsYes.ts, 185, 22)) + + public static = 0; +>static : Symbol(bigClass.static, Decl(convertKeywordsYes.ts, 186, 19)) + + public string = 0; +>string : Symbol(bigClass.string, Decl(convertKeywordsYes.ts, 187, 22)) + + public get = 0; +>get : Symbol(bigClass.get, Decl(convertKeywordsYes.ts, 188, 22)) + + public yield = 0; +>yield : Symbol(bigClass.yield, Decl(convertKeywordsYes.ts, 189, 19)) + + public break = 0; +>break : Symbol(bigClass.break, Decl(convertKeywordsYes.ts, 190, 21)) + + public case = 0; +>case : Symbol(bigClass.case, Decl(convertKeywordsYes.ts, 191, 21)) + + public catch = 0; +>catch : Symbol(bigClass.catch, Decl(convertKeywordsYes.ts, 192, 20)) + + public class = 0; +>class : Symbol(bigClass.class, Decl(convertKeywordsYes.ts, 193, 21)) + + public continue = 0; +>continue : Symbol(bigClass.continue, Decl(convertKeywordsYes.ts, 194, 21)) + + public const = 0; +>const : Symbol(bigClass.const, Decl(convertKeywordsYes.ts, 195, 24)) + + public debugger = 0; +>debugger : Symbol(bigClass.debugger, Decl(convertKeywordsYes.ts, 196, 21)) + + public declare = 0; +>declare : Symbol(bigClass.declare, Decl(convertKeywordsYes.ts, 197, 24)) + + public default = 0; +>default : Symbol(bigClass.default, Decl(convertKeywordsYes.ts, 198, 23)) + + public delete = 0; +>delete : Symbol(bigClass.delete, Decl(convertKeywordsYes.ts, 199, 23)) + + public do = 0; +>do : Symbol(bigClass.do, Decl(convertKeywordsYes.ts, 200, 22)) + + public else = 0; +>else : Symbol(bigClass.else, Decl(convertKeywordsYes.ts, 201, 18)) + + public enum = 0; +>enum : Symbol(bigClass.enum, Decl(convertKeywordsYes.ts, 202, 20)) + + public export = 0; +>export : Symbol(bigClass.export, Decl(convertKeywordsYes.ts, 203, 20)) + + public extends = 0; +>extends : Symbol(bigClass.extends, Decl(convertKeywordsYes.ts, 204, 22)) + + public false = 0; +>false : Symbol(bigClass.false, Decl(convertKeywordsYes.ts, 205, 23)) + + public finally = 0; +>finally : Symbol(bigClass.finally, Decl(convertKeywordsYes.ts, 206, 21)) + + public for = 0; +>for : Symbol(bigClass.for, Decl(convertKeywordsYes.ts, 207, 23)) + + public function = 0; +>function : Symbol(bigClass.function, Decl(convertKeywordsYes.ts, 208, 19)) + + public if = 0; +>if : Symbol(bigClass.if, Decl(convertKeywordsYes.ts, 209, 24)) + + public import = 0; +>import : Symbol(bigClass.import, Decl(convertKeywordsYes.ts, 210, 18)) + + public in = 0; +>in : Symbol(bigClass.in, Decl(convertKeywordsYes.ts, 211, 22)) + + public instanceof = 0; +>instanceof : Symbol(bigClass.instanceof, Decl(convertKeywordsYes.ts, 212, 18)) + + public new = 0; +>new : Symbol(bigClass.new, Decl(convertKeywordsYes.ts, 213, 26)) + + public null = 0; +>null : Symbol(bigClass.null, Decl(convertKeywordsYes.ts, 214, 19)) + + public return = 0; +>return : Symbol(bigClass.return, Decl(convertKeywordsYes.ts, 215, 20)) + + public super = 0; +>super : Symbol(bigClass.super, Decl(convertKeywordsYes.ts, 216, 22)) + + public switch = 0; +>switch : Symbol(bigClass.switch, Decl(convertKeywordsYes.ts, 217, 21)) + + public this = 0; +>this : Symbol(bigClass.this, Decl(convertKeywordsYes.ts, 218, 22)) + + public throw = 0; +>throw : Symbol(bigClass.throw, Decl(convertKeywordsYes.ts, 219, 20)) + + public true = 0; +>true : Symbol(bigClass.true, Decl(convertKeywordsYes.ts, 220, 21)) + + public try = 0; +>try : Symbol(bigClass.try, Decl(convertKeywordsYes.ts, 221, 20)) + + public typeof = 0; +>typeof : Symbol(bigClass.typeof, Decl(convertKeywordsYes.ts, 222, 19)) + + public var = 0; +>var : Symbol(bigClass.var, Decl(convertKeywordsYes.ts, 223, 22)) + + public void = 0; +>void : Symbol(bigClass.void, Decl(convertKeywordsYes.ts, 224, 19)) + + public while = 0; +>while : Symbol(bigClass.while, Decl(convertKeywordsYes.ts, 225, 20)) + + public with = 0; +>with : Symbol(bigClass.with, Decl(convertKeywordsYes.ts, 226, 21)) +} + +enum bigEnum { +>bigEnum : Symbol(bigEnum, Decl(convertKeywordsYes.ts, 228, 1)) + + constructor, +>constructor : Symbol(bigEnum.constructor, Decl(convertKeywordsYes.ts, 230, 14)) + + any, +>any : Symbol(bigEnum.any, Decl(convertKeywordsYes.ts, 231, 16)) + + boolean, +>boolean : Symbol(bigEnum.boolean, Decl(convertKeywordsYes.ts, 232, 8)) + + implements, +>implements : Symbol(bigEnum.implements, Decl(convertKeywordsYes.ts, 233, 12)) + + interface, +>interface : Symbol(bigEnum.interface, Decl(convertKeywordsYes.ts, 234, 15)) + + let, +>let : Symbol(bigEnum.let, Decl(convertKeywordsYes.ts, 235, 14)) + + module, +>module : Symbol(bigEnum.module, Decl(convertKeywordsYes.ts, 236, 8)) + + number, +>number : Symbol(bigEnum.number, Decl(convertKeywordsYes.ts, 237, 11)) + + package, +>package : Symbol(bigEnum.package, Decl(convertKeywordsYes.ts, 238, 11)) + + private, +>private : Symbol(bigEnum.private, Decl(convertKeywordsYes.ts, 239, 12)) + + protected, +>protected : Symbol(bigEnum.protected, Decl(convertKeywordsYes.ts, 240, 12)) + + public, +>public : Symbol(bigEnum.public, Decl(convertKeywordsYes.ts, 241, 14)) + + set, +>set : Symbol(bigEnum.set, Decl(convertKeywordsYes.ts, 242, 11)) + + static, +>static : Symbol(bigEnum.static, Decl(convertKeywordsYes.ts, 243, 8)) + + string, +>string : Symbol(bigEnum.string, Decl(convertKeywordsYes.ts, 244, 11)) + + get, +>get : Symbol(bigEnum.get, Decl(convertKeywordsYes.ts, 245, 11)) + + yield, +>yield : Symbol(bigEnum.yield, Decl(convertKeywordsYes.ts, 246, 8)) + + break, +>break : Symbol(bigEnum.break, Decl(convertKeywordsYes.ts, 247, 10)) + + case, +>case : Symbol(bigEnum.case, Decl(convertKeywordsYes.ts, 248, 10)) + + catch, +>catch : Symbol(bigEnum.catch, Decl(convertKeywordsYes.ts, 249, 9)) + + class, +>class : Symbol(bigEnum.class, Decl(convertKeywordsYes.ts, 250, 10)) + + continue, +>continue : Symbol(bigEnum.continue, Decl(convertKeywordsYes.ts, 251, 10)) + + const, +>const : Symbol(bigEnum.const, Decl(convertKeywordsYes.ts, 252, 13)) + + debugger, +>debugger : Symbol(bigEnum.debugger, Decl(convertKeywordsYes.ts, 253, 10)) + + declare, +>declare : Symbol(bigEnum.declare, Decl(convertKeywordsYes.ts, 255, 13)) + + default, +>default : Symbol(bigEnum.default, Decl(convertKeywordsYes.ts, 256, 12)) + + delete, +>delete : Symbol(bigEnum.delete, Decl(convertKeywordsYes.ts, 257, 12)) + + do, +>do : Symbol(bigEnum.do, Decl(convertKeywordsYes.ts, 258, 11)) + + else, +>else : Symbol(bigEnum.else, Decl(convertKeywordsYes.ts, 259, 7)) + + enum, +>enum : Symbol(bigEnum.enum, Decl(convertKeywordsYes.ts, 260, 9)) + + export, +>export : Symbol(bigEnum.export, Decl(convertKeywordsYes.ts, 261, 9)) + + extends, +>extends : Symbol(bigEnum.extends, Decl(convertKeywordsYes.ts, 262, 11)) + + false, +>false : Symbol(bigEnum.false, Decl(convertKeywordsYes.ts, 263, 12)) + + finally, +>finally : Symbol(bigEnum.finally, Decl(convertKeywordsYes.ts, 264, 10)) + + for, +>for : Symbol(bigEnum.for, Decl(convertKeywordsYes.ts, 265, 12)) + + function, +>function : Symbol(bigEnum.function, Decl(convertKeywordsYes.ts, 266, 8)) + + if, +>if : Symbol(bigEnum.if, Decl(convertKeywordsYes.ts, 267, 13)) + + import, +>import : Symbol(bigEnum.import, Decl(convertKeywordsYes.ts, 268, 7)) + + in, +>in : Symbol(bigEnum.in, Decl(convertKeywordsYes.ts, 270, 11)) + + instanceof, +>instanceof : Symbol(bigEnum.instanceof, Decl(convertKeywordsYes.ts, 271, 7)) + + new, +>new : Symbol(bigEnum.new, Decl(convertKeywordsYes.ts, 272, 15)) + + null, +>null : Symbol(bigEnum.null, Decl(convertKeywordsYes.ts, 273, 8)) + + return, +>return : Symbol(bigEnum.return, Decl(convertKeywordsYes.ts, 274, 9)) + + super, +>super : Symbol(bigEnum.super, Decl(convertKeywordsYes.ts, 275, 11)) + + switch, +>switch : Symbol(bigEnum.switch, Decl(convertKeywordsYes.ts, 276, 10)) + + this, +>this : Symbol(bigEnum.this, Decl(convertKeywordsYes.ts, 277, 11)) + + throw, +>throw : Symbol(bigEnum.throw, Decl(convertKeywordsYes.ts, 278, 9)) + + true, +>true : Symbol(bigEnum.true, Decl(convertKeywordsYes.ts, 279, 10)) + + try, +>try : Symbol(bigEnum.try, Decl(convertKeywordsYes.ts, 280, 9)) + + typeof, +>typeof : Symbol(bigEnum.typeof, Decl(convertKeywordsYes.ts, 281, 8)) + + var, +>var : Symbol(bigEnum.var, Decl(convertKeywordsYes.ts, 282, 11)) + + void, +>void : Symbol(bigEnum.void, Decl(convertKeywordsYes.ts, 283, 8)) + + while, +>while : Symbol(bigEnum.while, Decl(convertKeywordsYes.ts, 284, 9)) + + with, +>with : Symbol(bigEnum.with, Decl(convertKeywordsYes.ts, 285, 10)) +} + +namespace bigModule { +>bigModule : Symbol(bigModule, Decl(convertKeywordsYes.ts, 287, 1)) + + class constructor { } +>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 289, 21)) + + class implements { } +>implements : Symbol(implements, Decl(convertKeywordsYes.ts, 290, 25)) + + class interface { } +>interface : Symbol(interface, Decl(convertKeywordsYes.ts, 291, 24)) + + class let { } +>let : Symbol(let, Decl(convertKeywordsYes.ts, 292, 23)) + + class module { } +>module : Symbol(module, Decl(convertKeywordsYes.ts, 293, 17)) + + class package { } +>package : Symbol(package, Decl(convertKeywordsYes.ts, 294, 20)) + + class private { } +>private : Symbol(private, Decl(convertKeywordsYes.ts, 295, 21)) + + class protected { } +>protected : Symbol(protected, Decl(convertKeywordsYes.ts, 296, 21)) + + class public { } +>public : Symbol(public, Decl(convertKeywordsYes.ts, 297, 23)) + + class set { } +>set : Symbol(set, Decl(convertKeywordsYes.ts, 298, 20)) + + class static { } +>static : Symbol(static, Decl(convertKeywordsYes.ts, 299, 17)) + + class get { } +>get : Symbol(get, Decl(convertKeywordsYes.ts, 300, 20)) + + class yield { } +>yield : Symbol(yield, Decl(convertKeywordsYes.ts, 301, 17)) + + class declare { } +>declare : Symbol(declare, Decl(convertKeywordsYes.ts, 302, 19)) +} diff --git a/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).types b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).types new file mode 100644 index 0000000000000..8526b317c275e --- /dev/null +++ b/tests/baselines/reference/convertKeywordsYes(alwaysstrict=true).types @@ -0,0 +1,1363 @@ +//// [tests/cases/compiler/convertKeywordsYes.ts] //// + +=== convertKeywordsYes.ts === +// reserved ES5 future in strict mode + +var constructor = 0; +>constructor : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var any = 0; +>any : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var boolean = 0; +>boolean : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var implements = 0; +>implements : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var interface = 0; +>interface : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var let = 0; +>let : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var module = 0; +>module : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var number = 0; +>number : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var package = 0; +>package : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var private = 0; +>private : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var protected = 0; +>protected : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var public = 0; +>public : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var set = 0; +>set : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var static = 0; +>static : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var string = 0; +>string : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var get = 0; +>get : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var yield = 0; +>yield : number +> : ^^^^^^ +>0 : 0 +> : ^ + +var declare = 0; +>declare : number +> : ^^^^^^ +>0 : 0 +> : ^ + +function bigGeneric< +>bigGeneric : (c: constructor, a: any, b2: boolean, i: implements, i2: interface, l: let, m: module, n: number, p: package, p2: private, p3: protected, p4: public, s: set, s2: static, s3: string, g: get, y: yield, d: declare) => void +> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ + + constructor, + implements , + interface , + let, + module , + package, + private , + protected, + public , + set , + static , + get , + yield, + declare + >(c: constructor, +>c : constructor +> : ^^^^^^^^^^^ + + a: any, +>a : any +> : ^^^ + + b2: boolean, +>b2 : boolean +> : ^^^^^^^ + + i: implements , +>i : implements +> : ^^^^^^^^^^ + + i2: interface , +>i2 : interface +> : ^^^^^^^^^ + + l: let, +>l : let +> : ^^^ + + m: module , +>m : module +> : ^^^^^^ + + n: number, +>n : number +> : ^^^^^^ + + p: package, +>p : package +> : ^^^^^^^ + + p2: private , +>p2 : private +> : ^^^^^^^ + + p3: protected, +>p3 : protected +> : ^^^^^^^^^ + + p4: public , +>p4 : public +> : ^^^^^^ + + s: set , +>s : set +> : ^^^ + + s2: static , +>s2 : static +> : ^^^^^^ + + s3: string, +>s3 : string +> : ^^^^^^ + + g: get , +>g : get +> : ^^^ + + y: yield, +>y : yield +> : ^^^^^ + + d: declare ) { } +>d : declare +> : ^^^^^^^ + +var bigObject = { +>bigObject : { constructor: number; any: number; boolean: number; implements: number; interface: number; let: number; module: number; number: number; package: number; private: number; protected: number; public: number; set: number; static: number; string: number; get: number; yield: number; break: number; case: number; catch: number; class: number; continue: number; const: number; debugger: number; declare: number; default: number; delete: number; do: number; else: number; enum: number; export: number; extends: number; false: number; finally: number; for: number; function: number; if: number; import: number; in: number; instanceof: number; new: number; null: number; return: number; super: number; switch: number; this: number; throw: number; true: number; try: number; typeof: number; var: number; void: number; while: number; with: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ constructor: 0, any: 0, boolean: 0, implements: 0, interface: 0, let: 0, module: 0, number: 0, package: 0, private: 0, protected: 0, public: 0, set: 0, static: 0, string: 0, get: 0, yield: 0, break: 0, case: 0, catch: 0, class: 0, continue: 0, const: 0, debugger: 0, declare: 0, default: 0, delete: 0, do: 0, else: 0, enum: 0, export: 0, extends: 0, false: 0, finally: 0, for: 0, function: 0, if: 0, import: 0, in: 0, instanceof: 0, new: 0, null: 0, return: 0, super: 0, switch: 0, this: 0, throw: 0, true: 0, try: 0, typeof: 0, var: 0, void: 0, while: 0, with: 0,} : { constructor: number; any: number; boolean: number; implements: number; interface: number; let: number; module: number; number: number; package: number; private: number; protected: number; public: number; set: number; static: number; string: number; get: number; yield: number; break: number; case: number; catch: number; class: number; continue: number; const: number; debugger: number; declare: number; default: number; delete: number; do: number; else: number; enum: number; export: number; extends: number; false: number; finally: number; for: number; function: number; if: number; import: number; in: number; instanceof: number; new: number; null: number; return: number; super: number; switch: number; this: number; throw: number; true: number; try: number; typeof: number; var: number; void: number; while: number; with: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + constructor: 0, +>constructor : number +> : ^^^^^^ +>0 : 0 +> : ^ + + any: 0, +>any : number +> : ^^^^^^ +>0 : 0 +> : ^ + + boolean: 0, +>boolean : number +> : ^^^^^^ +>0 : 0 +> : ^ + + implements: 0, +>implements : number +> : ^^^^^^ +>0 : 0 +> : ^ + + interface: 0, +>interface : number +> : ^^^^^^ +>0 : 0 +> : ^ + + let: 0, +>let : number +> : ^^^^^^ +>0 : 0 +> : ^ + + module: 0, +>module : number +> : ^^^^^^ +>0 : 0 +> : ^ + + number: 0, +>number : number +> : ^^^^^^ +>0 : 0 +> : ^ + + package: 0, +>package : number +> : ^^^^^^ +>0 : 0 +> : ^ + + private: 0, +>private : number +> : ^^^^^^ +>0 : 0 +> : ^ + + protected: 0, +>protected : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public: 0, +>public : number +> : ^^^^^^ +>0 : 0 +> : ^ + + set: 0, +>set : number +> : ^^^^^^ +>0 : 0 +> : ^ + + static: 0, +>static : number +> : ^^^^^^ +>0 : 0 +> : ^ + + string: 0, +>string : number +> : ^^^^^^ +>0 : 0 +> : ^ + + get: 0, +>get : number +> : ^^^^^^ +>0 : 0 +> : ^ + + yield: 0, +>yield : number +> : ^^^^^^ +>0 : 0 +> : ^ + + break: 0, +>break : number +> : ^^^^^^ +>0 : 0 +> : ^ + + case: 0, +>case : number +> : ^^^^^^ +>0 : 0 +> : ^ + + catch: 0, +>catch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + class: 0, +>class : number +> : ^^^^^^ +>0 : 0 +> : ^ + + continue: 0, +>continue : number +> : ^^^^^^ +>0 : 0 +> : ^ + + const: 0, +>const : number +> : ^^^^^^ +>0 : 0 +> : ^ + + debugger: 0, +>debugger : number +> : ^^^^^^ +>0 : 0 +> : ^ + + declare: 0, +>declare : number +> : ^^^^^^ +>0 : 0 +> : ^ + + default: 0, +>default : number +> : ^^^^^^ +>0 : 0 +> : ^ + + delete: 0, +>delete : number +> : ^^^^^^ +>0 : 0 +> : ^ + + do: 0, +>do : number +> : ^^^^^^ +>0 : 0 +> : ^ + + else: 0, +>else : number +> : ^^^^^^ +>0 : 0 +> : ^ + + enum: 0, +>enum : number +> : ^^^^^^ +>0 : 0 +> : ^ + + export: 0, +>export : number +> : ^^^^^^ +>0 : 0 +> : ^ + + extends: 0, +>extends : number +> : ^^^^^^ +>0 : 0 +> : ^ + + false: 0, +>false : number +> : ^^^^^^ +>0 : 0 +> : ^ + + finally: 0, +>finally : number +> : ^^^^^^ +>0 : 0 +> : ^ + + for: 0, +>for : number +> : ^^^^^^ +>0 : 0 +> : ^ + + function: 0, +>function : number +> : ^^^^^^ +>0 : 0 +> : ^ + + if: 0, +>if : number +> : ^^^^^^ +>0 : 0 +> : ^ + + import: 0, +>import : number +> : ^^^^^^ +>0 : 0 +> : ^ + + in: 0, +>in : number +> : ^^^^^^ +>0 : 0 +> : ^ + + instanceof: 0, +>instanceof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + new: 0, +>new : number +> : ^^^^^^ +>0 : 0 +> : ^ + + null: 0, +>null : number +> : ^^^^^^ +>0 : 0 +> : ^ + + return: 0, +>return : number +> : ^^^^^^ +>0 : 0 +> : ^ + + super: 0, +>super : number +> : ^^^^^^ +>0 : 0 +> : ^ + + switch: 0, +>switch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + this: 0, +>this : number +> : ^^^^^^ +>0 : 0 +> : ^ + + throw: 0, +>throw : number +> : ^^^^^^ +>0 : 0 +> : ^ + + true: 0, +>true : number +> : ^^^^^^ +>0 : 0 +> : ^ + + try: 0, +>try : number +> : ^^^^^^ +>0 : 0 +> : ^ + + typeof: 0, +>typeof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + var: 0, +>var : number +> : ^^^^^^ +>0 : 0 +> : ^ + + void: 0, +>void : number +> : ^^^^^^ +>0 : 0 +> : ^ + + while: 0, +>while : number +> : ^^^^^^ +>0 : 0 +> : ^ + + with: 0, +>with : number +> : ^^^^^^ +>0 : 0 +> : ^ + +}; + +interface bigInterface { + constructor; +>constructor : any +> : ^^^ + + any; +>any : any +> : ^^^ + + boolean; +>boolean : any +> : ^^^ + + implements; +>implements : any +> : ^^^ + + interface; +>interface : any +> : ^^^ + + let; +>let : any +> : ^^^ + + module; +>module : any +> : ^^^ + + number; +>number : any +> : ^^^ + + package; +>package : any +> : ^^^ + + private; +>private : any +> : ^^^ + + protected; +>protected : any +> : ^^^ + + public; +>public : any +> : ^^^ + + set; +>set : any +> : ^^^ + + static; +>static : any +> : ^^^ + + string; +>string : any +> : ^^^ + + get; +>get : any +> : ^^^ + + yield; +>yield : any +> : ^^^ + + break; +>break : any +> : ^^^ + + case; +>case : any +> : ^^^ + + catch; +>catch : any +> : ^^^ + + class; +>class : any +> : ^^^ + + continue; +>continue : any +> : ^^^ + + const; +>const : any +> : ^^^ + + debugger; +>debugger : any +> : ^^^ + + declare; +>declare : any +> : ^^^ + + default; +>default : any +> : ^^^ + + delete; +>delete : any +> : ^^^ + + do; +>do : any +> : ^^^ + + else; +>else : any +> : ^^^ + + enum; +>enum : any +> : ^^^ + + export; +>export : any +> : ^^^ + + extends; +>extends : any +> : ^^^ + + false; +>false : any +> : ^^^ + + finally; +>finally : any +> : ^^^ + + for; +>for : any +> : ^^^ + + function; +>function : any +> : ^^^ + + if; +>if : any +> : ^^^ + + import; +>import : any +> : ^^^ + + in; +>in : any +> : ^^^ + + instanceof; +>instanceof : any +> : ^^^ + + new; +>new : any +> : ^^^ + + null; +>null : any +> : ^^^ + + return; +>return : any +> : ^^^ + + super; +>super : any +> : ^^^ + + switch; +>switch : any +> : ^^^ + + this; +>this : any +> : ^^^ + + throw; +>throw : any +> : ^^^ + + true; +>true : any +> : ^^^ + + try; +>try : any +> : ^^^ + + typeof; +>typeof : any +> : ^^^ + + var; +>var : any +> : ^^^ + + void; +>void : any +> : ^^^ + + while; +>while : any +> : ^^^ + + with; +>with : any +> : ^^^ +} + +class bigClass { +>bigClass : bigClass +> : ^^^^^^^^ + + public "constructor" = 0; +>"constructor" : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public any = 0; +>any : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public boolean = 0; +>boolean : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public implements = 0; +>implements : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public interface = 0; +>interface : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public let = 0; +>let : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public module = 0; +>module : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public number = 0; +>number : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public package = 0; +>package : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public private = 0; +>private : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public protected = 0; +>protected : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public public = 0; +>public : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public set = 0; +>set : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public static = 0; +>static : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public string = 0; +>string : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public get = 0; +>get : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public yield = 0; +>yield : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public break = 0; +>break : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public case = 0; +>case : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public catch = 0; +>catch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public class = 0; +>class : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public continue = 0; +>continue : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public const = 0; +>const : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public debugger = 0; +>debugger : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public declare = 0; +>declare : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public default = 0; +>default : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public delete = 0; +>delete : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public do = 0; +>do : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public else = 0; +>else : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public enum = 0; +>enum : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public export = 0; +>export : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public extends = 0; +>extends : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public false = 0; +>false : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public finally = 0; +>finally : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public for = 0; +>for : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public function = 0; +>function : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public if = 0; +>if : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public import = 0; +>import : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public in = 0; +>in : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public instanceof = 0; +>instanceof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public new = 0; +>new : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public null = 0; +>null : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public return = 0; +>return : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public super = 0; +>super : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public switch = 0; +>switch : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public this = 0; +>this : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public throw = 0; +>throw : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public true = 0; +>true : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public try = 0; +>try : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public typeof = 0; +>typeof : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public var = 0; +>var : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public void = 0; +>void : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public while = 0; +>while : number +> : ^^^^^^ +>0 : 0 +> : ^ + + public with = 0; +>with : number +> : ^^^^^^ +>0 : 0 +> : ^ +} + +enum bigEnum { +>bigEnum : bigEnum +> : ^^^^^^^ + + constructor, +>constructor : bigEnum.constructor +> : ^^^^^^^^^^^^^^^^^^^ + + any, +>any : bigEnum.any +> : ^^^^^^^^^^^ + + boolean, +>boolean : bigEnum.boolean +> : ^^^^^^^^^^^^^^^ + + implements, +>implements : bigEnum.implements +> : ^^^^^^^^^^^^^^^^^^ + + interface, +>interface : bigEnum.interface +> : ^^^^^^^^^^^^^^^^^ + + let, +>let : bigEnum.let +> : ^^^^^^^^^^^ + + module, +>module : bigEnum.module +> : ^^^^^^^^^^^^^^ + + number, +>number : bigEnum.number +> : ^^^^^^^^^^^^^^ + + package, +>package : bigEnum.package +> : ^^^^^^^^^^^^^^^ + + private, +>private : bigEnum.private +> : ^^^^^^^^^^^^^^^ + + protected, +>protected : bigEnum.protected +> : ^^^^^^^^^^^^^^^^^ + + public, +>public : bigEnum.public +> : ^^^^^^^^^^^^^^ + + set, +>set : bigEnum.set +> : ^^^^^^^^^^^ + + static, +>static : bigEnum.static +> : ^^^^^^^^^^^^^^ + + string, +>string : bigEnum.string +> : ^^^^^^^^^^^^^^ + + get, +>get : bigEnum.get +> : ^^^^^^^^^^^ + + yield, +>yield : bigEnum.yield +> : ^^^^^^^^^^^^^ + + break, +>break : bigEnum.break +> : ^^^^^^^^^^^^^ + + case, +>case : bigEnum.case +> : ^^^^^^^^^^^^ + + catch, +>catch : bigEnum.catch +> : ^^^^^^^^^^^^^ + + class, +>class : bigEnum.class +> : ^^^^^^^^^^^^^ + + continue, +>continue : bigEnum.continue +> : ^^^^^^^^^^^^^^^^ + + const, +>const : bigEnum.const +> : ^^^^^^^^^^^^^ + + debugger, +>debugger : bigEnum.debugger +> : ^^^^^^^^^^^^^^^^ + + declare, +>declare : bigEnum.declare +> : ^^^^^^^^^^^^^^^ + + default, +>default : bigEnum.default +> : ^^^^^^^^^^^^^^^ + + delete, +>delete : bigEnum.delete +> : ^^^^^^^^^^^^^^ + + do, +>do : bigEnum.do +> : ^^^^^^^^^^ + + else, +>else : bigEnum.else +> : ^^^^^^^^^^^^ + + enum, +>enum : bigEnum.enum +> : ^^^^^^^^^^^^ + + export, +>export : bigEnum.export +> : ^^^^^^^^^^^^^^ + + extends, +>extends : bigEnum.extends +> : ^^^^^^^^^^^^^^^ + + false, +>false : bigEnum.false +> : ^^^^^^^^^^^^^ + + finally, +>finally : bigEnum.finally +> : ^^^^^^^^^^^^^^^ + + for, +>for : bigEnum.for +> : ^^^^^^^^^^^ + + function, +>function : bigEnum.function +> : ^^^^^^^^^^^^^^^^ + + if, +>if : bigEnum.if +> : ^^^^^^^^^^ + + import, +>import : bigEnum.import +> : ^^^^^^^^^^^^^^ + + in, +>in : bigEnum.in +> : ^^^^^^^^^^ + + instanceof, +>instanceof : bigEnum.instanceof +> : ^^^^^^^^^^^^^^^^^^ + + new, +>new : bigEnum.new +> : ^^^^^^^^^^^ + + null, +>null : bigEnum.null +> : ^^^^^^^^^^^^ + + return, +>return : bigEnum.return +> : ^^^^^^^^^^^^^^ + + super, +>super : bigEnum.super +> : ^^^^^^^^^^^^^ + + switch, +>switch : bigEnum.switch +> : ^^^^^^^^^^^^^^ + + this, +>this : bigEnum.this +> : ^^^^^^^^^^^^ + + throw, +>throw : bigEnum.throw +> : ^^^^^^^^^^^^^ + + true, +>true : bigEnum.true +> : ^^^^^^^^^^^^ + + try, +>try : bigEnum.try +> : ^^^^^^^^^^^ + + typeof, +>typeof : bigEnum.typeof +> : ^^^^^^^^^^^^^^ + + var, +>var : bigEnum.var +> : ^^^^^^^^^^^ + + void, +>void : bigEnum.void +> : ^^^^^^^^^^^^ + + while, +>while : bigEnum.while +> : ^^^^^^^^^^^^^ + + with, +>with : bigEnum.with +> : ^^^^^^^^^^^^ +} + +namespace bigModule { +>bigModule : typeof bigModule +> : ^^^^^^^^^^^^^^^^ + + class constructor { } +>constructor : constructor +> : ^^^^^^^^^^^ + + class implements { } +>implements : implements +> : ^^^^^^^^^^ + + class interface { } +>interface : interface +> : ^^^^^^^^^ + + class let { } +>let : let +> : ^^^ + + class module { } +>module : module +> : ^^^^^^ + + class package { } +>package : package +> : ^^^^^^^ + + class private { } +>private : private +> : ^^^^^^^ + + class protected { } +>protected : protected +> : ^^^^^^^^^ + + class public { } +>public : public +> : ^^^^^^ + + class set { } +>set : set +> : ^^^ + + class static { } +>static : static +> : ^^^^^^ + + class get { } +>get : get +> : ^^^ + + class yield { } +>yield : yield +> : ^^^^^ + + class declare { } +>declare : declare +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/convertKeywordsYes.errors.txt b/tests/baselines/reference/convertKeywordsYes.errors.txt index de9cad2cb2484..f4775668f1ab0 100644 --- a/tests/baselines/reference/convertKeywordsYes.errors.txt +++ b/tests/baselines/reference/convertKeywordsYes.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. convertKeywordsYes.ts(175,12): error TS18006: Classes may not have a field named 'constructor'. convertKeywordsYes.ts(292,11): error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. convertKeywordsYes.ts(293,11): error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. @@ -10,6 +11,7 @@ convertKeywordsYes.ts(301,11): error TS1213: Identifier expected. 'static' is a convertKeywordsYes.ts(303,11): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== convertKeywordsYes.ts (10 errors) ==== // reserved ES5 future in strict mode diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.js.map b/tests/baselines/reference/declarationMapsWithSourceMap.js.map index 6cb7feaabe199..6cc1c749d2e29 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.js.map +++ b/tests/baselines/reference/declarationMapsWithSourceMap.js.map @@ -1,6 +1,6 @@ //// [bundle.js.map] -{"version":3,"file":"bundle.js","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,MAAM,GAAG;IACL,OAAO,CAAC,CAAc;QAClB,OAAO,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC;IACpB,CAAC;IACD,MAAM,CAAC,IAAI;QACP,OAAO,IAAI,GAAG,EAAE,CAAC;IACrB,CAAC;CACJ;ACPD,MAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACpB,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC;AAEnB,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,Y2xhc3MgRm9vIHsNCiAgICBkb1RoaW5nKHgpIHsNCiAgICAgICAgcmV0dXJuIHsgYjogeC5hIH07DQogICAgfQ0KICAgIHN0YXRpYyBtYWtlKCkgew0KICAgICAgICByZXR1cm4gbmV3IEZvbygpOw0KICAgIH0NCn0NCmNvbnN0IGMgPSBuZXcgRm9vKCk7DQpjLmRvVGhpbmcoeyBhOiA0MiB9KTsNCmxldCB4ID0gYy5kb1RoaW5nKHsgYTogMTIgfSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1idW5kbGUuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sR0FBRztJQUNMLE9BQU8sQ0FBQyxDQUFjO1FBQ2xCLE9BQU8sRUFBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBQyxDQUFDO0lBQ3BCLENBQUM7SUFDRCxNQUFNLENBQUMsSUFBSTtRQUNQLE9BQU8sSUFBSSxHQUFHLEVBQUUsQ0FBQztJQUNyQixDQUFDO0NBQ0o7QUNQRCxNQUFNLENBQUMsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUMsQ0FBQztBQUVuQixJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsT0FBTyxDQUFDLEVBQUMsQ0FBQyxFQUFFLEVBQUUsRUFBQyxDQUFDLENBQUMifQ==,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== +{"version":3,"file":"bundle.js","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":";AAAA,MAAM,GAAG;IACL,OAAO,CAAC,CAAc;QAClB,OAAO,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC;IACpB,CAAC;IACD,MAAM,CAAC,IAAI;QACP,OAAO,IAAI,GAAG,EAAE,CAAC;IACrB,CAAC;CACJ;ACPD,MAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACpB,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC;AAEnB,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KY2xhc3MgRm9vIHsNCiAgICBkb1RoaW5nKHgpIHsNCiAgICAgICAgcmV0dXJuIHsgYjogeC5hIH07DQogICAgfQ0KICAgIHN0YXRpYyBtYWtlKCkgew0KICAgICAgICByZXR1cm4gbmV3IEZvbygpOw0KICAgIH0NCn0NCmNvbnN0IGMgPSBuZXcgRm9vKCk7DQpjLmRvVGhpbmcoeyBhOiA0MiB9KTsNCmxldCB4ID0gYy5kb1RoaW5nKHsgYTogMTIgfSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1idW5kbGUuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50cyIsImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxNQUFNLEdBQUc7SUFDTCxPQUFPLENBQUMsQ0FBYztRQUNsQixPQUFPLEVBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQUMsQ0FBQztJQUNwQixDQUFDO0lBQ0QsTUFBTSxDQUFDLElBQUk7UUFDUCxPQUFPLElBQUksR0FBRyxFQUFFLENBQUM7SUFDckIsQ0FBQztDQUNKO0FDUEQsTUFBTSxDQUFDLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQztBQUNwQixDQUFDLENBQUMsT0FBTyxDQUFDLEVBQUMsQ0FBQyxFQUFFLEVBQUUsRUFBQyxDQUFDLENBQUM7QUFFbkIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQyxDQUFDIn0=,Y2xhc3MgRm9vIHsKICAgIGRvVGhpbmcoeDoge2E6IG51bWJlcn0pIHsKICAgICAgICByZXR1cm4ge2I6IHguYX07CiAgICB9CiAgICBzdGF0aWMgbWFrZSgpIHsKICAgICAgICByZXR1cm4gbmV3IEZvbygpOwogICAgfQp9,Y29uc3QgYyA9IG5ldyBGb28oKTsKYy5kb1RoaW5nKHthOiA0Mn0pOwoKbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7Cg== //// [bundle.d.ts.map] {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["a.ts","index.ts"],"names":[],"mappings":"AAAA,cAAM,GAAG;IACL,OAAO,CAAC,GAAG;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;;;IAGtB,MAAM,CAAC,IAAI;CAGd;ACPD,QAAA,MAAM,CAAC,KAAY,CAAC;AAGpB,QAAA,IAAI,CAAC;;CAAqB,CAAC"} diff --git a/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt b/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt index d5be89d134a9f..d7133da557186 100644 --- a/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsWithSourceMap.sourcemap.txt @@ -8,6 +8,7 @@ sources: a.ts,index.ts emittedFile:bundle.js sourceFile:a.ts ------------------------------------------------------------------- +>>>"use strict"; >>>class Foo { 1 > 2 >^^^^^^ @@ -16,9 +17,9 @@ sourceFile:a.ts 1 > 2 >class 3 > Foo -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) -3 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 7) Source(1, 7) + SourceIndex(0) +3 >Emitted(2, 10) Source(1, 10) + SourceIndex(0) --- >>> doThing(x) { 1->^^^^ @@ -31,10 +32,10 @@ sourceFile:a.ts 2 > doThing 3 > ( 4 > x: {a: number} -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) -2 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) -3 >Emitted(2, 13) Source(2, 13) + SourceIndex(0) -4 >Emitted(2, 14) Source(2, 27) + SourceIndex(0) +1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(3, 12) Source(2, 12) + SourceIndex(0) +3 >Emitted(3, 13) Source(2, 13) + SourceIndex(0) +4 >Emitted(3, 14) Source(2, 27) + SourceIndex(0) --- >>> return { b: x.a }; 1->^^^^^^^^ @@ -58,16 +59,16 @@ sourceFile:a.ts 8 > a 9 > } 10> ; -1->Emitted(3, 9) Source(3, 9) + SourceIndex(0) -2 >Emitted(3, 16) Source(3, 16) + SourceIndex(0) -3 >Emitted(3, 18) Source(3, 17) + SourceIndex(0) -4 >Emitted(3, 19) Source(3, 18) + SourceIndex(0) -5 >Emitted(3, 21) Source(3, 20) + SourceIndex(0) -6 >Emitted(3, 22) Source(3, 21) + SourceIndex(0) -7 >Emitted(3, 23) Source(3, 22) + SourceIndex(0) -8 >Emitted(3, 24) Source(3, 23) + SourceIndex(0) -9 >Emitted(3, 26) Source(3, 24) + SourceIndex(0) -10>Emitted(3, 27) Source(3, 25) + SourceIndex(0) +1->Emitted(4, 9) Source(3, 9) + SourceIndex(0) +2 >Emitted(4, 16) Source(3, 16) + SourceIndex(0) +3 >Emitted(4, 18) Source(3, 17) + SourceIndex(0) +4 >Emitted(4, 19) Source(3, 18) + SourceIndex(0) +5 >Emitted(4, 21) Source(3, 20) + SourceIndex(0) +6 >Emitted(4, 22) Source(3, 21) + SourceIndex(0) +7 >Emitted(4, 23) Source(3, 22) + SourceIndex(0) +8 >Emitted(4, 24) Source(3, 23) + SourceIndex(0) +9 >Emitted(4, 26) Source(3, 24) + SourceIndex(0) +10>Emitted(4, 27) Source(3, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -76,8 +77,8 @@ sourceFile:a.ts 1 > > 2 > } -1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) -2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) +1 >Emitted(5, 5) Source(4, 5) + SourceIndex(0) +2 >Emitted(5, 6) Source(4, 6) + SourceIndex(0) --- >>> static make() { 1->^^^^ @@ -90,10 +91,10 @@ sourceFile:a.ts 2 > static 3 > 4 > make -1->Emitted(5, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(5, 11) Source(5, 11) + SourceIndex(0) -3 >Emitted(5, 12) Source(5, 12) + SourceIndex(0) -4 >Emitted(5, 16) Source(5, 16) + SourceIndex(0) +1->Emitted(6, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(6, 11) Source(5, 11) + SourceIndex(0) +3 >Emitted(6, 12) Source(5, 12) + SourceIndex(0) +4 >Emitted(6, 16) Source(5, 16) + SourceIndex(0) --- >>> return new Foo(); 1->^^^^^^^^ @@ -109,12 +110,12 @@ sourceFile:a.ts 4 > Foo 5 > () 6 > ; -1->Emitted(6, 9) Source(6, 9) + SourceIndex(0) -2 >Emitted(6, 16) Source(6, 16) + SourceIndex(0) -3 >Emitted(6, 20) Source(6, 20) + SourceIndex(0) -4 >Emitted(6, 23) Source(6, 23) + SourceIndex(0) -5 >Emitted(6, 25) Source(6, 25) + SourceIndex(0) -6 >Emitted(6, 26) Source(6, 26) + SourceIndex(0) +1->Emitted(7, 9) Source(6, 9) + SourceIndex(0) +2 >Emitted(7, 16) Source(6, 16) + SourceIndex(0) +3 >Emitted(7, 20) Source(6, 20) + SourceIndex(0) +4 >Emitted(7, 23) Source(6, 23) + SourceIndex(0) +5 >Emitted(7, 25) Source(6, 25) + SourceIndex(0) +6 >Emitted(7, 26) Source(6, 26) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -122,15 +123,15 @@ sourceFile:a.ts 1 > > 2 > } -1 >Emitted(7, 5) Source(7, 5) + SourceIndex(0) -2 >Emitted(7, 6) Source(7, 6) + SourceIndex(0) +1 >Emitted(8, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(8, 6) Source(7, 6) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(8, 2) Source(8, 2) + SourceIndex(0) +1 >Emitted(9, 2) Source(8, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:bundle.js @@ -154,14 +155,14 @@ sourceFile:index.ts 6 > Foo 7 > () 8 > ; -1->Emitted(9, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(9, 7) Source(1, 7) + SourceIndex(1) -3 >Emitted(9, 8) Source(1, 8) + SourceIndex(1) -4 >Emitted(9, 11) Source(1, 11) + SourceIndex(1) -5 >Emitted(9, 15) Source(1, 15) + SourceIndex(1) -6 >Emitted(9, 18) Source(1, 18) + SourceIndex(1) -7 >Emitted(9, 20) Source(1, 20) + SourceIndex(1) -8 >Emitted(9, 21) Source(1, 21) + SourceIndex(1) +1->Emitted(10, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(10, 7) Source(1, 7) + SourceIndex(1) +3 >Emitted(10, 8) Source(1, 8) + SourceIndex(1) +4 >Emitted(10, 11) Source(1, 11) + SourceIndex(1) +5 >Emitted(10, 15) Source(1, 15) + SourceIndex(1) +6 >Emitted(10, 18) Source(1, 18) + SourceIndex(1) +7 >Emitted(10, 20) Source(1, 20) + SourceIndex(1) +8 >Emitted(10, 21) Source(1, 21) + SourceIndex(1) --- >>>c.doThing({ a: 42 }); 1-> @@ -190,18 +191,18 @@ sourceFile:index.ts 10> } 11> ) 12> ; -1->Emitted(10, 1) Source(2, 1) + SourceIndex(1) -2 >Emitted(10, 2) Source(2, 2) + SourceIndex(1) -3 >Emitted(10, 3) Source(2, 3) + SourceIndex(1) -4 >Emitted(10, 10) Source(2, 10) + SourceIndex(1) -5 >Emitted(10, 11) Source(2, 11) + SourceIndex(1) -6 >Emitted(10, 13) Source(2, 12) + SourceIndex(1) -7 >Emitted(10, 14) Source(2, 13) + SourceIndex(1) -8 >Emitted(10, 16) Source(2, 15) + SourceIndex(1) -9 >Emitted(10, 18) Source(2, 17) + SourceIndex(1) -10>Emitted(10, 20) Source(2, 18) + SourceIndex(1) -11>Emitted(10, 21) Source(2, 19) + SourceIndex(1) -12>Emitted(10, 22) Source(2, 20) + SourceIndex(1) +1->Emitted(11, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(11, 2) Source(2, 2) + SourceIndex(1) +3 >Emitted(11, 3) Source(2, 3) + SourceIndex(1) +4 >Emitted(11, 10) Source(2, 10) + SourceIndex(1) +5 >Emitted(11, 11) Source(2, 11) + SourceIndex(1) +6 >Emitted(11, 13) Source(2, 12) + SourceIndex(1) +7 >Emitted(11, 14) Source(2, 13) + SourceIndex(1) +8 >Emitted(11, 16) Source(2, 15) + SourceIndex(1) +9 >Emitted(11, 18) Source(2, 17) + SourceIndex(1) +10>Emitted(11, 20) Source(2, 18) + SourceIndex(1) +11>Emitted(11, 21) Source(2, 19) + SourceIndex(1) +12>Emitted(11, 22) Source(2, 20) + SourceIndex(1) --- >>>let x = c.doThing({ a: 12 }); 1-> @@ -237,21 +238,21 @@ sourceFile:index.ts 13> } 14> ) 15> ; -1->Emitted(11, 1) Source(4, 1) + SourceIndex(1) -2 >Emitted(11, 5) Source(4, 5) + SourceIndex(1) -3 >Emitted(11, 6) Source(4, 6) + SourceIndex(1) -4 >Emitted(11, 9) Source(4, 9) + SourceIndex(1) -5 >Emitted(11, 10) Source(4, 10) + SourceIndex(1) -6 >Emitted(11, 11) Source(4, 11) + SourceIndex(1) -7 >Emitted(11, 18) Source(4, 18) + SourceIndex(1) -8 >Emitted(11, 19) Source(4, 19) + SourceIndex(1) -9 >Emitted(11, 21) Source(4, 20) + SourceIndex(1) -10>Emitted(11, 22) Source(4, 21) + SourceIndex(1) -11>Emitted(11, 24) Source(4, 23) + SourceIndex(1) -12>Emitted(11, 26) Source(4, 25) + SourceIndex(1) -13>Emitted(11, 28) Source(4, 26) + SourceIndex(1) -14>Emitted(11, 29) Source(4, 27) + SourceIndex(1) -15>Emitted(11, 30) Source(4, 28) + SourceIndex(1) +1->Emitted(12, 1) Source(4, 1) + SourceIndex(1) +2 >Emitted(12, 5) Source(4, 5) + SourceIndex(1) +3 >Emitted(12, 6) Source(4, 6) + SourceIndex(1) +4 >Emitted(12, 9) Source(4, 9) + SourceIndex(1) +5 >Emitted(12, 10) Source(4, 10) + SourceIndex(1) +6 >Emitted(12, 11) Source(4, 11) + SourceIndex(1) +7 >Emitted(12, 18) Source(4, 18) + SourceIndex(1) +8 >Emitted(12, 19) Source(4, 19) + SourceIndex(1) +9 >Emitted(12, 21) Source(4, 20) + SourceIndex(1) +10>Emitted(12, 22) Source(4, 21) + SourceIndex(1) +11>Emitted(12, 24) Source(4, 23) + SourceIndex(1) +12>Emitted(12, 26) Source(4, 25) + SourceIndex(1) +13>Emitted(12, 28) Source(4, 26) + SourceIndex(1) +14>Emitted(12, 29) Source(4, 27) + SourceIndex(1) +15>Emitted(12, 30) Source(4, 28) + SourceIndex(1) --- >>>//# sourceMappingURL=bundle.js.map=================================================================== JsFile: bundle.d.ts diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).errors.txt b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..82266312f7190 --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).errors.txt @@ -0,0 +1,139 @@ +deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(28,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(29,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(30,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(33,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(34,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(42,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(43,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(44,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(45,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. +deleteOperatorWithAnyOtherType.ts(45,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(46,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +deleteOperatorWithAnyOtherType.ts(46,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(47,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +deleteOperatorWithAnyOtherType.ts(47,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(50,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(50,39): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(51,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(51,39): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(51,47): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(54,8): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a 'delete' operator must be a property reference. + + +==== deleteOperatorWithAnyOtherType.ts (25 errors) ==== + // delete operator on any type + + declare var ANY: any; + declare var ANY1; + var ANY2: any[] = ["", ""]; + declare var obj: () => {}; + var obj1 = { x: "", y: () => { }}; + function foo(): any { + var a; + return a; + } + class A { + public a: any; + static foo() { + var a; + return a; + } + } + namespace M { + export var n: any; + } + var objA = new A(); + + // any type var + var ResultIsBoolean1 = delete ANY1; + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean2 = delete ANY2; + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean3 = delete A; + ~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean4 = delete M; + ~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean5 = delete obj; + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean6 = delete obj1; + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // any type literal + var ResultIsBoolean7 = delete undefined; + ~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean8 = delete null; + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // any type expressions + var ResultIsBoolean9 = delete ANY2[0]; + var ResultIsBoolean10 = delete obj1.x; + var ResultIsBoolean11 = delete obj1.y; + var ResultIsBoolean12 = delete objA.a; + var ResultIsBoolean13 = delete M.n; + var ResultIsBoolean14 = delete foo(); + ~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean15 = delete A.foo(); + ~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean16 = delete (ANY + ANY1); + ~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean17 = delete (null + undefined); + ~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. + ~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean18 = delete (null + null); + ~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. + ~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean19 = delete (undefined + undefined); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // multiple delete operators + var ResultIsBoolean20 = delete delete ANY; + ~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean21 = delete delete delete (ANY + ANY1); + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + ~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // miss assignment operators + delete ANY; + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + delete ANY1; + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + delete ANY2[0]; + delete ANY, ANY1; + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + delete obj1.x; + delete obj1.y; + delete objA.a; + delete M.n; \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).symbols b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..e307ee95891ed --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).symbols @@ -0,0 +1,190 @@ +//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// + +=== deleteOperatorWithAnyOtherType.ts === +// delete operator on any type + +declare var ANY: any; +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) + +declare var ANY1; +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +var ANY2: any[] = ["", ""]; +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +declare var obj: () => {}; +>obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 11)) + +var obj1 = { x: "", y: () => { }}; +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) +>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) + +function foo(): any { +>foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34)) + + var a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7)) + + return a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7)) +} +class A { +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) + + public a: any; +>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) + + static foo() { +>foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) + + var a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11)) + + return a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11)) + } +} +namespace M { +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) + + export var n: any; +>n : Symbol(n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) +} +var objA = new A(); +>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) + +// any type var +var ResultIsBoolean1 = delete ANY1; +>ResultIsBoolean1 : Symbol(ResultIsBoolean1, Decl(deleteOperatorWithAnyOtherType.ts, 24, 3)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +var ResultIsBoolean2 = delete ANY2; +>ResultIsBoolean2 : Symbol(ResultIsBoolean2, Decl(deleteOperatorWithAnyOtherType.ts, 25, 3)) +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +var ResultIsBoolean3 = delete A; +>ResultIsBoolean3 : Symbol(ResultIsBoolean3, Decl(deleteOperatorWithAnyOtherType.ts, 26, 3)) +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) + +var ResultIsBoolean4 = delete M; +>ResultIsBoolean4 : Symbol(ResultIsBoolean4, Decl(deleteOperatorWithAnyOtherType.ts, 27, 3)) +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) + +var ResultIsBoolean5 = delete obj; +>ResultIsBoolean5 : Symbol(ResultIsBoolean5, Decl(deleteOperatorWithAnyOtherType.ts, 28, 3)) +>obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 11)) + +var ResultIsBoolean6 = delete obj1; +>ResultIsBoolean6 : Symbol(ResultIsBoolean6, Decl(deleteOperatorWithAnyOtherType.ts, 29, 3)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) + +// any type literal +var ResultIsBoolean7 = delete undefined; +>ResultIsBoolean7 : Symbol(ResultIsBoolean7, Decl(deleteOperatorWithAnyOtherType.ts, 32, 3)) +>undefined : Symbol(undefined) + +var ResultIsBoolean8 = delete null; +>ResultIsBoolean8 : Symbol(ResultIsBoolean8, Decl(deleteOperatorWithAnyOtherType.ts, 33, 3)) + +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +>ResultIsBoolean9 : Symbol(ResultIsBoolean9, Decl(deleteOperatorWithAnyOtherType.ts, 36, 3)) +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +var ResultIsBoolean10 = delete obj1.x; +>ResultIsBoolean10 : Symbol(ResultIsBoolean10, Decl(deleteOperatorWithAnyOtherType.ts, 37, 3)) +>obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) + +var ResultIsBoolean11 = delete obj1.y; +>ResultIsBoolean11 : Symbol(ResultIsBoolean11, Decl(deleteOperatorWithAnyOtherType.ts, 38, 3)) +>obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) + +var ResultIsBoolean12 = delete objA.a; +>ResultIsBoolean12 : Symbol(ResultIsBoolean12, Decl(deleteOperatorWithAnyOtherType.ts, 39, 3)) +>objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) +>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) +>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) + +var ResultIsBoolean13 = delete M.n; +>ResultIsBoolean13 : Symbol(ResultIsBoolean13, Decl(deleteOperatorWithAnyOtherType.ts, 40, 3)) +>M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) +>n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) + +var ResultIsBoolean14 = delete foo(); +>ResultIsBoolean14 : Symbol(ResultIsBoolean14, Decl(deleteOperatorWithAnyOtherType.ts, 41, 3)) +>foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34)) + +var ResultIsBoolean15 = delete A.foo(); +>ResultIsBoolean15 : Symbol(ResultIsBoolean15, Decl(deleteOperatorWithAnyOtherType.ts, 42, 3)) +>A.foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) +>foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) + +var ResultIsBoolean16 = delete (ANY + ANY1); +>ResultIsBoolean16 : Symbol(ResultIsBoolean16, Decl(deleteOperatorWithAnyOtherType.ts, 43, 3)) +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +var ResultIsBoolean17 = delete (null + undefined); +>ResultIsBoolean17 : Symbol(ResultIsBoolean17, Decl(deleteOperatorWithAnyOtherType.ts, 44, 3)) +>undefined : Symbol(undefined) + +var ResultIsBoolean18 = delete (null + null); +>ResultIsBoolean18 : Symbol(ResultIsBoolean18, Decl(deleteOperatorWithAnyOtherType.ts, 45, 3)) + +var ResultIsBoolean19 = delete (undefined + undefined); +>ResultIsBoolean19 : Symbol(ResultIsBoolean19, Decl(deleteOperatorWithAnyOtherType.ts, 46, 3)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +>ResultIsBoolean20 : Symbol(ResultIsBoolean20, Decl(deleteOperatorWithAnyOtherType.ts, 49, 3)) +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) + +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); +>ResultIsBoolean21 : Symbol(ResultIsBoolean21, Decl(deleteOperatorWithAnyOtherType.ts, 50, 3)) +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +// miss assignment operators +delete ANY; +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) + +delete ANY1; +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +delete ANY2[0]; +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +delete ANY, ANY1; +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +delete obj1.x; +>obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) + +delete obj1.y; +>obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) + +delete objA.a; +>objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) +>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) +>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) + +delete M.n; +>M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) +>n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) + diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).types b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).types new file mode 100644 index 0000000000000..f86f73f992e5d --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=false).types @@ -0,0 +1,391 @@ +//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// + +=== deleteOperatorWithAnyOtherType.ts === +// delete operator on any type + +declare var ANY: any; +>ANY : any +> : ^^^ + +declare var ANY1; +>ANY1 : any +> : ^^^ + +var ANY2: any[] = ["", ""]; +>ANY2 : any[] +> : ^^^^^ +>["", ""] : string[] +> : ^^^^^^^^ +>"" : "" +> : ^^ +>"" : "" +> : ^^ + +declare var obj: () => {}; +>obj : () => {} +> : ^^^^^^ + +var obj1 = { x: "", y: () => { }}; +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ x: "", y: () => { }} : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>x : string +> : ^^^^^^ +>"" : "" +> : ^^ +>y : () => void +> : ^^^^^^^^^^ +>() => { } : () => void +> : ^^^^^^^^^^ + +function foo(): any { +>foo : () => any +> : ^^^^^^ + + var a; +>a : any +> : ^^^ + + return a; +>a : any +> : ^^^ +} +class A { +>A : A +> : ^ + + public a: any; +>a : any +> : ^^^ + + static foo() { +>foo : () => any +> : ^^^^^^^^^ + + var a; +>a : any +> : ^^^ + + return a; +>a : any +> : ^^^ + } +} +namespace M { +>M : typeof M +> : ^^^^^^^^ + + export var n: any; +>n : any +> : ^^^ +} +var objA = new A(); +>objA : A +> : ^ +>new A() : A +> : ^ +>A : typeof A +> : ^^^^^^^^ + +// any type var +var ResultIsBoolean1 = delete ANY1; +>ResultIsBoolean1 : boolean +> : ^^^^^^^ +>delete ANY1 : boolean +> : ^^^^^^^ +>ANY1 : any +> : ^^^ + +var ResultIsBoolean2 = delete ANY2; +>ResultIsBoolean2 : boolean +> : ^^^^^^^ +>delete ANY2 : boolean +> : ^^^^^^^ +>ANY2 : any[] +> : ^^^^^ + +var ResultIsBoolean3 = delete A; +>ResultIsBoolean3 : boolean +> : ^^^^^^^ +>delete A : boolean +> : ^^^^^^^ +>A : typeof A +> : ^^^^^^^^ + +var ResultIsBoolean4 = delete M; +>ResultIsBoolean4 : boolean +> : ^^^^^^^ +>delete M : boolean +> : ^^^^^^^ +>M : typeof M +> : ^^^^^^^^ + +var ResultIsBoolean5 = delete obj; +>ResultIsBoolean5 : boolean +> : ^^^^^^^ +>delete obj : boolean +> : ^^^^^^^ +>obj : () => {} +> : ^^^^^^ + +var ResultIsBoolean6 = delete obj1; +>ResultIsBoolean6 : boolean +> : ^^^^^^^ +>delete obj1 : boolean +> : ^^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +// any type literal +var ResultIsBoolean7 = delete undefined; +>ResultIsBoolean7 : boolean +> : ^^^^^^^ +>delete undefined : boolean +> : ^^^^^^^ +>undefined : undefined +> : ^^^^^^^^^ + +var ResultIsBoolean8 = delete null; +>ResultIsBoolean8 : boolean +> : ^^^^^^^ +>delete null : boolean +> : ^^^^^^^ + +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +>ResultIsBoolean9 : boolean +> : ^^^^^^^ +>delete ANY2[0] : boolean +> : ^^^^^^^ +>ANY2[0] : any +> : ^^^ +>ANY2 : any[] +> : ^^^^^ +>0 : 0 +> : ^ + +var ResultIsBoolean10 = delete obj1.x; +>ResultIsBoolean10 : boolean +> : ^^^^^^^ +>delete obj1.x : boolean +> : ^^^^^^^ +>obj1.x : string +> : ^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>x : string +> : ^^^^^^ + +var ResultIsBoolean11 = delete obj1.y; +>ResultIsBoolean11 : boolean +> : ^^^^^^^ +>delete obj1.y : boolean +> : ^^^^^^^ +>obj1.y : () => void +> : ^^^^^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>y : () => void +> : ^^^^^^^^^^ + +var ResultIsBoolean12 = delete objA.a; +>ResultIsBoolean12 : boolean +> : ^^^^^^^ +>delete objA.a : boolean +> : ^^^^^^^ +>objA.a : any +> : ^^^ +>objA : A +> : ^ +>a : any +> : ^^^ + +var ResultIsBoolean13 = delete M.n; +>ResultIsBoolean13 : boolean +> : ^^^^^^^ +>delete M.n : boolean +> : ^^^^^^^ +>M.n : any +> : ^^^ +>M : typeof M +> : ^^^^^^^^ +>n : any +> : ^^^ + +var ResultIsBoolean14 = delete foo(); +>ResultIsBoolean14 : boolean +> : ^^^^^^^ +>delete foo() : boolean +> : ^^^^^^^ +>foo() : any +> : ^^^ +>foo : () => any +> : ^^^^^^ + +var ResultIsBoolean15 = delete A.foo(); +>ResultIsBoolean15 : boolean +> : ^^^^^^^ +>delete A.foo() : boolean +> : ^^^^^^^ +>A.foo() : any +> : ^^^ +>A.foo : () => any +> : ^^^^^^^^^ +>A : typeof A +> : ^^^^^^^^ +>foo : () => any +> : ^^^^^^^^^ + +var ResultIsBoolean16 = delete (ANY + ANY1); +>ResultIsBoolean16 : boolean +> : ^^^^^^^ +>delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>(ANY + ANY1) : any +> : ^^^ +>ANY + ANY1 : any +> : ^^^ +>ANY : any +> : ^^^ +>ANY1 : any +> : ^^^ + +var ResultIsBoolean17 = delete (null + undefined); +>ResultIsBoolean17 : boolean +> : ^^^^^^^ +>delete (null + undefined) : boolean +> : ^^^^^^^ +>(null + undefined) : any +> : ^^^ +>null + undefined : any +> : ^^^ +>undefined : undefined +> : ^^^^^^^^^ + +var ResultIsBoolean18 = delete (null + null); +>ResultIsBoolean18 : boolean +> : ^^^^^^^ +>delete (null + null) : boolean +> : ^^^^^^^ +>(null + null) : any +> : ^^^ +>null + null : any +> : ^^^ + +var ResultIsBoolean19 = delete (undefined + undefined); +>ResultIsBoolean19 : boolean +> : ^^^^^^^ +>delete (undefined + undefined) : boolean +> : ^^^^^^^ +>(undefined + undefined) : any +> : ^^^ +>undefined + undefined : any +> : ^^^ +>undefined : undefined +> : ^^^^^^^^^ +>undefined : undefined +> : ^^^^^^^^^ + +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +>ResultIsBoolean20 : boolean +> : ^^^^^^^ +>delete delete ANY : boolean +> : ^^^^^^^ +>delete ANY : boolean +> : ^^^^^^^ +>ANY : any +> : ^^^ + +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); +>ResultIsBoolean21 : boolean +> : ^^^^^^^ +>delete delete delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>delete delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>(ANY + ANY1) : any +> : ^^^ +>ANY + ANY1 : any +> : ^^^ +>ANY : any +> : ^^^ +>ANY1 : any +> : ^^^ + +// miss assignment operators +delete ANY; +>delete ANY : boolean +> : ^^^^^^^ +>ANY : any +> : ^^^ + +delete ANY1; +>delete ANY1 : boolean +> : ^^^^^^^ +>ANY1 : any +> : ^^^ + +delete ANY2[0]; +>delete ANY2[0] : boolean +> : ^^^^^^^ +>ANY2[0] : any +> : ^^^ +>ANY2 : any[] +> : ^^^^^ +>0 : 0 +> : ^ + +delete ANY, ANY1; +>delete ANY, ANY1 : any +> : ^^^ +>delete ANY : boolean +> : ^^^^^^^ +>ANY : any +> : ^^^ +>ANY1 : any +> : ^^^ + +delete obj1.x; +>delete obj1.x : boolean +> : ^^^^^^^ +>obj1.x : string +> : ^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>x : string +> : ^^^^^^ + +delete obj1.y; +>delete obj1.y : boolean +> : ^^^^^^^ +>obj1.y : () => void +> : ^^^^^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>y : () => void +> : ^^^^^^^^^^ + +delete objA.a; +>delete objA.a : boolean +> : ^^^^^^^ +>objA.a : any +> : ^^^ +>objA : A +> : ^ +>a : any +> : ^^^ + +delete M.n; +>delete M.n : boolean +> : ^^^^^^^ +>M.n : any +> : ^^^ +>M : typeof M +> : ^^^^^^^^ +>n : any +> : ^^^ + diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).errors.txt b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..69bab738aa41e --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).errors.txt @@ -0,0 +1,172 @@ +deleteOperatorWithAnyOtherType.ts(25,31): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(26,31): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(27,31): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(28,31): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(28,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(29,31): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(29,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(30,31): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(30,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(33,31): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(33,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(34,31): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(42,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(43,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(44,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(45,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. +deleteOperatorWithAnyOtherType.ts(45,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(46,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +deleteOperatorWithAnyOtherType.ts(46,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(47,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +deleteOperatorWithAnyOtherType.ts(47,33): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(50,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(50,39): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(50,39): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(51,32): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(51,39): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(51,47): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(54,8): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(54,8): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(55,8): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a 'delete' operator must be a property reference. +deleteOperatorWithAnyOtherType.ts(57,8): error TS1102: 'delete' cannot be called on an identifier in strict mode. +deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a 'delete' operator must be a property reference. + + +==== deleteOperatorWithAnyOtherType.ts (36 errors) ==== + // delete operator on any type + + declare var ANY: any; + declare var ANY1; + var ANY2: any[] = ["", ""]; + declare var obj: () => {}; + var obj1 = { x: "", y: () => { }}; + function foo(): any { + var a; + return a; + } + class A { + public a: any; + static foo() { + var a; + return a; + } + } + namespace M { + export var n: any; + } + var objA = new A(); + + // any type var + var ResultIsBoolean1 = delete ANY1; + ~~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean2 = delete ANY2; + ~~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean3 = delete A; + ~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean4 = delete M; + ~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean5 = delete obj; + ~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean6 = delete obj1; + ~~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // any type literal + var ResultIsBoolean7 = delete undefined; + ~~~~~~~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean8 = delete null; + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // any type expressions + var ResultIsBoolean9 = delete ANY2[0]; + var ResultIsBoolean10 = delete obj1.x; + var ResultIsBoolean11 = delete obj1.y; + var ResultIsBoolean12 = delete objA.a; + var ResultIsBoolean13 = delete M.n; + var ResultIsBoolean14 = delete foo(); + ~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean15 = delete A.foo(); + ~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean16 = delete (ANY + ANY1); + ~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean17 = delete (null + undefined); + ~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. + ~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean18 = delete (null + null); + ~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. + ~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean19 = delete (undefined + undefined); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // multiple delete operators + var ResultIsBoolean20 = delete delete ANY; + ~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + ~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + var ResultIsBoolean21 = delete delete delete (ANY + ANY1); + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + ~~~~~~~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + + // miss assignment operators + delete ANY; + ~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + delete ANY1; + ~~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + delete ANY2[0]; + delete ANY, ANY1; + ~~~ +!!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~~~ +!!! error TS2703: The operand of a 'delete' operator must be a property reference. + delete obj1.x; + delete obj1.y; + delete objA.a; + delete M.n; \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).symbols b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..e307ee95891ed --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).symbols @@ -0,0 +1,190 @@ +//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// + +=== deleteOperatorWithAnyOtherType.ts === +// delete operator on any type + +declare var ANY: any; +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) + +declare var ANY1; +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +var ANY2: any[] = ["", ""]; +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +declare var obj: () => {}; +>obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 11)) + +var obj1 = { x: "", y: () => { }}; +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) +>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) + +function foo(): any { +>foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34)) + + var a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7)) + + return a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7)) +} +class A { +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) + + public a: any; +>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) + + static foo() { +>foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) + + var a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11)) + + return a; +>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11)) + } +} +namespace M { +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) + + export var n: any; +>n : Symbol(n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) +} +var objA = new A(); +>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) + +// any type var +var ResultIsBoolean1 = delete ANY1; +>ResultIsBoolean1 : Symbol(ResultIsBoolean1, Decl(deleteOperatorWithAnyOtherType.ts, 24, 3)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +var ResultIsBoolean2 = delete ANY2; +>ResultIsBoolean2 : Symbol(ResultIsBoolean2, Decl(deleteOperatorWithAnyOtherType.ts, 25, 3)) +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +var ResultIsBoolean3 = delete A; +>ResultIsBoolean3 : Symbol(ResultIsBoolean3, Decl(deleteOperatorWithAnyOtherType.ts, 26, 3)) +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) + +var ResultIsBoolean4 = delete M; +>ResultIsBoolean4 : Symbol(ResultIsBoolean4, Decl(deleteOperatorWithAnyOtherType.ts, 27, 3)) +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) + +var ResultIsBoolean5 = delete obj; +>ResultIsBoolean5 : Symbol(ResultIsBoolean5, Decl(deleteOperatorWithAnyOtherType.ts, 28, 3)) +>obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 11)) + +var ResultIsBoolean6 = delete obj1; +>ResultIsBoolean6 : Symbol(ResultIsBoolean6, Decl(deleteOperatorWithAnyOtherType.ts, 29, 3)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) + +// any type literal +var ResultIsBoolean7 = delete undefined; +>ResultIsBoolean7 : Symbol(ResultIsBoolean7, Decl(deleteOperatorWithAnyOtherType.ts, 32, 3)) +>undefined : Symbol(undefined) + +var ResultIsBoolean8 = delete null; +>ResultIsBoolean8 : Symbol(ResultIsBoolean8, Decl(deleteOperatorWithAnyOtherType.ts, 33, 3)) + +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +>ResultIsBoolean9 : Symbol(ResultIsBoolean9, Decl(deleteOperatorWithAnyOtherType.ts, 36, 3)) +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +var ResultIsBoolean10 = delete obj1.x; +>ResultIsBoolean10 : Symbol(ResultIsBoolean10, Decl(deleteOperatorWithAnyOtherType.ts, 37, 3)) +>obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) + +var ResultIsBoolean11 = delete obj1.y; +>ResultIsBoolean11 : Symbol(ResultIsBoolean11, Decl(deleteOperatorWithAnyOtherType.ts, 38, 3)) +>obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) + +var ResultIsBoolean12 = delete objA.a; +>ResultIsBoolean12 : Symbol(ResultIsBoolean12, Decl(deleteOperatorWithAnyOtherType.ts, 39, 3)) +>objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) +>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) +>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) + +var ResultIsBoolean13 = delete M.n; +>ResultIsBoolean13 : Symbol(ResultIsBoolean13, Decl(deleteOperatorWithAnyOtherType.ts, 40, 3)) +>M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) +>n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) + +var ResultIsBoolean14 = delete foo(); +>ResultIsBoolean14 : Symbol(ResultIsBoolean14, Decl(deleteOperatorWithAnyOtherType.ts, 41, 3)) +>foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34)) + +var ResultIsBoolean15 = delete A.foo(); +>ResultIsBoolean15 : Symbol(ResultIsBoolean15, Decl(deleteOperatorWithAnyOtherType.ts, 42, 3)) +>A.foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) +>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) +>foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) + +var ResultIsBoolean16 = delete (ANY + ANY1); +>ResultIsBoolean16 : Symbol(ResultIsBoolean16, Decl(deleteOperatorWithAnyOtherType.ts, 43, 3)) +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +var ResultIsBoolean17 = delete (null + undefined); +>ResultIsBoolean17 : Symbol(ResultIsBoolean17, Decl(deleteOperatorWithAnyOtherType.ts, 44, 3)) +>undefined : Symbol(undefined) + +var ResultIsBoolean18 = delete (null + null); +>ResultIsBoolean18 : Symbol(ResultIsBoolean18, Decl(deleteOperatorWithAnyOtherType.ts, 45, 3)) + +var ResultIsBoolean19 = delete (undefined + undefined); +>ResultIsBoolean19 : Symbol(ResultIsBoolean19, Decl(deleteOperatorWithAnyOtherType.ts, 46, 3)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +>ResultIsBoolean20 : Symbol(ResultIsBoolean20, Decl(deleteOperatorWithAnyOtherType.ts, 49, 3)) +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) + +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); +>ResultIsBoolean21 : Symbol(ResultIsBoolean21, Decl(deleteOperatorWithAnyOtherType.ts, 50, 3)) +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +// miss assignment operators +delete ANY; +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) + +delete ANY1; +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +delete ANY2[0]; +>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) + +delete ANY, ANY1; +>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) +>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) + +delete obj1.x; +>obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) + +delete obj1.y; +>obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) +>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) +>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) + +delete objA.a; +>objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) +>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) +>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) + +delete M.n; +>M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) +>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) +>n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) + diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).types b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).types new file mode 100644 index 0000000000000..f86f73f992e5d --- /dev/null +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType(alwaysstrict=true).types @@ -0,0 +1,391 @@ +//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// + +=== deleteOperatorWithAnyOtherType.ts === +// delete operator on any type + +declare var ANY: any; +>ANY : any +> : ^^^ + +declare var ANY1; +>ANY1 : any +> : ^^^ + +var ANY2: any[] = ["", ""]; +>ANY2 : any[] +> : ^^^^^ +>["", ""] : string[] +> : ^^^^^^^^ +>"" : "" +> : ^^ +>"" : "" +> : ^^ + +declare var obj: () => {}; +>obj : () => {} +> : ^^^^^^ + +var obj1 = { x: "", y: () => { }}; +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ x: "", y: () => { }} : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>x : string +> : ^^^^^^ +>"" : "" +> : ^^ +>y : () => void +> : ^^^^^^^^^^ +>() => { } : () => void +> : ^^^^^^^^^^ + +function foo(): any { +>foo : () => any +> : ^^^^^^ + + var a; +>a : any +> : ^^^ + + return a; +>a : any +> : ^^^ +} +class A { +>A : A +> : ^ + + public a: any; +>a : any +> : ^^^ + + static foo() { +>foo : () => any +> : ^^^^^^^^^ + + var a; +>a : any +> : ^^^ + + return a; +>a : any +> : ^^^ + } +} +namespace M { +>M : typeof M +> : ^^^^^^^^ + + export var n: any; +>n : any +> : ^^^ +} +var objA = new A(); +>objA : A +> : ^ +>new A() : A +> : ^ +>A : typeof A +> : ^^^^^^^^ + +// any type var +var ResultIsBoolean1 = delete ANY1; +>ResultIsBoolean1 : boolean +> : ^^^^^^^ +>delete ANY1 : boolean +> : ^^^^^^^ +>ANY1 : any +> : ^^^ + +var ResultIsBoolean2 = delete ANY2; +>ResultIsBoolean2 : boolean +> : ^^^^^^^ +>delete ANY2 : boolean +> : ^^^^^^^ +>ANY2 : any[] +> : ^^^^^ + +var ResultIsBoolean3 = delete A; +>ResultIsBoolean3 : boolean +> : ^^^^^^^ +>delete A : boolean +> : ^^^^^^^ +>A : typeof A +> : ^^^^^^^^ + +var ResultIsBoolean4 = delete M; +>ResultIsBoolean4 : boolean +> : ^^^^^^^ +>delete M : boolean +> : ^^^^^^^ +>M : typeof M +> : ^^^^^^^^ + +var ResultIsBoolean5 = delete obj; +>ResultIsBoolean5 : boolean +> : ^^^^^^^ +>delete obj : boolean +> : ^^^^^^^ +>obj : () => {} +> : ^^^^^^ + +var ResultIsBoolean6 = delete obj1; +>ResultIsBoolean6 : boolean +> : ^^^^^^^ +>delete obj1 : boolean +> : ^^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +// any type literal +var ResultIsBoolean7 = delete undefined; +>ResultIsBoolean7 : boolean +> : ^^^^^^^ +>delete undefined : boolean +> : ^^^^^^^ +>undefined : undefined +> : ^^^^^^^^^ + +var ResultIsBoolean8 = delete null; +>ResultIsBoolean8 : boolean +> : ^^^^^^^ +>delete null : boolean +> : ^^^^^^^ + +// any type expressions +var ResultIsBoolean9 = delete ANY2[0]; +>ResultIsBoolean9 : boolean +> : ^^^^^^^ +>delete ANY2[0] : boolean +> : ^^^^^^^ +>ANY2[0] : any +> : ^^^ +>ANY2 : any[] +> : ^^^^^ +>0 : 0 +> : ^ + +var ResultIsBoolean10 = delete obj1.x; +>ResultIsBoolean10 : boolean +> : ^^^^^^^ +>delete obj1.x : boolean +> : ^^^^^^^ +>obj1.x : string +> : ^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>x : string +> : ^^^^^^ + +var ResultIsBoolean11 = delete obj1.y; +>ResultIsBoolean11 : boolean +> : ^^^^^^^ +>delete obj1.y : boolean +> : ^^^^^^^ +>obj1.y : () => void +> : ^^^^^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>y : () => void +> : ^^^^^^^^^^ + +var ResultIsBoolean12 = delete objA.a; +>ResultIsBoolean12 : boolean +> : ^^^^^^^ +>delete objA.a : boolean +> : ^^^^^^^ +>objA.a : any +> : ^^^ +>objA : A +> : ^ +>a : any +> : ^^^ + +var ResultIsBoolean13 = delete M.n; +>ResultIsBoolean13 : boolean +> : ^^^^^^^ +>delete M.n : boolean +> : ^^^^^^^ +>M.n : any +> : ^^^ +>M : typeof M +> : ^^^^^^^^ +>n : any +> : ^^^ + +var ResultIsBoolean14 = delete foo(); +>ResultIsBoolean14 : boolean +> : ^^^^^^^ +>delete foo() : boolean +> : ^^^^^^^ +>foo() : any +> : ^^^ +>foo : () => any +> : ^^^^^^ + +var ResultIsBoolean15 = delete A.foo(); +>ResultIsBoolean15 : boolean +> : ^^^^^^^ +>delete A.foo() : boolean +> : ^^^^^^^ +>A.foo() : any +> : ^^^ +>A.foo : () => any +> : ^^^^^^^^^ +>A : typeof A +> : ^^^^^^^^ +>foo : () => any +> : ^^^^^^^^^ + +var ResultIsBoolean16 = delete (ANY + ANY1); +>ResultIsBoolean16 : boolean +> : ^^^^^^^ +>delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>(ANY + ANY1) : any +> : ^^^ +>ANY + ANY1 : any +> : ^^^ +>ANY : any +> : ^^^ +>ANY1 : any +> : ^^^ + +var ResultIsBoolean17 = delete (null + undefined); +>ResultIsBoolean17 : boolean +> : ^^^^^^^ +>delete (null + undefined) : boolean +> : ^^^^^^^ +>(null + undefined) : any +> : ^^^ +>null + undefined : any +> : ^^^ +>undefined : undefined +> : ^^^^^^^^^ + +var ResultIsBoolean18 = delete (null + null); +>ResultIsBoolean18 : boolean +> : ^^^^^^^ +>delete (null + null) : boolean +> : ^^^^^^^ +>(null + null) : any +> : ^^^ +>null + null : any +> : ^^^ + +var ResultIsBoolean19 = delete (undefined + undefined); +>ResultIsBoolean19 : boolean +> : ^^^^^^^ +>delete (undefined + undefined) : boolean +> : ^^^^^^^ +>(undefined + undefined) : any +> : ^^^ +>undefined + undefined : any +> : ^^^ +>undefined : undefined +> : ^^^^^^^^^ +>undefined : undefined +> : ^^^^^^^^^ + +// multiple delete operators +var ResultIsBoolean20 = delete delete ANY; +>ResultIsBoolean20 : boolean +> : ^^^^^^^ +>delete delete ANY : boolean +> : ^^^^^^^ +>delete ANY : boolean +> : ^^^^^^^ +>ANY : any +> : ^^^ + +var ResultIsBoolean21 = delete delete delete (ANY + ANY1); +>ResultIsBoolean21 : boolean +> : ^^^^^^^ +>delete delete delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>delete delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>delete (ANY + ANY1) : boolean +> : ^^^^^^^ +>(ANY + ANY1) : any +> : ^^^ +>ANY + ANY1 : any +> : ^^^ +>ANY : any +> : ^^^ +>ANY1 : any +> : ^^^ + +// miss assignment operators +delete ANY; +>delete ANY : boolean +> : ^^^^^^^ +>ANY : any +> : ^^^ + +delete ANY1; +>delete ANY1 : boolean +> : ^^^^^^^ +>ANY1 : any +> : ^^^ + +delete ANY2[0]; +>delete ANY2[0] : boolean +> : ^^^^^^^ +>ANY2[0] : any +> : ^^^ +>ANY2 : any[] +> : ^^^^^ +>0 : 0 +> : ^ + +delete ANY, ANY1; +>delete ANY, ANY1 : any +> : ^^^ +>delete ANY : boolean +> : ^^^^^^^ +>ANY : any +> : ^^^ +>ANY1 : any +> : ^^^ + +delete obj1.x; +>delete obj1.x : boolean +> : ^^^^^^^ +>obj1.x : string +> : ^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>x : string +> : ^^^^^^ + +delete obj1.y; +>delete obj1.y : boolean +> : ^^^^^^^ +>obj1.y : () => void +> : ^^^^^^^^^^ +>obj1 : { x: string; y: () => void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>y : () => void +> : ^^^^^^^^^^ + +delete objA.a; +>delete objA.a : boolean +> : ^^^^^^^ +>objA.a : any +> : ^^^ +>objA : A +> : ^ +>a : any +> : ^^^ + +delete M.n; +>delete M.n : boolean +> : ^^^^^^^ +>M.n : any +> : ^^^ +>M : typeof M +> : ^^^^^^^^ +>n : any +> : ^^^ + diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt index 82266312f7190..b02c086b50018 100644 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a 'delete' operator must be a property reference. deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a 'delete' operator must be a property reference. deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a 'delete' operator must be a property reference. @@ -25,6 +26,7 @@ deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a 'delete' deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a 'delete' operator must be a property reference. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== deleteOperatorWithAnyOtherType.ts (25 errors) ==== // delete operator on any type diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..e54b9ef5bd414 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) + +var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..bbce51d986fa7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es2015).types @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : any + +var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..c9f5526b14ebe --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,8 @@ +emitArrowFunctionWhenUsingArguments03.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments03.ts (1 errors) ==== + var arguments; + var a = () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..330ee3789816c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) + +var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3)) +>arguments : Symbol(arguments) + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..756142e72f371 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=false,target=es5).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : any +> : ^^^ + +var a = () => arguments; +>a : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..ffee8993c1ea2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,8 @@ +emitArrowFunctionWhenUsingArguments03.ts(1,5): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments03.ts (1 errors) ==== + var arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..e54b9ef5bd414 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) + +var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..7dc5ae672597e --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es2015).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : any +> : ^^^ + +var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..4b3bd937f9fec --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,11 @@ +emitArrowFunctionWhenUsingArguments03.ts(1,5): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments03.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments03.ts (2 errors) ==== + var arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..330ee3789816c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) + +var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3)) +>arguments : Symbol(arguments) + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..756142e72f371 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(alwaysstrict=true,target=es5).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// + +=== emitArrowFunctionWhenUsingArguments03.ts === +var arguments; +>arguments : any +> : ^^^ + +var a = () => arguments; +>a : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt new file mode 100644 index 0000000000000..8bd5b59026a50 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt @@ -0,0 +1,7 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments03.ts (0 errors) ==== + var arguments; + var a = () => arguments; \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types index bbce51d986fa7..7dc5ae672597e 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types @@ -3,6 +3,7 @@ === emitArrowFunctionWhenUsingArguments03.ts === var arguments; >arguments : any +> : ^^^ var a = () => arguments; >a : () => any @@ -10,4 +11,5 @@ var a = () => arguments; >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt index 4a1159fbb4881..3f7f0e65148a1 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments03.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments03.ts (1 errors) ==== var arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..35b0aedddde28 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).symbols @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments03_ES6.ts === +var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 0, 3)) + +var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 1, 3)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..f255903903057 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=false).types @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments03_ES6.ts === +var arguments; +>arguments : any + +var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..d5496138bb520 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,8 @@ +emitArrowFunctionWhenUsingArguments03_ES6.ts(1,5): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments03_ES6.ts (1 errors) ==== + var arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..35b0aedddde28 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).symbols @@ -0,0 +1,10 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments03_ES6.ts === +var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 0, 3)) + +var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 1, 3)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..2779840ecb7b9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6(alwaysstrict=true).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments03_ES6.ts === +var arguments; +>arguments : any +> : ^^^ + +var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ + diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt new file mode 100644 index 0000000000000..e1dee69e74b9b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt @@ -0,0 +1,7 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments03_ES6.ts (0 errors) ==== + var arguments; + var a = () => arguments; \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types index f255903903057..2779840ecb7b9 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types @@ -3,6 +3,7 @@ === emitArrowFunctionWhenUsingArguments03_ES6.ts === var arguments; >arguments : any +> : ^^^ var a = () => arguments; >a : () => any @@ -10,4 +11,5 @@ var a = () => arguments; >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..1b2fc7cf3feba --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04.ts, 0, 0)) + + var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..f19ab5dbcf9fd --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es2015).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var arguments; +>arguments : any + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..b962c5453e1bf --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments04.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments04.ts (1 errors) ==== + function f() { + var arguments; + var a = () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..ed04a6c54cd57 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04.ts, 0, 0)) + + var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..74e000ce61f6a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=false,target=es5).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var arguments; +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..73c7a77423621 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments04.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments04.ts (1 errors) ==== + function f() { + var arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..1b2fc7cf3feba --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04.ts, 0, 0)) + + var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..d3abb68829e4d --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es2015).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var arguments; +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..93e9809dde71f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,13 @@ +emitArrowFunctionWhenUsingArguments04.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments04.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments04.ts (2 errors) ==== + function f() { + var arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..ed04a6c54cd57 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04.ts, 0, 0)) + + var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..74e000ce61f6a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(alwaysstrict=true,target=es5).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// + +=== emitArrowFunctionWhenUsingArguments04.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var arguments; +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt new file mode 100644 index 0000000000000..8ef2d24c760d3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt @@ -0,0 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments04.ts (0 errors) ==== + function f() { + var arguments; + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types index f19ab5dbcf9fd..d3abb68829e4d 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types @@ -7,6 +7,7 @@ function f() { var arguments; >arguments : any +> : ^^^ var a = () => arguments; >a : () => any @@ -14,4 +15,5 @@ function f() { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt index 71594e8a0aef5..de843bf991879 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments04.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments04.ts (1 errors) ==== function f() { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..0d8ae60fd6d8f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments04_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 0, 0)) + + var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 1, 7)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..b6b6a39254d6e --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=false).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments04_ES6.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var arguments; +>arguments : any + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..7f18575e8b6c1 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments04_ES6.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments04_ES6.ts (1 errors) ==== + function f() { + var arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..0d8ae60fd6d8f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).symbols @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments04_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 0, 0)) + + var arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 1, 7)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..f165f38180df0 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6(alwaysstrict=true).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments04_ES6.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var arguments; +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt new file mode 100644 index 0000000000000..30e8e7bba16dc --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt @@ -0,0 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments04_ES6.ts (0 errors) ==== + function f() { + var arguments; + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types index b6b6a39254d6e..f165f38180df0 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types @@ -7,6 +7,7 @@ function f() { var arguments; >arguments : any +> : ^^^ var a = () => arguments; >a : () => any @@ -14,4 +15,5 @@ function f() { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..254d7203b21f2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..6cd5c153831b4 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es2015).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..802e88b146761 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,9 @@ +emitArrowFunctionWhenUsingArguments05.ts(2,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments05.ts (1 errors) ==== + function f(arguments) { + var a = () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..1bb2d9b8d32b3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..69a46a305c427 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=false,target=es5).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..293b93a72eb4d --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,9 @@ +emitArrowFunctionWhenUsingArguments05.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments05.ts (1 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..254d7203b21f2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..39ab21aa27494 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es2015).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..163eb3852b309 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments05.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments05.ts(2,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments05.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..1bb2d9b8d32b3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..69a46a305c427 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(alwaysstrict=true,target=es5).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// + +=== emitArrowFunctionWhenUsingArguments05.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt new file mode 100644 index 0000000000000..50e45f86136a5 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments05.ts (0 errors) ==== + function f(arguments) { + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types index 6cd5c153831b4..39ab21aa27494 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = () => arguments; >a : () => any @@ -12,4 +13,5 @@ function f(arguments) { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt index 4362ce0482537..1caab7bc40f98 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments05.ts(2,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments05.ts (1 errors) ==== function f(arguments) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..4541c98910354 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments05_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 11)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..db3a8162f8ca4 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=false).types @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments05_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..965c8bc8a84f9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,9 @@ +emitArrowFunctionWhenUsingArguments05_ES6.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments05_ES6.ts (1 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..4541c98910354 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments05_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 11)) + + var a = () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..121ea6447a88a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6(alwaysstrict=true).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments05_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => arguments; +>a : () => any +> : ^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt new file mode 100644 index 0000000000000..77b7c2f969d41 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments05_ES6.ts (0 errors) ==== + function f(arguments) { + var a = () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types index db3a8162f8ca4..121ea6447a88a 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = () => arguments; >a : () => any @@ -12,4 +13,5 @@ function f(arguments) { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..b9bf50b481ae3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..6fbcc94be2cdc --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es2015).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..1d17c2669a321 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,9 @@ +emitArrowFunctionWhenUsingArguments06.ts(2,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments06.ts (1 errors) ==== + function f(arguments) { + var a = () => () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..9b8370f3f0e49 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..ee4e78ccfd433 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=false,target=es5).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => () => arguments; +>a : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..e22b66f9fb0fd --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,9 @@ +emitArrowFunctionWhenUsingArguments06.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments06.ts (1 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..b9bf50b481ae3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..c584b87a2998c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es2015).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..b0ae5ecf1f887 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments06.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments06.ts(2,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments06.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..9b8370f3f0e49 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..ee4e78ccfd433 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(alwaysstrict=true,target=es5).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// + +=== emitArrowFunctionWhenUsingArguments06.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => () => arguments; +>a : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt new file mode 100644 index 0000000000000..161eae697b9d7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments06.ts (0 errors) ==== + function f(arguments) { + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types index 6fbcc94be2cdc..c584b87a2998c 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = () => () => arguments; >a : () => () => any @@ -14,4 +15,5 @@ function f(arguments) { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt index 195886af0649c..6453091c1d0ee 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments06.ts(2,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments06.ts (1 errors) ==== function f(arguments) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..0f0037ef64df7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments06_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 11)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..fd66dc71493a3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=false).types @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments06_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..7d719319caf3a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,9 @@ +emitArrowFunctionWhenUsingArguments06_ES6.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments06_ES6.ts (1 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..0f0037ef64df7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).symbols @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments06_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 11)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..18aed6b01e027 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6(alwaysstrict=true).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments06_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt new file mode 100644 index 0000000000000..be374a6d4f8c4 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments06_ES6.ts (0 errors) ==== + function f(arguments) { + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types index fd66dc71493a3..18aed6b01e027 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = () => () => arguments; >a : () => () => any @@ -14,4 +15,5 @@ function f(arguments) { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..bbfaf7221f80b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 11)) + + var a = (arguments) => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..3b67ce8002417 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es2015).types @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = (arguments) => () => arguments; +>a : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => arguments : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>arguments : any +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..c3037a6e2b559 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,9 @@ +emitArrowFunctionWhenUsingArguments07.ts(2,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments07.ts (1 errors) ==== + function f(arguments) { + var a = (arguments) => () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..4bccf38d83dab --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 11)) + + var a = (arguments) => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..36785c96f6a32 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=false,target=es5).types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = (arguments) => () => arguments; +>a : (arguments: any) => () => IArguments +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => arguments : (arguments: any) => () => IArguments +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..5b8a9394dc01c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments07.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments07.ts(2,14): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments07.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = (arguments) => () => arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..bbfaf7221f80b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 11)) + + var a = (arguments) => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..6f1de7cc685ae --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es2015).types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = (arguments) => () => arguments; +>a : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => arguments : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..eda078533f6c2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,15 @@ +emitArrowFunctionWhenUsingArguments07.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments07.ts(2,14): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments07.ts(2,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments07.ts (3 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = (arguments) => () => arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..4bccf38d83dab --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 11)) + + var a = (arguments) => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..36785c96f6a32 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(alwaysstrict=true,target=es5).types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// + +=== emitArrowFunctionWhenUsingArguments07.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = (arguments) => () => arguments; +>a : (arguments: any) => () => IArguments +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => arguments : (arguments: any) => () => IArguments +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt new file mode 100644 index 0000000000000..ddf2a824c5a16 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments07.ts (0 errors) ==== + function f(arguments) { + var a = (arguments) => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types index 3b67ce8002417..6f1de7cc685ae 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = (arguments) => () => arguments; >a : (arguments: any) => () => any @@ -12,7 +13,9 @@ function f(arguments) { >(arguments) => () => arguments : (arguments: any) => () => any > : ^ ^^^^^^^^^^^^^^^^^^^ >arguments : any +> : ^^^ >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt index c26bd59b80865..6f84ae69d69ca 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments07.ts(2,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments07.ts (1 errors) ==== function f(arguments) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..e0ad9357de250 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments07_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 0, 11)) + + var a = (arguments) => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 13)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 13)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..2db42c24a88ec --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=false).types @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments07_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = (arguments) => () => arguments; +>a : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => arguments : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>arguments : any +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..81f21de0e6fb2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments07_ES6.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments07_ES6.ts(2,14): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments07_ES6.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = (arguments) => () => arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..e0ad9357de250 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments07_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 0, 11)) + + var a = (arguments) => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 13)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 13)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..fcd4f4569c791 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6(alwaysstrict=true).types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments07_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = (arguments) => () => arguments; +>a : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => arguments : (arguments: any) => () => any +> : ^ ^^^^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt new file mode 100644 index 0000000000000..adb49935c96f8 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments07_ES6.ts (0 errors) ==== + function f(arguments) { + var a = (arguments) => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types index 2db42c24a88ec..fcd4f4569c791 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = (arguments) => () => arguments; >a : (arguments: any) => () => any @@ -12,7 +13,9 @@ function f(arguments) { >(arguments) => () => arguments : (arguments: any) => () => any > : ^ ^^^^^^^^^^^^^^^^^^^ >arguments : any +> : ^^^ >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..b06a65d46f817 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 11)) + + var a = () => (arguments) => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..b47b22daec481 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es2015).types @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = () => (arguments) => arguments; +>a : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>() => (arguments) => arguments : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>(arguments) => arguments : (arguments: any) => any +> : ^ ^^^^^^^^^^^^^ +>arguments : any +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..b06a65d46f817 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 11)) + + var a = () => (arguments) => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..b47b22daec481 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=false,target=es5).types @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = () => (arguments) => arguments; +>a : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>() => (arguments) => arguments : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>(arguments) => arguments : (arguments: any) => any +> : ^ ^^^^^^^^^^^^^ +>arguments : any +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..1764f2f84bef6 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments08.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments08.ts(2,20): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments08.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => (arguments) => arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..b06a65d46f817 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 11)) + + var a = () => (arguments) => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..90a6b46b58d41 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es2015).types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => (arguments) => arguments; +>a : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>() => (arguments) => arguments : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>(arguments) => arguments : (arguments: any) => any +> : ^ ^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..1764f2f84bef6 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments08.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments08.ts(2,20): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments08.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => (arguments) => arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..b06a65d46f817 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 11)) + + var a = () => (arguments) => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..90a6b46b58d41 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(alwaysstrict=true,target=es5).types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// + +=== emitArrowFunctionWhenUsingArguments08.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => (arguments) => arguments; +>a : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>() => (arguments) => arguments : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>(arguments) => arguments : (arguments: any) => any +> : ^ ^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt new file mode 100644 index 0000000000000..87b979ac40825 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments08.ts (0 errors) ==== + function f(arguments) { + var a = () => (arguments) => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types index b47b22daec481..90a6b46b58d41 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = () => (arguments) => arguments; >a : () => (arguments: any) => any @@ -14,5 +15,7 @@ function f(arguments) { >(arguments) => arguments : (arguments: any) => any > : ^ ^^^^^^^^^^^^^ >arguments : any +> : ^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt index 2606d8c7f984b..baacb6d06c003 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt @@ -1,6 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments08.ts (0 errors) ==== function f(arguments) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..fbc0487329377 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments08_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 0, 11)) + + var a = () => (arguments) => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 19)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 19)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..0f6f1c03d6407 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=false).types @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments08_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var a = () => (arguments) => arguments; +>a : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>() => (arguments) => arguments : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>(arguments) => arguments : (arguments: any) => any +> : ^ ^^^^^^^^^^^^^ +>arguments : any +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..f55b018eff4a1 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments08_ES6.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments08_ES6.ts(2,20): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments08_ES6.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var a = () => (arguments) => arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..fbc0487329377 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).symbols @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments08_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 0, 11)) + + var a = () => (arguments) => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 19)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 19)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..aeea922a665ba --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6(alwaysstrict=true).types @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments08_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var a = () => (arguments) => arguments; +>a : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>() => (arguments) => arguments : () => (arguments: any) => any +> : ^^^^^^^ ^^^^^^^^^^^ +>(arguments) => arguments : (arguments: any) => any +> : ^ ^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt new file mode 100644 index 0000000000000..6ccd51bc546da --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt @@ -0,0 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments08_ES6.ts (0 errors) ==== + function f(arguments) { + var a = () => (arguments) => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types index 0f6f1c03d6407..aeea922a665ba 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var a = () => (arguments) => arguments; >a : () => (arguments: any) => any @@ -14,5 +15,7 @@ function f(arguments) { >(arguments) => arguments : (arguments: any) => any > : ^ ^^^^^^^^^^^^^ >arguments : any +> : ^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..96debf73c8304 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 1, 7)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..e273761aeea90 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es2015).types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..dcce324a922d3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments11.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments11.ts (1 errors) ==== + function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..c554e449a98f7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 1, 7)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11.ts, 2, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..94009bca9e4ad --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=false,target=es5).types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = () => () => arguments; +>a : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..e9f272b1702ed --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments11.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments11.ts (1 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var _arguments = 10; + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..96debf73c8304 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 1, 7)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..4ce4bc6cec552 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es2015).types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..9bacfc14b76eb --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,13 @@ +emitArrowFunctionWhenUsingArguments11.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments11.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments11.ts (2 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var _arguments = 10; + var a = () => () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..c554e449a98f7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 1, 7)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11.ts, 2, 7)) +>arguments : Symbol(arguments) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..94009bca9e4ad --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(alwaysstrict=true,target=es5).types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// + +=== emitArrowFunctionWhenUsingArguments11.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = () => () => arguments; +>a : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt new file mode 100644 index 0000000000000..c518b32e87b6b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt @@ -0,0 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments11.ts (0 errors) ==== + function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types index e273761aeea90..4ce4bc6cec552 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var _arguments = 10; >_arguments : number @@ -20,4 +21,5 @@ function f(arguments) { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt index 42d4a3e1f4159..91facbc8420fd 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments11.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments11.ts (1 errors) ==== function f(arguments) { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..9f40cf1de3a29 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments11_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 11)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 1, 7)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..1d6162b54968c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=false).types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments11_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..0bc335d9e0200 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments11_ES6.ts(1,12): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments11_ES6.ts (1 errors) ==== + function f(arguments) { + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + var _arguments = 10; + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..9f40cf1de3a29 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments11_ES6.ts === +function f(arguments) { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 0)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 11)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 1, 7)) + + var a = () => () => arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 11)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..2ec0fa53e0742 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6(alwaysstrict=true).types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments11_ES6.ts === +function f(arguments) { +>f : (arguments: any) => void +> : ^ ^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = () => () => arguments; +>a : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => () => arguments : () => () => any +> : ^^^^^^^^^^^^^^^ +>() => arguments : () => any +> : ^^^^^^^^^ +>arguments : any +> : ^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt new file mode 100644 index 0000000000000..922866d404512 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt @@ -0,0 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments11_ES6.ts (0 errors) ==== + function f(arguments) { + var _arguments = 10; + var a = () => () => arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types index 1d6162b54968c..2ec0fa53e0742 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types @@ -5,6 +5,7 @@ function f(arguments) { >f : (arguments: any) => void > : ^ ^^^^^^^^^^^^^^ >arguments : any +> : ^^^ var _arguments = 10; >_arguments : number @@ -20,4 +21,5 @@ function f(arguments) { >() => arguments : () => any > : ^^^^^^^^^ >arguments : any +> : ^^^ } diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..c326e772a4203 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13.ts, 0, 0)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) + + var a = (arguments) => () => _arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 13)) +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..6de9462639006 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es2015).types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = (arguments) => () => _arguments; +>a : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => _arguments : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +>() => _arguments : () => number +> : ^^^^^^^^^^^^ +>_arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..c326e772a4203 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13.ts, 0, 0)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) + + var a = (arguments) => () => _arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 13)) +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..6de9462639006 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=false,target=es5).types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = (arguments) => () => _arguments; +>a : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => _arguments : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +>() => _arguments : () => number +> : ^^^^^^^^^^^^ +>_arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..014ac9794db26 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments13.ts(3,14): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments13.ts (1 errors) ==== + function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..c326e772a4203 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13.ts, 0, 0)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) + + var a = (arguments) => () => _arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 13)) +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..90f2c840dc66c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es2015).types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = (arguments) => () => _arguments; +>a : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => _arguments : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>() => _arguments : () => number +> : ^^^^^^^^^^^^ +>_arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..014ac9794db26 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments13.ts(3,14): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments13.ts (1 errors) ==== + function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..c326e772a4203 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13.ts, 0, 0)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) + + var a = (arguments) => () => _arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 13)) +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..90f2c840dc66c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(alwaysstrict=true,target=es5).types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// + +=== emitArrowFunctionWhenUsingArguments13.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = (arguments) => () => _arguments; +>a : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => _arguments : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>() => _arguments : () => number +> : ^^^^^^^^^^^^ +>_arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt new file mode 100644 index 0000000000000..77b90781e1155 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt @@ -0,0 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments13.ts (0 errors) ==== + function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types index 6de9462639006..90f2c840dc66c 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types @@ -17,6 +17,7 @@ function f() { >(arguments) => () => _arguments : (arguments: any) => () => number > : ^ ^^^^^^^^^^^^^^^^^^^^^^ >arguments : any +> : ^^^ >() => _arguments : () => number > : ^^^^^^^^^^^^ >_arguments : number diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt index 82d3463939e03..fe9761c698daa 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt @@ -1,6 +1,8 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments13.ts (0 errors) ==== function f() { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..0b1107b185b8b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments13_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 0, 0)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 1, 7)) + + var a = (arguments) => () => _arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 2, 13)) +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..fe34d30f83068 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=false).types @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments13_ES6.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = (arguments) => () => _arguments; +>a : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => _arguments : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +>() => _arguments : () => number +> : ^^^^^^^^^^^^ +>_arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..b57bbf9baeb78 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,10 @@ +emitArrowFunctionWhenUsingArguments13_ES6.ts(3,14): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments13_ES6.ts (1 errors) ==== + function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..0b1107b185b8b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments13_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 0, 0)) + + var _arguments = 10; +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 1, 7)) + + var a = (arguments) => () => _arguments; +>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 2, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 2, 13)) +>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 1, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..c3f12720f0f3c --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6(alwaysstrict=true).types @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments13_ES6.ts === +function f() { +>f : () => void +> : ^^^^^^^^^^ + + var _arguments = 10; +>_arguments : number +> : ^^^^^^ +>10 : 10 +> : ^^ + + var a = (arguments) => () => _arguments; +>a : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>(arguments) => () => _arguments : (arguments: any) => () => number +> : ^ ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : any +> : ^^^ +>() => _arguments : () => number +> : ^^^^^^^^^^^^ +>_arguments : number +> : ^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt new file mode 100644 index 0000000000000..04eea8a41ee27 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt @@ -0,0 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments13_ES6.ts (0 errors) ==== + function f() { + var _arguments = 10; + var a = (arguments) => () => _arguments; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types index fe34d30f83068..c3f12720f0f3c 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types @@ -17,6 +17,7 @@ function f() { >(arguments) => () => _arguments : (arguments: any) => () => number > : ^ ^^^^^^^^^^^^^^^^^^^^^^ >arguments : any +> : ^^^ >() => _arguments : () => number > : ^^^^^^^^^^^^ >_arguments : number diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..790f5dc7a16d2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14.ts, 0, 0)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..63f66daca2a4b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es2015).types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : 100 +> : ^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..38491ae7195a5 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments14.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments14.ts (1 errors) ==== + function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..d68e36476a445 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14.ts, 0, 0)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) + + return () => arguments; +>arguments : Symbol(arguments) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..4f265d5bc112b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=false,target=es5).types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..4ef6c65a8ac03 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments14.ts(3,15): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments14.ts (1 errors) ==== + function f() { + if (Math.random()) { + const arguments = 100; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..790f5dc7a16d2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14.ts, 0, 0)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..63f66daca2a4b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es2015).types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : 100 +> : ^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..1f73dd4d42f2d --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,15 @@ +emitArrowFunctionWhenUsingArguments14.ts(3,15): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments14.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments14.ts (2 errors) ==== + function f() { + if (Math.random()) { + const arguments = 100; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + return () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..d68e36476a445 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14.ts, 0, 0)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) + + return () => arguments; +>arguments : Symbol(arguments) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..4f265d5bc112b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(alwaysstrict=true,target=es5).types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// + +=== emitArrowFunctionWhenUsingArguments14.ts === +function f() { +>f : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt new file mode 100644 index 0000000000000..45701db0e80a1 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt @@ -0,0 +1,11 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments14.ts (0 errors) ==== + function f() { + if (Math.random()) { + const arguments = 100; + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt index ffb68d5432770..ee4d293da7a02 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments14.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments14.ts (1 errors) ==== function f() { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..bd672ba012041 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments14_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 0, 0)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + let arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 2, 11)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 2, 11)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..a22eb9a22b3b7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=false).types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments14_ES6.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + let arguments = 100; +>arguments : number +> : ^^^^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..39f7734b72e60 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,12 @@ +emitArrowFunctionWhenUsingArguments14_ES6.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments14_ES6.ts (1 errors) ==== + function f() { + if (Math.random()) { + let arguments = 100; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..bd672ba012041 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments14_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 0, 0)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + let arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 2, 11)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 2, 11)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..a22eb9a22b3b7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6(alwaysstrict=true).types @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments14_ES6.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + let arguments = 100; +>arguments : number +> : ^^^^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : number +> : ^^^^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt new file mode 100644 index 0000000000000..1482618236673 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt @@ -0,0 +1,11 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments14_ES6.ts (0 errors) ==== + function f() { + if (Math.random()) { + let arguments = 100; + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..e7792c1e733c7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 1, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..c83d8ca35e8b5 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es2015).types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : 100 +> : ^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..08a608ae1216d --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,13 @@ +emitArrowFunctionWhenUsingArguments15.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments15.ts (1 errors) ==== + function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..561af3e8bcdbd --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 1, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) + + return () => arguments; +>arguments : Symbol(arguments) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..f8f496216b06a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=false,target=es5).types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..2f24ee1921f19 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,16 @@ +emitArrowFunctionWhenUsingArguments15.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments15.ts(4,15): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments15.ts (2 errors) ==== + function f() { + var arguments = "hello"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + const arguments = 100; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..e7792c1e733c7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 1, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..c83d8ca35e8b5 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es2015).types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : 100 +> : ^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..052edf9546011 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,19 @@ +emitArrowFunctionWhenUsingArguments15.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments15.ts(4,15): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments15.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments15.ts (3 errors) ==== + function f() { + var arguments = "hello"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + const arguments = 100; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + return () => arguments; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..561af3e8bcdbd --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 1, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) + + return () => arguments; +>arguments : Symbol(arguments) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..f8f496216b06a --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(alwaysstrict=true,target=es5).types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// + +=== emitArrowFunctionWhenUsingArguments15.ts === +function f() { +>f : () => () => IArguments +> : ^^^^^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => IArguments +> : ^^^^^^^^^^^^^^^^ +>arguments : IArguments +> : ^^^^^^^^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt new file mode 100644 index 0000000000000..12af555d93a80 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt @@ -0,0 +1,12 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments15.ts (0 errors) ==== + function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt index f0f32a0eb26ab..5f63621cb79be 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments15.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments15.ts (1 errors) ==== function f() { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..34da49790434e --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments15_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 1, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 3, 13)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 3, 13)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..7fb3a830d44a9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=false).types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments15_ES6.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : 100 +> : ^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..672c64982bdb6 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,16 @@ +emitArrowFunctionWhenUsingArguments15_ES6.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments15_ES6.ts(4,15): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments15_ES6.ts (2 errors) ==== + function f() { + var arguments = "hello"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + const arguments = 100; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..34da49790434e --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments15_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 1, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const arguments = 100; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 3, 13)) + + return () => arguments; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 3, 13)) + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..7fb3a830d44a9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6(alwaysstrict=true).types @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments15_ES6.ts === +function f() { +>f : () => () => number +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + const arguments = 100; +>arguments : 100 +> : ^^^ +>100 : 100 +> : ^^^ + + return () => arguments; +>() => arguments : () => number +> : ^^^^^^^^^^^^ +>arguments : 100 +> : ^^^ + } +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt new file mode 100644 index 0000000000000..cc6085a6839b8 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt @@ -0,0 +1,12 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments15_ES6.ts (0 errors) ==== + function f() { + var arguments = "hello"; + if (Math.random()) { + const arguments = 100; + return () => arguments; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..03ff76ba6952b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..780601d9fc530 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es2015).types @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..f3becb13393c7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,13 @@ +emitArrowFunctionWhenUsingArguments16.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments16.ts (1 errors) ==== + function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + var arguments = "world"; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..586e68c176a9b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..e5ffd84d04bc3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=false,target=es5).types @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : () => () => any +> : ^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => any +> : ^^^^^^^^^ +>arguments[0] : any +> : ^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..8291ca8b55dd2 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,16 @@ +emitArrowFunctionWhenUsingArguments16.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments16.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments16.ts (2 errors) ==== + function f() { + var arguments = "hello"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..03ff76ba6952b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..780601d9fc530 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es2015).types @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..71e9b035d1325 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,19 @@ +emitArrowFunctionWhenUsingArguments16.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments16.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +emitArrowFunctionWhenUsingArguments16.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments16.ts (3 errors) ==== + function f() { + var arguments = "hello"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + return () => arguments[0]; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + var arguments = "world"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..586e68c176a9b --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..e5ffd84d04bc3 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(alwaysstrict=true,target=es5).types @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// + +=== emitArrowFunctionWhenUsingArguments16.ts === +function f() { +>f : () => () => any +> : ^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => any +> : ^^^^^^^^^ +>arguments[0] : any +> : ^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt new file mode 100644 index 0000000000000..a64862cee8af0 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt @@ -0,0 +1,12 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments16.ts (0 errors) ==== + function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt index 80c3f2f710ba3..ffe6b821d4b12 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments16.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments16.ts (1 errors) ==== function f() { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..6c65b5b89bbd0 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments16_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..8ddc725812a31 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=false).types @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments16_ES6.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..958c33c5f0e08 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,16 @@ +emitArrowFunctionWhenUsingArguments16_ES6.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments16_ES6.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments16_ES6.ts (2 errors) ==== + function f() { + var arguments = "hello"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..6c65b5b89bbd0 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).symbols @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments16_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 0, 0)) + + var arguments = "hello"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..8ddc725812a31 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6(alwaysstrict=true).types @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments16_ES6.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var arguments = "hello"; +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt new file mode 100644 index 0000000000000..53f19b94bab6f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt @@ -0,0 +1,12 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments16_ES6.ts (0 errors) ==== + function f() { + var arguments = "hello"; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..afab9d24135d9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17.ts, 0, 0)) + + var { arguments } = { arguments: "hello" }; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 25)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..08520075773a1 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es2015).types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var { arguments } = { arguments: "hello" }; +>arguments : string +> : ^^^^^^ +>{ arguments: "hello" } : { arguments: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..47a1971378097 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,13 @@ +emitArrowFunctionWhenUsingArguments17.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + + +==== emitArrowFunctionWhenUsingArguments17.ts (1 errors) ==== + function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + var arguments = "world"; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..599a54500165f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17.ts, 0, 0)) + + var { arguments } = { arguments: "hello" }; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 25)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..d9d6a3594c278 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=false,target=es5).types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : () => () => any +> : ^^^^^^^^^^^^^^^ + + var { arguments } = { arguments: "hello" }; +>arguments : string +> : ^^^^^^ +>{ arguments: "hello" } : { arguments: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => any +> : ^^^^^^^^^ +>arguments[0] : any +> : ^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..d76d71923ab83 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,16 @@ +emitArrowFunctionWhenUsingArguments17.ts(2,11): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments17.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments17.ts (2 errors) ==== + function f() { + var { arguments } = { arguments: "hello" }; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..afab9d24135d9 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17.ts, 0, 0)) + + var { arguments } = { arguments: "hello" }; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 25)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..08520075773a1 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es2015).types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var { arguments } = { arguments: "hello" }; +>arguments : string +> : ^^^^^^ +>{ arguments: "hello" } : { arguments: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..73fa1d0bf4926 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,19 @@ +emitArrowFunctionWhenUsingArguments17.ts(2,11): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments17.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +emitArrowFunctionWhenUsingArguments17.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments17.ts (3 errors) ==== + function f() { + var { arguments } = { arguments: "hello" }; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + return () => arguments[0]; + ~~~~~~~~~ +!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. + } + var arguments = "world"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..599a54500165f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17.ts, 0, 0)) + + var { arguments } = { arguments: "hello" }; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 25)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..d9d6a3594c278 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(alwaysstrict=true,target=es5).types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// + +=== emitArrowFunctionWhenUsingArguments17.ts === +function f() { +>f : () => () => any +> : ^^^^^^^^^^^^^^^ + + var { arguments } = { arguments: "hello" }; +>arguments : string +> : ^^^^^^ +>{ arguments: "hello" } : { arguments: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => any +> : ^^^^^^^^^ +>arguments[0] : any +> : ^^^ +>arguments : IArguments +> : ^^^^^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt new file mode 100644 index 0000000000000..4e373e7f84c3f --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt @@ -0,0 +1,12 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments17.ts (0 errors) ==== + function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt index ecdecc5686bf3..1a1f301ffbd83 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt @@ -1,7 +1,9 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. emitArrowFunctionWhenUsingArguments17.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== emitArrowFunctionWhenUsingArguments17.ts (1 errors) ==== function f() { diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..1d1ea3732bc75 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments17_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 0, 0)) + + var { arguments } = { arguments: "hello" }; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 25)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).types new file mode 100644 index 0000000000000..52cc042304621 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=false).types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments17_ES6.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var { arguments } = { arguments: "hello" }; +>arguments : string +> : ^^^^^^ +>{ arguments: "hello" } : { arguments: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..5ffd967d5f0e7 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).errors.txt @@ -0,0 +1,16 @@ +emitArrowFunctionWhenUsingArguments17_ES6.ts(2,11): error TS1100: Invalid use of 'arguments' in strict mode. +emitArrowFunctionWhenUsingArguments17_ES6.ts(6,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== emitArrowFunctionWhenUsingArguments17_ES6.ts (2 errors) ==== + function f() { + var { arguments } = { arguments: "hello" }; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..1d1ea3732bc75 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).symbols @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments17_ES6.ts === +function f() { +>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 0, 0)) + + var { arguments } = { arguments: "hello" }; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 25)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return () => arguments[0]; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) + } + var arguments = "world"; +>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).types new file mode 100644 index 0000000000000..52cc042304621 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6(alwaysstrict=true).types @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// + +=== emitArrowFunctionWhenUsingArguments17_ES6.ts === +function f() { +>f : () => () => string +> : ^^^^^^^^^^^^^^^^^^ + + var { arguments } = { arguments: "hello" }; +>arguments : string +> : ^^^^^^ +>{ arguments: "hello" } : { arguments: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^ +>arguments : string +> : ^^^^^^ +>"hello" : "hello" +> : ^^^^^^^ + + if (Math.random()) { +>Math.random() : number +> : ^^^^^^ +>Math.random : () => number +> : ^^^^^^ +>Math : Math +> : ^^^^ +>random : () => number +> : ^^^^^^ + + return () => arguments[0]; +>() => arguments[0] : () => string +> : ^^^^^^^^^^^^ +>arguments[0] : string +> : ^^^^^^ +>arguments : string +> : ^^^^^^ +>0 : 0 +> : ^ + } + var arguments = "world"; +>arguments : string +> : ^^^^^^ +>"world" : "world" +> : ^^^^^^^ +} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt new file mode 100644 index 0000000000000..bfbe1991c9634 --- /dev/null +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt @@ -0,0 +1,12 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== emitArrowFunctionWhenUsingArguments17_ES6.ts (0 errors) ==== + function f() { + var { arguments } = { arguments: "hello" }; + if (Math.random()) { + return () => arguments[0]; + } + var arguments = "world"; + } \ No newline at end of file diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).errors.txt new file mode 100644 index 0000000000000..b1245d7c46e27 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).errors.txt @@ -0,0 +1,58 @@ +es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(10,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(10,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(16,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(16,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + + +==== es5-asyncFunctionWithStatements.ts (8 errors) ==== + declare var x, y, z, a, b, c; + + async function withStatement0() { + with (x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement1() { + with (await x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement2() { + with (x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + a; + await y; + b; + } + } + + async function withStatement3() { + with (x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + with (z) { + a; + await y; + b; + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).symbols b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).symbols new file mode 100644 index 0000000000000..13a98479a6dbb --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).symbols @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) +>y : Symbol(y, Decl(es5-asyncFunctionWithStatements.ts, 0, 14)) +>z : Symbol(z, Decl(es5-asyncFunctionWithStatements.ts, 0, 17)) +>a : Symbol(a, Decl(es5-asyncFunctionWithStatements.ts, 0, 20)) +>b : Symbol(b, Decl(es5-asyncFunctionWithStatements.ts, 0, 23)) +>c : Symbol(c, Decl(es5-asyncFunctionWithStatements.ts, 0, 26)) + +async function withStatement0() { +>withStatement0 : Symbol(withStatement0, Decl(es5-asyncFunctionWithStatements.ts, 0, 29)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement1() { +>withStatement1 : Symbol(withStatement1, Decl(es5-asyncFunctionWithStatements.ts, 6, 1)) + + with (await x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement2() { +>withStatement2 : Symbol(withStatement2, Decl(es5-asyncFunctionWithStatements.ts, 12, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + a; + await y; + b; + } +} + +async function withStatement3() { +>withStatement3 : Symbol(withStatement3, Decl(es5-asyncFunctionWithStatements.ts, 20, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + with (z) { + a; + await y; + b; + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).types b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).types new file mode 100644 index 0000000000000..cc171bfdef044 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es2015).types @@ -0,0 +1,99 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ +>a : any +> : ^^^ +>b : any +> : ^^^ +>c : any +> : ^^^ + +async function withStatement0() { +>withStatement0 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement1() { +>withStatement1 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (await x) { +>await x : any +> : ^^^ +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement2() { +>withStatement2 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } +} + +async function withStatement3() { +>withStatement3 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + with (z) { +>z : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).errors.txt new file mode 100644 index 0000000000000..b1245d7c46e27 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).errors.txt @@ -0,0 +1,58 @@ +es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(10,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(10,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(16,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(16,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + + +==== es5-asyncFunctionWithStatements.ts (8 errors) ==== + declare var x, y, z, a, b, c; + + async function withStatement0() { + with (x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement1() { + with (await x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement2() { + with (x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + a; + await y; + b; + } + } + + async function withStatement3() { + with (x) { + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + with (z) { + a; + await y; + b; + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).symbols b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).symbols new file mode 100644 index 0000000000000..13a98479a6dbb --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).symbols @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) +>y : Symbol(y, Decl(es5-asyncFunctionWithStatements.ts, 0, 14)) +>z : Symbol(z, Decl(es5-asyncFunctionWithStatements.ts, 0, 17)) +>a : Symbol(a, Decl(es5-asyncFunctionWithStatements.ts, 0, 20)) +>b : Symbol(b, Decl(es5-asyncFunctionWithStatements.ts, 0, 23)) +>c : Symbol(c, Decl(es5-asyncFunctionWithStatements.ts, 0, 26)) + +async function withStatement0() { +>withStatement0 : Symbol(withStatement0, Decl(es5-asyncFunctionWithStatements.ts, 0, 29)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement1() { +>withStatement1 : Symbol(withStatement1, Decl(es5-asyncFunctionWithStatements.ts, 6, 1)) + + with (await x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement2() { +>withStatement2 : Symbol(withStatement2, Decl(es5-asyncFunctionWithStatements.ts, 12, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + a; + await y; + b; + } +} + +async function withStatement3() { +>withStatement3 : Symbol(withStatement3, Decl(es5-asyncFunctionWithStatements.ts, 20, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + with (z) { + a; + await y; + b; + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).types b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).types new file mode 100644 index 0000000000000..cc171bfdef044 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=false,target=es5).types @@ -0,0 +1,99 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ +>a : any +> : ^^^ +>b : any +> : ^^^ +>c : any +> : ^^^ + +async function withStatement0() { +>withStatement0 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement1() { +>withStatement1 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (await x) { +>await x : any +> : ^^^ +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement2() { +>withStatement2 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } +} + +async function withStatement3() { +>withStatement3 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + with (z) { +>z : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).errors.txt new file mode 100644 index 0000000000000..74edf96ff9326 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).errors.txt @@ -0,0 +1,73 @@ +es5-asyncFunctionWithStatements.ts(4,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(10,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(10,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(10,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(16,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(16,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(16,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(24,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(25,9): error TS1101: 'with' statements are not allowed in strict mode. + + +==== es5-asyncFunctionWithStatements.ts (13 errors) ==== + declare var x, y, z, a, b, c; + + async function withStatement0() { + with (x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement1() { + with (await x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement2() { + with (x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + a; + await y; + b; + } + } + + async function withStatement3() { + with (x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + with (z) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + a; + await y; + b; + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).symbols b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).symbols new file mode 100644 index 0000000000000..13a98479a6dbb --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).symbols @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) +>y : Symbol(y, Decl(es5-asyncFunctionWithStatements.ts, 0, 14)) +>z : Symbol(z, Decl(es5-asyncFunctionWithStatements.ts, 0, 17)) +>a : Symbol(a, Decl(es5-asyncFunctionWithStatements.ts, 0, 20)) +>b : Symbol(b, Decl(es5-asyncFunctionWithStatements.ts, 0, 23)) +>c : Symbol(c, Decl(es5-asyncFunctionWithStatements.ts, 0, 26)) + +async function withStatement0() { +>withStatement0 : Symbol(withStatement0, Decl(es5-asyncFunctionWithStatements.ts, 0, 29)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement1() { +>withStatement1 : Symbol(withStatement1, Decl(es5-asyncFunctionWithStatements.ts, 6, 1)) + + with (await x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement2() { +>withStatement2 : Symbol(withStatement2, Decl(es5-asyncFunctionWithStatements.ts, 12, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + a; + await y; + b; + } +} + +async function withStatement3() { +>withStatement3 : Symbol(withStatement3, Decl(es5-asyncFunctionWithStatements.ts, 20, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + with (z) { + a; + await y; + b; + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).types b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).types new file mode 100644 index 0000000000000..cc171bfdef044 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es2015).types @@ -0,0 +1,99 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ +>a : any +> : ^^^ +>b : any +> : ^^^ +>c : any +> : ^^^ + +async function withStatement0() { +>withStatement0 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement1() { +>withStatement1 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (await x) { +>await x : any +> : ^^^ +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement2() { +>withStatement2 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } +} + +async function withStatement3() { +>withStatement3 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + with (z) { +>z : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).errors.txt new file mode 100644 index 0000000000000..74edf96ff9326 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).errors.txt @@ -0,0 +1,73 @@ +es5-asyncFunctionWithStatements.ts(4,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(10,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(10,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(10,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(16,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(16,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(16,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(24,5): error TS1101: 'with' statements are not allowed in strict mode. +es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are not allowed in an async function block. +es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +es5-asyncFunctionWithStatements.ts(25,9): error TS1101: 'with' statements are not allowed in strict mode. + + +==== es5-asyncFunctionWithStatements.ts (13 errors) ==== + declare var x, y, z, a, b, c; + + async function withStatement0() { + with (x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement1() { + with (await x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + y; + } + } + + async function withStatement2() { + with (x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + a; + await y; + b; + } + } + + async function withStatement3() { + with (x) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~ +!!! error TS1300: 'with' statements are not allowed in an async function block. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + with (z) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + a; + await y; + b; + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).symbols b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).symbols new file mode 100644 index 0000000000000..13a98479a6dbb --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).symbols @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) +>y : Symbol(y, Decl(es5-asyncFunctionWithStatements.ts, 0, 14)) +>z : Symbol(z, Decl(es5-asyncFunctionWithStatements.ts, 0, 17)) +>a : Symbol(a, Decl(es5-asyncFunctionWithStatements.ts, 0, 20)) +>b : Symbol(b, Decl(es5-asyncFunctionWithStatements.ts, 0, 23)) +>c : Symbol(c, Decl(es5-asyncFunctionWithStatements.ts, 0, 26)) + +async function withStatement0() { +>withStatement0 : Symbol(withStatement0, Decl(es5-asyncFunctionWithStatements.ts, 0, 29)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement1() { +>withStatement1 : Symbol(withStatement1, Decl(es5-asyncFunctionWithStatements.ts, 6, 1)) + + with (await x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + y; + } +} + +async function withStatement2() { +>withStatement2 : Symbol(withStatement2, Decl(es5-asyncFunctionWithStatements.ts, 12, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + a; + await y; + b; + } +} + +async function withStatement3() { +>withStatement3 : Symbol(withStatement3, Decl(es5-asyncFunctionWithStatements.ts, 20, 1)) + + with (x) { +>x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) + + with (z) { + a; + await y; + b; + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).types b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).types new file mode 100644 index 0000000000000..cc171bfdef044 --- /dev/null +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(alwaysstrict=true,target=es5).types @@ -0,0 +1,99 @@ +//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// + +=== es5-asyncFunctionWithStatements.ts === +declare var x, y, z, a, b, c; +>x : any +> : ^^^ +>y : any +> : ^^^ +>z : any +> : ^^^ +>a : any +> : ^^^ +>b : any +> : ^^^ +>c : any +> : ^^^ + +async function withStatement0() { +>withStatement0 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement1() { +>withStatement1 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (await x) { +>await x : any +> : ^^^ +>x : any +> : ^^^ + + y; +>y : any +> : ^^^ + } +} + +async function withStatement2() { +>withStatement2 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } +} + +async function withStatement3() { +>withStatement3 : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + with (x) { +>x : any +> : ^^^ + + with (z) { +>z : any +> : ^^^ + + a; +>a : any +> : ^^^ + + await y; +>await y : any +> : ^^^ +>y : any +> : ^^^ + + b; +>b : any +> : ^^^ + } + } +} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt index b1245d7c46e27..20ce2004d602a 100644 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. es5-asyncFunctionWithStatements.ts(10,5): error TS1300: 'with' statements are not allowed in an async function block. @@ -8,6 +9,7 @@ es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are no es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== es5-asyncFunctionWithStatements.ts (8 errors) ==== declare var x, y, z, a, b, c; diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt index 1c4cb6d9c9fed..f91911577485c 100644 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt +++ b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. @@ -9,6 +10,7 @@ es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are no es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. !!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== es5-asyncFunctionWithStatements.ts (8 errors) ==== declare var x, y, z, a, b, c; diff --git a/tests/baselines/reference/for-of56(alwaysstrict=false).symbols b/tests/baselines/reference/for-of56(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..791222da436bf --- /dev/null +++ b/tests/baselines/reference/for-of56(alwaysstrict=false).symbols @@ -0,0 +1,6 @@ +//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// + +=== for-of56.ts === +for (var let of []) {} +>let : Symbol(let, Decl(for-of56.ts, 0, 8)) + diff --git a/tests/baselines/reference/for-of56(alwaysstrict=false).types b/tests/baselines/reference/for-of56(alwaysstrict=false).types new file mode 100644 index 0000000000000..8c4b7a9d8a4df --- /dev/null +++ b/tests/baselines/reference/for-of56(alwaysstrict=false).types @@ -0,0 +1,8 @@ +//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// + +=== for-of56.ts === +for (var let of []) {} +>let : any +>[] : undefined[] +> : ^^^^^^^^^^^ + diff --git a/tests/baselines/reference/for-of56(alwaysstrict=true).errors.txt b/tests/baselines/reference/for-of56(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..d2b1cc974f91c --- /dev/null +++ b/tests/baselines/reference/for-of56(alwaysstrict=true).errors.txt @@ -0,0 +1,7 @@ +for-of56.ts(1,10): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. + + +==== for-of56.ts (1 errors) ==== + for (var let of []) {} + ~~~ +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/for-of56(alwaysstrict=true).symbols b/tests/baselines/reference/for-of56(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..791222da436bf --- /dev/null +++ b/tests/baselines/reference/for-of56(alwaysstrict=true).symbols @@ -0,0 +1,6 @@ +//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// + +=== for-of56.ts === +for (var let of []) {} +>let : Symbol(let, Decl(for-of56.ts, 0, 8)) + diff --git a/tests/baselines/reference/for-of56(alwaysstrict=true).types b/tests/baselines/reference/for-of56(alwaysstrict=true).types new file mode 100644 index 0000000000000..0571d0cd09367 --- /dev/null +++ b/tests/baselines/reference/for-of56(alwaysstrict=true).types @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// + +=== for-of56.ts === +for (var let of []) {} +>let : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + diff --git a/tests/baselines/reference/for-of56.errors.txt b/tests/baselines/reference/for-of56.errors.txt new file mode 100644 index 0000000000000..75d34f65ae231 --- /dev/null +++ b/tests/baselines/reference/for-of56.errors.txt @@ -0,0 +1,6 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== for-of56.ts (0 errors) ==== + for (var let of []) {} \ No newline at end of file diff --git a/tests/baselines/reference/for-of56.types b/tests/baselines/reference/for-of56.types index 8c4b7a9d8a4df..0571d0cd09367 100644 --- a/tests/baselines/reference/for-of56.types +++ b/tests/baselines/reference/for-of56.types @@ -3,6 +3,7 @@ === for-of56.ts === for (var let of []) {} >let : any +> : ^^^ >[] : undefined[] > : ^^^^^^^^^^^ diff --git a/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).symbols b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..1eb86c1eaba4e --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// + +=== generatorTypeCheck38.ts === +var yield; +>yield : Symbol(yield, Decl(generatorTypeCheck38.ts, 0, 3)) + +function* g() { +>g : Symbol(g, Decl(generatorTypeCheck38.ts, 0, 10)) + + yield 0; + var v: typeof yield; +>v : Symbol(v, Decl(generatorTypeCheck38.ts, 3, 7)) +>yield : Symbol(yield, Decl(generatorTypeCheck38.ts, 0, 3)) +} diff --git a/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).types b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).types new file mode 100644 index 0000000000000..da815c386e60f --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=false).types @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// + +=== generatorTypeCheck38.ts === +var yield; +>yield : any + +function* g() { +>g : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 0; +>yield 0 : any +>0 : 0 +> : ^ + + var v: typeof yield; +>v : any +>yield : any +} diff --git a/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).errors.txt b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..d3948ae800df1 --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).errors.txt @@ -0,0 +1,14 @@ +generatorTypeCheck38.ts(1,5): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +generatorTypeCheck38.ts(4,19): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + + +==== generatorTypeCheck38.ts (2 errors) ==== + var yield; + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + function* g() { + yield 0; + var v: typeof yield; + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).symbols b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..1eb86c1eaba4e --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).symbols @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// + +=== generatorTypeCheck38.ts === +var yield; +>yield : Symbol(yield, Decl(generatorTypeCheck38.ts, 0, 3)) + +function* g() { +>g : Symbol(g, Decl(generatorTypeCheck38.ts, 0, 10)) + + yield 0; + var v: typeof yield; +>v : Symbol(v, Decl(generatorTypeCheck38.ts, 3, 7)) +>yield : Symbol(yield, Decl(generatorTypeCheck38.ts, 0, 3)) +} diff --git a/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).types b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).types new file mode 100644 index 0000000000000..d8ad76a698fc6 --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38(alwaysstrict=true).types @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// + +=== generatorTypeCheck38.ts === +var yield; +>yield : any +> : ^^^ + +function* g() { +>g : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 0; +>yield 0 : any +> : ^^^ +>0 : 0 +> : ^ + + var v: typeof yield; +>v : any +> : ^^^ +>yield : any +> : ^^^ +} diff --git a/tests/baselines/reference/generatorTypeCheck38.errors.txt b/tests/baselines/reference/generatorTypeCheck38.errors.txt new file mode 100644 index 0000000000000..62ad808f14e08 --- /dev/null +++ b/tests/baselines/reference/generatorTypeCheck38.errors.txt @@ -0,0 +1,10 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. + + +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +==== generatorTypeCheck38.ts (0 errors) ==== + var yield; + function* g() { + yield 0; + var v: typeof yield; + } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck38.types b/tests/baselines/reference/generatorTypeCheck38.types index da815c386e60f..d8ad76a698fc6 100644 --- a/tests/baselines/reference/generatorTypeCheck38.types +++ b/tests/baselines/reference/generatorTypeCheck38.types @@ -3,6 +3,7 @@ === generatorTypeCheck38.ts === var yield; >yield : any +> : ^^^ function* g() { >g : () => Generator @@ -10,10 +11,13 @@ function* g() { yield 0; >yield 0 : any +> : ^^^ >0 : 0 > : ^ var v: typeof yield; >v : any +> : ^^^ >yield : any +> : ^^^ } diff --git a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline index 1cbee21f47d7e..e6596478fddea 100644 --- a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline +++ b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline @@ -2,8 +2,9 @@ EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js.map -{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["inputFile1.ts"],"names":[],"mappings":"AAAA,kBAAkB;AACjB,IAAI,CAAC,GAAW,CAAC,CAAC;AAClB,MAAM,GAAG;IACN,CAAC,CAAU;IACX,CAAC,CAAS;CACZ"} +{"version":3,"file":"inputFile1.js","sourceRoot":"","sources":["inputFile1.ts"],"names":[],"mappings":";AAAA,kBAAkB;AACjB,IAAI,CAAC,GAAW,CAAC,CAAC;AAClB,MAAM,GAAG;IACN,CAAC,CAAU;IACX,CAAC,CAAS;CACZ"} FileName : /tests/cases/fourslash/inputFile1.js +"use strict"; // regular ts file var t = 5; class Bar { @@ -21,8 +22,9 @@ declare class Bar { EmitSkipped: false FileName : /tests/cases/fourslash/inputFile2.js.map -{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,6BAAK,IAAI,EAAG,CAAC,GAAI,CAAA"} +{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":";AACA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,6BAAK,IAAI,EAAG,CAAC,GAAI,CAAA"} FileName : /tests/cases/fourslash/inputFile2.js +"use strict"; var y = "my div"; var x = React.createElement("div", { name: y }); //# sourceMappingURL=inputFile2.js.map diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).errors.txt b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..1cfc752462491 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).errors.txt @@ -0,0 +1,31 @@ +a.js(3,9): error TS7029: Fallthrough case in switch. +a.js(16,5): error TS7027: Unreachable code detected. +a.js(19,1): error TS7028: Unused label. + + +==== a.js (3 errors) ==== + function foo(a, b) { + switch (a) { + case 10: + ~~~~~~~~ +!!! error TS7029: Fallthrough case in switch. + if (b) { + return b; + } + case 20: + return a; + } + } + + function bar() { + return x; + function bar2() { + } + var x = 10; // error + ~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + label1: var x2 = 10; + ~~~~~~ +!!! error TS7028: Unused label. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).symbols b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..adb3816e10d1a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).symbols @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts] //// + +=== a.js === +function foo(a, b) { +>foo : Symbol(foo, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 0, 13)) +>b : Symbol(b, Decl(a.js, 0, 15)) + + switch (a) { +>a : Symbol(a, Decl(a.js, 0, 13)) + + case 10: + if (b) { +>b : Symbol(b, Decl(a.js, 0, 15)) + + return b; +>b : Symbol(b, Decl(a.js, 0, 15)) + } + case 20: + return a; +>a : Symbol(a, Decl(a.js, 0, 13)) + } +} + +function bar() { +>bar : Symbol(bar, Decl(a.js, 9, 1)) + + return x; +>x : Symbol(x, Decl(a.js, 15, 7)) + + function bar2() { +>bar2 : Symbol(bar2, Decl(a.js, 12, 13)) + } + var x = 10; // error +>x : Symbol(x, Decl(a.js, 15, 7)) +} + +label1: var x2 = 10; +>x2 : Symbol(x2, Decl(a.js, 18, 12)) + diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).types b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).types new file mode 100644 index 0000000000000..951f18b71aa7b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=false).types @@ -0,0 +1,64 @@ +//// [tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts] //// + +=== a.js === +function foo(a, b) { +>foo : (a: any, b: any) => any +> : ^ ^^^^^^^ ^^^^^^^^^^^^^ +>a : any +> : ^^^ +>b : any +> : ^^^ + + switch (a) { +>a : any +> : ^^^ + + case 10: +>10 : 10 +> : ^^ + + if (b) { +>b : any +> : ^^^ + + return b; +>b : any +> : ^^^ + } + case 20: +>20 : 20 +> : ^^ + + return a; +>a : any +> : ^^^ + } +} + +function bar() { +>bar : () => number +> : ^^^^^^^^^^^^ + + return x; +>x : number +> : ^^^^^^ + + function bar2() { +>bar2 : () => void +> : ^^^^^^^^^^ + } + var x = 10; // error +>x : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +label1: var x2 = 10; +>label1 : any +> : ^^^ +>x2 : number +> : ^^^^^^ +>10 : 10 +> : ^^ + diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).errors.txt b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..b71c353ccc3c2 --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).errors.txt @@ -0,0 +1,34 @@ +a.js(3,9): error TS7029: Fallthrough case in switch. +a.js(16,5): error TS7027: Unreachable code detected. +a.js(19,1): error TS1344: 'A label is not allowed here. +a.js(19,1): error TS7028: Unused label. + + +==== a.js (4 errors) ==== + function foo(a, b) { + switch (a) { + case 10: + ~~~~~~~~ +!!! error TS7029: Fallthrough case in switch. + if (b) { + return b; + } + case 20: + return a; + } + } + + function bar() { + return x; + function bar2() { + } + var x = 10; // error + ~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + label1: var x2 = 10; + ~~~~~~ +!!! error TS1344: 'A label is not allowed here. + ~~~~~~ +!!! error TS7028: Unused label. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).symbols b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..adb3816e10d1a --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).symbols @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts] //// + +=== a.js === +function foo(a, b) { +>foo : Symbol(foo, Decl(a.js, 0, 0)) +>a : Symbol(a, Decl(a.js, 0, 13)) +>b : Symbol(b, Decl(a.js, 0, 15)) + + switch (a) { +>a : Symbol(a, Decl(a.js, 0, 13)) + + case 10: + if (b) { +>b : Symbol(b, Decl(a.js, 0, 15)) + + return b; +>b : Symbol(b, Decl(a.js, 0, 15)) + } + case 20: + return a; +>a : Symbol(a, Decl(a.js, 0, 13)) + } +} + +function bar() { +>bar : Symbol(bar, Decl(a.js, 9, 1)) + + return x; +>x : Symbol(x, Decl(a.js, 15, 7)) + + function bar2() { +>bar2 : Symbol(bar2, Decl(a.js, 12, 13)) + } + var x = 10; // error +>x : Symbol(x, Decl(a.js, 15, 7)) +} + +label1: var x2 = 10; +>x2 : Symbol(x2, Decl(a.js, 18, 12)) + diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).types b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).types new file mode 100644 index 0000000000000..951f18b71aa7b --- /dev/null +++ b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors(alwaysstrict=true).types @@ -0,0 +1,64 @@ +//// [tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts] //// + +=== a.js === +function foo(a, b) { +>foo : (a: any, b: any) => any +> : ^ ^^^^^^^ ^^^^^^^^^^^^^ +>a : any +> : ^^^ +>b : any +> : ^^^ + + switch (a) { +>a : any +> : ^^^ + + case 10: +>10 : 10 +> : ^^ + + if (b) { +>b : any +> : ^^^ + + return b; +>b : any +> : ^^^ + } + case 20: +>20 : 20 +> : ^^ + + return a; +>a : any +> : ^^^ + } +} + +function bar() { +>bar : () => number +> : ^^^^^^^^^^^^ + + return x; +>x : number +> : ^^^^^^ + + function bar2() { +>bar2 : () => void +> : ^^^^^^^^^^ + } + var x = 10; // error +>x : number +> : ^^^^^^ +>10 : 10 +> : ^^ +} + +label1: var x2 = 10; +>label1 : any +> : ^^^ +>x2 : number +> : ^^^^^^ +>10 : 10 +> : ^^ + diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt index 1cfc752462491..a5537848cdc33 100644 --- a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt +++ b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt @@ -1,8 +1,10 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. a.js(3,9): error TS7029: Fallthrough case in switch. a.js(16,5): error TS7027: Unreachable code detected. a.js(19,1): error TS7028: Unused label. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== a.js (3 errors) ==== function foo(a, b) { switch (a) { diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).errors.txt b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..2c7829a92049b --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).errors.txt @@ -0,0 +1,32 @@ +missingCloseParenStatements.ts(2,26): error TS1005: ')' expected. +missingCloseParenStatements.ts(4,5): error TS1005: ')' expected. +missingCloseParenStatements.ts(8,39): error TS1005: ')' expected. +missingCloseParenStatements.ts(11,35): error TS1005: ')' expected. + + +==== missingCloseParenStatements.ts (4 errors) ==== + var a1, a2, a3 = 0; + if ( a1 && (a2 + a3 > 0) { + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:2:4: The parser expected to find a ')' to match the '(' token here. + while( (a2 > 0) && a1 + { + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:3:10: The parser expected to find a ')' to match the '(' token here. + do { + var i = i + 1; + a1 = a1 + i; + with ((a2 + a3 > 0) && a1 { + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:8:18: The parser expected to find a ')' to match the '(' token here. + console.log(x); + } + } while (i < 5 && (a1 > 5); + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:11:17: The parser expected to find a ')' to match the '(' token here. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).symbols b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..00e76343b192a --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).symbols @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/missingCloseParenStatements.ts] //// + +=== missingCloseParenStatements.ts === +var a1, a2, a3 = 0; +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) + +if ( a1 && (a2 + a3 > 0) { +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) + + while( (a2 > 0) && a1 +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) + { + do { + var i = i + 1; +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) + + a1 = a1 + i; +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) + + with ((a2 + a3 > 0) && a1 { +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) + + console.log(x); + } + } while (i < 5 && (a1 > 5); +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) + } +} diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).types b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).types new file mode 100644 index 0000000000000..e051609f67f7b --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=false).types @@ -0,0 +1,117 @@ +//// [tests/cases/compiler/missingCloseParenStatements.ts] //// + +=== missingCloseParenStatements.ts === +var a1, a2, a3 = 0; +>a1 : any +> : ^^^ +>a2 : any +> : ^^^ +>a3 : number +> : ^^^^^^ +>0 : 0 +> : ^ + +if ( a1 && (a2 + a3 > 0) { +>a1 && (a2 + a3 > 0) : boolean +> : ^^^^^^^ +>a1 : any +> : ^^^ +>(a2 + a3 > 0) : boolean +> : ^^^^^^^ +>a2 + a3 > 0 : boolean +> : ^^^^^^^ +>a2 + a3 : any +> : ^^^ +>a2 : any +> : ^^^ +>a3 : number +> : ^^^^^^ +>0 : 0 +> : ^ + + while( (a2 > 0) && a1 +>(a2 > 0) && a1 : any +> : ^^^ +>(a2 > 0) : boolean +> : ^^^^^^^ +>a2 > 0 : boolean +> : ^^^^^^^ +>a2 : any +> : ^^^ +>0 : 0 +> : ^ +>a1 : any +> : ^^^ + { + do { + var i = i + 1; +>i : any +> : ^^^ +>i + 1 : any +> : ^^^ +>i : any +> : ^^^ +>1 : 1 +> : ^ + + a1 = a1 + i; +>a1 = a1 + i : any +> : ^^^ +>a1 : any +> : ^^^ +>a1 + i : any +> : ^^^ +>a1 : any +> : ^^^ +>i : any +> : ^^^ + + with ((a2 + a3 > 0) && a1 { +>(a2 + a3 > 0) && a1 : any +> : ^^^ +>(a2 + a3 > 0) : boolean +> : ^^^^^^^ +>a2 + a3 > 0 : boolean +> : ^^^^^^^ +>a2 + a3 : any +> : ^^^ +>a2 : any +> : ^^^ +>a3 : number +> : ^^^^^^ +>0 : 0 +> : ^ +>a1 : any +> : ^^^ + + console.log(x); +>console.log(x) : any +> : ^^^ +>console.log : any +> : ^^^ +>console : any +> : ^^^ +>log : any +> : ^^^ +>x : any +> : ^^^ + } + } while (i < 5 && (a1 > 5); +>i < 5 && (a1 > 5) : boolean +> : ^^^^^^^ +>i < 5 : boolean +> : ^^^^^^^ +>i : any +> : ^^^ +>5 : 5 +> : ^ +>(a1 > 5) : boolean +> : ^^^^^^^ +>a1 > 5 : boolean +> : ^^^^^^^ +>a1 : any +> : ^^^ +>5 : 5 +> : ^ + } +} diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).errors.txt b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..0d2e3bdca3f6d --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).errors.txt @@ -0,0 +1,35 @@ +missingCloseParenStatements.ts(2,26): error TS1005: ')' expected. +missingCloseParenStatements.ts(4,5): error TS1005: ')' expected. +missingCloseParenStatements.ts(8,13): error TS1101: 'with' statements are not allowed in strict mode. +missingCloseParenStatements.ts(8,39): error TS1005: ')' expected. +missingCloseParenStatements.ts(11,35): error TS1005: ')' expected. + + +==== missingCloseParenStatements.ts (5 errors) ==== + var a1, a2, a3 = 0; + if ( a1 && (a2 + a3 > 0) { + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:2:4: The parser expected to find a ')' to match the '(' token here. + while( (a2 > 0) && a1 + { + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:3:10: The parser expected to find a ')' to match the '(' token here. + do { + var i = i + 1; + a1 = a1 + i; + with ((a2 + a3 > 0) && a1 { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:8:18: The parser expected to find a ')' to match the '(' token here. + console.log(x); + } + } while (i < 5 && (a1 > 5); + ~ +!!! error TS1005: ')' expected. +!!! related TS1007 missingCloseParenStatements.ts:11:17: The parser expected to find a ')' to match the '(' token here. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).symbols b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..00e76343b192a --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).symbols @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/missingCloseParenStatements.ts] //// + +=== missingCloseParenStatements.ts === +var a1, a2, a3 = 0; +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) + +if ( a1 && (a2 + a3 > 0) { +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) + + while( (a2 > 0) && a1 +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) + { + do { + var i = i + 1; +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) + + a1 = a1 + i; +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) + + with ((a2 + a3 > 0) && a1 { +>a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) +>a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) + + console.log(x); + } + } while (i < 5 && (a1 > 5); +>i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) +>a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) + } +} diff --git a/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).types b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).types new file mode 100644 index 0000000000000..e051609f67f7b --- /dev/null +++ b/tests/baselines/reference/missingCloseParenStatements(alwaysstrict=true).types @@ -0,0 +1,117 @@ +//// [tests/cases/compiler/missingCloseParenStatements.ts] //// + +=== missingCloseParenStatements.ts === +var a1, a2, a3 = 0; +>a1 : any +> : ^^^ +>a2 : any +> : ^^^ +>a3 : number +> : ^^^^^^ +>0 : 0 +> : ^ + +if ( a1 && (a2 + a3 > 0) { +>a1 && (a2 + a3 > 0) : boolean +> : ^^^^^^^ +>a1 : any +> : ^^^ +>(a2 + a3 > 0) : boolean +> : ^^^^^^^ +>a2 + a3 > 0 : boolean +> : ^^^^^^^ +>a2 + a3 : any +> : ^^^ +>a2 : any +> : ^^^ +>a3 : number +> : ^^^^^^ +>0 : 0 +> : ^ + + while( (a2 > 0) && a1 +>(a2 > 0) && a1 : any +> : ^^^ +>(a2 > 0) : boolean +> : ^^^^^^^ +>a2 > 0 : boolean +> : ^^^^^^^ +>a2 : any +> : ^^^ +>0 : 0 +> : ^ +>a1 : any +> : ^^^ + { + do { + var i = i + 1; +>i : any +> : ^^^ +>i + 1 : any +> : ^^^ +>i : any +> : ^^^ +>1 : 1 +> : ^ + + a1 = a1 + i; +>a1 = a1 + i : any +> : ^^^ +>a1 : any +> : ^^^ +>a1 + i : any +> : ^^^ +>a1 : any +> : ^^^ +>i : any +> : ^^^ + + with ((a2 + a3 > 0) && a1 { +>(a2 + a3 > 0) && a1 : any +> : ^^^ +>(a2 + a3 > 0) : boolean +> : ^^^^^^^ +>a2 + a3 > 0 : boolean +> : ^^^^^^^ +>a2 + a3 : any +> : ^^^ +>a2 : any +> : ^^^ +>a3 : number +> : ^^^^^^ +>0 : 0 +> : ^ +>a1 : any +> : ^^^ + + console.log(x); +>console.log(x) : any +> : ^^^ +>console.log : any +> : ^^^ +>console : any +> : ^^^ +>log : any +> : ^^^ +>x : any +> : ^^^ + } + } while (i < 5 && (a1 > 5); +>i < 5 && (a1 > 5) : boolean +> : ^^^^^^^ +>i < 5 : boolean +> : ^^^^^^^ +>i : any +> : ^^^ +>5 : 5 +> : ^ +>(a1 > 5) : boolean +> : ^^^^^^^ +>a1 > 5 : boolean +> : ^^^^^^^ +>a1 : any +> : ^^^ +>5 : 5 +> : ^ + } +} diff --git a/tests/baselines/reference/missingCloseParenStatements.errors.txt b/tests/baselines/reference/missingCloseParenStatements.errors.txt index 2c7829a92049b..fced4eaf15df5 100644 --- a/tests/baselines/reference/missingCloseParenStatements.errors.txt +++ b/tests/baselines/reference/missingCloseParenStatements.errors.txt @@ -1,9 +1,11 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. missingCloseParenStatements.ts(2,26): error TS1005: ')' expected. missingCloseParenStatements.ts(4,5): error TS1005: ')' expected. missingCloseParenStatements.ts(8,39): error TS1005: ')' expected. missingCloseParenStatements.ts(11,35): error TS1005: ')' expected. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== missingCloseParenStatements.ts (4 errors) ==== var a1, a2, a3 = 0; if ( a1 && (a2 + a3 > 0) { diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).errors.txt b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..cfd5b716ff941 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).errors.txt @@ -0,0 +1,197 @@ +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. +yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + class C1 { + async * f() { + } + } +==== awaitMethodNameIsOk.ts (0 errors) ==== + class C2 { + async * await() { + } + } +==== yieldMethodNameIsOk.ts (0 errors) ==== + class C3 { + async * yield() { + } + } +==== awaitParameterIsError.ts (1 errors) ==== + class C4 { + async * f(await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } +==== yieldParameterIsError.ts (1 errors) ==== + class C5 { + async * f(yield) { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + class C6 { + async * f(a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + } +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + class C7 { + async * f(a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + } +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + class C8 { + async * f() { + async function * g() { + } + } + } +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + class C9 { + async * f() { + function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } + } +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + class C10 { + async * f() { + const x = function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + }; + } + } +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + class C11 { + async * f() { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + } +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + class C12 { + async * f() { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + } +==== yieldIsOk.ts (0 errors) ==== + class C13 { + async * f() { + yield; + } + } +==== yieldWithValueIsOk.ts (0 errors) ==== + class C14 { + async * f() { + yield 1; + } + } +==== yieldStarMissingValueIsError.ts (1 errors) ==== + class C15 { + async * f() { + yield *; + ~ +!!! error TS1109: Expression expected. + } + } +==== yieldStarWithValueIsOk.ts (0 errors) ==== + class C16 { + async * f() { + yield * []; + } + } +==== awaitWithValueIsOk.ts (0 errors) ==== + class C17 { + async * f() { + await 1; + } + } +==== awaitMissingValueIsError.ts (1 errors) ==== + class C18 { + async * f() { + await; + ~ +!!! error TS1109: Expression expected. + } + } +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + class C19 { + async * f() { + let x: await; + } + } +==== yieldAsTypeIsStrictError.ts (1 errors) ==== + interface yield {} + class C20 { + async * f() { + let x: yield; + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== yieldInClassComputedPropertyIsError.ts (2 errors) ==== + class C21 { + async * [yield]() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~ +!!! error TS2693: 'yield' only refers to a type, but is being used as a value here. + } + } +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + class C22 { + async * f() { + const x = { [yield]: 1 }; + } + } +==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== + class C23 { + async * get x() { + ~ +!!! error TS1005: '(' expected. + return 1; + } + } +==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== + class C24 { + async * set x(value: number) { + ~ +!!! error TS1005: '(' expected. + } + } +==== asyncGeneratorPropertyIsError.ts (1 errors) ==== + class C25 { + async * x = 1; + ~ +!!! error TS1005: '(' expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).symbols b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..61fa90d72959e --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).symbols @@ -0,0 +1,266 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// + +=== methodIsOk.ts === +class C1 { +>C1 : Symbol(C1, Decl(methodIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C1.f, Decl(methodIsOk.ts, 0, 10)) + } +} +=== awaitMethodNameIsOk.ts === +class C2 { +>C2 : Symbol(C2, Decl(awaitMethodNameIsOk.ts, 0, 0)) + + async * await() { +>await : Symbol(C2.await, Decl(awaitMethodNameIsOk.ts, 0, 10)) + } +} +=== yieldMethodNameIsOk.ts === +class C3 { +>C3 : Symbol(C3, Decl(yieldMethodNameIsOk.ts, 0, 0)) + + async * yield() { +>yield : Symbol(C3.yield, Decl(yieldMethodNameIsOk.ts, 0, 10)) + } +} +=== awaitParameterIsError.ts === +class C4 { +>C4 : Symbol(C4, Decl(awaitParameterIsError.ts, 0, 0)) + + async * f(await) { +>f : Symbol(C4.f, Decl(awaitParameterIsError.ts, 0, 10)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 1, 14)) + } +} +=== yieldParameterIsError.ts === +class C5 { +>C5 : Symbol(C5, Decl(yieldParameterIsError.ts, 0, 0)) + + async * f(yield) { +>f : Symbol(C5.f, Decl(yieldParameterIsError.ts, 0, 10)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 1, 14)) + } +} +=== awaitInParameterInitializerIsError.ts === +class C6 { +>C6 : Symbol(C6, Decl(awaitInParameterInitializerIsError.ts, 0, 0)) + + async * f(a = await 1) { +>f : Symbol(C6.f, Decl(awaitInParameterInitializerIsError.ts, 0, 10)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14)) + } +} +=== yieldInParameterInitializerIsError.ts === +class C7 { +>C7 : Symbol(C7, Decl(yieldInParameterInitializerIsError.ts, 0, 0)) + + async * f(a = yield) { +>f : Symbol(C7.f, Decl(yieldInParameterInitializerIsError.ts, 0, 10)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14)) + } +} +=== nestedAsyncGeneratorIsOk.ts === +class C8 { +>C8 : Symbol(C8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C8.f, Decl(nestedAsyncGeneratorIsOk.ts, 0, 10)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 1, 17)) + } + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +class C9 { +>C9 : Symbol(C9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C9.f, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 10)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 1, 17)) + } + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +class C10 { +>C10 : Symbol(C10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C10.f, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 11)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 13)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 17)) + + }; + } +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +class C11 { +>C11 : Symbol(C11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C11.f, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 11)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 1, 17)) + } + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +class C12 { +>C12 : Symbol(C12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C12.f, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 11)) + + const x = function await() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 13)) +>await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 17)) + + }; + } +} +=== yieldIsOk.ts === +class C13 { +>C13 : Symbol(C13, Decl(yieldIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C13.f, Decl(yieldIsOk.ts, 0, 11)) + + yield; + } +} +=== yieldWithValueIsOk.ts === +class C14 { +>C14 : Symbol(C14, Decl(yieldWithValueIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C14.f, Decl(yieldWithValueIsOk.ts, 0, 11)) + + yield 1; + } +} +=== yieldStarMissingValueIsError.ts === +class C15 { +>C15 : Symbol(C15, Decl(yieldStarMissingValueIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C15.f, Decl(yieldStarMissingValueIsError.ts, 0, 11)) + + yield *; + } +} +=== yieldStarWithValueIsOk.ts === +class C16 { +>C16 : Symbol(C16, Decl(yieldStarWithValueIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C16.f, Decl(yieldStarWithValueIsOk.ts, 0, 11)) + + yield * []; + } +} +=== awaitWithValueIsOk.ts === +class C17 { +>C17 : Symbol(C17, Decl(awaitWithValueIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C17.f, Decl(awaitWithValueIsOk.ts, 0, 11)) + + await 1; + } +} +=== awaitMissingValueIsError.ts === +class C18 { +>C18 : Symbol(C18, Decl(awaitMissingValueIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C18.f, Decl(awaitMissingValueIsError.ts, 0, 11)) + + await; + } +} +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +class C19 { +>C19 : Symbol(C19, Decl(awaitAsTypeIsOk.ts, 0, 18)) + + async * f() { +>f : Symbol(C19.f, Decl(awaitAsTypeIsOk.ts, 1, 11)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 3, 11)) +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + } +} +=== yieldAsTypeIsStrictError.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0)) + +class C20 { +>C20 : Symbol(C20, Decl(yieldAsTypeIsStrictError.ts, 0, 18)) + + async * f() { +>f : Symbol(C20.f, Decl(yieldAsTypeIsStrictError.ts, 1, 11)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsStrictError.ts, 3, 11)) +>yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0)) + } +} +=== yieldInClassComputedPropertyIsError.ts === +class C21 { +>C21 : Symbol(C21, Decl(yieldInClassComputedPropertyIsError.ts, 0, 0)) + + async * [yield]() { +>[yield] : Symbol(C21[yield], Decl(yieldInClassComputedPropertyIsError.ts, 0, 11)) + } +} +=== yieldInNestedComputedPropertyIsOk.ts === +class C22 { +>C22 : Symbol(C22, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C22.f, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 11)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 13)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19)) + } +} +=== asyncGeneratorGetAccessorIsError.ts === +class C23 { +>C23 : Symbol(C23, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 0)) + + async * get x() { +>get : Symbol(C23.get, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 11)) +>x : Symbol(C23.x, Decl(asyncGeneratorGetAccessorIsError.ts, 1, 15)) + + return 1; + } +} +=== asyncGeneratorSetAccessorIsError.ts === +class C24 { +>C24 : Symbol(C24, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 0)) + + async * set x(value: number) { +>set : Symbol(C24.set, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 11)) +>x : Symbol(C24.x, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 15)) +>value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18)) + } +} +=== asyncGeneratorPropertyIsError.ts === +class C25 { +>C25 : Symbol(C25, Decl(asyncGeneratorPropertyIsError.ts, 0, 0)) + + async * x = 1; +>x : Symbol(C25.x, Decl(asyncGeneratorPropertyIsError.ts, 0, 11)) +>1 : Symbol(C25[1], Decl(asyncGeneratorPropertyIsError.ts, 1, 15)) +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).types b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).types new file mode 100644 index 0000000000000..1aa65a69c8cd4 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=false).types @@ -0,0 +1,371 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// + +=== methodIsOk.ts === +class C1 { +>C1 : C1 +> : ^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== awaitMethodNameIsOk.ts === +class C2 { +>C2 : C2 +> : ^^ + + async * await() { +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== yieldMethodNameIsOk.ts === +class C3 { +>C3 : C3 +> : ^^ + + async * yield() { +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== awaitParameterIsError.ts === +class C4 { +>C4 : C4 +> : ^^ + + async * f(await) { +>f : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ + } +} +=== yieldParameterIsError.ts === +class C5 { +>C5 : C5 +> : ^^ + + async * f(yield) { +>f : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + } +} +=== awaitInParameterInitializerIsError.ts === +class C6 { +>C6 : C6 +> : ^^ + + async * f(a = await 1) { +>f : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +} +=== yieldInParameterInitializerIsError.ts === +class C7 { +>C7 : C7 +> : ^^ + + async * f(a = yield) { +>f : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ + } +} +=== nestedAsyncGeneratorIsOk.ts === +class C8 { +>C8 : C8 +> : ^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +class C9 { +>C9 : C9 +> : ^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +class C10 { +>C10 : C10 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; + } +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +class C11 { +>C11 : C11 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +class C12 { +>C12 : C12 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function await() { +>x : () => void +> : ^^^^^^^^^^ +>function await() { } : () => void +> : ^^^^^^^^^^ +>await : () => void +> : ^^^^^^^^^^ + + }; + } +} +=== yieldIsOk.ts === +class C13 { +>C13 : C13 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ + } +} +=== yieldWithValueIsOk.ts === +class C14 { +>C14 : C14 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ + } +} +=== yieldStarMissingValueIsError.ts === +class C15 { +>C15 : C15 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ + } +} +=== yieldStarWithValueIsOk.ts === +class C16 { +>C16 : C16 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + } +} +=== awaitWithValueIsOk.ts === +class C17 { +>C17 : C17 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +} +=== awaitMissingValueIsError.ts === +class C18 { +>C18 : C18 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ + } +} +=== awaitAsTypeIsOk.ts === +interface await {} +class C19 { +>C19 : C19 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ + } +} +=== yieldAsTypeIsStrictError.ts === +interface yield {} +class C20 { +>C20 : C20 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ + } +} +=== yieldInClassComputedPropertyIsError.ts === +class C21 { +>C21 : C21 +> : ^^^ + + async * [yield]() { +>[yield] : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + } +} +=== yieldInNestedComputedPropertyIsOk.ts === +class C22 { +>C22 : C22 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ + } +} +=== asyncGeneratorGetAccessorIsError.ts === +class C23 { +>C23 : C23 +> : ^^^ + + async * get x() { +>get : () => any +> : ^^^^^^^^^ +>x : () => number +> : ^^^^^^^^^^^^ + + return 1; +>1 : 1 +> : ^ + } +} +=== asyncGeneratorSetAccessorIsError.ts === +class C24 { +>C24 : C24 +> : ^^^ + + async * set x(value: number) { +>set : () => any +> : ^^^^^^^^^ +>x : (value: number) => void +> : ^ ^^ ^^^^^^^^^ +>value : number +> : ^^^^^^ + } +} +=== asyncGeneratorPropertyIsError.ts === +class C25 { +>C25 : C25 +> : ^^^ + + async * x = 1; +>x : () => any +> : ^^^^^^^^^ +>1 : any +> : ^^^ +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).errors.txt b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..3b2d03801b956 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).errors.txt @@ -0,0 +1,200 @@ +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldAsTypeIsStrictError.ts(1,11): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. +yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + class C1 { + async * f() { + } + } +==== awaitMethodNameIsOk.ts (0 errors) ==== + class C2 { + async * await() { + } + } +==== yieldMethodNameIsOk.ts (0 errors) ==== + class C3 { + async * yield() { + } + } +==== awaitParameterIsError.ts (1 errors) ==== + class C4 { + async * f(await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } +==== yieldParameterIsError.ts (1 errors) ==== + class C5 { + async * f(yield) { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + class C6 { + async * f(a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + } +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + class C7 { + async * f(a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + } +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + class C8 { + async * f() { + async function * g() { + } + } + } +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + class C9 { + async * f() { + function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } + } +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + class C10 { + async * f() { + const x = function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + }; + } + } +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + class C11 { + async * f() { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + } +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + class C12 { + async * f() { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + } +==== yieldIsOk.ts (0 errors) ==== + class C13 { + async * f() { + yield; + } + } +==== yieldWithValueIsOk.ts (0 errors) ==== + class C14 { + async * f() { + yield 1; + } + } +==== yieldStarMissingValueIsError.ts (1 errors) ==== + class C15 { + async * f() { + yield *; + ~ +!!! error TS1109: Expression expected. + } + } +==== yieldStarWithValueIsOk.ts (0 errors) ==== + class C16 { + async * f() { + yield * []; + } + } +==== awaitWithValueIsOk.ts (0 errors) ==== + class C17 { + async * f() { + await 1; + } + } +==== awaitMissingValueIsError.ts (1 errors) ==== + class C18 { + async * f() { + await; + ~ +!!! error TS1109: Expression expected. + } + } +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + class C19 { + async * f() { + let x: await; + } + } +==== yieldAsTypeIsStrictError.ts (2 errors) ==== + interface yield {} + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + class C20 { + async * f() { + let x: yield; + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== yieldInClassComputedPropertyIsError.ts (2 errors) ==== + class C21 { + async * [yield]() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~ +!!! error TS2693: 'yield' only refers to a type, but is being used as a value here. + } + } +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + class C22 { + async * f() { + const x = { [yield]: 1 }; + } + } +==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== + class C23 { + async * get x() { + ~ +!!! error TS1005: '(' expected. + return 1; + } + } +==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== + class C24 { + async * set x(value: number) { + ~ +!!! error TS1005: '(' expected. + } + } +==== asyncGeneratorPropertyIsError.ts (1 errors) ==== + class C25 { + async * x = 1; + ~ +!!! error TS1005: '(' expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).symbols b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..61fa90d72959e --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).symbols @@ -0,0 +1,266 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// + +=== methodIsOk.ts === +class C1 { +>C1 : Symbol(C1, Decl(methodIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C1.f, Decl(methodIsOk.ts, 0, 10)) + } +} +=== awaitMethodNameIsOk.ts === +class C2 { +>C2 : Symbol(C2, Decl(awaitMethodNameIsOk.ts, 0, 0)) + + async * await() { +>await : Symbol(C2.await, Decl(awaitMethodNameIsOk.ts, 0, 10)) + } +} +=== yieldMethodNameIsOk.ts === +class C3 { +>C3 : Symbol(C3, Decl(yieldMethodNameIsOk.ts, 0, 0)) + + async * yield() { +>yield : Symbol(C3.yield, Decl(yieldMethodNameIsOk.ts, 0, 10)) + } +} +=== awaitParameterIsError.ts === +class C4 { +>C4 : Symbol(C4, Decl(awaitParameterIsError.ts, 0, 0)) + + async * f(await) { +>f : Symbol(C4.f, Decl(awaitParameterIsError.ts, 0, 10)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 1, 14)) + } +} +=== yieldParameterIsError.ts === +class C5 { +>C5 : Symbol(C5, Decl(yieldParameterIsError.ts, 0, 0)) + + async * f(yield) { +>f : Symbol(C5.f, Decl(yieldParameterIsError.ts, 0, 10)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 1, 14)) + } +} +=== awaitInParameterInitializerIsError.ts === +class C6 { +>C6 : Symbol(C6, Decl(awaitInParameterInitializerIsError.ts, 0, 0)) + + async * f(a = await 1) { +>f : Symbol(C6.f, Decl(awaitInParameterInitializerIsError.ts, 0, 10)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14)) + } +} +=== yieldInParameterInitializerIsError.ts === +class C7 { +>C7 : Symbol(C7, Decl(yieldInParameterInitializerIsError.ts, 0, 0)) + + async * f(a = yield) { +>f : Symbol(C7.f, Decl(yieldInParameterInitializerIsError.ts, 0, 10)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14)) + } +} +=== nestedAsyncGeneratorIsOk.ts === +class C8 { +>C8 : Symbol(C8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C8.f, Decl(nestedAsyncGeneratorIsOk.ts, 0, 10)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 1, 17)) + } + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +class C9 { +>C9 : Symbol(C9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C9.f, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 10)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 1, 17)) + } + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +class C10 { +>C10 : Symbol(C10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C10.f, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 11)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 13)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 17)) + + }; + } +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +class C11 { +>C11 : Symbol(C11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C11.f, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 11)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 1, 17)) + } + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +class C12 { +>C12 : Symbol(C12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C12.f, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 11)) + + const x = function await() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 13)) +>await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 17)) + + }; + } +} +=== yieldIsOk.ts === +class C13 { +>C13 : Symbol(C13, Decl(yieldIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C13.f, Decl(yieldIsOk.ts, 0, 11)) + + yield; + } +} +=== yieldWithValueIsOk.ts === +class C14 { +>C14 : Symbol(C14, Decl(yieldWithValueIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C14.f, Decl(yieldWithValueIsOk.ts, 0, 11)) + + yield 1; + } +} +=== yieldStarMissingValueIsError.ts === +class C15 { +>C15 : Symbol(C15, Decl(yieldStarMissingValueIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C15.f, Decl(yieldStarMissingValueIsError.ts, 0, 11)) + + yield *; + } +} +=== yieldStarWithValueIsOk.ts === +class C16 { +>C16 : Symbol(C16, Decl(yieldStarWithValueIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C16.f, Decl(yieldStarWithValueIsOk.ts, 0, 11)) + + yield * []; + } +} +=== awaitWithValueIsOk.ts === +class C17 { +>C17 : Symbol(C17, Decl(awaitWithValueIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C17.f, Decl(awaitWithValueIsOk.ts, 0, 11)) + + await 1; + } +} +=== awaitMissingValueIsError.ts === +class C18 { +>C18 : Symbol(C18, Decl(awaitMissingValueIsError.ts, 0, 0)) + + async * f() { +>f : Symbol(C18.f, Decl(awaitMissingValueIsError.ts, 0, 11)) + + await; + } +} +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +class C19 { +>C19 : Symbol(C19, Decl(awaitAsTypeIsOk.ts, 0, 18)) + + async * f() { +>f : Symbol(C19.f, Decl(awaitAsTypeIsOk.ts, 1, 11)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 3, 11)) +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + } +} +=== yieldAsTypeIsStrictError.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0)) + +class C20 { +>C20 : Symbol(C20, Decl(yieldAsTypeIsStrictError.ts, 0, 18)) + + async * f() { +>f : Symbol(C20.f, Decl(yieldAsTypeIsStrictError.ts, 1, 11)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsStrictError.ts, 3, 11)) +>yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0)) + } +} +=== yieldInClassComputedPropertyIsError.ts === +class C21 { +>C21 : Symbol(C21, Decl(yieldInClassComputedPropertyIsError.ts, 0, 0)) + + async * [yield]() { +>[yield] : Symbol(C21[yield], Decl(yieldInClassComputedPropertyIsError.ts, 0, 11)) + } +} +=== yieldInNestedComputedPropertyIsOk.ts === +class C22 { +>C22 : Symbol(C22, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0)) + + async * f() { +>f : Symbol(C22.f, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 11)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 13)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19)) + } +} +=== asyncGeneratorGetAccessorIsError.ts === +class C23 { +>C23 : Symbol(C23, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 0)) + + async * get x() { +>get : Symbol(C23.get, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 11)) +>x : Symbol(C23.x, Decl(asyncGeneratorGetAccessorIsError.ts, 1, 15)) + + return 1; + } +} +=== asyncGeneratorSetAccessorIsError.ts === +class C24 { +>C24 : Symbol(C24, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 0)) + + async * set x(value: number) { +>set : Symbol(C24.set, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 11)) +>x : Symbol(C24.x, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 15)) +>value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18)) + } +} +=== asyncGeneratorPropertyIsError.ts === +class C25 { +>C25 : Symbol(C25, Decl(asyncGeneratorPropertyIsError.ts, 0, 0)) + + async * x = 1; +>x : Symbol(C25.x, Decl(asyncGeneratorPropertyIsError.ts, 0, 11)) +>1 : Symbol(C25[1], Decl(asyncGeneratorPropertyIsError.ts, 1, 15)) +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).types b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).types new file mode 100644 index 0000000000000..1aa65a69c8cd4 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018(alwaysstrict=true).types @@ -0,0 +1,371 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// + +=== methodIsOk.ts === +class C1 { +>C1 : C1 +> : ^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== awaitMethodNameIsOk.ts === +class C2 { +>C2 : C2 +> : ^^ + + async * await() { +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== yieldMethodNameIsOk.ts === +class C3 { +>C3 : C3 +> : ^^ + + async * yield() { +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== awaitParameterIsError.ts === +class C4 { +>C4 : C4 +> : ^^ + + async * f(await) { +>f : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ + } +} +=== yieldParameterIsError.ts === +class C5 { +>C5 : C5 +> : ^^ + + async * f(yield) { +>f : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + } +} +=== awaitInParameterInitializerIsError.ts === +class C6 { +>C6 : C6 +> : ^^ + + async * f(a = await 1) { +>f : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +} +=== yieldInParameterInitializerIsError.ts === +class C7 { +>C7 : C7 +> : ^^ + + async * f(a = yield) { +>f : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ + } +} +=== nestedAsyncGeneratorIsOk.ts === +class C8 { +>C8 : C8 +> : ^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +class C9 { +>C9 : C9 +> : ^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +class C10 { +>C10 : C10 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; + } +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +class C11 { +>C11 : C11 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +class C12 { +>C12 : C12 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function await() { +>x : () => void +> : ^^^^^^^^^^ +>function await() { } : () => void +> : ^^^^^^^^^^ +>await : () => void +> : ^^^^^^^^^^ + + }; + } +} +=== yieldIsOk.ts === +class C13 { +>C13 : C13 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ + } +} +=== yieldWithValueIsOk.ts === +class C14 { +>C14 : C14 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ + } +} +=== yieldStarMissingValueIsError.ts === +class C15 { +>C15 : C15 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ + } +} +=== yieldStarWithValueIsOk.ts === +class C16 { +>C16 : C16 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + } +} +=== awaitWithValueIsOk.ts === +class C17 { +>C17 : C17 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +} +=== awaitMissingValueIsError.ts === +class C18 { +>C18 : C18 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ + } +} +=== awaitAsTypeIsOk.ts === +interface await {} +class C19 { +>C19 : C19 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ + } +} +=== yieldAsTypeIsStrictError.ts === +interface yield {} +class C20 { +>C20 : C20 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ + } +} +=== yieldInClassComputedPropertyIsError.ts === +class C21 { +>C21 : C21 +> : ^^^ + + async * [yield]() { +>[yield] : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + } +} +=== yieldInNestedComputedPropertyIsOk.ts === +class C22 { +>C22 : C22 +> : ^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ + } +} +=== asyncGeneratorGetAccessorIsError.ts === +class C23 { +>C23 : C23 +> : ^^^ + + async * get x() { +>get : () => any +> : ^^^^^^^^^ +>x : () => number +> : ^^^^^^^^^^^^ + + return 1; +>1 : 1 +> : ^ + } +} +=== asyncGeneratorSetAccessorIsError.ts === +class C24 { +>C24 : C24 +> : ^^^ + + async * set x(value: number) { +>set : () => any +> : ^^^^^^^^^ +>x : (value: number) => void +> : ^ ^^ ^^^^^^^^^ +>value : number +> : ^^^^^^ + } +} +=== asyncGeneratorPropertyIsError.ts === +class C25 { +>C25 : C25 +> : ^^^ + + async * x = 1; +>x : () => any +> : ^^^^^^^^^ +>1 : any +> : ^^^ +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt index cfd5b716ff941..8241f0bb2837c 100644 --- a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. @@ -16,6 +17,7 @@ yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== methodIsOk.ts (0 errors) ==== class C1 { async * f() { diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..c2ed90eace221 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).errors.txt @@ -0,0 +1,117 @@ +awaitInParameterInitializerIsError.ts(1,25): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. +awaitParameterIsError.ts(1,21): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldInParameterInitializerIsError.ts(1,25): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(1,21): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. + + +==== functionDeclarationIsOk.ts (0 errors) ==== + async function * f1() { + } +==== awaitNameIsOk.ts (0 errors) ==== + async function * await() { + } +==== yieldNameIsOk.ts (0 errors) ==== + async function * yield() { + } +==== awaitParameterIsError.ts (1 errors) ==== + async function * f4(await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } +==== yieldParameterIsError.ts (1 errors) ==== + async function * f5(yield) { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + async function * f6(a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + async function * f7(a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + async function * f8() { + async function * g() { + } + } +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + async function * f9() { + function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + } +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + async function * f10() { + const x = function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; + } +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + async function * f11() { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + async function * f12() { + const x = function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; + } +==== yieldIsOk.ts (0 errors) ==== + async function * f13() { + yield; + } +==== yieldWithValueIsOk.ts (0 errors) ==== + async function * f14() { + yield 1; + } +==== yieldStarMissingValueIsError.ts (1 errors) ==== + async function * f15() { + yield *; + ~ +!!! error TS1109: Expression expected. + } +==== yieldStarWithValueIsOk.ts (0 errors) ==== + async function * f16() { + yield * []; + } +==== awaitWithValueIsOk.ts (0 errors) ==== + async function * f17() { + await 1; + } +==== awaitMissingValueIsError.ts (1 errors) ==== + async function * f18() { + await; + ~ +!!! error TS1109: Expression expected. + } +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + async function * f19() { + let x: await; + } +==== yieldAsTypeIsOk.ts (0 errors) ==== + interface yield {} + async function * f20() { + let x: yield; + } +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + async function * f21() { + const x = { [yield]: 1 }; + } + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).symbols b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..a09eca527125d --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).symbols @@ -0,0 +1,145 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts] //// + +=== functionDeclarationIsOk.ts === +async function * f1() { +>f1 : Symbol(f1, Decl(functionDeclarationIsOk.ts, 0, 0)) +} +=== awaitNameIsOk.ts === +async function * await() { +>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) +} +=== yieldNameIsOk.ts === +async function * yield() { +>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) +} +=== awaitParameterIsError.ts === +async function * f4(await) { +>f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 0)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 0, 20)) +} +=== yieldParameterIsError.ts === +async function * f5(yield) { +>f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 0)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 0, 20)) +} +=== awaitInParameterInitializerIsError.ts === +async function * f6(a = await 1) { +>f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 0)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 20)) +} +=== yieldInParameterInitializerIsError.ts === +async function * f7(a = yield) { +>f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 0)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 20)) +} +=== nestedAsyncGeneratorIsOk.ts === +async function * f8() { +>f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 23)) + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +async function * f9() { +>f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 23)) + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +async function * f10() { +>f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 9)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 13)) + + }; +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +async function * f11() { +>f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 24)) + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +async function * f12() { +>f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 9)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 13)) + + }; +} +=== yieldIsOk.ts === +async function * f13() { +>f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 0)) + + yield; +} +=== yieldWithValueIsOk.ts === +async function * f14() { +>f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 0)) + + yield 1; +} +=== yieldStarMissingValueIsError.ts === +async function * f15() { +>f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 0)) + + yield *; +} +=== yieldStarWithValueIsOk.ts === +async function * f16() { +>f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 0)) + + yield * []; +} +=== awaitWithValueIsOk.ts === +async function * f17() { +>f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 0)) + + await 1; +} +=== awaitMissingValueIsError.ts === +async function * f18() { +>f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 0)) + + await; +} +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) + +async function * f19() { +>f19 : Symbol(f19, Decl(awaitAsTypeIsOk.ts, 0, 18)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 2, 7)) +>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) +} +=== yieldAsTypeIsOk.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) + +async function * f20() { +>f20 : Symbol(f20, Decl(yieldAsTypeIsOk.ts, 0, 18)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 2, 7)) +>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) +} +=== yieldInNestedComputedPropertyIsOk.ts === +async function * f21() { +>f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 9)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 15)) +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).types b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).types new file mode 100644 index 0000000000000..8b708f94c95a6 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=false).types @@ -0,0 +1,213 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts] //// + +=== functionDeclarationIsOk.ts === +async function * f1() { +>f1 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +=== awaitNameIsOk.ts === +async function * await() { +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +=== yieldNameIsOk.ts === +async function * yield() { +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +=== awaitParameterIsError.ts === +async function * f4(await) { +>f4 : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ +} +=== yieldParameterIsError.ts === +async function * f5(yield) { +>f5 : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ +} +=== awaitInParameterInitializerIsError.ts === +async function * f6(a = await 1) { +>f6 : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ +} +=== yieldInParameterInitializerIsError.ts === +async function * f7(a = yield) { +>f7 : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ +} +=== nestedAsyncGeneratorIsOk.ts === +async function * f8() { +>f8 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +async function * f9() { +>f9 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +async function * f10() { +>f10 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +async function * f11() { +>f11 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +async function * f12() { +>f12 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; +} +=== yieldIsOk.ts === +async function * f13() { +>f13 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ +} +=== yieldWithValueIsOk.ts === +async function * f14() { +>f14 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ +} +=== yieldStarMissingValueIsError.ts === +async function * f15() { +>f15 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ +} +=== yieldStarWithValueIsOk.ts === +async function * f16() { +>f16 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ +} +=== awaitWithValueIsOk.ts === +async function * f17() { +>f17 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ +} +=== awaitMissingValueIsError.ts === +async function * f18() { +>f18 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ +} +=== awaitAsTypeIsOk.ts === +interface await {} +async function * f19() { +>f19 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ +} +=== yieldAsTypeIsOk.ts === +interface yield {} +async function * f20() { +>f20 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ +} +=== yieldInNestedComputedPropertyIsOk.ts === +async function * f21() { +>f21 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..7a90af94f3d97 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).errors.txt @@ -0,0 +1,126 @@ +awaitInParameterInitializerIsError.ts(1,25): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. +awaitParameterIsError.ts(1,21): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldAsTypeIsOk.ts(1,11): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldAsTypeIsOk.ts(3,12): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldInParameterInitializerIsError.ts(1,25): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldNameIsOk.ts(1,18): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldParameterIsError.ts(1,21): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. + + +==== functionDeclarationIsOk.ts (0 errors) ==== + async function * f1() { + } +==== awaitNameIsOk.ts (0 errors) ==== + async function * await() { + } +==== yieldNameIsOk.ts (1 errors) ==== + async function * yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } +==== awaitParameterIsError.ts (1 errors) ==== + async function * f4(await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } +==== yieldParameterIsError.ts (1 errors) ==== + async function * f5(yield) { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + async function * f6(a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + async function * f7(a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + async function * f8() { + async function * g() { + } + } +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + async function * f9() { + function yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } + } +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + async function * f10() { + const x = function yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + }; + } +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + async function * f11() { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + async function * f12() { + const x = function yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + }; + } +==== yieldIsOk.ts (0 errors) ==== + async function * f13() { + yield; + } +==== yieldWithValueIsOk.ts (0 errors) ==== + async function * f14() { + yield 1; + } +==== yieldStarMissingValueIsError.ts (1 errors) ==== + async function * f15() { + yield *; + ~ +!!! error TS1109: Expression expected. + } +==== yieldStarWithValueIsOk.ts (0 errors) ==== + async function * f16() { + yield * []; + } +==== awaitWithValueIsOk.ts (0 errors) ==== + async function * f17() { + await 1; + } +==== awaitMissingValueIsError.ts (1 errors) ==== + async function * f18() { + await; + ~ +!!! error TS1109: Expression expected. + } +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + async function * f19() { + let x: await; + } +==== yieldAsTypeIsOk.ts (2 errors) ==== + interface yield {} + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + async function * f20() { + let x: yield; + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + async function * f21() { + const x = { [yield]: 1 }; + } + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).symbols b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..a09eca527125d --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).symbols @@ -0,0 +1,145 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts] //// + +=== functionDeclarationIsOk.ts === +async function * f1() { +>f1 : Symbol(f1, Decl(functionDeclarationIsOk.ts, 0, 0)) +} +=== awaitNameIsOk.ts === +async function * await() { +>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) +} +=== yieldNameIsOk.ts === +async function * yield() { +>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) +} +=== awaitParameterIsError.ts === +async function * f4(await) { +>f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 0)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 0, 20)) +} +=== yieldParameterIsError.ts === +async function * f5(yield) { +>f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 0)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 0, 20)) +} +=== awaitInParameterInitializerIsError.ts === +async function * f6(a = await 1) { +>f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 0)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 20)) +} +=== yieldInParameterInitializerIsError.ts === +async function * f7(a = yield) { +>f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 0)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 20)) +} +=== nestedAsyncGeneratorIsOk.ts === +async function * f8() { +>f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 23)) + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +async function * f9() { +>f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 23)) + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +async function * f10() { +>f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 9)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 13)) + + }; +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +async function * f11() { +>f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 24)) + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +async function * f12() { +>f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 9)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 13)) + + }; +} +=== yieldIsOk.ts === +async function * f13() { +>f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 0)) + + yield; +} +=== yieldWithValueIsOk.ts === +async function * f14() { +>f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 0)) + + yield 1; +} +=== yieldStarMissingValueIsError.ts === +async function * f15() { +>f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 0)) + + yield *; +} +=== yieldStarWithValueIsOk.ts === +async function * f16() { +>f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 0)) + + yield * []; +} +=== awaitWithValueIsOk.ts === +async function * f17() { +>f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 0)) + + await 1; +} +=== awaitMissingValueIsError.ts === +async function * f18() { +>f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 0)) + + await; +} +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) + +async function * f19() { +>f19 : Symbol(f19, Decl(awaitAsTypeIsOk.ts, 0, 18)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 2, 7)) +>await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) +} +=== yieldAsTypeIsOk.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) + +async function * f20() { +>f20 : Symbol(f20, Decl(yieldAsTypeIsOk.ts, 0, 18)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 2, 7)) +>yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) +} +=== yieldInNestedComputedPropertyIsOk.ts === +async function * f21() { +>f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 9)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 15)) +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).types b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).types new file mode 100644 index 0000000000000..8b708f94c95a6 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018(alwaysstrict=true).types @@ -0,0 +1,213 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts] //// + +=== functionDeclarationIsOk.ts === +async function * f1() { +>f1 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +=== awaitNameIsOk.ts === +async function * await() { +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +=== yieldNameIsOk.ts === +async function * yield() { +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} +=== awaitParameterIsError.ts === +async function * f4(await) { +>f4 : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ +} +=== yieldParameterIsError.ts === +async function * f5(yield) { +>f5 : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ +} +=== awaitInParameterInitializerIsError.ts === +async function * f6(a = await 1) { +>f6 : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ +} +=== yieldInParameterInitializerIsError.ts === +async function * f7(a = yield) { +>f7 : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ +} +=== nestedAsyncGeneratorIsOk.ts === +async function * f8() { +>f8 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +} +=== nestedFunctionDeclarationNamedYieldIsError.ts === +async function * f9() { +>f9 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } +} +=== nestedFunctionExpressionNamedYieldIsError.ts === +async function * f10() { +>f10 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; +} +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +async function * f11() { +>f11 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } +} +=== nestedFunctionExpressionNamedAwaitIsError.ts === +async function * f12() { +>f12 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; +} +=== yieldIsOk.ts === +async function * f13() { +>f13 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ +} +=== yieldWithValueIsOk.ts === +async function * f14() { +>f14 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ +} +=== yieldStarMissingValueIsError.ts === +async function * f15() { +>f15 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ +} +=== yieldStarWithValueIsOk.ts === +async function * f16() { +>f16 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ +} +=== awaitWithValueIsOk.ts === +async function * f17() { +>f17 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ +} +=== awaitMissingValueIsError.ts === +async function * f18() { +>f18 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ +} +=== awaitAsTypeIsOk.ts === +interface await {} +async function * f19() { +>f19 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ +} +=== yieldAsTypeIsOk.ts === +interface yield {} +async function * f20() { +>f20 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ +} +=== yieldInNestedComputedPropertyIsOk.ts === +async function * f21() { +>f21 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ +} + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt index c2ed90eace221..f64ec4e397a6f 100644 --- a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. awaitInParameterInitializerIsError.ts(1,25): error TS2524: 'await' expressions cannot be used in a parameter initializer. awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. awaitParameterIsError.ts(1,21): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. @@ -10,6 +11,7 @@ yieldParameterIsError.ts(1,21): error TS1359: Identifier expected. 'yield' is a yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== functionDeclarationIsOk.ts (0 errors) ==== async function * f1() { } diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..87e4127bc8816 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).errors.txt @@ -0,0 +1,123 @@ +awaitInParameterInitializerIsError.ts(1,34): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. +awaitNameIsError.ts(1,29): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +awaitParameterIsError.ts(1,30): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldInParameterInitializerIsError.ts(1,34): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldNameIsError.ts(1,29): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldParameterIsError.ts(1,30): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. + + +==== functionExpressionIsOk.ts (0 errors) ==== + const f1 = async function * f() { + }; +==== awaitNameIsError.ts (1 errors) ==== + const f2 = async function * await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; +==== yieldNameIsError.ts (1 errors) ==== + const f3 = async function * yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; +==== awaitParameterIsError.ts (1 errors) ==== + const f4 = async function * (await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; +==== yieldParameterIsError.ts (1 errors) ==== + const f5 = async function * (yield) { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + const f6 = async function * (a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + }; +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + const f7 = async function * (a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + }; +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + const f8 = async function * () { + async function * g() { + } + }; +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + const f9 = async function * () { + function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + }; +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + const f10 = async function * () { + const x = function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; + }; +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + const f11 = async function * () { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + }; +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + const f12 = async function * () { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + }; +==== yieldIsOk.ts (0 errors) ==== + const f13 = async function * () { + yield; + }; +==== yieldWithValueIsOk.ts (0 errors) ==== + const f14 = async function * () { + yield 1; + }; +==== yieldStarMissingValueIsError.ts (1 errors) ==== + const f15 = async function * () { + yield *; + ~ +!!! error TS1109: Expression expected. + }; +==== yieldStarWithValueIsOk.ts (0 errors) ==== + const f16 = async function * () { + yield * []; + }; +==== awaitWithValueIsOk.ts (0 errors) ==== + const f17 = async function * () { + await 1; + }; +==== awaitMissingValueIsError.ts (1 errors) ==== + const f18 = async function * () { + await; + ~ +!!! error TS1109: Expression expected. + }; +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + const f19 = async function * () { + let x: await; + }; +==== yieldAsTypeIsOk.ts (0 errors) ==== + interface yield {} + const f20 = async function * () { + let x: yield; + }; +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + const f21 = async function *() { + const x = { [yield]: 1 }; + }; + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).symbols b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..358adceb0febe --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).symbols @@ -0,0 +1,158 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts] //// + +=== functionExpressionIsOk.ts === +const f1 = async function * f() { +>f1 : Symbol(f1, Decl(functionExpressionIsOk.ts, 0, 5)) +>f : Symbol(f, Decl(functionExpressionIsOk.ts, 0, 10)) + +}; +=== awaitNameIsError.ts === +const f2 = async function * await() { +>f2 : Symbol(f2, Decl(awaitNameIsError.ts, 0, 5)) +>await : Symbol(await, Decl(awaitNameIsError.ts, 0, 10)) + +}; +=== yieldNameIsError.ts === +const f3 = async function * yield() { +>f3 : Symbol(f3, Decl(yieldNameIsError.ts, 0, 5)) +>yield : Symbol(yield, Decl(yieldNameIsError.ts, 0, 10)) + +}; +=== awaitParameterIsError.ts === +const f4 = async function * (await) { +>f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 5)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 0, 29)) + +}; +=== yieldParameterIsError.ts === +const f5 = async function * (yield) { +>f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 5)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 0, 29)) + +}; +=== awaitInParameterInitializerIsError.ts === +const f6 = async function * (a = await 1) { +>f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 5)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 29)) + +}; +=== yieldInParameterInitializerIsError.ts === +const f7 = async function * (a = yield) { +>f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 5)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 29)) + +}; +=== nestedAsyncGeneratorIsOk.ts === +const f8 = async function * () { +>f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 32)) + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const f9 = async function * () { +>f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 32)) + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const f10 = async function * () { +>f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 9)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 13)) + + }; +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const f11 = async function * () { +>f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 33)) + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const f12 = async function * () { +>f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5)) + + const x = function await() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 9)) +>await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 13)) + + }; +}; +=== yieldIsOk.ts === +const f13 = async function * () { +>f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 5)) + + yield; +}; +=== yieldWithValueIsOk.ts === +const f14 = async function * () { +>f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 5)) + + yield 1; +}; +=== yieldStarMissingValueIsError.ts === +const f15 = async function * () { +>f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 5)) + + yield *; +}; +=== yieldStarWithValueIsOk.ts === +const f16 = async function * () { +>f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 5)) + + yield * []; +}; +=== awaitWithValueIsOk.ts === +const f17 = async function * () { +>f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 5)) + + await 1; +}; +=== awaitMissingValueIsError.ts === +const f18 = async function * () { +>f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 5)) + + await; +}; +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +const f19 = async function * () { +>f19 : Symbol(f19, Decl(awaitAsTypeIsOk.ts, 1, 5)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 2, 7)) +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + +const f20 = async function * () { +>f20 : Symbol(f20, Decl(yieldAsTypeIsOk.ts, 1, 5)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 2, 7)) +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const f21 = async function *() { +>f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 9)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 15)) + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).types b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).types new file mode 100644 index 0000000000000..036bdb2f62b80 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=false).types @@ -0,0 +1,277 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts] //// + +=== functionExpressionIsOk.ts === +const f1 = async function * f() { +>f1 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * f() {} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +}; +=== awaitNameIsError.ts === +const f2 = async function * await() { +>f2 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * await() {} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +}; +=== yieldNameIsError.ts === +const f3 = async function * yield() { +>f3 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * yield() {} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +}; +=== awaitParameterIsError.ts === +const f4 = async function * (await) { +>f4 : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (await) {} : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ + +}; +=== yieldParameterIsError.ts === +const f5 = async function * (yield) { +>f5 : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (yield) {} : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + +}; +=== awaitInParameterInitializerIsError.ts === +const f6 = async function * (a = await 1) { +>f6 : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (a = await 1) {} : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + +}; +=== yieldInParameterInitializerIsError.ts === +const f7 = async function * (a = yield) { +>f7 : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (a = yield) {} : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ + +}; +=== nestedAsyncGeneratorIsOk.ts === +const f8 = async function * () { +>f8 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { async function * g() { }} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const f9 = async function * () { +>f9 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { function yield() { }} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const f10 = async function * () { +>f10 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { const x = function yield() { };} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const f11 = async function * () { +>f11 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { function await() { }} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const f12 = async function * () { +>f12 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { const x = function await() { };} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function await() { +>x : () => void +> : ^^^^^^^^^^ +>function await() { } : () => void +> : ^^^^^^^^^^ +>await : () => void +> : ^^^^^^^^^^ + + }; +}; +=== yieldIsOk.ts === +const f13 = async function * () { +>f13 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ + +}; +=== yieldWithValueIsOk.ts === +const f14 = async function * () { +>f14 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield 1;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ + +}; +=== yieldStarMissingValueIsError.ts === +const f15 = async function * () { +>f15 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield *;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ + +}; +=== yieldStarWithValueIsOk.ts === +const f16 = async function * () { +>f16 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield * [];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + +}; +=== awaitWithValueIsOk.ts === +const f17 = async function * () { +>f17 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { await 1;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + +}; +=== awaitMissingValueIsError.ts === +const f18 = async function * () { +>f18 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { await;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ + +}; +=== awaitAsTypeIsOk.ts === +interface await {} +const f19 = async function * () { +>f19 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { let x: await;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ + +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +const f20 = async function * () { +>f20 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { let x: yield;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ + +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const f21 = async function *() { +>f21 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function *() { const x = { [yield]: 1 };} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..1479b8abf37f9 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).errors.txt @@ -0,0 +1,129 @@ +awaitInParameterInitializerIsError.ts(1,34): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. +awaitNameIsError.ts(1,29): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +awaitParameterIsError.ts(1,30): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldAsTypeIsOk.ts(1,11): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldAsTypeIsOk.ts(3,12): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldInParameterInitializerIsError.ts(1,34): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldNameIsError.ts(1,29): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldParameterIsError.ts(1,30): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. + + +==== functionExpressionIsOk.ts (0 errors) ==== + const f1 = async function * f() { + }; +==== awaitNameIsError.ts (1 errors) ==== + const f2 = async function * await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; +==== yieldNameIsError.ts (1 errors) ==== + const f3 = async function * yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + }; +==== awaitParameterIsError.ts (1 errors) ==== + const f4 = async function * (await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; +==== yieldParameterIsError.ts (1 errors) ==== + const f5 = async function * (yield) { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + }; +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + const f6 = async function * (a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + }; +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + const f7 = async function * (a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + }; +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + const f8 = async function * () { + async function * g() { + } + }; +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + const f9 = async function * () { + function yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } + }; +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + const f10 = async function * () { + const x = function yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + }; + }; +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + const f11 = async function * () { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + }; +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + const f12 = async function * () { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + }; +==== yieldIsOk.ts (0 errors) ==== + const f13 = async function * () { + yield; + }; +==== yieldWithValueIsOk.ts (0 errors) ==== + const f14 = async function * () { + yield 1; + }; +==== yieldStarMissingValueIsError.ts (1 errors) ==== + const f15 = async function * () { + yield *; + ~ +!!! error TS1109: Expression expected. + }; +==== yieldStarWithValueIsOk.ts (0 errors) ==== + const f16 = async function * () { + yield * []; + }; +==== awaitWithValueIsOk.ts (0 errors) ==== + const f17 = async function * () { + await 1; + }; +==== awaitMissingValueIsError.ts (1 errors) ==== + const f18 = async function * () { + await; + ~ +!!! error TS1109: Expression expected. + }; +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + const f19 = async function * () { + let x: await; + }; +==== yieldAsTypeIsOk.ts (2 errors) ==== + interface yield {} + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + const f20 = async function * () { + let x: yield; + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + }; +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + const f21 = async function *() { + const x = { [yield]: 1 }; + }; + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).symbols b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..358adceb0febe --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).symbols @@ -0,0 +1,158 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts] //// + +=== functionExpressionIsOk.ts === +const f1 = async function * f() { +>f1 : Symbol(f1, Decl(functionExpressionIsOk.ts, 0, 5)) +>f : Symbol(f, Decl(functionExpressionIsOk.ts, 0, 10)) + +}; +=== awaitNameIsError.ts === +const f2 = async function * await() { +>f2 : Symbol(f2, Decl(awaitNameIsError.ts, 0, 5)) +>await : Symbol(await, Decl(awaitNameIsError.ts, 0, 10)) + +}; +=== yieldNameIsError.ts === +const f3 = async function * yield() { +>f3 : Symbol(f3, Decl(yieldNameIsError.ts, 0, 5)) +>yield : Symbol(yield, Decl(yieldNameIsError.ts, 0, 10)) + +}; +=== awaitParameterIsError.ts === +const f4 = async function * (await) { +>f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 5)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 0, 29)) + +}; +=== yieldParameterIsError.ts === +const f5 = async function * (yield) { +>f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 5)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 0, 29)) + +}; +=== awaitInParameterInitializerIsError.ts === +const f6 = async function * (a = await 1) { +>f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 5)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 29)) + +}; +=== yieldInParameterInitializerIsError.ts === +const f7 = async function * (a = yield) { +>f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 5)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 29)) + +}; +=== nestedAsyncGeneratorIsOk.ts === +const f8 = async function * () { +>f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 32)) + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const f9 = async function * () { +>f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 32)) + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const f10 = async function * () { +>f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 9)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 13)) + + }; +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const f11 = async function * () { +>f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 33)) + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const f12 = async function * () { +>f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5)) + + const x = function await() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 9)) +>await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 13)) + + }; +}; +=== yieldIsOk.ts === +const f13 = async function * () { +>f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 5)) + + yield; +}; +=== yieldWithValueIsOk.ts === +const f14 = async function * () { +>f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 5)) + + yield 1; +}; +=== yieldStarMissingValueIsError.ts === +const f15 = async function * () { +>f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 5)) + + yield *; +}; +=== yieldStarWithValueIsOk.ts === +const f16 = async function * () { +>f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 5)) + + yield * []; +}; +=== awaitWithValueIsOk.ts === +const f17 = async function * () { +>f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 5)) + + await 1; +}; +=== awaitMissingValueIsError.ts === +const f18 = async function * () { +>f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 5)) + + await; +}; +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +const f19 = async function * () { +>f19 : Symbol(f19, Decl(awaitAsTypeIsOk.ts, 1, 5)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 2, 7)) +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + +const f20 = async function * () { +>f20 : Symbol(f20, Decl(yieldAsTypeIsOk.ts, 1, 5)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 2, 7)) +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const f21 = async function *() { +>f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 9)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 15)) + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).types b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).types new file mode 100644 index 0000000000000..036bdb2f62b80 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018(alwaysstrict=true).types @@ -0,0 +1,277 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts] //// + +=== functionExpressionIsOk.ts === +const f1 = async function * f() { +>f1 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * f() {} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +}; +=== awaitNameIsError.ts === +const f2 = async function * await() { +>f2 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * await() {} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +}; +=== yieldNameIsError.ts === +const f3 = async function * yield() { +>f3 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * yield() {} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +}; +=== awaitParameterIsError.ts === +const f4 = async function * (await) { +>f4 : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (await) {} : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ + +}; +=== yieldParameterIsError.ts === +const f5 = async function * (yield) { +>f5 : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (yield) {} : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + +}; +=== awaitInParameterInitializerIsError.ts === +const f6 = async function * (a = await 1) { +>f6 : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (a = await 1) {} : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + +}; +=== yieldInParameterInitializerIsError.ts === +const f7 = async function * (a = yield) { +>f7 : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * (a = yield) {} : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ + +}; +=== nestedAsyncGeneratorIsOk.ts === +const f8 = async function * () { +>f8 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { async function * g() { }} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const f9 = async function * () { +>f9 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { function yield() { }} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const f10 = async function * () { +>f10 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { const x = function yield() { };} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const f11 = async function * () { +>f11 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { function await() { }} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const f12 = async function * () { +>f12 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { const x = function await() { };} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function await() { +>x : () => void +> : ^^^^^^^^^^ +>function await() { } : () => void +> : ^^^^^^^^^^ +>await : () => void +> : ^^^^^^^^^^ + + }; +}; +=== yieldIsOk.ts === +const f13 = async function * () { +>f13 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ + +}; +=== yieldWithValueIsOk.ts === +const f14 = async function * () { +>f14 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield 1;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ + +}; +=== yieldStarMissingValueIsError.ts === +const f15 = async function * () { +>f15 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield *;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ + +}; +=== yieldStarWithValueIsOk.ts === +const f16 = async function * () { +>f16 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield * [];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + +}; +=== awaitWithValueIsOk.ts === +const f17 = async function * () { +>f17 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { await 1;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + +}; +=== awaitMissingValueIsError.ts === +const f18 = async function * () { +>f18 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { await;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ + +}; +=== awaitAsTypeIsOk.ts === +interface await {} +const f19 = async function * () { +>f19 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { let x: await;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ + +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +const f20 = async function * () { +>f20 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { let x: yield;} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ + +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const f21 = async function *() { +>f21 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function *() { const x = { [yield]: 1 };} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt index 87e4127bc8816..804359b2535df 100644 --- a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. awaitInParameterInitializerIsError.ts(1,34): error TS2524: 'await' expressions cannot be used in a parameter initializer. awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. awaitNameIsError.ts(1,29): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. @@ -12,6 +13,7 @@ yieldParameterIsError.ts(1,30): error TS1359: Identifier expected. 'yield' is a yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== functionExpressionIsOk.ts (0 errors) ==== const f1 = async function * f() { }; diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).errors.txt b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..ab637edec9c6f --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).errors.txt @@ -0,0 +1,183 @@ +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + const o1 = { + async * f() { + } + }; +==== awaitMethodNameIsOk.ts (0 errors) ==== + const o2 = { + async * await() { + } + }; +==== yieldMethodNameIsOk.ts (0 errors) ==== + const o3 = { + async * yield() { + } + }; +==== awaitParameterIsError.ts (1 errors) ==== + const o4 = { + async * f(await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + }; +==== yieldParameterIsError.ts (1 errors) ==== + const o5 = { + async * f(yield) { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + }; +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + const o6 = { + async * f(a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + }; +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + const o7 = { + async * f(a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + }; +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + const o8 = { + async * f() { + async function * g() { + } + } + }; +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + const o9 = { + async * f() { + function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + } + }; +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + const o10 = { + async * f() { + const x = function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; + } + }; +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + const o11 = { + async * f() { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + }; +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + const o12 = { + async * f() { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + }; +==== yieldIsOk.ts (0 errors) ==== + const o13 = { + async * f() { + yield; + } + }; +==== yieldWithValueIsOk.ts (0 errors) ==== + const o14 = { + async * f() { + yield 1; + } + }; +==== yieldStarMissingValueIsError.ts (1 errors) ==== + const o15 = { + async * f() { + yield *; + ~ +!!! error TS1109: Expression expected. + } + }; +==== yieldStarWithValueIsOk.ts (0 errors) ==== + const o16 = { + async * f() { + yield * []; + } + }; +==== awaitWithValueIsOk.ts (0 errors) ==== + const o17 = { + async * f() { + await 1; + } + }; +==== awaitMissingValueIsError.ts (1 errors) ==== + const o18 = { + async * f() { + await; + ~ +!!! error TS1109: Expression expected. + } + }; +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + const o19 = { + async * f() { + let x: await; + } + }; +==== yieldAsTypeIsOk.ts (0 errors) ==== + interface yield {} + const o20 = { + async * f() { + let x: yield; + } + }; +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + const o21 = { + async * f() { + const x = { [yield]: 1 }; + } + }; +==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== + const o22 = { + async * get x() { + ~ +!!! error TS1005: '(' expected. + return 1; + } + }; +==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== + const o23 = { + async * set x(value: number) { + ~ +!!! error TS1005: '(' expected. + } + }; +==== asyncGeneratorPropertyIsError.ts (1 errors) ==== + const o24 = { + async * x: 1; + ~ +!!! error TS1005: '(' expected. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).symbols b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..f446450108c68 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).symbols @@ -0,0 +1,258 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// + +=== methodIsOk.ts === +const o1 = { +>o1 : Symbol(o1, Decl(methodIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(methodIsOk.ts, 0, 12)) + } +}; +=== awaitMethodNameIsOk.ts === +const o2 = { +>o2 : Symbol(o2, Decl(awaitMethodNameIsOk.ts, 0, 5)) + + async * await() { +>await : Symbol(await, Decl(awaitMethodNameIsOk.ts, 0, 12)) + } +}; +=== yieldMethodNameIsOk.ts === +const o3 = { +>o3 : Symbol(o3, Decl(yieldMethodNameIsOk.ts, 0, 5)) + + async * yield() { +>yield : Symbol(yield, Decl(yieldMethodNameIsOk.ts, 0, 12)) + } +}; +=== awaitParameterIsError.ts === +const o4 = { +>o4 : Symbol(o4, Decl(awaitParameterIsError.ts, 0, 5)) + + async * f(await) { +>f : Symbol(f, Decl(awaitParameterIsError.ts, 0, 12)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 1, 14)) + } +}; +=== yieldParameterIsError.ts === +const o5 = { +>o5 : Symbol(o5, Decl(yieldParameterIsError.ts, 0, 5)) + + async * f(yield) { +>f : Symbol(f, Decl(yieldParameterIsError.ts, 0, 12)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 1, 14)) + } +}; +=== awaitInParameterInitializerIsError.ts === +const o6 = { +>o6 : Symbol(o6, Decl(awaitInParameterInitializerIsError.ts, 0, 5)) + + async * f(a = await 1) { +>f : Symbol(f, Decl(awaitInParameterInitializerIsError.ts, 0, 12)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14)) + } +}; +=== yieldInParameterInitializerIsError.ts === +const o7 = { +>o7 : Symbol(o7, Decl(yieldInParameterInitializerIsError.ts, 0, 5)) + + async * f(a = yield) { +>f : Symbol(f, Decl(yieldInParameterInitializerIsError.ts, 0, 12)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14)) + } +}; +=== nestedAsyncGeneratorIsOk.ts === +const o8 = { +>o8 : Symbol(o8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedAsyncGeneratorIsOk.ts, 0, 12)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 1, 17)) + } + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const o9 = { +>o9 : Symbol(o9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 12)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 1, 17)) + } + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const o10 = { +>o10 : Symbol(o10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 13)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 13)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 17)) + + }; + } +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const o11 = { +>o11 : Symbol(o11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 13)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 1, 17)) + } + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const o12 = { +>o12 : Symbol(o12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 13)) + + const x = function await() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 13)) +>await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 17)) + + }; + } +}; +=== yieldIsOk.ts === +const o13 = { +>o13 : Symbol(o13, Decl(yieldIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldIsOk.ts, 0, 13)) + + yield; + } +}; +=== yieldWithValueIsOk.ts === +const o14 = { +>o14 : Symbol(o14, Decl(yieldWithValueIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldWithValueIsOk.ts, 0, 13)) + + yield 1; + } +}; +=== yieldStarMissingValueIsError.ts === +const o15 = { +>o15 : Symbol(o15, Decl(yieldStarMissingValueIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldStarMissingValueIsError.ts, 0, 13)) + + yield *; + } +}; +=== yieldStarWithValueIsOk.ts === +const o16 = { +>o16 : Symbol(o16, Decl(yieldStarWithValueIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldStarWithValueIsOk.ts, 0, 13)) + + yield * []; + } +}; +=== awaitWithValueIsOk.ts === +const o17 = { +>o17 : Symbol(o17, Decl(awaitWithValueIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(awaitWithValueIsOk.ts, 0, 13)) + + await 1; + } +}; +=== awaitMissingValueIsError.ts === +const o18 = { +>o18 : Symbol(o18, Decl(awaitMissingValueIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(awaitMissingValueIsError.ts, 0, 13)) + + await; + } +}; +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +const o19 = { +>o19 : Symbol(o19, Decl(awaitAsTypeIsOk.ts, 1, 5)) + + async * f() { +>f : Symbol(f, Decl(awaitAsTypeIsOk.ts, 1, 13)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 3, 11)) +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + } +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + +const o20 = { +>o20 : Symbol(o20, Decl(yieldAsTypeIsOk.ts, 1, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldAsTypeIsOk.ts, 1, 13)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 3, 11)) +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + } +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const o21 = { +>o21 : Symbol(o21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 13)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 13)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19)) + } +}; +=== asyncGeneratorGetAccessorIsError.ts === +const o22 = { +>o22 : Symbol(o22, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 5)) + + async * get x() { +>get : Symbol(get, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 13)) +>x : Symbol(x, Decl(asyncGeneratorGetAccessorIsError.ts, 1, 15)) + + return 1; + } +}; +=== asyncGeneratorSetAccessorIsError.ts === +const o23 = { +>o23 : Symbol(o23, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 5)) + + async * set x(value: number) { +>set : Symbol(set, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 13)) +>x : Symbol(x, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 15)) +>value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18)) + } +}; +=== asyncGeneratorPropertyIsError.ts === +const o24 = { +>o24 : Symbol(o24, Decl(asyncGeneratorPropertyIsError.ts, 0, 5)) + + async * x: 1; +>x : Symbol(x, Decl(asyncGeneratorPropertyIsError.ts, 0, 13)) + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).types b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).types new file mode 100644 index 0000000000000..0a67b43853d48 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=false).types @@ -0,0 +1,406 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// + +=== methodIsOk.ts === +const o1 = { +>o1 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== awaitMethodNameIsOk.ts === +const o2 = { +>o2 : { await(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * await() { }} : { await(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * await() { +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== yieldMethodNameIsOk.ts === +const o3 = { +>o3 : { yield(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * yield() { }} : { yield(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * yield() { +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== awaitParameterIsError.ts === +const o4 = { +>o4 : { f(await: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(await) { }} : { f(await: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(await) { +>f : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ + } +}; +=== yieldParameterIsError.ts === +const o5 = { +>o5 : { f(yield: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(yield) { }} : { f(yield: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(yield) { +>f : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + } +}; +=== awaitInParameterInitializerIsError.ts === +const o6 = { +>o6 : { f(a?: number): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(a = await 1) { }} : { f(a?: number): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(a = await 1) { +>f : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +}; +=== yieldInParameterInitializerIsError.ts === +const o7 = { +>o7 : { f(a?: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(a = yield) { }} : { f(a?: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(a = yield) { +>f : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ + } +}; +=== nestedAsyncGeneratorIsOk.ts === +const o8 = { +>o8 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { async function * g() { } }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const o9 = { +>o9 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { function yield() { } }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const o10 = { +>o10 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = function yield() { }; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; + } +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const o11 = { +>o11 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { function await() { } }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const o12 = { +>o12 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = function await() { }; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function await() { +>x : () => void +> : ^^^^^^^^^^ +>function await() { } : () => void +> : ^^^^^^^^^^ +>await : () => void +> : ^^^^^^^^^^ + + }; + } +}; +=== yieldIsOk.ts === +const o13 = { +>o13 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ + } +}; +=== yieldWithValueIsOk.ts === +const o14 = { +>o14 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield 1; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ + } +}; +=== yieldStarMissingValueIsError.ts === +const o15 = { +>o15 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield *; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ + } +}; +=== yieldStarWithValueIsOk.ts === +const o16 = { +>o16 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield * []; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + } +}; +=== awaitWithValueIsOk.ts === +const o17 = { +>o17 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { await 1; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +}; +=== awaitMissingValueIsError.ts === +const o18 = { +>o18 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { await; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ + } +}; +=== awaitAsTypeIsOk.ts === +interface await {} +const o19 = { +>o19 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { let x: await; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ + } +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +const o20 = { +>o20 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { let x: yield; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ + } +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const o21 = { +>o21 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = { [yield]: 1 }; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ + } +}; +=== asyncGeneratorGetAccessorIsError.ts === +const o22 = { +>o22 : { get(): any; x(): number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * get x() { return 1; }} : { get(): any; x(): number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * get x() { +>get : () => any +> : ^^^^^^^^^ +>x : () => number +> : ^^^^^^^^^^^^ + + return 1; +>1 : 1 +> : ^ + } +}; +=== asyncGeneratorSetAccessorIsError.ts === +const o23 = { +>o23 : { set(): any; x(value: number): void; } +> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ +>{ async * set x(value: number) { }} : { set(): any; x(value: number): void; } +> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ + + async * set x(value: number) { +>set : () => any +> : ^^^^^^^^^ +>x : (value: number) => void +> : ^ ^^ ^^^^^^^^^ +>value : number +> : ^^^^^^ + } +}; +=== asyncGeneratorPropertyIsError.ts === +const o24 = { +>o24 : { x(): 1; } +> : ^^^^^^^ ^^^ +>{ async * x: 1;} : { x(): 1; } +> : ^^^^^^^ ^^^ + + async * x: 1; +>x : () => 1 +> : ^^^^^^ + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).errors.txt b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..b53846a75432a --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).errors.txt @@ -0,0 +1,189 @@ +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldAsTypeIsOk.ts(1,11): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldAsTypeIsOk.ts(4,16): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + const o1 = { + async * f() { + } + }; +==== awaitMethodNameIsOk.ts (0 errors) ==== + const o2 = { + async * await() { + } + }; +==== yieldMethodNameIsOk.ts (0 errors) ==== + const o3 = { + async * yield() { + } + }; +==== awaitParameterIsError.ts (1 errors) ==== + const o4 = { + async * f(await) { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + }; +==== yieldParameterIsError.ts (1 errors) ==== + const o5 = { + async * f(yield) { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } + }; +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + const o6 = { + async * f(a = await 1) { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + }; +==== yieldInParameterInitializerIsError.ts (1 errors) ==== + const o7 = { + async * f(a = yield) { + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + }; +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + const o8 = { + async * f() { + async function * g() { + } + } + }; +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + const o9 = { + async * f() { + function yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } + } + }; +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + const o10 = { + async * f() { + const x = function yield() { + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + }; + } + }; +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + const o11 = { + async * f() { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + }; +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + const o12 = { + async * f() { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + }; +==== yieldIsOk.ts (0 errors) ==== + const o13 = { + async * f() { + yield; + } + }; +==== yieldWithValueIsOk.ts (0 errors) ==== + const o14 = { + async * f() { + yield 1; + } + }; +==== yieldStarMissingValueIsError.ts (1 errors) ==== + const o15 = { + async * f() { + yield *; + ~ +!!! error TS1109: Expression expected. + } + }; +==== yieldStarWithValueIsOk.ts (0 errors) ==== + const o16 = { + async * f() { + yield * []; + } + }; +==== awaitWithValueIsOk.ts (0 errors) ==== + const o17 = { + async * f() { + await 1; + } + }; +==== awaitMissingValueIsError.ts (1 errors) ==== + const o18 = { + async * f() { + await; + ~ +!!! error TS1109: Expression expected. + } + }; +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + const o19 = { + async * f() { + let x: await; + } + }; +==== yieldAsTypeIsOk.ts (2 errors) ==== + interface yield {} + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + const o20 = { + async * f() { + let x: yield; + ~~~~~ +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. + } + }; +==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== + const o21 = { + async * f() { + const x = { [yield]: 1 }; + } + }; +==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== + const o22 = { + async * get x() { + ~ +!!! error TS1005: '(' expected. + return 1; + } + }; +==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== + const o23 = { + async * set x(value: number) { + ~ +!!! error TS1005: '(' expected. + } + }; +==== asyncGeneratorPropertyIsError.ts (1 errors) ==== + const o24 = { + async * x: 1; + ~ +!!! error TS1005: '(' expected. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).symbols b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..f446450108c68 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).symbols @@ -0,0 +1,258 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// + +=== methodIsOk.ts === +const o1 = { +>o1 : Symbol(o1, Decl(methodIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(methodIsOk.ts, 0, 12)) + } +}; +=== awaitMethodNameIsOk.ts === +const o2 = { +>o2 : Symbol(o2, Decl(awaitMethodNameIsOk.ts, 0, 5)) + + async * await() { +>await : Symbol(await, Decl(awaitMethodNameIsOk.ts, 0, 12)) + } +}; +=== yieldMethodNameIsOk.ts === +const o3 = { +>o3 : Symbol(o3, Decl(yieldMethodNameIsOk.ts, 0, 5)) + + async * yield() { +>yield : Symbol(yield, Decl(yieldMethodNameIsOk.ts, 0, 12)) + } +}; +=== awaitParameterIsError.ts === +const o4 = { +>o4 : Symbol(o4, Decl(awaitParameterIsError.ts, 0, 5)) + + async * f(await) { +>f : Symbol(f, Decl(awaitParameterIsError.ts, 0, 12)) +>await : Symbol(await, Decl(awaitParameterIsError.ts, 1, 14)) + } +}; +=== yieldParameterIsError.ts === +const o5 = { +>o5 : Symbol(o5, Decl(yieldParameterIsError.ts, 0, 5)) + + async * f(yield) { +>f : Symbol(f, Decl(yieldParameterIsError.ts, 0, 12)) +>yield : Symbol(yield, Decl(yieldParameterIsError.ts, 1, 14)) + } +}; +=== awaitInParameterInitializerIsError.ts === +const o6 = { +>o6 : Symbol(o6, Decl(awaitInParameterInitializerIsError.ts, 0, 5)) + + async * f(a = await 1) { +>f : Symbol(f, Decl(awaitInParameterInitializerIsError.ts, 0, 12)) +>a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14)) + } +}; +=== yieldInParameterInitializerIsError.ts === +const o7 = { +>o7 : Symbol(o7, Decl(yieldInParameterInitializerIsError.ts, 0, 5)) + + async * f(a = yield) { +>f : Symbol(f, Decl(yieldInParameterInitializerIsError.ts, 0, 12)) +>a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14)) + } +}; +=== nestedAsyncGeneratorIsOk.ts === +const o8 = { +>o8 : Symbol(o8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedAsyncGeneratorIsOk.ts, 0, 12)) + + async function * g() { +>g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 1, 17)) + } + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const o9 = { +>o9 : Symbol(o9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 12)) + + function yield() { +>yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 1, 17)) + } + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const o10 = { +>o10 : Symbol(o10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 13)) + + const x = function yield() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 13)) +>yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 17)) + + }; + } +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const o11 = { +>o11 : Symbol(o11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 13)) + + function await() { +>await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 1, 17)) + } + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const o12 = { +>o12 : Symbol(o12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 13)) + + const x = function await() { +>x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 13)) +>await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 17)) + + }; + } +}; +=== yieldIsOk.ts === +const o13 = { +>o13 : Symbol(o13, Decl(yieldIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldIsOk.ts, 0, 13)) + + yield; + } +}; +=== yieldWithValueIsOk.ts === +const o14 = { +>o14 : Symbol(o14, Decl(yieldWithValueIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldWithValueIsOk.ts, 0, 13)) + + yield 1; + } +}; +=== yieldStarMissingValueIsError.ts === +const o15 = { +>o15 : Symbol(o15, Decl(yieldStarMissingValueIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldStarMissingValueIsError.ts, 0, 13)) + + yield *; + } +}; +=== yieldStarWithValueIsOk.ts === +const o16 = { +>o16 : Symbol(o16, Decl(yieldStarWithValueIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldStarWithValueIsOk.ts, 0, 13)) + + yield * []; + } +}; +=== awaitWithValueIsOk.ts === +const o17 = { +>o17 : Symbol(o17, Decl(awaitWithValueIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(awaitWithValueIsOk.ts, 0, 13)) + + await 1; + } +}; +=== awaitMissingValueIsError.ts === +const o18 = { +>o18 : Symbol(o18, Decl(awaitMissingValueIsError.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(awaitMissingValueIsError.ts, 0, 13)) + + await; + } +}; +=== awaitAsTypeIsOk.ts === +interface await {} +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + +const o19 = { +>o19 : Symbol(o19, Decl(awaitAsTypeIsOk.ts, 1, 5)) + + async * f() { +>f : Symbol(f, Decl(awaitAsTypeIsOk.ts, 1, 13)) + + let x: await; +>x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 3, 11)) +>await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) + } +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + +const o20 = { +>o20 : Symbol(o20, Decl(yieldAsTypeIsOk.ts, 1, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldAsTypeIsOk.ts, 1, 13)) + + let x: yield; +>x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 3, 11)) +>yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) + } +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const o21 = { +>o21 : Symbol(o21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5)) + + async * f() { +>f : Symbol(f, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 13)) + + const x = { [yield]: 1 }; +>x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 13)) +>[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19)) + } +}; +=== asyncGeneratorGetAccessorIsError.ts === +const o22 = { +>o22 : Symbol(o22, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 5)) + + async * get x() { +>get : Symbol(get, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 13)) +>x : Symbol(x, Decl(asyncGeneratorGetAccessorIsError.ts, 1, 15)) + + return 1; + } +}; +=== asyncGeneratorSetAccessorIsError.ts === +const o23 = { +>o23 : Symbol(o23, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 5)) + + async * set x(value: number) { +>set : Symbol(set, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 13)) +>x : Symbol(x, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 15)) +>value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18)) + } +}; +=== asyncGeneratorPropertyIsError.ts === +const o24 = { +>o24 : Symbol(o24, Decl(asyncGeneratorPropertyIsError.ts, 0, 5)) + + async * x: 1; +>x : Symbol(x, Decl(asyncGeneratorPropertyIsError.ts, 0, 13)) + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).types b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).types new file mode 100644 index 0000000000000..0a67b43853d48 --- /dev/null +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018(alwaysstrict=true).types @@ -0,0 +1,406 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// + +=== methodIsOk.ts === +const o1 = { +>o1 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== awaitMethodNameIsOk.ts === +const o2 = { +>o2 : { await(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * await() { }} : { await(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * await() { +>await : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== yieldMethodNameIsOk.ts === +const o3 = { +>o3 : { yield(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * yield() { }} : { yield(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * yield() { +>yield : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } +}; +=== awaitParameterIsError.ts === +const o4 = { +>o4 : { f(await: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(await) { }} : { f(await: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(await) { +>f : (await: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await : any +> : ^^^ + } +}; +=== yieldParameterIsError.ts === +const o5 = { +>o5 : { f(yield: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(yield) { }} : { f(yield: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(yield) { +>f : (yield: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any +> : ^^^ + } +}; +=== awaitInParameterInitializerIsError.ts === +const o6 = { +>o6 : { f(a?: number): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(a = await 1) { }} : { f(a?: number): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(a = await 1) { +>f : (a?: number) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : number +> : ^^^^^^ +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +}; +=== yieldInParameterInitializerIsError.ts === +const o7 = { +>o7 : { f(a?: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f(a = yield) { }} : { f(a?: any): AsyncGenerator; } +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f(a = yield) { +>f : (a?: any) => AsyncGenerator +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>a : any +> : ^^^ +>yield : any +> : ^^^ + } +}; +=== nestedAsyncGeneratorIsOk.ts === +const o8 = { +>o8 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { async function * g() { } }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async function * g() { +>g : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } + } +}; +=== nestedFunctionDeclarationNamedYieldIsError.ts === +const o9 = { +>o9 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { function yield() { } }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function yield() { +>yield : () => void +> : ^^^^^^^^^^ + } + } +}; +=== nestedFunctionExpressionNamedYieldIsError.ts === +const o10 = { +>o10 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = function yield() { }; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function yield() { +>x : () => void +> : ^^^^^^^^^^ +>function yield() { } : () => void +> : ^^^^^^^^^^ +>yield : () => void +> : ^^^^^^^^^^ + + }; + } +}; +=== nestedFunctionDeclarationNamedAwaitIsError.ts === +const o11 = { +>o11 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { function await() { } }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + function await() { +>await : () => void +> : ^^^^^^^^^^ + } + } +}; +=== nestedFunctionExpressionNamedAwaitIsError.ts === +const o12 = { +>o12 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = function await() { }; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = function await() { +>x : () => void +> : ^^^^^^^^^^ +>function await() { } : () => void +> : ^^^^^^^^^^ +>await : () => void +> : ^^^^^^^^^^ + + }; + } +}; +=== yieldIsOk.ts === +const o13 = { +>o13 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield; +>yield : any +> : ^^^ + } +}; +=== yieldWithValueIsOk.ts === +const o14 = { +>o14 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield 1; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield 1; +>yield 1 : any +> : ^^^ +>1 : 1 +> : ^ + } +}; +=== yieldStarMissingValueIsError.ts === +const o15 = { +>o15 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield *; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield *; +>yield * : any +> : ^^^ +> : any +> : ^^^ + } +}; +=== yieldStarWithValueIsOk.ts === +const o16 = { +>o16 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield * []; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + yield * []; +>yield * [] : any +> : ^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ + } +}; +=== awaitWithValueIsOk.ts === +const o17 = { +>o17 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { await 1; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await 1; +>await 1 : 1 +> : ^ +>1 : 1 +> : ^ + } +}; +=== awaitMissingValueIsError.ts === +const o18 = { +>o18 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { await; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await; +>await : any +> : ^^^ +> : any +> : ^^^ + } +}; +=== awaitAsTypeIsOk.ts === +interface await {} +const o19 = { +>o19 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { let x: await; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: await; +>x : await +> : ^^^^^ + } +}; +=== yieldAsTypeIsOk.ts === +interface yield {} +const o20 = { +>o20 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { let x: yield; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let x: yield; +>x : yield +> : ^^^^^ + } +}; +=== yieldInNestedComputedPropertyIsOk.ts === +const o21 = { +>o21 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = { [yield]: 1 }; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * f() { +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + const x = { [yield]: 1 }; +>x : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [yield]: 1 } : { [x: number]: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[yield] : number +> : ^^^^^^ +>yield : any +> : ^^^ +>1 : 1 +> : ^ + } +}; +=== asyncGeneratorGetAccessorIsError.ts === +const o22 = { +>o22 : { get(): any; x(): number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * get x() { return 1; }} : { get(): any; x(): number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async * get x() { +>get : () => any +> : ^^^^^^^^^ +>x : () => number +> : ^^^^^^^^^^^^ + + return 1; +>1 : 1 +> : ^ + } +}; +=== asyncGeneratorSetAccessorIsError.ts === +const o23 = { +>o23 : { set(): any; x(value: number): void; } +> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ +>{ async * set x(value: number) { }} : { set(): any; x(value: number): void; } +> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ + + async * set x(value: number) { +>set : () => any +> : ^^^^^^^^^ +>x : (value: number) => void +> : ^ ^^ ^^^^^^^^^ +>value : number +> : ^^^^^^ + } +}; +=== asyncGeneratorPropertyIsError.ts === +const o24 = { +>o24 : { x(): 1; } +> : ^^^^^^^ ^^^ +>{ async * x: 1;} : { x(): 1; } +> : ^^^^^^^ ^^^ + + async * x: 1; +>x : () => 1 +> : ^^^^^^ + +}; + diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt index ab637edec9c6f..9106197c326da 100644 --- a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt @@ -1,3 +1,4 @@ +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. @@ -13,6 +14,7 @@ yieldParameterIsError.ts(2,15): error TS1359: Identifier expected. 'yield' is a yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== methodIsOk.ts (0 errors) ==== const o1 = { async * f() { diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).errors.txt b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).errors.txt new file mode 100644 index 0000000000000..0550c53d433f5 --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).errors.txt @@ -0,0 +1,20 @@ +error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +parserStatementIsNotAMemberVariableDeclaration1.ts(1,1): error TS1108: A 'return' statement can only be used within a function body. + + +!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2304 parserStatementIsNotAMemberVariableDeclaration1.ts:6:5: Cannot find name 'private'. +==== parserStatementIsNotAMemberVariableDeclaration1.ts (1 errors) ==== + return { + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. + + "set": function (key, value) { + + // 'private' should not be considered a member variable here. + private[key] = value; + + } + + }; \ No newline at end of file diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).symbols b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).symbols new file mode 100644 index 0000000000000..1ab21d87dc79a --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// + +=== parserStatementIsNotAMemberVariableDeclaration1.ts === +return { + + "set": function (key, value) { +>"set" : Symbol("set", Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 0, 8)) +>key : Symbol(key, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 19)) +>value : Symbol(value, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 23)) + + // 'private' should not be considered a member variable here. + private[key] = value; +>key : Symbol(key, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 19)) +>value : Symbol(value, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 23)) + + } + +}; diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).types b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).types new file mode 100644 index 0000000000000..fba7da3639d62 --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=false).types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// + +=== parserStatementIsNotAMemberVariableDeclaration1.ts === +return { +>{ "set": function (key, value) { // 'private' should not be considered a member variable here. private[key] = value; }} : { set: (key: any, value: any) => void; } +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^ + + "set": function (key, value) { +>"set" : (key: any, value: any) => void +> : ^ ^^^^^^^ ^^^^^^^^^^^^^^ +>function (key, value) { // 'private' should not be considered a member variable here. private[key] = value; } : (key: any, value: any) => void +> : ^ ^^^^^^^ ^^^^^^^^^^^^^^ +>key : any +> : ^^^ +>value : any +> : ^^^ + + // 'private' should not be considered a member variable here. + private[key] = value; +>private[key] = value : any +> : ^^^ +>private[key] : any +> : ^^^ +>private : any +> : ^^^ +>key : any +> : ^^^ +>value : any +> : ^^^ + + } + +}; diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).errors.txt b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).errors.txt new file mode 100644 index 0000000000000..f82d4967ff7fa --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).errors.txt @@ -0,0 +1,23 @@ +error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +parserStatementIsNotAMemberVariableDeclaration1.ts(1,1): error TS1108: A 'return' statement can only be used within a function body. +parserStatementIsNotAMemberVariableDeclaration1.ts(6,5): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. + + +!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! related TS-1: The excess diagnostics are: +!!! related TS2304 parserStatementIsNotAMemberVariableDeclaration1.ts:6:5: Cannot find name 'private'. +==== parserStatementIsNotAMemberVariableDeclaration1.ts (2 errors) ==== + return { + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. + + "set": function (key, value) { + + // 'private' should not be considered a member variable here. + private[key] = value; + ~~~~~~~ +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. + + } + + }; \ No newline at end of file diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).symbols b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).symbols new file mode 100644 index 0000000000000..1ab21d87dc79a --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).symbols @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// + +=== parserStatementIsNotAMemberVariableDeclaration1.ts === +return { + + "set": function (key, value) { +>"set" : Symbol("set", Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 0, 8)) +>key : Symbol(key, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 19)) +>value : Symbol(value, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 23)) + + // 'private' should not be considered a member variable here. + private[key] = value; +>key : Symbol(key, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 19)) +>value : Symbol(value, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 23)) + + } + +}; diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).types b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).types new file mode 100644 index 0000000000000..fba7da3639d62 --- /dev/null +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1(alwaysstrict=true).types @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// + +=== parserStatementIsNotAMemberVariableDeclaration1.ts === +return { +>{ "set": function (key, value) { // 'private' should not be considered a member variable here. private[key] = value; }} : { set: (key: any, value: any) => void; } +> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^ + + "set": function (key, value) { +>"set" : (key: any, value: any) => void +> : ^ ^^^^^^^ ^^^^^^^^^^^^^^ +>function (key, value) { // 'private' should not be considered a member variable here. private[key] = value; } : (key: any, value: any) => void +> : ^ ^^^^^^^ ^^^^^^^^^^^^^^ +>key : any +> : ^^^ +>value : any +> : ^^^ + + // 'private' should not be considered a member variable here. + private[key] = value; +>private[key] = value : any +> : ^^^ +>private[key] : any +> : ^^^ +>private : any +> : ^^^ +>key : any +> : ^^^ +>value : any +> : ^^^ + + } + +}; diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt index 0550c53d433f5..43379dbf8682c 100644 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt @@ -1,10 +1,12 @@ -error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. parserStatementIsNotAMemberVariableDeclaration1.ts(1,1): error TS1108: A 'return' statement can only be used within a function body. -!!! error TS-1: Pre-emit (1) and post-emit (2) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! +!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! !!! related TS-1: The excess diagnostics are: !!! related TS2304 parserStatementIsNotAMemberVariableDeclaration1.ts:6:5: Cannot find name 'private'. +!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. ==== parserStatementIsNotAMemberVariableDeclaration1.ts (1 errors) ==== return { ~~~~~~ diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index 843873870d537..db5b49debc5bc 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,3 +1,3 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;AA8B1E,IAAU,MAAM,CAUf;AAVD,WAAU,MAAM;IAAC,IAAA,OAAO,CAUvB;IAVgB,WAAA,OAAO;QAAC,IAAA,KAAK,CAU7B;QAVwB,WAAA,OAAK;YAAC,IAAA,IAAI,CAUlC;YAV8B,WAAA,IAAI;gBAClC,MAAa,eAAe;oBAEpB,KAAK,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;oBAExB,GAAG,CAAC,KAA6B;wBAEvC,OAAO,IAAI,CAAC;oBACb,CAAC;iBACD;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV8B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAUlC;QAAD,CAAC,EAVwB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU7B;IAAD,CAAC,EAVgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAUvB;AAAD,CAAC,EAVS,MAAM,KAAN,MAAM,QAUf;AAED,WAAU,MAAM;IAAC,IAAA,KAAK,CAoBrB;IApBgB,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB7B;QApBsB,WAAA,OAAO;YAC7B,MAAa,UAAU;gBAEf,GAAG,CAAC,MAAyC,IAAI,IAAI,IAAI,EAAE,CAAC;oBAAA,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAGzF,YAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBAEM,UAAU;oBAChB,OAAO,OAAO,CAAC;gBAChB,CAAC;gBAEM,OAAO;gBAEd,CAAC;aAED;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBsB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB7B;IAAD,CAAC,EApBgB,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBrB;AAAD,CAAC,EApBS,MAAM,KAAN,MAAM,QAoBf;AAGD,MAAM,YAAY;IAA2B,eAAe,KAAa,OAAO,IAAI,CAAC,CAAA,CAAC;CAAE;AASxF,WAAU,MAAM;IAAC,IAAA,KAAK,CAwBrB;IAxBgB,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB/B;QAxBsB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBzC;YAxBgC,WAAA,SAAS;gBAEzC,MAAa,KAAK;oBACX,YAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,KAAK;wBACX,OAAO,IAAI,CAAC;oBACb,CAAC;oBAEM,MAAM,CAAC,KAAY;wBACzB,OAAO,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,OAAO,KAAY,OAAO,IAAI,CAAC,CAAC,CAAC;iBACxC;gBAXY,eAAK,QAWjB,CAAA;gBAED,MAAa,IAAK,SAAQ,YAAY;oBAErC,aAAa;oBACN,eAAe;wBACrB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;iBAGD;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxBgC,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBzC;QAAD,CAAC,EAxBsB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB/B;IAAD,CAAC,EAxBgB,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBrB;AAAD,CAAC,EAxBS,MAAM,KAAN,MAAM,QAwBf"} -//// https://sokra.github.io/source-map-visualization#base64,Ly8gU2NlbmFyaW8gMTogVGVzdCByZXF1cnNpdmUgZnVuY3Rpb24gY2FsbCB3aXRoICJ0aGlzIiBwYXJhbWV0ZXINCi8vIFNjZW5hcmlvIDI6IFRlc3QgcmVjdXJzaXZlIGZ1bmN0aW9uIGNhbGwgd2l0aCBjYXN0IGFuZCAidGhpcyIgcGFyYW1ldGVyDQp2YXIgU2FtcGxlOw0KKGZ1bmN0aW9uIChTYW1wbGUpIHsNCiAgICB2YXIgQWN0aW9uczsNCiAgICAoZnVuY3Rpb24gKEFjdGlvbnMpIHsNCiAgICAgICAgdmFyIFRoaW5nOw0KICAgICAgICAoZnVuY3Rpb24gKFRoaW5nXzEpIHsNCiAgICAgICAgICAgIHZhciBGaW5kOw0KICAgICAgICAgICAgKGZ1bmN0aW9uIChGaW5kKSB7DQogICAgICAgICAgICAgICAgY2xhc3MgU3RhcnRGaW5kQWN0aW9uIHsNCiAgICAgICAgICAgICAgICAgICAgZ2V0SWQoKSB7IHJldHVybiAieW8iOyB9DQogICAgICAgICAgICAgICAgICAgIHJ1bihUaGluZykgew0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgRmluZC5TdGFydEZpbmRBY3Rpb24gPSBTdGFydEZpbmRBY3Rpb247DQogICAgICAgICAgICB9KShGaW5kID0gVGhpbmdfMS5GaW5kIHx8IChUaGluZ18xLkZpbmQgPSB7fSkpOw0KICAgICAgICB9KShUaGluZyA9IEFjdGlvbnMuVGhpbmcgfHwgKEFjdGlvbnMuVGhpbmcgPSB7fSkpOw0KICAgIH0pKEFjdGlvbnMgPSBTYW1wbGUuQWN0aW9ucyB8fCAoU2FtcGxlLkFjdGlvbnMgPSB7fSkpOw0KfSkoU2FtcGxlIHx8IChTYW1wbGUgPSB7fSkpOw0KKGZ1bmN0aW9uIChTYW1wbGUpIHsNCiAgICB2YXIgVGhpbmc7DQogICAgKGZ1bmN0aW9uIChUaGluZykgew0KICAgICAgICB2YXIgV2lkZ2V0czsNCiAgICAgICAgKGZ1bmN0aW9uIChXaWRnZXRzKSB7DQogICAgICAgICAgICBjbGFzcyBGaW5kV2lkZ2V0IHsNCiAgICAgICAgICAgICAgICBnYXIocnVubmVyKSB7IGlmICh0cnVlKSB7DQogICAgICAgICAgICAgICAgICAgIHJldHVybiBydW5uZXIodGhpcyk7DQogICAgICAgICAgICAgICAgfSB9DQogICAgICAgICAgICAgICAgY29uc3RydWN0b3IoY29kZVRoaW5nKSB7DQogICAgICAgICAgICAgICAgICAgIHRoaXMuY29kZVRoaW5nID0gY29kZVRoaW5nOw0KICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUgPSBudWxsOw0KICAgICAgICAgICAgICAgICAgICAvLyBzY2VuYXJpbyAxDQogICAgICAgICAgICAgICAgICAgIGNvZGVUaGluZy5hZGRXaWRnZXQoImFkZFdpZGdldCIsIHRoaXMpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBnZXREb21Ob2RlKCkgew0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gZG9tTm9kZTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgZGVzdHJveSgpIHsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgICAgICBXaWRnZXRzLkZpbmRXaWRnZXQgPSBGaW5kV2lkZ2V0Ow0KICAgICAgICB9KShXaWRnZXRzID0gVGhpbmcuV2lkZ2V0cyB8fCAoVGhpbmcuV2lkZ2V0cyA9IHt9KSk7DQogICAgfSkoVGhpbmcgPSBTYW1wbGUuVGhpbmcgfHwgKFNhbXBsZS5UaGluZyA9IHt9KSk7DQp9KShTYW1wbGUgfHwgKFNhbXBsZSA9IHt9KSk7DQpjbGFzcyBBYnN0cmFjdE1vZGUgew0KICAgIGdldEluaXRpYWxTdGF0ZSgpIHsgcmV0dXJuIG51bGw7IH0NCn0NCihmdW5jdGlvbiAoU2FtcGxlKSB7DQogICAgdmFyIFRoaW5nOw0KICAgIChmdW5jdGlvbiAoVGhpbmcpIHsNCiAgICAgICAgdmFyIExhbmd1YWdlczsNCiAgICAgICAgKGZ1bmN0aW9uIChMYW5ndWFnZXMpIHsNCiAgICAgICAgICAgIHZhciBQbGFpblRleHQ7DQogICAgICAgICAgICAoZnVuY3Rpb24gKFBsYWluVGV4dCkgew0KICAgICAgICAgICAgICAgIGNsYXNzIFN0YXRlIHsNCiAgICAgICAgICAgICAgICAgICAgY29uc3RydWN0b3IobW9kZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tb2RlID0gbW9kZTsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICBjbG9uZSgpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIGVxdWFscyhvdGhlcikgew0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMgPT09IG90aGVyOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIGdldE1vZGUoKSB7IHJldHVybiBtb2RlOyB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIFBsYWluVGV4dC5TdGF0ZSA9IFN0YXRlOw0KICAgICAgICAgICAgICAgIGNsYXNzIE1vZGUgZXh0ZW5kcyBBYnN0cmFjdE1vZGUgew0KICAgICAgICAgICAgICAgICAgICAvLyBzY2VuYXJpbyAyDQogICAgICAgICAgICAgICAgICAgIGdldEluaXRpYWxTdGF0ZSgpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU3RhdGUoc2VsZik7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgUGxhaW5UZXh0Lk1vZGUgPSBNb2RlOw0KICAgICAgICAgICAgfSkoUGxhaW5UZXh0ID0gTGFuZ3VhZ2VzLlBsYWluVGV4dCB8fCAoTGFuZ3VhZ2VzLlBsYWluVGV4dCA9IHt9KSk7DQogICAgICAgIH0pKExhbmd1YWdlcyA9IFRoaW5nLkxhbmd1YWdlcyB8fCAoVGhpbmcuTGFuZ3VhZ2VzID0ge30pKTsNCiAgICB9KShUaGluZyA9IFNhbXBsZS5UaGluZyB8fCAoU2FtcGxlLlRoaW5nID0ge30pKTsNCn0pKFNhbXBsZSB8fCAoU2FtcGxlID0ge30pKTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXJlY3Vyc2l2ZUNsYXNzUmVmZXJlbmNlVGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjdXJzaXZlQ2xhc3NSZWZlcmVuY2VUZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVjdXJzaXZlQ2xhc3NSZWZlcmVuY2VUZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGlFQUFpRTtBQUNqRSwwRUFBMEU7QUE4QjFFLElBQVUsTUFBTSxDQVVmO0FBVkQsV0FBVSxNQUFNO0lBQUMsSUFBQSxPQUFPLENBVXZCO0lBVmdCLFdBQUEsT0FBTztRQUFDLElBQUEsS0FBSyxDQVU3QjtRQVZ3QixXQUFBLE9BQUs7WUFBQyxJQUFBLElBQUksQ0FVbEM7WUFWOEIsV0FBQSxJQUFJO2dCQUNsQyxNQUFhLGVBQWU7b0JBRXBCLEtBQUssS0FBSyxPQUFPLElBQUksQ0FBQyxDQUFDLENBQUM7b0JBRXhCLEdBQUcsQ0FBQyxLQUE2Qjt3QkFFdkMsT0FBTyxJQUFJLENBQUM7b0JBQ2IsQ0FBQztpQkFDRDtnQkFSWSxvQkFBZSxrQkFRM0IsQ0FBQTtZQUNGLENBQUMsRUFWOEIsSUFBSSxHQUFKLFlBQUksS0FBSixZQUFJLFFBVWxDO1FBQUQsQ0FBQyxFQVZ3QixLQUFLLEdBQUwsYUFBSyxLQUFMLGFBQUssUUFVN0I7SUFBRCxDQUFDLEVBVmdCLE9BQU8sR0FBUCxjQUFPLEtBQVAsY0FBTyxRQVV2QjtBQUFELENBQUMsRUFWUyxNQUFNLEtBQU4sTUFBTSxRQVVmO0FBRUQsV0FBVSxNQUFNO0lBQUMsSUFBQSxLQUFLLENBb0JyQjtJQXBCZ0IsV0FBQSxLQUFLO1FBQUMsSUFBQSxPQUFPLENBb0I3QjtRQXBCc0IsV0FBQSxPQUFPO1lBQzdCLE1BQWEsVUFBVTtnQkFFZixHQUFHLENBQUMsTUFBeUMsSUFBSSxJQUFJLElBQUksRUFBRSxDQUFDO29CQUFBLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO2dCQUFBLENBQUMsQ0FBQSxDQUFDO2dCQUd6RixZQUFvQixTQUFrQztvQkFBbEMsY0FBUyxHQUFULFNBQVMsQ0FBeUI7b0JBRDlDLFlBQU8sR0FBTyxJQUFJLENBQUM7b0JBRXZCLGFBQWE7b0JBQ2IsU0FBUyxDQUFDLFNBQVMsQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLENBQUM7Z0JBQzNDLENBQUM7Z0JBRU0sVUFBVTtvQkFDaEIsT0FBTyxPQUFPLENBQUM7Z0JBQ2hCLENBQUM7Z0JBRU0sT0FBTztnQkFFZCxDQUFDO2FBRUQ7WUFsQlksa0JBQVUsYUFrQnRCLENBQUE7UUFDRixDQUFDLEVBcEJzQixPQUFPLEdBQVAsYUFBTyxLQUFQLGFBQU8sUUFvQjdCO0lBQUQsQ0FBQyxFQXBCZ0IsS0FBSyxHQUFMLFlBQUssS0FBTCxZQUFLLFFBb0JyQjtBQUFELENBQUMsRUFwQlMsTUFBTSxLQUFOLE1BQU0sUUFvQmY7QUFHRCxNQUFNLFlBQVk7SUFBMkIsZUFBZSxLQUFhLE9BQU8sSUFBSSxDQUFDLENBQUEsQ0FBQztDQUFFO0FBU3hGLFdBQVUsTUFBTTtJQUFDLElBQUEsS0FBSyxDQXdCckI7SUF4QmdCLFdBQUEsS0FBSztRQUFDLElBQUEsU0FBUyxDQXdCL0I7UUF4QnNCLFdBQUEsU0FBUztZQUFDLElBQUEsU0FBUyxDQXdCekM7WUF4QmdDLFdBQUEsU0FBUztnQkFFekMsTUFBYSxLQUFLO29CQUNYLFlBQW9CLElBQVc7d0JBQVgsU0FBSSxHQUFKLElBQUksQ0FBTztvQkFBSSxDQUFDO29CQUNuQyxLQUFLO3dCQUNYLE9BQU8sSUFBSSxDQUFDO29CQUNiLENBQUM7b0JBRU0sTUFBTSxDQUFDLEtBQVk7d0JBQ3pCLE9BQU8sSUFBSSxLQUFLLEtBQUssQ0FBQztvQkFDdkIsQ0FBQztvQkFFTSxPQUFPLEtBQVksT0FBTyxJQUFJLENBQUMsQ0FBQyxDQUFDO2lCQUN4QztnQkFYWSxlQUFLLFFBV2pCLENBQUE7Z0JBRUQsTUFBYSxJQUFLLFNBQVEsWUFBWTtvQkFFckMsYUFBYTtvQkFDTixlQUFlO3dCQUNyQixPQUFPLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDO29CQUN4QixDQUFDO2lCQUdEO2dCQVJZLGNBQUksT0FRaEIsQ0FBQTtZQUNGLENBQUMsRUF4QmdDLFNBQVMsR0FBVCxtQkFBUyxLQUFULG1CQUFTLFFBd0J6QztRQUFELENBQUMsRUF4QnNCLFNBQVMsR0FBVCxlQUFTLEtBQVQsZUFBUyxRQXdCL0I7SUFBRCxDQUFDLEVBeEJnQixLQUFLLEdBQUwsWUFBSyxLQUFMLFlBQUssUUF3QnJCO0FBQUQsQ0FBQyxFQXhCUyxNQUFNLEtBQU4sTUFBTSxRQXdCZiJ9,Ly8gU2NlbmFyaW8gMTogVGVzdCByZXF1cnNpdmUgZnVuY3Rpb24gY2FsbCB3aXRoICJ0aGlzIiBwYXJhbWV0ZXIKLy8gU2NlbmFyaW8gMjogVGVzdCByZWN1cnNpdmUgZnVuY3Rpb24gY2FsbCB3aXRoIGNhc3QgYW5kICJ0aGlzIiBwYXJhbWV0ZXIKCgoKZGVjbGFyZSBuYW1lc3BhY2UgU2FtcGxlLlRoaW5nIHsKCglleHBvcnQgaW50ZXJmYWNlIElXaWRnZXQgewoJCWdldERvbU5vZGUoKTogYW55OwoJCWRlc3Ryb3koKTsKCQlnYXIocnVubmVyOih3aWRnZXQ6U2FtcGxlLlRoaW5nLklXaWRnZXQpPT5hbnkpOmFueTsKCX0KCglleHBvcnQgaW50ZXJmYWNlIElDb2RlVGhpbmcgewogIAogIAkJZ2V0RG9tTm9kZSgpOiBFbGVtZW50OwoJCQoJCWFkZFdpZGdldCh3aWRnZXRJZDpzdHJpbmcsIHdpZGdldDpJV2lkZ2V0KTsKCgkJCgkJZm9jdXMoKTsgCgkJCgkJLy9hZGRXaWRnZXQod2lkZ2V0OiBTYW1wbGUuVGhpbmcuV2lkZ2V0cy5JV2lkZ2V0KTsKCX0KCglleHBvcnQgaW50ZXJmYWNlIElBY3Rpb24gewoJCXJ1bihUaGluZzpJQ29kZVRoaW5nKTpib29sZWFuOwoJCWdldElkKCk6c3RyaW5nOwoJfQkKfQoKbmFtZXNwYWNlIFNhbXBsZS5BY3Rpb25zLlRoaW5nLkZpbmQgewoJZXhwb3J0IGNsYXNzIFN0YXJ0RmluZEFjdGlvbiBpbXBsZW1lbnRzIFNhbXBsZS5UaGluZy5JQWN0aW9uIHsKCQkKCQlwdWJsaWMgZ2V0SWQoKSB7IHJldHVybiAieW8iOyB9CgkJCgkJcHVibGljIHJ1bihUaGluZzpTYW1wbGUuVGhpbmcuSUNvZGVUaGluZyk6Ym9vbGVhbiB7CgoJCQlyZXR1cm4gdHJ1ZTsKCQl9Cgl9Cn0KCm5hbWVzcGFjZSBTYW1wbGUuVGhpbmcuV2lkZ2V0cyB7CglleHBvcnQgY2xhc3MgRmluZFdpZGdldCBpbXBsZW1lbnRzIFNhbXBsZS5UaGluZy5JV2lkZ2V0IHsKCgkJcHVibGljIGdhcihydW5uZXI6KHdpZGdldDpTYW1wbGUuVGhpbmcuSVdpZGdldCk9PmFueSkgeyBpZiAodHJ1ZSkge3JldHVybiBydW5uZXIodGhpcyk7fX0KCQkJCgkJcHJpdmF0ZSBkb21Ob2RlOmFueSA9IG51bGw7CgkJY29uc3RydWN0b3IocHJpdmF0ZSBjb2RlVGhpbmc6IFNhbXBsZS5UaGluZy5JQ29kZVRoaW5nKSB7CgkJICAgIC8vIHNjZW5hcmlvIDEKCQkgICAgY29kZVRoaW5nLmFkZFdpZGdldCgiYWRkV2lkZ2V0IiwgdGhpcyk7CgkJfQoJCQoJCXB1YmxpYyBnZXREb21Ob2RlKCkgewoJCQlyZXR1cm4gZG9tTm9kZTsKCQl9CgkJCgkJcHVibGljIGRlc3Ryb3koKSB7CgoJCX0KCgl9Cn0KCmludGVyZmFjZSBJTW9kZSB7IGdldEluaXRpYWxTdGF0ZSgpOiBJU3RhdGU7fSAKY2xhc3MgQWJzdHJhY3RNb2RlIGltcGxlbWVudHMgSU1vZGUgeyBwdWJsaWMgZ2V0SW5pdGlhbFN0YXRlKCk6IElTdGF0ZSB7IHJldHVybiBudWxsO30gfQoKaW50ZXJmYWNlIElTdGF0ZSB7fQoKaW50ZXJmYWNlIFdpbmRvdyB7CiAgICBvcGVuZXI6IFdpbmRvdzsKfQpkZWNsYXJlIHZhciBzZWxmOiBXaW5kb3c7CgpuYW1lc3BhY2UgU2FtcGxlLlRoaW5nLkxhbmd1YWdlcy5QbGFpblRleHQgewoJCglleHBvcnQgY2xhc3MgU3RhdGUgaW1wbGVtZW50cyBJU3RhdGUgewkJCiAgICAgICAgY29uc3RydWN0b3IocHJpdmF0ZSBtb2RlOiBJTW9kZSkgeyB9CgkJcHVibGljIGNsb25lKCk6SVN0YXRlIHsKCQkJcmV0dXJuIHRoaXM7CgkJfQoKCQlwdWJsaWMgZXF1YWxzKG90aGVyOklTdGF0ZSk6Ym9vbGVhbiB7CgkJCXJldHVybiB0aGlzID09PSBvdGhlcjsKCQl9CgkJCgkJcHVibGljIGdldE1vZGUoKTogSU1vZGUgeyByZXR1cm4gbW9kZTsgfQoJfQoJCglleHBvcnQgY2xhc3MgTW9kZSBleHRlbmRzIEFic3RyYWN0TW9kZSB7CgoJCS8vIHNjZW5hcmlvIDIKCQlwdWJsaWMgZ2V0SW5pdGlhbFN0YXRlKCk6IElTdGF0ZSB7CgkJCXJldHVybiBuZXcgU3RhdGUoc2VsZik7CgkJfQoKCgl9Cn0KCg== +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,0EAA0E;AA8B1E,IAAU,MAAM,CAUf;AAVD,WAAU,MAAM;IAAC,IAAA,OAAO,CAUvB;IAVgB,WAAA,OAAO;QAAC,IAAA,KAAK,CAU7B;QAVwB,WAAA,OAAK;YAAC,IAAA,IAAI,CAUlC;YAV8B,WAAA,IAAI;gBAClC,MAAa,eAAe;oBAEpB,KAAK,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;oBAExB,GAAG,CAAC,KAA6B;wBAEvC,OAAO,IAAI,CAAC;oBACb,CAAC;iBACD;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV8B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAUlC;QAAD,CAAC,EAVwB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU7B;IAAD,CAAC,EAVgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAUvB;AAAD,CAAC,EAVS,MAAM,KAAN,MAAM,QAUf;AAED,WAAU,MAAM;IAAC,IAAA,KAAK,CAoBrB;IApBgB,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB7B;QApBsB,WAAA,OAAO;YAC7B,MAAa,UAAU;gBAEf,GAAG,CAAC,MAAyC,IAAI,IAAI,IAAI,EAAE,CAAC;oBAAA,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAGzF,YAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBAEM,UAAU;oBAChB,OAAO,OAAO,CAAC;gBAChB,CAAC;gBAEM,OAAO;gBAEd,CAAC;aAED;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBsB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB7B;IAAD,CAAC,EApBgB,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBrB;AAAD,CAAC,EApBS,MAAM,KAAN,MAAM,QAoBf;AAGD,MAAM,YAAY;IAA2B,eAAe,KAAa,OAAO,IAAI,CAAC,CAAA,CAAC;CAAE;AASxF,WAAU,MAAM;IAAC,IAAA,KAAK,CAwBrB;IAxBgB,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB/B;QAxBsB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBzC;YAxBgC,WAAA,SAAS;gBAEzC,MAAa,KAAK;oBACX,YAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,KAAK;wBACX,OAAO,IAAI,CAAC;oBACb,CAAC;oBAEM,MAAM,CAAC,KAAY;wBACzB,OAAO,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,OAAO,KAAY,OAAO,IAAI,CAAC,CAAC,CAAC;iBACxC;gBAXY,eAAK,QAWjB,CAAA;gBAED,MAAa,IAAK,SAAQ,YAAY;oBAErC,aAAa;oBACN,eAAe;wBACrB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;iBAGD;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxBgC,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBzC;QAAD,CAAC,EAxBsB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB/B;IAAD,CAAC,EAxBgB,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBrB;AAAD,CAAC,EAxBS,MAAM,KAAN,MAAM,QAwBf"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KLy8gU2NlbmFyaW8gMTogVGVzdCByZXF1cnNpdmUgZnVuY3Rpb24gY2FsbCB3aXRoICJ0aGlzIiBwYXJhbWV0ZXINCi8vIFNjZW5hcmlvIDI6IFRlc3QgcmVjdXJzaXZlIGZ1bmN0aW9uIGNhbGwgd2l0aCBjYXN0IGFuZCAidGhpcyIgcGFyYW1ldGVyDQp2YXIgU2FtcGxlOw0KKGZ1bmN0aW9uIChTYW1wbGUpIHsNCiAgICB2YXIgQWN0aW9uczsNCiAgICAoZnVuY3Rpb24gKEFjdGlvbnMpIHsNCiAgICAgICAgdmFyIFRoaW5nOw0KICAgICAgICAoZnVuY3Rpb24gKFRoaW5nXzEpIHsNCiAgICAgICAgICAgIHZhciBGaW5kOw0KICAgICAgICAgICAgKGZ1bmN0aW9uIChGaW5kKSB7DQogICAgICAgICAgICAgICAgY2xhc3MgU3RhcnRGaW5kQWN0aW9uIHsNCiAgICAgICAgICAgICAgICAgICAgZ2V0SWQoKSB7IHJldHVybiAieW8iOyB9DQogICAgICAgICAgICAgICAgICAgIHJ1bihUaGluZykgew0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgRmluZC5TdGFydEZpbmRBY3Rpb24gPSBTdGFydEZpbmRBY3Rpb247DQogICAgICAgICAgICB9KShGaW5kID0gVGhpbmdfMS5GaW5kIHx8IChUaGluZ18xLkZpbmQgPSB7fSkpOw0KICAgICAgICB9KShUaGluZyA9IEFjdGlvbnMuVGhpbmcgfHwgKEFjdGlvbnMuVGhpbmcgPSB7fSkpOw0KICAgIH0pKEFjdGlvbnMgPSBTYW1wbGUuQWN0aW9ucyB8fCAoU2FtcGxlLkFjdGlvbnMgPSB7fSkpOw0KfSkoU2FtcGxlIHx8IChTYW1wbGUgPSB7fSkpOw0KKGZ1bmN0aW9uIChTYW1wbGUpIHsNCiAgICB2YXIgVGhpbmc7DQogICAgKGZ1bmN0aW9uIChUaGluZykgew0KICAgICAgICB2YXIgV2lkZ2V0czsNCiAgICAgICAgKGZ1bmN0aW9uIChXaWRnZXRzKSB7DQogICAgICAgICAgICBjbGFzcyBGaW5kV2lkZ2V0IHsNCiAgICAgICAgICAgICAgICBnYXIocnVubmVyKSB7IGlmICh0cnVlKSB7DQogICAgICAgICAgICAgICAgICAgIHJldHVybiBydW5uZXIodGhpcyk7DQogICAgICAgICAgICAgICAgfSB9DQogICAgICAgICAgICAgICAgY29uc3RydWN0b3IoY29kZVRoaW5nKSB7DQogICAgICAgICAgICAgICAgICAgIHRoaXMuY29kZVRoaW5nID0gY29kZVRoaW5nOw0KICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUgPSBudWxsOw0KICAgICAgICAgICAgICAgICAgICAvLyBzY2VuYXJpbyAxDQogICAgICAgICAgICAgICAgICAgIGNvZGVUaGluZy5hZGRXaWRnZXQoImFkZFdpZGdldCIsIHRoaXMpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBnZXREb21Ob2RlKCkgew0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gZG9tTm9kZTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgZGVzdHJveSgpIHsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgICAgICBXaWRnZXRzLkZpbmRXaWRnZXQgPSBGaW5kV2lkZ2V0Ow0KICAgICAgICB9KShXaWRnZXRzID0gVGhpbmcuV2lkZ2V0cyB8fCAoVGhpbmcuV2lkZ2V0cyA9IHt9KSk7DQogICAgfSkoVGhpbmcgPSBTYW1wbGUuVGhpbmcgfHwgKFNhbXBsZS5UaGluZyA9IHt9KSk7DQp9KShTYW1wbGUgfHwgKFNhbXBsZSA9IHt9KSk7DQpjbGFzcyBBYnN0cmFjdE1vZGUgew0KICAgIGdldEluaXRpYWxTdGF0ZSgpIHsgcmV0dXJuIG51bGw7IH0NCn0NCihmdW5jdGlvbiAoU2FtcGxlKSB7DQogICAgdmFyIFRoaW5nOw0KICAgIChmdW5jdGlvbiAoVGhpbmcpIHsNCiAgICAgICAgdmFyIExhbmd1YWdlczsNCiAgICAgICAgKGZ1bmN0aW9uIChMYW5ndWFnZXMpIHsNCiAgICAgICAgICAgIHZhciBQbGFpblRleHQ7DQogICAgICAgICAgICAoZnVuY3Rpb24gKFBsYWluVGV4dCkgew0KICAgICAgICAgICAgICAgIGNsYXNzIFN0YXRlIHsNCiAgICAgICAgICAgICAgICAgICAgY29uc3RydWN0b3IobW9kZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tb2RlID0gbW9kZTsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICBjbG9uZSgpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIGVxdWFscyhvdGhlcikgew0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMgPT09IG90aGVyOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIGdldE1vZGUoKSB7IHJldHVybiBtb2RlOyB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIFBsYWluVGV4dC5TdGF0ZSA9IFN0YXRlOw0KICAgICAgICAgICAgICAgIGNsYXNzIE1vZGUgZXh0ZW5kcyBBYnN0cmFjdE1vZGUgew0KICAgICAgICAgICAgICAgICAgICAvLyBzY2VuYXJpbyAyDQogICAgICAgICAgICAgICAgICAgIGdldEluaXRpYWxTdGF0ZSgpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU3RhdGUoc2VsZik7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgUGxhaW5UZXh0Lk1vZGUgPSBNb2RlOw0KICAgICAgICAgICAgfSkoUGxhaW5UZXh0ID0gTGFuZ3VhZ2VzLlBsYWluVGV4dCB8fCAoTGFuZ3VhZ2VzLlBsYWluVGV4dCA9IHt9KSk7DQogICAgICAgIH0pKExhbmd1YWdlcyA9IFRoaW5nLkxhbmd1YWdlcyB8fCAoVGhpbmcuTGFuZ3VhZ2VzID0ge30pKTsNCiAgICB9KShUaGluZyA9IFNhbXBsZS5UaGluZyB8fCAoU2FtcGxlLlRoaW5nID0ge30pKTsNCn0pKFNhbXBsZSB8fCAoU2FtcGxlID0ge30pKTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXJlY3Vyc2l2ZUNsYXNzUmVmZXJlbmNlVGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjdXJzaXZlQ2xhc3NSZWZlcmVuY2VUZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVjdXJzaXZlQ2xhc3NSZWZlcmVuY2VUZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxpRUFBaUU7QUFDakUsMEVBQTBFO0FBOEIxRSxJQUFVLE1BQU0sQ0FVZjtBQVZELFdBQVUsTUFBTTtJQUFDLElBQUEsT0FBTyxDQVV2QjtJQVZnQixXQUFBLE9BQU87UUFBQyxJQUFBLEtBQUssQ0FVN0I7UUFWd0IsV0FBQSxPQUFLO1lBQUMsSUFBQSxJQUFJLENBVWxDO1lBVjhCLFdBQUEsSUFBSTtnQkFDbEMsTUFBYSxlQUFlO29CQUVwQixLQUFLLEtBQUssT0FBTyxJQUFJLENBQUMsQ0FBQyxDQUFDO29CQUV4QixHQUFHLENBQUMsS0FBNkI7d0JBRXZDLE9BQU8sSUFBSSxDQUFDO29CQUNiLENBQUM7aUJBQ0Q7Z0JBUlksb0JBQWUsa0JBUTNCLENBQUE7WUFDRixDQUFDLEVBVjhCLElBQUksR0FBSixZQUFJLEtBQUosWUFBSSxRQVVsQztRQUFELENBQUMsRUFWd0IsS0FBSyxHQUFMLGFBQUssS0FBTCxhQUFLLFFBVTdCO0lBQUQsQ0FBQyxFQVZnQixPQUFPLEdBQVAsY0FBTyxLQUFQLGNBQU8sUUFVdkI7QUFBRCxDQUFDLEVBVlMsTUFBTSxLQUFOLE1BQU0sUUFVZjtBQUVELFdBQVUsTUFBTTtJQUFDLElBQUEsS0FBSyxDQW9CckI7SUFwQmdCLFdBQUEsS0FBSztRQUFDLElBQUEsT0FBTyxDQW9CN0I7UUFwQnNCLFdBQUEsT0FBTztZQUM3QixNQUFhLFVBQVU7Z0JBRWYsR0FBRyxDQUFDLE1BQXlDLElBQUksSUFBSSxJQUFJLEVBQUUsQ0FBQztvQkFBQSxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztnQkFBQSxDQUFDLENBQUEsQ0FBQztnQkFHekYsWUFBb0IsU0FBa0M7b0JBQWxDLGNBQVMsR0FBVCxTQUFTLENBQXlCO29CQUQ5QyxZQUFPLEdBQU8sSUFBSSxDQUFDO29CQUV2QixhQUFhO29CQUNiLFNBQVMsQ0FBQyxTQUFTLENBQUMsV0FBVyxFQUFFLElBQUksQ0FBQyxDQUFDO2dCQUMzQyxDQUFDO2dCQUVNLFVBQVU7b0JBQ2hCLE9BQU8sT0FBTyxDQUFDO2dCQUNoQixDQUFDO2dCQUVNLE9BQU87Z0JBRWQsQ0FBQzthQUVEO1lBbEJZLGtCQUFVLGFBa0J0QixDQUFBO1FBQ0YsQ0FBQyxFQXBCc0IsT0FBTyxHQUFQLGFBQU8sS0FBUCxhQUFPLFFBb0I3QjtJQUFELENBQUMsRUFwQmdCLEtBQUssR0FBTCxZQUFLLEtBQUwsWUFBSyxRQW9CckI7QUFBRCxDQUFDLEVBcEJTLE1BQU0sS0FBTixNQUFNLFFBb0JmO0FBR0QsTUFBTSxZQUFZO0lBQTJCLGVBQWUsS0FBYSxPQUFPLElBQUksQ0FBQyxDQUFBLENBQUM7Q0FBRTtBQVN4RixXQUFVLE1BQU07SUFBQyxJQUFBLEtBQUssQ0F3QnJCO0lBeEJnQixXQUFBLEtBQUs7UUFBQyxJQUFBLFNBQVMsQ0F3Qi9CO1FBeEJzQixXQUFBLFNBQVM7WUFBQyxJQUFBLFNBQVMsQ0F3QnpDO1lBeEJnQyxXQUFBLFNBQVM7Z0JBRXpDLE1BQWEsS0FBSztvQkFDWCxZQUFvQixJQUFXO3dCQUFYLFNBQUksR0FBSixJQUFJLENBQU87b0JBQUksQ0FBQztvQkFDbkMsS0FBSzt3QkFDWCxPQUFPLElBQUksQ0FBQztvQkFDYixDQUFDO29CQUVNLE1BQU0sQ0FBQyxLQUFZO3dCQUN6QixPQUFPLElBQUksS0FBSyxLQUFLLENBQUM7b0JBQ3ZCLENBQUM7b0JBRU0sT0FBTyxLQUFZLE9BQU8sSUFBSSxDQUFDLENBQUMsQ0FBQztpQkFDeEM7Z0JBWFksZUFBSyxRQVdqQixDQUFBO2dCQUVELE1BQWEsSUFBSyxTQUFRLFlBQVk7b0JBRXJDLGFBQWE7b0JBQ04sZUFBZTt3QkFDckIsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztvQkFDeEIsQ0FBQztpQkFHRDtnQkFSWSxjQUFJLE9BUWhCLENBQUE7WUFDRixDQUFDLEVBeEJnQyxTQUFTLEdBQVQsbUJBQVMsS0FBVCxtQkFBUyxRQXdCekM7UUFBRCxDQUFDLEVBeEJzQixTQUFTLEdBQVQsZUFBUyxLQUFULGVBQVMsUUF3Qi9CO0lBQUQsQ0FBQyxFQXhCZ0IsS0FBSyxHQUFMLFlBQUssS0FBTCxZQUFLLFFBd0JyQjtBQUFELENBQUMsRUF4QlMsTUFBTSxLQUFOLE1BQU0sUUF3QmYifQ==,Ly8gU2NlbmFyaW8gMTogVGVzdCByZXF1cnNpdmUgZnVuY3Rpb24gY2FsbCB3aXRoICJ0aGlzIiBwYXJhbWV0ZXIKLy8gU2NlbmFyaW8gMjogVGVzdCByZWN1cnNpdmUgZnVuY3Rpb24gY2FsbCB3aXRoIGNhc3QgYW5kICJ0aGlzIiBwYXJhbWV0ZXIKCgoKZGVjbGFyZSBuYW1lc3BhY2UgU2FtcGxlLlRoaW5nIHsKCglleHBvcnQgaW50ZXJmYWNlIElXaWRnZXQgewoJCWdldERvbU5vZGUoKTogYW55OwoJCWRlc3Ryb3koKTsKCQlnYXIocnVubmVyOih3aWRnZXQ6U2FtcGxlLlRoaW5nLklXaWRnZXQpPT5hbnkpOmFueTsKCX0KCglleHBvcnQgaW50ZXJmYWNlIElDb2RlVGhpbmcgewogIAogIAkJZ2V0RG9tTm9kZSgpOiBFbGVtZW50OwoJCQoJCWFkZFdpZGdldCh3aWRnZXRJZDpzdHJpbmcsIHdpZGdldDpJV2lkZ2V0KTsKCgkJCgkJZm9jdXMoKTsgCgkJCgkJLy9hZGRXaWRnZXQod2lkZ2V0OiBTYW1wbGUuVGhpbmcuV2lkZ2V0cy5JV2lkZ2V0KTsKCX0KCglleHBvcnQgaW50ZXJmYWNlIElBY3Rpb24gewoJCXJ1bihUaGluZzpJQ29kZVRoaW5nKTpib29sZWFuOwoJCWdldElkKCk6c3RyaW5nOwoJfQkKfQoKbmFtZXNwYWNlIFNhbXBsZS5BY3Rpb25zLlRoaW5nLkZpbmQgewoJZXhwb3J0IGNsYXNzIFN0YXJ0RmluZEFjdGlvbiBpbXBsZW1lbnRzIFNhbXBsZS5UaGluZy5JQWN0aW9uIHsKCQkKCQlwdWJsaWMgZ2V0SWQoKSB7IHJldHVybiAieW8iOyB9CgkJCgkJcHVibGljIHJ1bihUaGluZzpTYW1wbGUuVGhpbmcuSUNvZGVUaGluZyk6Ym9vbGVhbiB7CgoJCQlyZXR1cm4gdHJ1ZTsKCQl9Cgl9Cn0KCm5hbWVzcGFjZSBTYW1wbGUuVGhpbmcuV2lkZ2V0cyB7CglleHBvcnQgY2xhc3MgRmluZFdpZGdldCBpbXBsZW1lbnRzIFNhbXBsZS5UaGluZy5JV2lkZ2V0IHsKCgkJcHVibGljIGdhcihydW5uZXI6KHdpZGdldDpTYW1wbGUuVGhpbmcuSVdpZGdldCk9PmFueSkgeyBpZiAodHJ1ZSkge3JldHVybiBydW5uZXIodGhpcyk7fX0KCQkJCgkJcHJpdmF0ZSBkb21Ob2RlOmFueSA9IG51bGw7CgkJY29uc3RydWN0b3IocHJpdmF0ZSBjb2RlVGhpbmc6IFNhbXBsZS5UaGluZy5JQ29kZVRoaW5nKSB7CgkJICAgIC8vIHNjZW5hcmlvIDEKCQkgICAgY29kZVRoaW5nLmFkZFdpZGdldCgiYWRkV2lkZ2V0IiwgdGhpcyk7CgkJfQoJCQoJCXB1YmxpYyBnZXREb21Ob2RlKCkgewoJCQlyZXR1cm4gZG9tTm9kZTsKCQl9CgkJCgkJcHVibGljIGRlc3Ryb3koKSB7CgoJCX0KCgl9Cn0KCmludGVyZmFjZSBJTW9kZSB7IGdldEluaXRpYWxTdGF0ZSgpOiBJU3RhdGU7fSAKY2xhc3MgQWJzdHJhY3RNb2RlIGltcGxlbWVudHMgSU1vZGUgeyBwdWJsaWMgZ2V0SW5pdGlhbFN0YXRlKCk6IElTdGF0ZSB7IHJldHVybiBudWxsO30gfQoKaW50ZXJmYWNlIElTdGF0ZSB7fQoKaW50ZXJmYWNlIFdpbmRvdyB7CiAgICBvcGVuZXI6IFdpbmRvdzsKfQpkZWNsYXJlIHZhciBzZWxmOiBXaW5kb3c7CgpuYW1lc3BhY2UgU2FtcGxlLlRoaW5nLkxhbmd1YWdlcy5QbGFpblRleHQgewoJCglleHBvcnQgY2xhc3MgU3RhdGUgaW1wbGVtZW50cyBJU3RhdGUgewkJCiAgICAgICAgY29uc3RydWN0b3IocHJpdmF0ZSBtb2RlOiBJTW9kZSkgeyB9CgkJcHVibGljIGNsb25lKCk6SVN0YXRlIHsKCQkJcmV0dXJuIHRoaXM7CgkJfQoKCQlwdWJsaWMgZXF1YWxzKG90aGVyOklTdGF0ZSk6Ym9vbGVhbiB7CgkJCXJldHVybiB0aGlzID09PSBvdGhlcjsKCQl9CgkJCgkJcHVibGljIGdldE1vZGUoKTogSU1vZGUgeyByZXR1cm4gbW9kZTsgfQoJfQoJCglleHBvcnQgY2xhc3MgTW9kZSBleHRlbmRzIEFic3RyYWN0TW9kZSB7CgoJCS8vIHNjZW5hcmlvIDIKCQlwdWJsaWMgZ2V0SW5pdGlhbFN0YXRlKCk6IElTdGF0ZSB7CgkJCXJldHVybiBuZXcgU3RhdGUoc2VsZik7CgkJfQoKCgl9Cn0KCg== diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 626ea2a1bf3ca..49c62d4ab2f6c 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -8,14 +8,15 @@ sources: recursiveClassReferenceTest.ts emittedFile:recursiveClassReferenceTest.js sourceFile:recursiveClassReferenceTest.ts ------------------------------------------------------------------- +>>>"use strict"; >>>// Scenario 1: Test reqursive function call with "this" parameter 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^-> 1 > 2 >// Scenario 1: Test reqursive function call with "this" parameter -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 66) Source(1, 66) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 66) Source(1, 66) + SourceIndex(0) --- >>>// Scenario 2: Test recursive function call with cast and "this" parameter 1-> @@ -23,8 +24,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 >// Scenario 2: Test recursive function call with cast and "this" parameter -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) +1->Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 75) Source(2, 75) + SourceIndex(0) --- >>>var Sample; 1 > @@ -76,10 +77,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(3, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(3, 5) Source(32, 11) + SourceIndex(0) -3 >Emitted(3, 11) Source(32, 17) + SourceIndex(0) -4 >Emitted(3, 12) Source(42, 2) + SourceIndex(0) +1 >Emitted(4, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(32, 11) + SourceIndex(0) +3 >Emitted(4, 11) Source(32, 17) + SourceIndex(0) +4 >Emitted(4, 12) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -88,9 +89,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >namespace 3 > Sample -1->Emitted(4, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(4, 12) Source(32, 11) + SourceIndex(0) -3 >Emitted(4, 18) Source(32, 17) + SourceIndex(0) +1->Emitted(5, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(5, 12) Source(32, 11) + SourceIndex(0) +3 >Emitted(5, 18) Source(32, 17) + SourceIndex(0) --- >>> var Actions; 1 >^^^^ @@ -112,10 +113,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(5, 5) Source(32, 18) + SourceIndex(0) -2 >Emitted(5, 9) Source(32, 18) + SourceIndex(0) -3 >Emitted(5, 16) Source(32, 25) + SourceIndex(0) -4 >Emitted(5, 17) Source(42, 2) + SourceIndex(0) +1 >Emitted(6, 5) Source(32, 18) + SourceIndex(0) +2 >Emitted(6, 9) Source(32, 18) + SourceIndex(0) +3 >Emitted(6, 16) Source(32, 25) + SourceIndex(0) +4 >Emitted(6, 17) Source(42, 2) + SourceIndex(0) --- >>> (function (Actions) { 1->^^^^ @@ -124,9 +125,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Actions -1->Emitted(6, 5) Source(32, 18) + SourceIndex(0) -2 >Emitted(6, 16) Source(32, 18) + SourceIndex(0) -3 >Emitted(6, 23) Source(32, 25) + SourceIndex(0) +1->Emitted(7, 5) Source(32, 18) + SourceIndex(0) +2 >Emitted(7, 16) Source(32, 18) + SourceIndex(0) +3 >Emitted(7, 23) Source(32, 25) + SourceIndex(0) --- >>> var Thing; 1 >^^^^^^^^ @@ -148,10 +149,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(7, 9) Source(32, 26) + SourceIndex(0) -2 >Emitted(7, 13) Source(32, 26) + SourceIndex(0) -3 >Emitted(7, 18) Source(32, 31) + SourceIndex(0) -4 >Emitted(7, 19) Source(42, 2) + SourceIndex(0) +1 >Emitted(8, 9) Source(32, 26) + SourceIndex(0) +2 >Emitted(8, 13) Source(32, 26) + SourceIndex(0) +3 >Emitted(8, 18) Source(32, 31) + SourceIndex(0) +4 >Emitted(8, 19) Source(42, 2) + SourceIndex(0) --- >>> (function (Thing_1) { 1->^^^^^^^^ @@ -160,9 +161,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(8, 9) Source(32, 26) + SourceIndex(0) -2 >Emitted(8, 20) Source(32, 26) + SourceIndex(0) -3 >Emitted(8, 27) Source(32, 31) + SourceIndex(0) +1->Emitted(9, 9) Source(32, 26) + SourceIndex(0) +2 >Emitted(9, 20) Source(32, 26) + SourceIndex(0) +3 >Emitted(9, 27) Source(32, 31) + SourceIndex(0) --- >>> var Find; 1 >^^^^^^^^^^^^ @@ -184,10 +185,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(9, 13) Source(32, 32) + SourceIndex(0) -2 >Emitted(9, 17) Source(32, 32) + SourceIndex(0) -3 >Emitted(9, 21) Source(32, 36) + SourceIndex(0) -4 >Emitted(9, 22) Source(42, 2) + SourceIndex(0) +1 >Emitted(10, 13) Source(32, 32) + SourceIndex(0) +2 >Emitted(10, 17) Source(32, 32) + SourceIndex(0) +3 >Emitted(10, 21) Source(32, 36) + SourceIndex(0) +4 >Emitted(10, 22) Source(42, 2) + SourceIndex(0) --- >>> (function (Find) { 1->^^^^^^^^^^^^ @@ -197,9 +198,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Find -1->Emitted(10, 13) Source(32, 32) + SourceIndex(0) -2 >Emitted(10, 24) Source(32, 32) + SourceIndex(0) -3 >Emitted(10, 28) Source(32, 36) + SourceIndex(0) +1->Emitted(11, 13) Source(32, 32) + SourceIndex(0) +2 >Emitted(11, 24) Source(32, 32) + SourceIndex(0) +3 >Emitted(11, 28) Source(32, 36) + SourceIndex(0) --- >>> class StartFindAction { 1->^^^^^^^^^^^^^^^^ @@ -210,9 +211,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > export class 3 > StartFindAction -1->Emitted(11, 17) Source(33, 2) + SourceIndex(0) -2 >Emitted(11, 23) Source(33, 15) + SourceIndex(0) -3 >Emitted(11, 38) Source(33, 30) + SourceIndex(0) +1->Emitted(12, 17) Source(33, 2) + SourceIndex(0) +2 >Emitted(12, 23) Source(33, 15) + SourceIndex(0) +3 >Emitted(12, 38) Source(33, 30) + SourceIndex(0) --- >>> getId() { return "yo"; } 1->^^^^^^^^^^^^^^^^^^^^ @@ -233,14 +234,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > ; 7 > 8 > } -1->Emitted(12, 21) Source(35, 10) + SourceIndex(0) -2 >Emitted(12, 26) Source(35, 15) + SourceIndex(0) -3 >Emitted(12, 31) Source(35, 20) + SourceIndex(0) -4 >Emitted(12, 38) Source(35, 27) + SourceIndex(0) -5 >Emitted(12, 42) Source(35, 31) + SourceIndex(0) -6 >Emitted(12, 43) Source(35, 32) + SourceIndex(0) -7 >Emitted(12, 44) Source(35, 33) + SourceIndex(0) -8 >Emitted(12, 45) Source(35, 34) + SourceIndex(0) +1->Emitted(13, 21) Source(35, 10) + SourceIndex(0) +2 >Emitted(13, 26) Source(35, 15) + SourceIndex(0) +3 >Emitted(13, 31) Source(35, 20) + SourceIndex(0) +4 >Emitted(13, 38) Source(35, 27) + SourceIndex(0) +5 >Emitted(13, 42) Source(35, 31) + SourceIndex(0) +6 >Emitted(13, 43) Source(35, 32) + SourceIndex(0) +7 >Emitted(13, 44) Source(35, 33) + SourceIndex(0) +8 >Emitted(13, 45) Source(35, 34) + SourceIndex(0) --- >>> run(Thing) { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -254,10 +255,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > run 3 > ( 4 > Thing:Sample.Thing.ICodeThing -1 >Emitted(13, 21) Source(37, 10) + SourceIndex(0) -2 >Emitted(13, 24) Source(37, 13) + SourceIndex(0) -3 >Emitted(13, 25) Source(37, 14) + SourceIndex(0) -4 >Emitted(13, 30) Source(37, 43) + SourceIndex(0) +1 >Emitted(14, 21) Source(37, 10) + SourceIndex(0) +2 >Emitted(14, 24) Source(37, 13) + SourceIndex(0) +3 >Emitted(14, 25) Source(37, 14) + SourceIndex(0) +4 >Emitted(14, 30) Source(37, 43) + SourceIndex(0) --- >>> return true; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -270,10 +271,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > return 3 > true 4 > ; -1->Emitted(14, 25) Source(39, 4) + SourceIndex(0) -2 >Emitted(14, 32) Source(39, 11) + SourceIndex(0) -3 >Emitted(14, 36) Source(39, 15) + SourceIndex(0) -4 >Emitted(14, 37) Source(39, 16) + SourceIndex(0) +1->Emitted(15, 25) Source(39, 4) + SourceIndex(0) +2 >Emitted(15, 32) Source(39, 11) + SourceIndex(0) +3 >Emitted(15, 36) Source(39, 15) + SourceIndex(0) +4 >Emitted(15, 37) Source(39, 16) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -281,15 +282,15 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(15, 21) Source(40, 3) + SourceIndex(0) -2 >Emitted(15, 22) Source(40, 4) + SourceIndex(0) +1 >Emitted(16, 21) Source(40, 3) + SourceIndex(0) +2 >Emitted(16, 22) Source(40, 4) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > } -1 >Emitted(16, 18) Source(41, 3) + SourceIndex(0) +1 >Emitted(17, 18) Source(41, 3) + SourceIndex(0) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -309,10 +310,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 4 > -1->Emitted(17, 17) Source(33, 15) + SourceIndex(0) -2 >Emitted(17, 37) Source(33, 30) + SourceIndex(0) -3 >Emitted(17, 55) Source(41, 3) + SourceIndex(0) -4 >Emitted(17, 56) Source(41, 3) + SourceIndex(0) +1->Emitted(18, 17) Source(33, 15) + SourceIndex(0) +2 >Emitted(18, 37) Source(33, 30) + SourceIndex(0) +3 >Emitted(18, 55) Source(41, 3) + SourceIndex(0) +4 >Emitted(18, 56) Source(41, 3) + SourceIndex(0) --- >>> })(Find = Thing_1.Find || (Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -344,15 +345,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(18, 13) Source(42, 1) + SourceIndex(0) -2 >Emitted(18, 14) Source(42, 2) + SourceIndex(0) -3 >Emitted(18, 16) Source(32, 32) + SourceIndex(0) -4 >Emitted(18, 20) Source(32, 36) + SourceIndex(0) -5 >Emitted(18, 23) Source(32, 32) + SourceIndex(0) -6 >Emitted(18, 35) Source(32, 36) + SourceIndex(0) -7 >Emitted(18, 40) Source(32, 32) + SourceIndex(0) -8 >Emitted(18, 52) Source(32, 36) + SourceIndex(0) -9 >Emitted(18, 60) Source(42, 2) + SourceIndex(0) +1->Emitted(19, 13) Source(42, 1) + SourceIndex(0) +2 >Emitted(19, 14) Source(42, 2) + SourceIndex(0) +3 >Emitted(19, 16) Source(32, 32) + SourceIndex(0) +4 >Emitted(19, 20) Source(32, 36) + SourceIndex(0) +5 >Emitted(19, 23) Source(32, 32) + SourceIndex(0) +6 >Emitted(19, 35) Source(32, 36) + SourceIndex(0) +7 >Emitted(19, 40) Source(32, 32) + SourceIndex(0) +8 >Emitted(19, 52) Source(32, 36) + SourceIndex(0) +9 >Emitted(19, 60) Source(42, 2) + SourceIndex(0) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -384,15 +385,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(19, 9) Source(42, 1) + SourceIndex(0) -2 >Emitted(19, 10) Source(42, 2) + SourceIndex(0) -3 >Emitted(19, 12) Source(32, 26) + SourceIndex(0) -4 >Emitted(19, 17) Source(32, 31) + SourceIndex(0) -5 >Emitted(19, 20) Source(32, 26) + SourceIndex(0) -6 >Emitted(19, 33) Source(32, 31) + SourceIndex(0) -7 >Emitted(19, 38) Source(32, 26) + SourceIndex(0) -8 >Emitted(19, 51) Source(32, 31) + SourceIndex(0) -9 >Emitted(19, 59) Source(42, 2) + SourceIndex(0) +1 >Emitted(20, 9) Source(42, 1) + SourceIndex(0) +2 >Emitted(20, 10) Source(42, 2) + SourceIndex(0) +3 >Emitted(20, 12) Source(32, 26) + SourceIndex(0) +4 >Emitted(20, 17) Source(32, 31) + SourceIndex(0) +5 >Emitted(20, 20) Source(32, 26) + SourceIndex(0) +6 >Emitted(20, 33) Source(32, 31) + SourceIndex(0) +7 >Emitted(20, 38) Source(32, 26) + SourceIndex(0) +8 >Emitted(20, 51) Source(32, 31) + SourceIndex(0) +9 >Emitted(20, 59) Source(42, 2) + SourceIndex(0) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -423,15 +424,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(20, 5) Source(42, 1) + SourceIndex(0) -2 >Emitted(20, 6) Source(42, 2) + SourceIndex(0) -3 >Emitted(20, 8) Source(32, 18) + SourceIndex(0) -4 >Emitted(20, 15) Source(32, 25) + SourceIndex(0) -5 >Emitted(20, 18) Source(32, 18) + SourceIndex(0) -6 >Emitted(20, 32) Source(32, 25) + SourceIndex(0) -7 >Emitted(20, 37) Source(32, 18) + SourceIndex(0) -8 >Emitted(20, 51) Source(32, 25) + SourceIndex(0) -9 >Emitted(20, 59) Source(42, 2) + SourceIndex(0) +1->Emitted(21, 5) Source(42, 1) + SourceIndex(0) +2 >Emitted(21, 6) Source(42, 2) + SourceIndex(0) +3 >Emitted(21, 8) Source(32, 18) + SourceIndex(0) +4 >Emitted(21, 15) Source(32, 25) + SourceIndex(0) +5 >Emitted(21, 18) Source(32, 18) + SourceIndex(0) +6 >Emitted(21, 32) Source(32, 25) + SourceIndex(0) +7 >Emitted(21, 37) Source(32, 18) + SourceIndex(0) +8 >Emitted(21, 51) Source(32, 25) + SourceIndex(0) +9 >Emitted(21, 59) Source(42, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -458,13 +459,13 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(21, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(21, 2) Source(42, 2) + SourceIndex(0) -3 >Emitted(21, 4) Source(32, 11) + SourceIndex(0) -4 >Emitted(21, 10) Source(32, 17) + SourceIndex(0) -5 >Emitted(21, 15) Source(32, 11) + SourceIndex(0) -6 >Emitted(21, 21) Source(32, 17) + SourceIndex(0) -7 >Emitted(21, 29) Source(42, 2) + SourceIndex(0) +1 >Emitted(22, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(22, 2) Source(42, 2) + SourceIndex(0) +3 >Emitted(22, 4) Source(32, 11) + SourceIndex(0) +4 >Emitted(22, 10) Source(32, 17) + SourceIndex(0) +5 >Emitted(22, 15) Source(32, 11) + SourceIndex(0) +6 >Emitted(22, 21) Source(32, 17) + SourceIndex(0) +7 >Emitted(22, 29) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1 > @@ -475,9 +476,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >namespace 3 > Sample -1 >Emitted(22, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(22, 12) Source(44, 11) + SourceIndex(0) -3 >Emitted(22, 18) Source(44, 17) + SourceIndex(0) +1 >Emitted(23, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(23, 12) Source(44, 11) + SourceIndex(0) +3 >Emitted(23, 18) Source(44, 17) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -509,10 +510,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(23, 5) Source(44, 18) + SourceIndex(0) -2 >Emitted(23, 9) Source(44, 18) + SourceIndex(0) -3 >Emitted(23, 14) Source(44, 23) + SourceIndex(0) -4 >Emitted(23, 15) Source(64, 2) + SourceIndex(0) +1 >Emitted(24, 5) Source(44, 18) + SourceIndex(0) +2 >Emitted(24, 9) Source(44, 18) + SourceIndex(0) +3 >Emitted(24, 14) Source(44, 23) + SourceIndex(0) +4 >Emitted(24, 15) Source(64, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -522,9 +523,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(24, 5) Source(44, 18) + SourceIndex(0) -2 >Emitted(24, 16) Source(44, 18) + SourceIndex(0) -3 >Emitted(24, 21) Source(44, 23) + SourceIndex(0) +1->Emitted(25, 5) Source(44, 18) + SourceIndex(0) +2 >Emitted(25, 16) Source(44, 18) + SourceIndex(0) +3 >Emitted(25, 21) Source(44, 23) + SourceIndex(0) --- >>> var Widgets; 1->^^^^^^^^ @@ -556,10 +557,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(25, 9) Source(44, 24) + SourceIndex(0) -2 >Emitted(25, 13) Source(44, 24) + SourceIndex(0) -3 >Emitted(25, 20) Source(44, 31) + SourceIndex(0) -4 >Emitted(25, 21) Source(64, 2) + SourceIndex(0) +1->Emitted(26, 9) Source(44, 24) + SourceIndex(0) +2 >Emitted(26, 13) Source(44, 24) + SourceIndex(0) +3 >Emitted(26, 20) Source(44, 31) + SourceIndex(0) +4 >Emitted(26, 21) Source(64, 2) + SourceIndex(0) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -569,9 +570,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Widgets -1->Emitted(26, 9) Source(44, 24) + SourceIndex(0) -2 >Emitted(26, 20) Source(44, 24) + SourceIndex(0) -3 >Emitted(26, 27) Source(44, 31) + SourceIndex(0) +1->Emitted(27, 9) Source(44, 24) + SourceIndex(0) +2 >Emitted(27, 20) Source(44, 24) + SourceIndex(0) +3 >Emitted(27, 27) Source(44, 31) + SourceIndex(0) --- >>> class FindWidget { 1->^^^^^^^^^^^^ @@ -582,9 +583,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > export class 3 > FindWidget -1->Emitted(27, 13) Source(45, 2) + SourceIndex(0) -2 >Emitted(27, 19) Source(45, 15) + SourceIndex(0) -3 >Emitted(27, 29) Source(45, 25) + SourceIndex(0) +1->Emitted(28, 13) Source(45, 2) + SourceIndex(0) +2 >Emitted(28, 19) Source(45, 15) + SourceIndex(0) +3 >Emitted(28, 29) Source(45, 25) + SourceIndex(0) --- >>> gar(runner) { if (true) { 1->^^^^^^^^^^^^^^^^ @@ -607,15 +608,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > true 8 > ) 9 > { -1->Emitted(28, 17) Source(47, 10) + SourceIndex(0) -2 >Emitted(28, 20) Source(47, 13) + SourceIndex(0) -3 >Emitted(28, 21) Source(47, 14) + SourceIndex(0) -4 >Emitted(28, 27) Source(47, 55) + SourceIndex(0) -5 >Emitted(28, 31) Source(47, 59) + SourceIndex(0) -6 >Emitted(28, 35) Source(47, 63) + SourceIndex(0) -7 >Emitted(28, 39) Source(47, 67) + SourceIndex(0) -8 >Emitted(28, 41) Source(47, 69) + SourceIndex(0) -9 >Emitted(28, 42) Source(47, 70) + SourceIndex(0) +1->Emitted(29, 17) Source(47, 10) + SourceIndex(0) +2 >Emitted(29, 20) Source(47, 13) + SourceIndex(0) +3 >Emitted(29, 21) Source(47, 14) + SourceIndex(0) +4 >Emitted(29, 27) Source(47, 55) + SourceIndex(0) +5 >Emitted(29, 31) Source(47, 59) + SourceIndex(0) +6 >Emitted(29, 35) Source(47, 63) + SourceIndex(0) +7 >Emitted(29, 39) Source(47, 67) + SourceIndex(0) +8 >Emitted(29, 41) Source(47, 69) + SourceIndex(0) +9 >Emitted(29, 42) Source(47, 70) + SourceIndex(0) --- >>> return runner(this); 1 >^^^^^^^^^^^^^^^^^^^^ @@ -632,13 +633,13 @@ sourceFile:recursiveClassReferenceTest.ts 5 > this 6 > ) 7 > ; -1 >Emitted(29, 21) Source(47, 70) + SourceIndex(0) -2 >Emitted(29, 28) Source(47, 77) + SourceIndex(0) -3 >Emitted(29, 34) Source(47, 83) + SourceIndex(0) -4 >Emitted(29, 35) Source(47, 84) + SourceIndex(0) -5 >Emitted(29, 39) Source(47, 88) + SourceIndex(0) -6 >Emitted(29, 40) Source(47, 89) + SourceIndex(0) -7 >Emitted(29, 41) Source(47, 90) + SourceIndex(0) +1 >Emitted(30, 21) Source(47, 70) + SourceIndex(0) +2 >Emitted(30, 28) Source(47, 77) + SourceIndex(0) +3 >Emitted(30, 34) Source(47, 83) + SourceIndex(0) +4 >Emitted(30, 35) Source(47, 84) + SourceIndex(0) +5 >Emitted(30, 39) Source(47, 88) + SourceIndex(0) +6 >Emitted(30, 40) Source(47, 89) + SourceIndex(0) +7 >Emitted(30, 41) Source(47, 90) + SourceIndex(0) --- >>> } } 1 >^^^^^^^^^^^^^^^^ @@ -650,10 +651,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > } 3 > 4 > } -1 >Emitted(30, 17) Source(47, 90) + SourceIndex(0) -2 >Emitted(30, 18) Source(47, 91) + SourceIndex(0) -3 >Emitted(30, 19) Source(47, 91) + SourceIndex(0) -4 >Emitted(30, 20) Source(47, 92) + SourceIndex(0) +1 >Emitted(31, 17) Source(47, 90) + SourceIndex(0) +2 >Emitted(31, 18) Source(47, 91) + SourceIndex(0) +3 >Emitted(31, 19) Source(47, 91) + SourceIndex(0) +4 >Emitted(31, 20) Source(47, 92) + SourceIndex(0) --- >>> constructor(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -666,9 +667,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > codeThing: Sample.Thing.ICodeThing -1->Emitted(31, 17) Source(50, 3) + SourceIndex(0) -2 >Emitted(31, 29) Source(50, 23) + SourceIndex(0) -3 >Emitted(31, 38) Source(50, 57) + SourceIndex(0) +1->Emitted(32, 17) Source(50, 3) + SourceIndex(0) +2 >Emitted(32, 29) Source(50, 23) + SourceIndex(0) +3 >Emitted(32, 38) Source(50, 57) + SourceIndex(0) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -681,11 +682,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(32, 21) Source(50, 23) + SourceIndex(0) -2 >Emitted(32, 35) Source(50, 32) + SourceIndex(0) -3 >Emitted(32, 38) Source(50, 23) + SourceIndex(0) -4 >Emitted(32, 47) Source(50, 32) + SourceIndex(0) -5 >Emitted(32, 48) Source(50, 57) + SourceIndex(0) +1->Emitted(33, 21) Source(50, 23) + SourceIndex(0) +2 >Emitted(33, 35) Source(50, 32) + SourceIndex(0) +3 >Emitted(33, 38) Source(50, 23) + SourceIndex(0) +4 >Emitted(33, 47) Source(50, 32) + SourceIndex(0) +5 >Emitted(33, 48) Source(50, 57) + SourceIndex(0) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -698,11 +699,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(33, 21) Source(49, 11) + SourceIndex(0) -2 >Emitted(33, 33) Source(49, 18) + SourceIndex(0) -3 >Emitted(33, 36) Source(49, 25) + SourceIndex(0) -4 >Emitted(33, 40) Source(49, 29) + SourceIndex(0) -5 >Emitted(33, 41) Source(49, 30) + SourceIndex(0) +1 >Emitted(34, 21) Source(49, 11) + SourceIndex(0) +2 >Emitted(34, 33) Source(49, 18) + SourceIndex(0) +3 >Emitted(34, 36) Source(49, 25) + SourceIndex(0) +4 >Emitted(34, 40) Source(49, 29) + SourceIndex(0) +5 >Emitted(34, 41) Source(49, 30) + SourceIndex(0) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -712,8 +713,8 @@ sourceFile:recursiveClassReferenceTest.ts > constructor(private codeThing: Sample.Thing.ICodeThing) { > 2 > // scenario 1 -1 >Emitted(34, 21) Source(51, 7) + SourceIndex(0) -2 >Emitted(34, 34) Source(51, 20) + SourceIndex(0) +1 >Emitted(35, 21) Source(51, 7) + SourceIndex(0) +2 >Emitted(35, 34) Source(51, 20) + SourceIndex(0) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -737,16 +738,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(35, 21) Source(52, 7) + SourceIndex(0) -2 >Emitted(35, 30) Source(52, 16) + SourceIndex(0) -3 >Emitted(35, 31) Source(52, 17) + SourceIndex(0) -4 >Emitted(35, 40) Source(52, 26) + SourceIndex(0) -5 >Emitted(35, 41) Source(52, 27) + SourceIndex(0) -6 >Emitted(35, 52) Source(52, 38) + SourceIndex(0) -7 >Emitted(35, 54) Source(52, 40) + SourceIndex(0) -8 >Emitted(35, 58) Source(52, 44) + SourceIndex(0) -9 >Emitted(35, 59) Source(52, 45) + SourceIndex(0) -10>Emitted(35, 60) Source(52, 46) + SourceIndex(0) +1->Emitted(36, 21) Source(52, 7) + SourceIndex(0) +2 >Emitted(36, 30) Source(52, 16) + SourceIndex(0) +3 >Emitted(36, 31) Source(52, 17) + SourceIndex(0) +4 >Emitted(36, 40) Source(52, 26) + SourceIndex(0) +5 >Emitted(36, 41) Source(52, 27) + SourceIndex(0) +6 >Emitted(36, 52) Source(52, 38) + SourceIndex(0) +7 >Emitted(36, 54) Source(52, 40) + SourceIndex(0) +8 >Emitted(36, 58) Source(52, 44) + SourceIndex(0) +9 >Emitted(36, 59) Source(52, 45) + SourceIndex(0) +10>Emitted(36, 60) Source(52, 46) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -755,8 +756,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(36, 17) Source(53, 3) + SourceIndex(0) -2 >Emitted(36, 18) Source(53, 4) + SourceIndex(0) +1 >Emitted(37, 17) Source(53, 3) + SourceIndex(0) +2 >Emitted(37, 18) Source(53, 4) + SourceIndex(0) --- >>> getDomNode() { 1->^^^^^^^^^^^^^^^^ @@ -766,8 +767,8 @@ sourceFile:recursiveClassReferenceTest.ts > > public 2 > getDomNode -1->Emitted(37, 17) Source(55, 10) + SourceIndex(0) -2 >Emitted(37, 27) Source(55, 20) + SourceIndex(0) +1->Emitted(38, 17) Source(55, 10) + SourceIndex(0) +2 >Emitted(38, 27) Source(55, 20) + SourceIndex(0) --- >>> return domNode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -779,10 +780,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > return 3 > domNode 4 > ; -1->Emitted(38, 21) Source(56, 4) + SourceIndex(0) -2 >Emitted(38, 28) Source(56, 11) + SourceIndex(0) -3 >Emitted(38, 35) Source(56, 18) + SourceIndex(0) -4 >Emitted(38, 36) Source(56, 19) + SourceIndex(0) +1->Emitted(39, 21) Source(56, 4) + SourceIndex(0) +2 >Emitted(39, 28) Source(56, 11) + SourceIndex(0) +3 >Emitted(39, 35) Source(56, 18) + SourceIndex(0) +4 >Emitted(39, 36) Source(56, 19) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -791,8 +792,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(39, 17) Source(57, 3) + SourceIndex(0) -2 >Emitted(39, 18) Source(57, 4) + SourceIndex(0) +1 >Emitted(40, 17) Source(57, 3) + SourceIndex(0) +2 >Emitted(40, 18) Source(57, 4) + SourceIndex(0) --- >>> destroy() { 1->^^^^^^^^^^^^^^^^ @@ -801,8 +802,8 @@ sourceFile:recursiveClassReferenceTest.ts > > public 2 > destroy -1->Emitted(40, 17) Source(59, 10) + SourceIndex(0) -2 >Emitted(40, 24) Source(59, 17) + SourceIndex(0) +1->Emitted(41, 17) Source(59, 10) + SourceIndex(0) +2 >Emitted(41, 24) Source(59, 17) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -811,8 +812,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(41, 17) Source(61, 3) + SourceIndex(0) -2 >Emitted(41, 18) Source(61, 4) + SourceIndex(0) +1 >Emitted(42, 17) Source(61, 3) + SourceIndex(0) +2 >Emitted(42, 18) Source(61, 4) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^ @@ -820,7 +821,7 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > > } -1 >Emitted(42, 14) Source(63, 3) + SourceIndex(0) +1 >Emitted(43, 14) Source(63, 3) + SourceIndex(0) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -850,10 +851,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(43, 13) Source(45, 15) + SourceIndex(0) -2 >Emitted(43, 31) Source(45, 25) + SourceIndex(0) -3 >Emitted(43, 44) Source(63, 3) + SourceIndex(0) -4 >Emitted(43, 45) Source(63, 3) + SourceIndex(0) +1->Emitted(44, 13) Source(45, 15) + SourceIndex(0) +2 >Emitted(44, 31) Source(45, 25) + SourceIndex(0) +3 >Emitted(44, 44) Source(63, 3) + SourceIndex(0) +4 >Emitted(44, 45) Source(63, 3) + SourceIndex(0) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -895,15 +896,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(44, 9) Source(64, 1) + SourceIndex(0) -2 >Emitted(44, 10) Source(64, 2) + SourceIndex(0) -3 >Emitted(44, 12) Source(44, 24) + SourceIndex(0) -4 >Emitted(44, 19) Source(44, 31) + SourceIndex(0) -5 >Emitted(44, 22) Source(44, 24) + SourceIndex(0) -6 >Emitted(44, 35) Source(44, 31) + SourceIndex(0) -7 >Emitted(44, 40) Source(44, 24) + SourceIndex(0) -8 >Emitted(44, 53) Source(44, 31) + SourceIndex(0) -9 >Emitted(44, 61) Source(64, 2) + SourceIndex(0) +1->Emitted(45, 9) Source(64, 1) + SourceIndex(0) +2 >Emitted(45, 10) Source(64, 2) + SourceIndex(0) +3 >Emitted(45, 12) Source(44, 24) + SourceIndex(0) +4 >Emitted(45, 19) Source(44, 31) + SourceIndex(0) +5 >Emitted(45, 22) Source(44, 24) + SourceIndex(0) +6 >Emitted(45, 35) Source(44, 31) + SourceIndex(0) +7 >Emitted(45, 40) Source(44, 24) + SourceIndex(0) +8 >Emitted(45, 53) Source(44, 31) + SourceIndex(0) +9 >Emitted(45, 61) Source(64, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -944,15 +945,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(45, 5) Source(64, 1) + SourceIndex(0) -2 >Emitted(45, 6) Source(64, 2) + SourceIndex(0) -3 >Emitted(45, 8) Source(44, 18) + SourceIndex(0) -4 >Emitted(45, 13) Source(44, 23) + SourceIndex(0) -5 >Emitted(45, 16) Source(44, 18) + SourceIndex(0) -6 >Emitted(45, 28) Source(44, 23) + SourceIndex(0) -7 >Emitted(45, 33) Source(44, 18) + SourceIndex(0) -8 >Emitted(45, 45) Source(44, 23) + SourceIndex(0) -9 >Emitted(45, 53) Source(64, 2) + SourceIndex(0) +1 >Emitted(46, 5) Source(64, 1) + SourceIndex(0) +2 >Emitted(46, 6) Source(64, 2) + SourceIndex(0) +3 >Emitted(46, 8) Source(44, 18) + SourceIndex(0) +4 >Emitted(46, 13) Source(44, 23) + SourceIndex(0) +5 >Emitted(46, 16) Source(44, 18) + SourceIndex(0) +6 >Emitted(46, 28) Source(44, 23) + SourceIndex(0) +7 >Emitted(46, 33) Source(44, 18) + SourceIndex(0) +8 >Emitted(46, 45) Source(44, 23) + SourceIndex(0) +9 >Emitted(46, 53) Source(64, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -989,13 +990,13 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(46, 1) Source(64, 1) + SourceIndex(0) -2 >Emitted(46, 2) Source(64, 2) + SourceIndex(0) -3 >Emitted(46, 4) Source(44, 11) + SourceIndex(0) -4 >Emitted(46, 10) Source(44, 17) + SourceIndex(0) -5 >Emitted(46, 15) Source(44, 11) + SourceIndex(0) -6 >Emitted(46, 21) Source(44, 17) + SourceIndex(0) -7 >Emitted(46, 29) Source(64, 2) + SourceIndex(0) +1 >Emitted(47, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(47, 2) Source(64, 2) + SourceIndex(0) +3 >Emitted(47, 4) Source(44, 11) + SourceIndex(0) +4 >Emitted(47, 10) Source(44, 17) + SourceIndex(0) +5 >Emitted(47, 15) Source(44, 11) + SourceIndex(0) +6 >Emitted(47, 21) Source(44, 17) + SourceIndex(0) +7 >Emitted(47, 29) Source(64, 2) + SourceIndex(0) --- >>>class AbstractMode { 1 > @@ -1008,9 +1009,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >class 3 > AbstractMode -1 >Emitted(47, 1) Source(67, 1) + SourceIndex(0) -2 >Emitted(47, 7) Source(67, 7) + SourceIndex(0) -3 >Emitted(47, 19) Source(67, 19) + SourceIndex(0) +1 >Emitted(48, 1) Source(67, 1) + SourceIndex(0) +2 >Emitted(48, 7) Source(67, 7) + SourceIndex(0) +3 >Emitted(48, 19) Source(67, 19) + SourceIndex(0) --- >>> getInitialState() { return null; } 1->^^^^ @@ -1029,20 +1030,20 @@ sourceFile:recursiveClassReferenceTest.ts 6 > ; 7 > 8 > } -1->Emitted(48, 5) Source(67, 46) + SourceIndex(0) -2 >Emitted(48, 20) Source(67, 61) + SourceIndex(0) -3 >Emitted(48, 25) Source(67, 74) + SourceIndex(0) -4 >Emitted(48, 32) Source(67, 81) + SourceIndex(0) -5 >Emitted(48, 36) Source(67, 85) + SourceIndex(0) -6 >Emitted(48, 37) Source(67, 86) + SourceIndex(0) -7 >Emitted(48, 38) Source(67, 86) + SourceIndex(0) -8 >Emitted(48, 39) Source(67, 87) + SourceIndex(0) +1->Emitted(49, 5) Source(67, 46) + SourceIndex(0) +2 >Emitted(49, 20) Source(67, 61) + SourceIndex(0) +3 >Emitted(49, 25) Source(67, 74) + SourceIndex(0) +4 >Emitted(49, 32) Source(67, 81) + SourceIndex(0) +5 >Emitted(49, 36) Source(67, 85) + SourceIndex(0) +6 >Emitted(49, 37) Source(67, 86) + SourceIndex(0) +7 >Emitted(49, 38) Source(67, 86) + SourceIndex(0) +8 >Emitted(49, 39) Source(67, 87) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(49, 2) Source(67, 89) + SourceIndex(0) +1 >Emitted(50, 2) Source(67, 89) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -1060,9 +1061,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >namespace 3 > Sample -1->Emitted(50, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(50, 12) Source(76, 11) + SourceIndex(0) -3 >Emitted(50, 18) Source(76, 17) + SourceIndex(0) +1->Emitted(51, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(51, 12) Source(76, 11) + SourceIndex(0) +3 >Emitted(51, 18) Source(76, 17) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -1098,10 +1099,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(51, 5) Source(76, 18) + SourceIndex(0) -2 >Emitted(51, 9) Source(76, 18) + SourceIndex(0) -3 >Emitted(51, 14) Source(76, 23) + SourceIndex(0) -4 >Emitted(51, 15) Source(100, 2) + SourceIndex(0) +1 >Emitted(52, 5) Source(76, 18) + SourceIndex(0) +2 >Emitted(52, 9) Source(76, 18) + SourceIndex(0) +3 >Emitted(52, 14) Source(76, 23) + SourceIndex(0) +4 >Emitted(52, 15) Source(100, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -1111,9 +1112,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(52, 5) Source(76, 18) + SourceIndex(0) -2 >Emitted(52, 16) Source(76, 18) + SourceIndex(0) -3 >Emitted(52, 21) Source(76, 23) + SourceIndex(0) +1->Emitted(53, 5) Source(76, 18) + SourceIndex(0) +2 >Emitted(53, 16) Source(76, 18) + SourceIndex(0) +3 >Emitted(53, 21) Source(76, 23) + SourceIndex(0) --- >>> var Languages; 1->^^^^^^^^ @@ -1149,10 +1150,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(53, 9) Source(76, 24) + SourceIndex(0) -2 >Emitted(53, 13) Source(76, 24) + SourceIndex(0) -3 >Emitted(53, 22) Source(76, 33) + SourceIndex(0) -4 >Emitted(53, 23) Source(100, 2) + SourceIndex(0) +1->Emitted(54, 9) Source(76, 24) + SourceIndex(0) +2 >Emitted(54, 13) Source(76, 24) + SourceIndex(0) +3 >Emitted(54, 22) Source(76, 33) + SourceIndex(0) +4 >Emitted(54, 23) Source(100, 2) + SourceIndex(0) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1161,9 +1162,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(54, 9) Source(76, 24) + SourceIndex(0) -2 >Emitted(54, 20) Source(76, 24) + SourceIndex(0) -3 >Emitted(54, 29) Source(76, 33) + SourceIndex(0) +1->Emitted(55, 9) Source(76, 24) + SourceIndex(0) +2 >Emitted(55, 20) Source(76, 24) + SourceIndex(0) +3 >Emitted(55, 29) Source(76, 33) + SourceIndex(0) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1199,10 +1200,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(55, 13) Source(76, 34) + SourceIndex(0) -2 >Emitted(55, 17) Source(76, 34) + SourceIndex(0) -3 >Emitted(55, 26) Source(76, 43) + SourceIndex(0) -4 >Emitted(55, 27) Source(100, 2) + SourceIndex(0) +1 >Emitted(56, 13) Source(76, 34) + SourceIndex(0) +2 >Emitted(56, 17) Source(76, 34) + SourceIndex(0) +3 >Emitted(56, 26) Source(76, 43) + SourceIndex(0) +4 >Emitted(56, 27) Source(100, 2) + SourceIndex(0) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1211,9 +1212,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > PlainText -1->Emitted(56, 13) Source(76, 34) + SourceIndex(0) -2 >Emitted(56, 24) Source(76, 34) + SourceIndex(0) -3 >Emitted(56, 33) Source(76, 43) + SourceIndex(0) +1->Emitted(57, 13) Source(76, 34) + SourceIndex(0) +2 >Emitted(57, 24) Source(76, 34) + SourceIndex(0) +3 >Emitted(57, 33) Source(76, 43) + SourceIndex(0) --- >>> class State { 1 >^^^^^^^^^^^^^^^^ @@ -1225,9 +1226,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > export class 3 > State -1 >Emitted(57, 17) Source(78, 2) + SourceIndex(0) -2 >Emitted(57, 23) Source(78, 15) + SourceIndex(0) -3 >Emitted(57, 28) Source(78, 20) + SourceIndex(0) +1 >Emitted(58, 17) Source(78, 2) + SourceIndex(0) +2 >Emitted(58, 23) Source(78, 15) + SourceIndex(0) +3 >Emitted(58, 28) Source(78, 20) + SourceIndex(0) --- >>> constructor(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1238,9 +1239,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > mode: IMode -1->Emitted(58, 21) Source(79, 9) + SourceIndex(0) -2 >Emitted(58, 33) Source(79, 29) + SourceIndex(0) -3 >Emitted(58, 37) Source(79, 40) + SourceIndex(0) +1->Emitted(59, 21) Source(79, 9) + SourceIndex(0) +2 >Emitted(59, 33) Source(79, 29) + SourceIndex(0) +3 >Emitted(59, 37) Source(79, 40) + SourceIndex(0) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1253,11 +1254,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(59, 25) Source(79, 29) + SourceIndex(0) -2 >Emitted(59, 34) Source(79, 33) + SourceIndex(0) -3 >Emitted(59, 37) Source(79, 29) + SourceIndex(0) -4 >Emitted(59, 41) Source(79, 33) + SourceIndex(0) -5 >Emitted(59, 42) Source(79, 40) + SourceIndex(0) +1->Emitted(60, 25) Source(79, 29) + SourceIndex(0) +2 >Emitted(60, 34) Source(79, 33) + SourceIndex(0) +3 >Emitted(60, 37) Source(79, 29) + SourceIndex(0) +4 >Emitted(60, 41) Source(79, 33) + SourceIndex(0) +5 >Emitted(60, 42) Source(79, 40) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1265,8 +1266,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(60, 21) Source(79, 44) + SourceIndex(0) -2 >Emitted(60, 22) Source(79, 45) + SourceIndex(0) +1 >Emitted(61, 21) Source(79, 44) + SourceIndex(0) +2 >Emitted(61, 22) Source(79, 45) + SourceIndex(0) --- >>> clone() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1275,8 +1276,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > public 2 > clone -1->Emitted(61, 21) Source(80, 10) + SourceIndex(0) -2 >Emitted(61, 26) Source(80, 15) + SourceIndex(0) +1->Emitted(62, 21) Source(80, 10) + SourceIndex(0) +2 >Emitted(62, 26) Source(80, 15) + SourceIndex(0) --- >>> return this; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1288,10 +1289,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > return 3 > this 4 > ; -1->Emitted(62, 25) Source(81, 4) + SourceIndex(0) -2 >Emitted(62, 32) Source(81, 11) + SourceIndex(0) -3 >Emitted(62, 36) Source(81, 15) + SourceIndex(0) -4 >Emitted(62, 37) Source(81, 16) + SourceIndex(0) +1->Emitted(63, 25) Source(81, 4) + SourceIndex(0) +2 >Emitted(63, 32) Source(81, 11) + SourceIndex(0) +3 >Emitted(63, 36) Source(81, 15) + SourceIndex(0) +4 >Emitted(63, 37) Source(81, 16) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1300,8 +1301,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(63, 21) Source(82, 3) + SourceIndex(0) -2 >Emitted(63, 22) Source(82, 4) + SourceIndex(0) +1 >Emitted(64, 21) Source(82, 3) + SourceIndex(0) +2 >Emitted(64, 22) Source(82, 4) + SourceIndex(0) --- >>> equals(other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1315,10 +1316,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > equals 3 > ( 4 > other:IState -1->Emitted(64, 21) Source(84, 10) + SourceIndex(0) -2 >Emitted(64, 27) Source(84, 16) + SourceIndex(0) -3 >Emitted(64, 28) Source(84, 17) + SourceIndex(0) -4 >Emitted(64, 33) Source(84, 29) + SourceIndex(0) +1->Emitted(65, 21) Source(84, 10) + SourceIndex(0) +2 >Emitted(65, 27) Source(84, 16) + SourceIndex(0) +3 >Emitted(65, 28) Source(84, 17) + SourceIndex(0) +4 >Emitted(65, 33) Source(84, 29) + SourceIndex(0) --- >>> return this === other; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1334,12 +1335,12 @@ sourceFile:recursiveClassReferenceTest.ts 4 > === 5 > other 6 > ; -1->Emitted(65, 25) Source(85, 4) + SourceIndex(0) -2 >Emitted(65, 32) Source(85, 11) + SourceIndex(0) -3 >Emitted(65, 36) Source(85, 15) + SourceIndex(0) -4 >Emitted(65, 41) Source(85, 20) + SourceIndex(0) -5 >Emitted(65, 46) Source(85, 25) + SourceIndex(0) -6 >Emitted(65, 47) Source(85, 26) + SourceIndex(0) +1->Emitted(66, 25) Source(85, 4) + SourceIndex(0) +2 >Emitted(66, 32) Source(85, 11) + SourceIndex(0) +3 >Emitted(66, 36) Source(85, 15) + SourceIndex(0) +4 >Emitted(66, 41) Source(85, 20) + SourceIndex(0) +5 >Emitted(66, 46) Source(85, 25) + SourceIndex(0) +6 >Emitted(66, 47) Source(85, 26) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1348,8 +1349,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(66, 21) Source(86, 3) + SourceIndex(0) -2 >Emitted(66, 22) Source(86, 4) + SourceIndex(0) +1 >Emitted(67, 21) Source(86, 3) + SourceIndex(0) +2 >Emitted(67, 22) Source(86, 4) + SourceIndex(0) --- >>> getMode() { return mode; } 1->^^^^^^^^^^^^^^^^^^^^ @@ -1370,21 +1371,21 @@ sourceFile:recursiveClassReferenceTest.ts 6 > ; 7 > 8 > } -1->Emitted(67, 21) Source(88, 10) + SourceIndex(0) -2 >Emitted(67, 28) Source(88, 17) + SourceIndex(0) -3 >Emitted(67, 33) Source(88, 29) + SourceIndex(0) -4 >Emitted(67, 40) Source(88, 36) + SourceIndex(0) -5 >Emitted(67, 44) Source(88, 40) + SourceIndex(0) -6 >Emitted(67, 45) Source(88, 41) + SourceIndex(0) -7 >Emitted(67, 46) Source(88, 42) + SourceIndex(0) -8 >Emitted(67, 47) Source(88, 43) + SourceIndex(0) +1->Emitted(68, 21) Source(88, 10) + SourceIndex(0) +2 >Emitted(68, 28) Source(88, 17) + SourceIndex(0) +3 >Emitted(68, 33) Source(88, 29) + SourceIndex(0) +4 >Emitted(68, 40) Source(88, 36) + SourceIndex(0) +5 >Emitted(68, 44) Source(88, 40) + SourceIndex(0) +6 >Emitted(68, 45) Source(88, 41) + SourceIndex(0) +7 >Emitted(68, 46) Source(88, 42) + SourceIndex(0) +8 >Emitted(68, 47) Source(88, 43) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > } -1 >Emitted(68, 18) Source(89, 3) + SourceIndex(0) +1 >Emitted(69, 18) Source(89, 3) + SourceIndex(0) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1407,10 +1408,10 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 4 > -1->Emitted(69, 17) Source(78, 15) + SourceIndex(0) -2 >Emitted(69, 32) Source(78, 20) + SourceIndex(0) -3 >Emitted(69, 40) Source(89, 3) + SourceIndex(0) -4 >Emitted(69, 41) Source(89, 3) + SourceIndex(0) +1->Emitted(70, 17) Source(78, 15) + SourceIndex(0) +2 >Emitted(70, 32) Source(78, 20) + SourceIndex(0) +3 >Emitted(70, 40) Source(89, 3) + SourceIndex(0) +4 >Emitted(70, 41) Source(89, 3) + SourceIndex(0) --- >>> class Mode extends AbstractMode { 1->^^^^^^^^^^^^^^^^ @@ -1425,11 +1426,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > Mode 4 > extends 5 > AbstractMode -1->Emitted(70, 17) Source(91, 2) + SourceIndex(0) -2 >Emitted(70, 23) Source(91, 15) + SourceIndex(0) -3 >Emitted(70, 27) Source(91, 20) + SourceIndex(0) -4 >Emitted(70, 36) Source(91, 28) + SourceIndex(0) -5 >Emitted(70, 48) Source(91, 40) + SourceIndex(0) +1->Emitted(71, 17) Source(91, 2) + SourceIndex(0) +2 >Emitted(71, 23) Source(91, 15) + SourceIndex(0) +3 >Emitted(71, 27) Source(91, 20) + SourceIndex(0) +4 >Emitted(71, 36) Source(91, 28) + SourceIndex(0) +5 >Emitted(71, 48) Source(91, 40) + SourceIndex(0) --- >>> // scenario 2 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1439,8 +1440,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > // scenario 2 -1 >Emitted(71, 21) Source(93, 3) + SourceIndex(0) -2 >Emitted(71, 34) Source(93, 16) + SourceIndex(0) +1 >Emitted(72, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(72, 34) Source(93, 16) + SourceIndex(0) --- >>> getInitialState() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1449,8 +1450,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > public 2 > getInitialState -1->Emitted(72, 21) Source(94, 10) + SourceIndex(0) -2 >Emitted(72, 36) Source(94, 25) + SourceIndex(0) +1->Emitted(73, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(73, 36) Source(94, 25) + SourceIndex(0) --- >>> return new State(self); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1470,14 +1471,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > self 7 > ) 8 > ; -1->Emitted(73, 25) Source(95, 4) + SourceIndex(0) -2 >Emitted(73, 32) Source(95, 11) + SourceIndex(0) -3 >Emitted(73, 36) Source(95, 15) + SourceIndex(0) -4 >Emitted(73, 41) Source(95, 20) + SourceIndex(0) -5 >Emitted(73, 42) Source(95, 21) + SourceIndex(0) -6 >Emitted(73, 46) Source(95, 25) + SourceIndex(0) -7 >Emitted(73, 47) Source(95, 26) + SourceIndex(0) -8 >Emitted(73, 48) Source(95, 27) + SourceIndex(0) +1->Emitted(74, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(74, 32) Source(95, 11) + SourceIndex(0) +3 >Emitted(74, 36) Source(95, 15) + SourceIndex(0) +4 >Emitted(74, 41) Source(95, 20) + SourceIndex(0) +5 >Emitted(74, 42) Source(95, 21) + SourceIndex(0) +6 >Emitted(74, 46) Source(95, 25) + SourceIndex(0) +7 >Emitted(74, 47) Source(95, 26) + SourceIndex(0) +8 >Emitted(74, 48) Source(95, 27) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1485,8 +1486,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(74, 21) Source(96, 3) + SourceIndex(0) -2 >Emitted(74, 22) Source(96, 4) + SourceIndex(0) +1 >Emitted(75, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(75, 22) Source(96, 4) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^ @@ -1495,7 +1496,7 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1 >Emitted(75, 18) Source(99, 3) + SourceIndex(0) +1 >Emitted(76, 18) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1515,10 +1516,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(76, 17) Source(91, 15) + SourceIndex(0) -2 >Emitted(76, 31) Source(91, 19) + SourceIndex(0) -3 >Emitted(76, 38) Source(99, 3) + SourceIndex(0) -4 >Emitted(76, 39) Source(99, 3) + SourceIndex(0) +1->Emitted(77, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(77, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(77, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(77, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1564,15 +1565,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(77, 13) Source(100, 1) + SourceIndex(0) -2 >Emitted(77, 14) Source(100, 2) + SourceIndex(0) -3 >Emitted(77, 16) Source(76, 34) + SourceIndex(0) -4 >Emitted(77, 25) Source(76, 43) + SourceIndex(0) -5 >Emitted(77, 28) Source(76, 34) + SourceIndex(0) -6 >Emitted(77, 47) Source(76, 43) + SourceIndex(0) -7 >Emitted(77, 52) Source(76, 34) + SourceIndex(0) -8 >Emitted(77, 71) Source(76, 43) + SourceIndex(0) -9 >Emitted(77, 79) Source(100, 2) + SourceIndex(0) +1->Emitted(78, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(78, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(78, 16) Source(76, 34) + SourceIndex(0) +4 >Emitted(78, 25) Source(76, 43) + SourceIndex(0) +5 >Emitted(78, 28) Source(76, 34) + SourceIndex(0) +6 >Emitted(78, 47) Source(76, 43) + SourceIndex(0) +7 >Emitted(78, 52) Source(76, 34) + SourceIndex(0) +8 >Emitted(78, 71) Source(76, 43) + SourceIndex(0) +9 >Emitted(78, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1617,15 +1618,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(78, 9) Source(100, 1) + SourceIndex(0) -2 >Emitted(78, 10) Source(100, 2) + SourceIndex(0) -3 >Emitted(78, 12) Source(76, 24) + SourceIndex(0) -4 >Emitted(78, 21) Source(76, 33) + SourceIndex(0) -5 >Emitted(78, 24) Source(76, 24) + SourceIndex(0) -6 >Emitted(78, 39) Source(76, 33) + SourceIndex(0) -7 >Emitted(78, 44) Source(76, 24) + SourceIndex(0) -8 >Emitted(78, 59) Source(76, 33) + SourceIndex(0) -9 >Emitted(78, 67) Source(100, 2) + SourceIndex(0) +1 >Emitted(79, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(79, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(79, 12) Source(76, 24) + SourceIndex(0) +4 >Emitted(79, 21) Source(76, 33) + SourceIndex(0) +5 >Emitted(79, 24) Source(76, 24) + SourceIndex(0) +6 >Emitted(79, 39) Source(76, 33) + SourceIndex(0) +7 >Emitted(79, 44) Source(76, 24) + SourceIndex(0) +8 >Emitted(79, 59) Source(76, 33) + SourceIndex(0) +9 >Emitted(79, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1670,15 +1671,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(79, 5) Source(100, 1) + SourceIndex(0) -2 >Emitted(79, 6) Source(100, 2) + SourceIndex(0) -3 >Emitted(79, 8) Source(76, 18) + SourceIndex(0) -4 >Emitted(79, 13) Source(76, 23) + SourceIndex(0) -5 >Emitted(79, 16) Source(76, 18) + SourceIndex(0) -6 >Emitted(79, 28) Source(76, 23) + SourceIndex(0) -7 >Emitted(79, 33) Source(76, 18) + SourceIndex(0) -8 >Emitted(79, 45) Source(76, 23) + SourceIndex(0) -9 >Emitted(79, 53) Source(100, 2) + SourceIndex(0) +1 >Emitted(80, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(80, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(80, 8) Source(76, 18) + SourceIndex(0) +4 >Emitted(80, 13) Source(76, 23) + SourceIndex(0) +5 >Emitted(80, 16) Source(76, 18) + SourceIndex(0) +6 >Emitted(80, 28) Source(76, 23) + SourceIndex(0) +7 >Emitted(80, 33) Source(76, 18) + SourceIndex(0) +8 >Emitted(80, 45) Source(76, 23) + SourceIndex(0) +9 >Emitted(80, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1720,12 +1721,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(80, 1) Source(100, 1) + SourceIndex(0) -2 >Emitted(80, 2) Source(100, 2) + SourceIndex(0) -3 >Emitted(80, 4) Source(76, 11) + SourceIndex(0) -4 >Emitted(80, 10) Source(76, 17) + SourceIndex(0) -5 >Emitted(80, 15) Source(76, 11) + SourceIndex(0) -6 >Emitted(80, 21) Source(76, 17) + SourceIndex(0) -7 >Emitted(80, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(81, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(81, 2) Source(100, 2) + SourceIndex(0) +3 >Emitted(81, 4) Source(76, 11) + SourceIndex(0) +4 >Emitted(81, 10) Source(76, 17) + SourceIndex(0) +5 >Emitted(81, 15) Source(76, 11) + SourceIndex(0) +6 >Emitted(81, 21) Source(76, 17) + SourceIndex(0) +7 >Emitted(81, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithBindingPattern1.js.map b/tests/baselines/reference/restParameterWithBindingPattern1.js.map index 3c69f02dbf144..6bc6d9aaf73bc 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern1.js.map +++ b/tests/baselines/reference/restParameterWithBindingPattern1.js.map @@ -1,3 +1,3 @@ //// [restParameterWithBindingPattern1.js.map] -{"version":3,"file":"restParameterWithBindingPattern1.js","sourceRoot":"","sources":["restParameterWithBindingPattern1.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC,CAAC,GAAG,EAAC,CAAC,EAAE,CAAC,EAAC,IAAI,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZnVuY3Rpb24gYSguLi57IGEsIGIgfSkgeyB9DQovLyMgc291cmNlTWFwcGluZ1VSTD1yZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLENBQUMsQ0FBQyxHQUFHLEVBQUMsQ0FBQyxFQUFFLENBQUMsRUFBQyxJQUFJLENBQUMifQ==,ZnVuY3Rpb24gYSguLi57YSwgYn0pIHsgfQ== +{"version":3,"file":"restParameterWithBindingPattern1.js","sourceRoot":"","sources":["restParameterWithBindingPattern1.ts"],"names":[],"mappings":";AAAA,SAAS,CAAC,CAAC,GAAG,EAAC,CAAC,EAAE,CAAC,EAAC,IAAI,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KZnVuY3Rpb24gYSguLi57IGEsIGIgfSkgeyB9DQovLyMgc291cmNlTWFwcGluZ1VSTD1yZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsU0FBUyxDQUFDLENBQUMsR0FBRyxFQUFDLENBQUMsRUFBRSxDQUFDLEVBQUMsSUFBSSxDQUFDIn0=,ZnVuY3Rpb24gYSguLi57YSwgYn0pIHsgfQ== diff --git a/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt b/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt index 3e84556857772..aae52b551a6b8 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt +++ b/tests/baselines/reference/restParameterWithBindingPattern1.sourcemap.txt @@ -8,6 +8,7 @@ sources: restParameterWithBindingPattern1.ts emittedFile:restParameterWithBindingPattern1.js sourceFile:restParameterWithBindingPattern1.ts ------------------------------------------------------------------- +>>>"use strict"; >>>function a(...{ a, b }) { } 1 > 2 >^^^^^^^^^ @@ -34,17 +35,17 @@ sourceFile:restParameterWithBindingPattern1.ts 10> } 11> ) { 12> } -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -4 >Emitted(1, 12) Source(1, 12) + SourceIndex(0) -5 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -6 >Emitted(1, 17) Source(1, 16) + SourceIndex(0) -7 >Emitted(1, 18) Source(1, 17) + SourceIndex(0) -8 >Emitted(1, 20) Source(1, 19) + SourceIndex(0) -9 >Emitted(1, 21) Source(1, 20) + SourceIndex(0) -10>Emitted(1, 23) Source(1, 21) + SourceIndex(0) -11>Emitted(1, 27) Source(1, 25) + SourceIndex(0) -12>Emitted(1, 28) Source(1, 26) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 10) Source(1, 10) + SourceIndex(0) +3 >Emitted(2, 11) Source(1, 11) + SourceIndex(0) +4 >Emitted(2, 12) Source(1, 12) + SourceIndex(0) +5 >Emitted(2, 15) Source(1, 15) + SourceIndex(0) +6 >Emitted(2, 17) Source(1, 16) + SourceIndex(0) +7 >Emitted(2, 18) Source(1, 17) + SourceIndex(0) +8 >Emitted(2, 20) Source(1, 19) + SourceIndex(0) +9 >Emitted(2, 21) Source(1, 20) + SourceIndex(0) +10>Emitted(2, 23) Source(1, 21) + SourceIndex(0) +11>Emitted(2, 27) Source(1, 25) + SourceIndex(0) +12>Emitted(2, 28) Source(1, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=restParameterWithBindingPattern1.js.map \ No newline at end of file diff --git a/tests/baselines/reference/restParameterWithBindingPattern2.js.map b/tests/baselines/reference/restParameterWithBindingPattern2.js.map index 799d88df0b328..da464c9dbeb2e 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern2.js.map +++ b/tests/baselines/reference/restParameterWithBindingPattern2.js.map @@ -1,3 +1,3 @@ //// [restParameterWithBindingPattern2.js.map] -{"version":3,"file":"restParameterWithBindingPattern2.js","sourceRoot":"","sources":["restParameterWithBindingPattern2.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZnVuY3Rpb24gYSguLi5bYSwgYl0pIHsgfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjIuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMifQ==,ZnVuY3Rpb24gYSguLi5bYSwgYl0pIHsgfQ== +{"version":3,"file":"restParameterWithBindingPattern2.js","sourceRoot":"","sources":["restParameterWithBindingPattern2.ts"],"names":[],"mappings":";AAAA,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KZnVuY3Rpb24gYSguLi5bYSwgYl0pIHsgfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9cmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjIuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdFBhcmFtZXRlcldpdGhCaW5kaW5nUGF0dGVybjIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJyZXN0UGFyYW1ldGVyV2l0aEJpbmRpbmdQYXR0ZXJuMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsU0FBUyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDIn0=,ZnVuY3Rpb24gYSguLi5bYSwgYl0pIHsgfQ== diff --git a/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt b/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt index eced4e957357c..dcdceb54d43d0 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/restParameterWithBindingPattern2.sourcemap.txt @@ -8,6 +8,7 @@ sources: restParameterWithBindingPattern2.ts emittedFile:restParameterWithBindingPattern2.js sourceFile:restParameterWithBindingPattern2.ts ------------------------------------------------------------------- +>>>"use strict"; >>>function a(...[a, b]) { } 1 > 2 >^^^^^^^^^ @@ -34,17 +35,17 @@ sourceFile:restParameterWithBindingPattern2.ts 10> ] 11> ) { 12> } -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0) -3 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -4 >Emitted(1, 12) Source(1, 12) + SourceIndex(0) -5 >Emitted(1, 15) Source(1, 15) + SourceIndex(0) -6 >Emitted(1, 16) Source(1, 16) + SourceIndex(0) -7 >Emitted(1, 17) Source(1, 17) + SourceIndex(0) -8 >Emitted(1, 19) Source(1, 19) + SourceIndex(0) -9 >Emitted(1, 20) Source(1, 20) + SourceIndex(0) -10>Emitted(1, 21) Source(1, 21) + SourceIndex(0) -11>Emitted(1, 25) Source(1, 25) + SourceIndex(0) -12>Emitted(1, 26) Source(1, 26) + SourceIndex(0) +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 10) Source(1, 10) + SourceIndex(0) +3 >Emitted(2, 11) Source(1, 11) + SourceIndex(0) +4 >Emitted(2, 12) Source(1, 12) + SourceIndex(0) +5 >Emitted(2, 15) Source(1, 15) + SourceIndex(0) +6 >Emitted(2, 16) Source(1, 16) + SourceIndex(0) +7 >Emitted(2, 17) Source(1, 17) + SourceIndex(0) +8 >Emitted(2, 19) Source(1, 19) + SourceIndex(0) +9 >Emitted(2, 20) Source(1, 20) + SourceIndex(0) +10>Emitted(2, 21) Source(1, 21) + SourceIndex(0) +11>Emitted(2, 25) Source(1, 25) + SourceIndex(0) +12>Emitted(2, 26) Source(1, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=restParameterWithBindingPattern2.js.map \ No newline at end of file From e741e4ab70318aabf68e54d086ea027a6ca4f74e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 3 Feb 2026 21:48:13 -0800 Subject: [PATCH 6/7] Ignore deprecations in this test --- src/testRunner/unittests/tscWatch/programUpdates.ts | 2 +- .../updates-errors-when-strictNullChecks-changes.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts index f676472804e0c..fed193fbe900c 100644 --- a/src/testRunner/unittests/tscWatch/programUpdates.ts +++ b/src/testRunner/unittests/tscWatch/programUpdates.ts @@ -1600,7 +1600,7 @@ foo().hello`, }, { caption: "Set always strict false", - edit: sys => sys.writeFile(`/user/username/projects/myproject/tsconfig.json`, jsonToReadableText({ compilerOptions: { strict: true, alwaysStrict: false } })), // Avoid changing 'alwaysStrict' or must re-bind + edit: sys => sys.writeFile(`/user/username/projects/myproject/tsconfig.json`, jsonToReadableText({ compilerOptions: { strict: true, alwaysStrict: false, ignoreDeprecations: "6.0" } })), // Avoid changing 'alwaysStrict' or must re-bind timeouts: sys => sys.runQueuedTimeoutCallbacks(), }, { diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js index 3f68072b0609e..7400a39f0b7eb 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-errors-when-strictNullChecks-changes.js @@ -146,7 +146,8 @@ Input:: { "compilerOptions": { "strict": true, - "alwaysStrict": false + "alwaysStrict": false, + "ignoreDeprecations": "6.0" } } @@ -163,10 +164,10 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -tsconfig.json:4:21 - error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. +a.ts:2:1 - error TS2531: Object is possibly 'null'. -4 "alwaysStrict": false -   ~~~~~ +2 foo().hello +  ~~~~~ [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -184,6 +185,7 @@ Program root files: [ Program options: { "strict": true, "alwaysStrict": false, + "ignoreDeprecations": "6.0", "watch": true, "configFilePath": "/user/username/projects/myproject/tsconfig.json" } From f02ebaac093dc819749843d119ac6005e710f1ef Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 3 Feb 2026 22:21:20 -0800 Subject: [PATCH 7/7] Remove unused baselines --- .../ES5For-of19(target=es2015).errors.txt | 14 - .../reference/ES5For-of19(target=es2015).js | 22 - .../ES5For-of19(target=es2015).symbols | 21 - .../ES5For-of19(target=es2015).types | 30 - .../ES5For-of19(target=es5).errors.txt | 16 - .../reference/ES5For-of19(target=es5).js | 24 - .../reference/ES5For-of19(target=es5).symbols | 21 - .../reference/ES5For-of19(target=es5).types | 30 - .../FunctionDeclaration2_es6.errors.txt | 7 - .../reference/FunctionDeclaration2_es6.js | 9 - .../FunctionDeclaration2_es6.symbols | 7 - .../reference/FunctionDeclaration2_es6.types | 9 - ...itializedExportInInternalModule.errors.txt | 48 - .../NonInitializedExportInInternalModule.js | 66 - ...nInitializedExportInInternalModule.symbols | 95 -- ...NonInitializedExportInInternalModule.types | 153 -- .../ambientWithStatements.errors.txt | 44 - .../reference/ambientWithStatements.js | 32 - .../reference/ambientWithStatements.symbols | 42 - .../reference/ambientWithStatements.types | 66 - ...indsToFunctionScopeArgumentList.errors.txt | 12 - ...gumentsBindsToFunctionScopeArgumentList.js | 13 - ...tsBindsToFunctionScopeArgumentList.symbols | 13 - ...entsBindsToFunctionScopeArgumentList.types | 23 - ...entsReferenceInObjectLiteral_Js.errors.txt | 34 - .../argumentsReferenceInObjectLiteral_Js.js | 53 - ...gumentsReferenceInObjectLiteral_Js.symbols | 51 - ...argumentsReferenceInObjectLiteral_Js.types | 86 -- .../arrowFunctionContexts.errors.txt | 118 -- .../reference/arrowFunctionContexts.js | 178 --- .../reference/arrowFunctionContexts.symbols | 210 --- .../reference/arrowFunctionContexts.types | 383 ----- .../asiPublicPrivateProtected.errors.txt | 54 - .../reference/asiPublicPrivateProtected.js | 74 - .../asiPublicPrivateProtected.symbols | 74 - .../reference/asiPublicPrivateProtected.types | 102 -- ...tsArrowFunctions(target=es2015).errors.txt | 21 - ...nArgumentsArrowFunctions(target=es2015).js | 36 - ...mentsArrowFunctions(target=es2015).symbols | 40 - ...gumentsArrowFunctions(target=es2015).types | 74 - ...mentsArrowFunctions(target=es5).errors.txt | 29 - ...sionArgumentsArrowFunctions(target=es5).js | 48 - ...rgumentsArrowFunctions(target=es5).symbols | 40 - ...nArgumentsArrowFunctions(target=es5).types | 74 - ...rgumentsFunction(target=es2015).errors.txt | 49 - ...llisionArgumentsFunction(target=es2015).js | 74 - ...onArgumentsFunction(target=es2015).symbols | 136 -- ...sionArgumentsFunction(target=es2015).types | 211 --- ...onArgumentsFunction(target=es5).errors.txt | 63 - .../collisionArgumentsFunction(target=es5).js | 94 -- ...isionArgumentsFunction(target=es5).symbols | 136 -- ...llisionArgumentsFunction(target=es5).types | 211 --- ...ctionExpressions(target=es2015).errors.txt | 39 - ...mentsFunctionExpressions(target=es2015).js | 65 - ...FunctionExpressions(target=es2015).symbols | 96 -- ...tsFunctionExpressions(target=es2015).types | 148 -- ...FunctionExpressions(target=es5).errors.txt | 53 - ...rgumentsFunctionExpressions(target=es5).js | 85 - ...ntsFunctionExpressions(target=es5).symbols | 96 -- ...mentsFunctionExpressions(target=es5).types | 148 -- .../collisionArgumentsInType.errors.txt | 19 - .../reference/collisionArgumentsInType.js | 23 - .../collisionArgumentsInType.symbols | 55 - .../reference/collisionArgumentsInType.types | 83 - ...lisionArgumentsInterfaceMembers.errors.txt | 33 - .../collisionArgumentsInterfaceMembers.js | 33 - ...collisionArgumentsInterfaceMembers.symbols | 65 - .../collisionArgumentsInterfaceMembers.types | 69 - ...nstDeclarations-invalidContexts.errors.txt | 64 - .../constDeclarations-invalidContexts.js | 58 - .../constDeclarations-invalidContexts.symbols | 55 - .../constDeclarations-invalidContexts.types | 121 -- .../constDeclarations-scopes.errors.txt | 154 -- .../reference/constDeclarations-scopes.js | 275 ---- .../constDeclarations-scopes.symbols | 293 ---- .../reference/constDeclarations-scopes.types | 545 ------- ...constDeclarations-validContexts.errors.txt | 129 -- .../constDeclarations-validContexts.js | 227 --- .../constDeclarations-validContexts.symbols | 197 --- .../constDeclarations-validContexts.types | 352 ----- .../reference/convertKeywordsYes.errors.txt | 340 ---- .../baselines/reference/convertKeywordsYes.js | 532 ------- .../reference/convertKeywordsYes.symbols | 882 ----------- .../reference/convertKeywordsYes.types | 1363 ----------------- .../deleteOperatorWithAnyOtherType.errors.txt | 141 -- .../deleteOperatorWithAnyOtherType.js | 117 -- .../deleteOperatorWithAnyOtherType.symbols | 190 --- .../deleteOperatorWithAnyOtherType.types | 391 ----- ...UsingArguments03(target=es2015).errors.txt | 7 - ...tionWhenUsingArguments03(target=es2015).js | 9 - ...henUsingArguments03(target=es2015).symbols | 10 - ...nWhenUsingArguments03(target=es2015).types | 15 - ...henUsingArguments03(target=es5).errors.txt | 12 - ...unctionWhenUsingArguments03(target=es5).js | 9 - ...onWhenUsingArguments03(target=es5).symbols | 10 - ...tionWhenUsingArguments03(target=es5).types | 15 - ...unctionWhenUsingArguments03_ES6.errors.txt | 7 - ...itArrowFunctionWhenUsingArguments03_ES6.js | 9 - ...owFunctionWhenUsingArguments03_ES6.symbols | 10 - ...rrowFunctionWhenUsingArguments03_ES6.types | 15 - ...UsingArguments04(target=es2015).errors.txt | 9 - ...tionWhenUsingArguments04(target=es2015).js | 13 - ...henUsingArguments04(target=es2015).symbols | 13 - ...nWhenUsingArguments04(target=es2015).types | 19 - ...henUsingArguments04(target=es5).errors.txt | 14 - ...unctionWhenUsingArguments04(target=es5).js | 13 - ...onWhenUsingArguments04(target=es5).symbols | 13 - ...tionWhenUsingArguments04(target=es5).types | 19 - ...unctionWhenUsingArguments04_ES6.errors.txt | 9 - ...itArrowFunctionWhenUsingArguments04_ES6.js | 13 - ...owFunctionWhenUsingArguments04_ES6.symbols | 13 - ...rrowFunctionWhenUsingArguments04_ES6.types | 19 - ...UsingArguments05(target=es2015).errors.txt | 8 - ...tionWhenUsingArguments05(target=es2015).js | 11 - ...henUsingArguments05(target=es2015).symbols | 11 - ...nWhenUsingArguments05(target=es2015).types | 17 - ...henUsingArguments05(target=es5).errors.txt | 13 - ...unctionWhenUsingArguments05(target=es5).js | 11 - ...onWhenUsingArguments05(target=es5).symbols | 11 - ...tionWhenUsingArguments05(target=es5).types | 17 - ...unctionWhenUsingArguments05_ES6.errors.txt | 8 - ...itArrowFunctionWhenUsingArguments05_ES6.js | 11 - ...owFunctionWhenUsingArguments05_ES6.symbols | 11 - ...rrowFunctionWhenUsingArguments05_ES6.types | 17 - ...UsingArguments06(target=es2015).errors.txt | 8 - ...tionWhenUsingArguments06(target=es2015).js | 11 - ...henUsingArguments06(target=es2015).symbols | 11 - ...nWhenUsingArguments06(target=es2015).types | 19 - ...henUsingArguments06(target=es5).errors.txt | 13 - ...unctionWhenUsingArguments06(target=es5).js | 11 - ...onWhenUsingArguments06(target=es5).symbols | 11 - ...tionWhenUsingArguments06(target=es5).types | 19 - ...unctionWhenUsingArguments06_ES6.errors.txt | 8 - ...itArrowFunctionWhenUsingArguments06_ES6.js | 11 - ...owFunctionWhenUsingArguments06_ES6.symbols | 11 - ...rrowFunctionWhenUsingArguments06_ES6.types | 19 - ...UsingArguments07(target=es2015).errors.txt | 8 - ...tionWhenUsingArguments07(target=es2015).js | 11 - ...henUsingArguments07(target=es2015).symbols | 12 - ...nWhenUsingArguments07(target=es2015).types | 21 - ...henUsingArguments07(target=es5).errors.txt | 13 - ...unctionWhenUsingArguments07(target=es5).js | 11 - ...onWhenUsingArguments07(target=es5).symbols | 12 - ...tionWhenUsingArguments07(target=es5).types | 21 - ...unctionWhenUsingArguments07_ES6.errors.txt | 8 - ...itArrowFunctionWhenUsingArguments07_ES6.js | 11 - ...owFunctionWhenUsingArguments07_ES6.symbols | 12 - ...rrowFunctionWhenUsingArguments07_ES6.types | 21 - ...UsingArguments08(target=es2015).errors.txt | 8 - ...tionWhenUsingArguments08(target=es2015).js | 11 - ...henUsingArguments08(target=es2015).symbols | 12 - ...nWhenUsingArguments08(target=es2015).types | 21 - ...henUsingArguments08(target=es5).errors.txt | 10 - ...unctionWhenUsingArguments08(target=es5).js | 11 - ...onWhenUsingArguments08(target=es5).symbols | 12 - ...tionWhenUsingArguments08(target=es5).types | 21 - ...unctionWhenUsingArguments08_ES6.errors.txt | 8 - ...itArrowFunctionWhenUsingArguments08_ES6.js | 11 - ...owFunctionWhenUsingArguments08_ES6.symbols | 12 - ...rrowFunctionWhenUsingArguments08_ES6.types | 21 - ...UsingArguments11(target=es2015).errors.txt | 9 - ...tionWhenUsingArguments11(target=es2015).js | 13 - ...henUsingArguments11(target=es2015).symbols | 14 - ...nWhenUsingArguments11(target=es2015).types | 25 - ...henUsingArguments11(target=es5).errors.txt | 14 - ...unctionWhenUsingArguments11(target=es5).js | 13 - ...onWhenUsingArguments11(target=es5).symbols | 14 - ...tionWhenUsingArguments11(target=es5).types | 25 - ...unctionWhenUsingArguments11_ES6.errors.txt | 9 - ...itArrowFunctionWhenUsingArguments11_ES6.js | 13 - ...owFunctionWhenUsingArguments11_ES6.symbols | 14 - ...rrowFunctionWhenUsingArguments11_ES6.types | 25 - ...UsingArguments13(target=es2015).errors.txt | 9 - ...tionWhenUsingArguments13(target=es2015).js | 13 - ...henUsingArguments13(target=es2015).symbols | 14 - ...nWhenUsingArguments13(target=es2015).types | 25 - ...henUsingArguments13(target=es5).errors.txt | 11 - ...unctionWhenUsingArguments13(target=es5).js | 13 - ...onWhenUsingArguments13(target=es5).symbols | 14 - ...tionWhenUsingArguments13(target=es5).types | 25 - ...unctionWhenUsingArguments13_ES6.errors.txt | 9 - ...itArrowFunctionWhenUsingArguments13_ES6.js | 13 - ...owFunctionWhenUsingArguments13_ES6.symbols | 14 - ...rrowFunctionWhenUsingArguments13_ES6.types | 25 - ...UsingArguments14(target=es2015).errors.txt | 11 - ...tionWhenUsingArguments14(target=es2015).js | 17 - ...henUsingArguments14(target=es2015).symbols | 18 - ...nWhenUsingArguments14(target=es2015).types | 30 - ...henUsingArguments14(target=es5).errors.txt | 16 - ...unctionWhenUsingArguments14(target=es5).js | 17 - ...onWhenUsingArguments14(target=es5).symbols | 18 - ...tionWhenUsingArguments14(target=es5).types | 30 - ...unctionWhenUsingArguments14_ES6.errors.txt | 11 - ...itArrowFunctionWhenUsingArguments14_ES6.js | 17 - ...owFunctionWhenUsingArguments14_ES6.symbols | 18 - ...rrowFunctionWhenUsingArguments14_ES6.types | 30 - ...UsingArguments15(target=es2015).errors.txt | 12 - ...tionWhenUsingArguments15(target=es2015).js | 19 - ...henUsingArguments15(target=es2015).symbols | 21 - ...nWhenUsingArguments15(target=es2015).types | 36 - ...henUsingArguments15(target=es5).errors.txt | 17 - ...unctionWhenUsingArguments15(target=es5).js | 19 - ...onWhenUsingArguments15(target=es5).symbols | 21 - ...tionWhenUsingArguments15(target=es5).types | 36 - ...unctionWhenUsingArguments15_ES6.errors.txt | 12 - ...itArrowFunctionWhenUsingArguments15_ES6.js | 19 - ...owFunctionWhenUsingArguments15_ES6.symbols | 21 - ...rrowFunctionWhenUsingArguments15_ES6.types | 36 - ...UsingArguments16(target=es2015).errors.txt | 12 - ...tionWhenUsingArguments16(target=es2015).js | 19 - ...henUsingArguments16(target=es2015).symbols | 20 - ...nWhenUsingArguments16(target=es2015).types | 39 - ...henUsingArguments16(target=es5).errors.txt | 17 - ...unctionWhenUsingArguments16(target=es5).js | 19 - ...onWhenUsingArguments16(target=es5).symbols | 20 - ...tionWhenUsingArguments16(target=es5).types | 39 - ...unctionWhenUsingArguments16_ES6.errors.txt | 12 - ...itArrowFunctionWhenUsingArguments16_ES6.js | 19 - ...owFunctionWhenUsingArguments16_ES6.symbols | 20 - ...rrowFunctionWhenUsingArguments16_ES6.types | 39 - ...UsingArguments17(target=es2015).errors.txt | 12 - ...tionWhenUsingArguments17(target=es2015).js | 19 - ...henUsingArguments17(target=es2015).symbols | 21 - ...nWhenUsingArguments17(target=es2015).types | 43 - ...henUsingArguments17(target=es5).errors.txt | 17 - ...unctionWhenUsingArguments17(target=es5).js | 19 - ...onWhenUsingArguments17(target=es5).symbols | 21 - ...tionWhenUsingArguments17(target=es5).types | 43 - ...unctionWhenUsingArguments17_ES6.errors.txt | 12 - ...itArrowFunctionWhenUsingArguments17_ES6.js | 19 - ...owFunctionWhenUsingArguments17_ES6.symbols | 21 - ...rrowFunctionWhenUsingArguments17_ES6.types | 43 - ...onWithStatements(target=es2015).errors.txt | 60 - ...ncFunctionWithStatements(target=es2015).js | 70 - ...ctionWithStatements(target=es2015).symbols | 56 - ...unctionWithStatements(target=es2015).types | 99 -- ...ctionWithStatements(target=es5).errors.txt | 62 - ...asyncFunctionWithStatements(target=es5).js | 120 -- ...FunctionWithStatements(target=es5).symbols | 56 - ...ncFunctionWithStatements(target=es5).types | 99 -- tests/baselines/reference/for-of56.errors.txt | 6 - tests/baselines/reference/for-of56.js | 7 - tests/baselines/reference/for-of56.symbols | 6 - tests/baselines/reference/for-of56.types | 9 - .../reference/generatorTypeCheck38.errors.txt | 10 - .../reference/generatorTypeCheck38.js | 15 - .../reference/generatorTypeCheck38.symbols | 14 - .../reference/generatorTypeCheck38.types | 23 - ...mpilationBindReachabilityErrors.errors.txt | 33 - ...eCompilationBindReachabilityErrors.symbols | 40 - ...ileCompilationBindReachabilityErrors.types | 64 - .../missingCloseParenStatements.errors.txt | 34 - .../reference/missingCloseParenStatements.js | 30 - .../missingCloseParenStatements.symbols | 39 - .../missingCloseParenStatements.types | 117 -- ...cGenerators.classMethods.es2018.errors.txt | 199 --- ...syncGenerators.classMethods.es2018.symbols | 266 ---- ....asyncGenerators.classMethods.es2018.types | 371 ----- ...ors.functionDeclarations.es2018.errors.txt | 119 -- ...rators.functionDeclarations.es2018.symbols | 145 -- ...nerators.functionDeclarations.es2018.types | 213 --- ...tors.functionExpressions.es2018.errors.txt | 125 -- ...erators.functionExpressions.es2018.symbols | 158 -- ...enerators.functionExpressions.es2018.types | 277 ---- ...ors.objectLiteralMethods.es2018.errors.txt | 185 --- ...rators.objectLiteralMethods.es2018.symbols | 258 ---- ...nerators.objectLiteralMethods.es2018.types | 406 ----- ...sNotAMemberVariableDeclaration1.errors.txt | 22 - ...atementIsNotAMemberVariableDeclaration1.js | 21 - ...ntIsNotAMemberVariableDeclaration1.symbols | 18 - ...mentIsNotAMemberVariableDeclaration1.types | 33 - 271 files changed, 17343 deletions(-) delete mode 100644 tests/baselines/reference/ES5For-of19(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/ES5For-of19(target=es2015).js delete mode 100644 tests/baselines/reference/ES5For-of19(target=es2015).symbols delete mode 100644 tests/baselines/reference/ES5For-of19(target=es2015).types delete mode 100644 tests/baselines/reference/ES5For-of19(target=es5).errors.txt delete mode 100644 tests/baselines/reference/ES5For-of19(target=es5).js delete mode 100644 tests/baselines/reference/ES5For-of19(target=es5).symbols delete mode 100644 tests/baselines/reference/ES5For-of19(target=es5).types delete mode 100644 tests/baselines/reference/FunctionDeclaration2_es6.errors.txt delete mode 100644 tests/baselines/reference/FunctionDeclaration2_es6.js delete mode 100644 tests/baselines/reference/FunctionDeclaration2_es6.symbols delete mode 100644 tests/baselines/reference/FunctionDeclaration2_es6.types delete mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt delete mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule.js delete mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule.symbols delete mode 100644 tests/baselines/reference/NonInitializedExportInInternalModule.types delete mode 100644 tests/baselines/reference/ambientWithStatements.errors.txt delete mode 100644 tests/baselines/reference/ambientWithStatements.js delete mode 100644 tests/baselines/reference/ambientWithStatements.symbols delete mode 100644 tests/baselines/reference/ambientWithStatements.types delete mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt delete mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js delete mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols delete mode 100644 tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types delete mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt delete mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js delete mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols delete mode 100644 tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types delete mode 100644 tests/baselines/reference/arrowFunctionContexts.errors.txt delete mode 100644 tests/baselines/reference/arrowFunctionContexts.js delete mode 100644 tests/baselines/reference/arrowFunctionContexts.symbols delete mode 100644 tests/baselines/reference/arrowFunctionContexts.types delete mode 100644 tests/baselines/reference/asiPublicPrivateProtected.errors.txt delete mode 100644 tests/baselines/reference/asiPublicPrivateProtected.js delete mode 100644 tests/baselines/reference/asiPublicPrivateProtected.symbols delete mode 100644 tests/baselines/reference/asiPublicPrivateProtected.types delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).js delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).symbols delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).types delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).js delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).symbols delete mode 100644 tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).types delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es2015).js delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es2015).symbols delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es2015).types delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es5).js delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es5).symbols delete mode 100644 tests/baselines/reference/collisionArgumentsFunction(target=es5).types delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).js delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).symbols delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).js delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).symbols delete mode 100644 tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).types delete mode 100644 tests/baselines/reference/collisionArgumentsInType.errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsInType.js delete mode 100644 tests/baselines/reference/collisionArgumentsInType.symbols delete mode 100644 tests/baselines/reference/collisionArgumentsInType.types delete mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt delete mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers.js delete mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers.symbols delete mode 100644 tests/baselines/reference/collisionArgumentsInterfaceMembers.types delete mode 100644 tests/baselines/reference/constDeclarations-invalidContexts.errors.txt delete mode 100644 tests/baselines/reference/constDeclarations-invalidContexts.js delete mode 100644 tests/baselines/reference/constDeclarations-invalidContexts.symbols delete mode 100644 tests/baselines/reference/constDeclarations-invalidContexts.types delete mode 100644 tests/baselines/reference/constDeclarations-scopes.errors.txt delete mode 100644 tests/baselines/reference/constDeclarations-scopes.js delete mode 100644 tests/baselines/reference/constDeclarations-scopes.symbols delete mode 100644 tests/baselines/reference/constDeclarations-scopes.types delete mode 100644 tests/baselines/reference/constDeclarations-validContexts.errors.txt delete mode 100644 tests/baselines/reference/constDeclarations-validContexts.js delete mode 100644 tests/baselines/reference/constDeclarations-validContexts.symbols delete mode 100644 tests/baselines/reference/constDeclarations-validContexts.types delete mode 100644 tests/baselines/reference/convertKeywordsYes.errors.txt delete mode 100644 tests/baselines/reference/convertKeywordsYes.js delete mode 100644 tests/baselines/reference/convertKeywordsYes.symbols delete mode 100644 tests/baselines/reference/convertKeywordsYes.types delete mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt delete mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType.js delete mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType.symbols delete mode 100644 tests/baselines/reference/deleteOperatorWithAnyOtherType.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).types delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.js delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols delete mode 100644 tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).js delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).symbols delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).types delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).js delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).symbols delete mode 100644 tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).types delete mode 100644 tests/baselines/reference/for-of56.errors.txt delete mode 100644 tests/baselines/reference/for-of56.js delete mode 100644 tests/baselines/reference/for-of56.symbols delete mode 100644 tests/baselines/reference/for-of56.types delete mode 100644 tests/baselines/reference/generatorTypeCheck38.errors.txt delete mode 100644 tests/baselines/reference/generatorTypeCheck38.js delete mode 100644 tests/baselines/reference/generatorTypeCheck38.symbols delete mode 100644 tests/baselines/reference/generatorTypeCheck38.types delete mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt delete mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors.symbols delete mode 100644 tests/baselines/reference/jsFileCompilationBindReachabilityErrors.types delete mode 100644 tests/baselines/reference/missingCloseParenStatements.errors.txt delete mode 100644 tests/baselines/reference/missingCloseParenStatements.js delete mode 100644 tests/baselines/reference/missingCloseParenStatements.symbols delete mode 100644 tests/baselines/reference/missingCloseParenStatements.types delete mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt delete mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.symbols delete mode 100644 tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types delete mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt delete mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.symbols delete mode 100644 tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types delete mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt delete mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.symbols delete mode 100644 tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types delete mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt delete mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.symbols delete mode 100644 tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types delete mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt delete mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.js delete mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.symbols delete mode 100644 tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.types diff --git a/tests/baselines/reference/ES5For-of19(target=es2015).errors.txt b/tests/baselines/reference/ES5For-of19(target=es2015).errors.txt deleted file mode 100644 index 0e241ffdce85b..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es2015).errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== ES5For-of19.ts (0 errors) ==== - for (let v of []) { - v; - function foo() { - for (const v of []) { - v; - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of19(target=es2015).js b/tests/baselines/reference/ES5For-of19(target=es2015).js deleted file mode 100644 index 5c3a9a9e90c3f..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es2015).js +++ /dev/null @@ -1,22 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// - -//// [ES5For-of19.ts] -for (let v of []) { - v; - function foo() { - for (const v of []) { - v; - } - } -} - - -//// [ES5For-of19.js] -for (let v of []) { - v; - function foo() { - for (const v of []) { - v; - } - } -} diff --git a/tests/baselines/reference/ES5For-of19(target=es2015).symbols b/tests/baselines/reference/ES5For-of19(target=es2015).symbols deleted file mode 100644 index 646e312385af2..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es2015).symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// - -=== ES5For-of19.ts === -for (let v of []) { ->v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) - - v; ->v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) - - function foo() { ->foo : Symbol(foo, Decl(ES5For-of19.ts, 1, 6)) - - for (const v of []) { ->v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) - - v; ->v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) - } - } -} - diff --git a/tests/baselines/reference/ES5For-of19(target=es2015).types b/tests/baselines/reference/ES5For-of19(target=es2015).types deleted file mode 100644 index 67affcfc4c249..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es2015).types +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// - -=== ES5For-of19.ts === -for (let v of []) { ->v : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - - v; ->v : any -> : ^^^ - - function foo() { ->foo : () => void -> : ^^^^^^^^^^ - - for (const v of []) { ->v : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - - v; ->v : any -> : ^^^ - } - } -} - diff --git a/tests/baselines/reference/ES5For-of19(target=es5).errors.txt b/tests/baselines/reference/ES5For-of19(target=es5).errors.txt deleted file mode 100644 index 9ad2fc0d0578e..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es5).errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== ES5For-of19.ts (0 errors) ==== - for (let v of []) { - v; - function foo() { - for (const v of []) { - v; - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of19(target=es5).js b/tests/baselines/reference/ES5For-of19(target=es5).js deleted file mode 100644 index fa2933b5c3390..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es5).js +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// - -//// [ES5For-of19.ts] -for (let v of []) { - v; - function foo() { - for (const v of []) { - v; - } - } -} - - -//// [ES5For-of19.js] -for (var _i = 0, _a = []; _i < _a.length; _i++) { - var v = _a[_i]; - v; - function foo() { - for (var _i = 0, _a = []; _i < _a.length; _i++) { - var v_1 = _a[_i]; - v_1; - } - } -} diff --git a/tests/baselines/reference/ES5For-of19(target=es5).symbols b/tests/baselines/reference/ES5For-of19(target=es5).symbols deleted file mode 100644 index 646e312385af2..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es5).symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// - -=== ES5For-of19.ts === -for (let v of []) { ->v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) - - v; ->v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) - - function foo() { ->foo : Symbol(foo, Decl(ES5For-of19.ts, 1, 6)) - - for (const v of []) { ->v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) - - v; ->v : Symbol(v, Decl(ES5For-of19.ts, 3, 18)) - } - } -} - diff --git a/tests/baselines/reference/ES5For-of19(target=es5).types b/tests/baselines/reference/ES5For-of19(target=es5).types deleted file mode 100644 index 67affcfc4c249..0000000000000 --- a/tests/baselines/reference/ES5For-of19(target=es5).types +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// - -=== ES5For-of19.ts === -for (let v of []) { ->v : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - - v; ->v : any -> : ^^^ - - function foo() { ->foo : () => void -> : ^^^^^^^^^^ - - for (const v of []) { ->v : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - - v; ->v : any -> : ^^^ - } - } -} - diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration2_es6.errors.txt deleted file mode 100644 index 01b3ed79f5f19..0000000000000 --- a/tests/baselines/reference/FunctionDeclaration2_es6.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== FunctionDeclaration2_es6.ts (0 errors) ==== - function f(yield) { - } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.js b/tests/baselines/reference/FunctionDeclaration2_es6.js deleted file mode 100644 index b162aa7fe4560..0000000000000 --- a/tests/baselines/reference/FunctionDeclaration2_es6.js +++ /dev/null @@ -1,9 +0,0 @@ -//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// - -//// [FunctionDeclaration2_es6.ts] -function f(yield) { -} - -//// [FunctionDeclaration2_es6.js] -function f(yield) { -} diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.symbols b/tests/baselines/reference/FunctionDeclaration2_es6.symbols deleted file mode 100644 index 771277a7e7b1c..0000000000000 --- a/tests/baselines/reference/FunctionDeclaration2_es6.symbols +++ /dev/null @@ -1,7 +0,0 @@ -//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// - -=== FunctionDeclaration2_es6.ts === -function f(yield) { ->f : Symbol(f, Decl(FunctionDeclaration2_es6.ts, 0, 0)) ->yield : Symbol(yield, Decl(FunctionDeclaration2_es6.ts, 0, 11)) -} diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.types b/tests/baselines/reference/FunctionDeclaration2_es6.types deleted file mode 100644 index ab3967a8e9039..0000000000000 --- a/tests/baselines/reference/FunctionDeclaration2_es6.types +++ /dev/null @@ -1,9 +0,0 @@ -//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// - -=== FunctionDeclaration2_es6.ts === -function f(yield) { ->f : (yield: any) => void -> : ^ ^^^^^^^^^^^^^^ ->yield : any -> : ^^^ -} diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt b/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt deleted file mode 100644 index 8c2f3f9667707..0000000000000 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt +++ /dev/null @@ -1,48 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -NonInitializedExportInInternalModule.ts(2,8): error TS1123: Variable declaration list cannot be empty. -NonInitializedExportInInternalModule.ts(3,5): error TS2304: Cannot find name 'let'. -NonInitializedExportInInternalModule.ts(4,10): error TS1123: Variable declaration list cannot be empty. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== NonInitializedExportInInternalModule.ts (3 errors) ==== - namespace Inner { - var; - -!!! error TS1123: Variable declaration list cannot be empty. - let; - ~~~ -!!! error TS2304: Cannot find name 'let'. - const; - -!!! error TS1123: Variable declaration list cannot be empty. - - export var a; - export let b; - export var c: string; - export let d: number; - class A {} - export var e: A; - export let f: A; - - namespace B { - export let a = 1, b, c = 2; - export let x, y, z; - } - - namespace C { - export var a = 1, b, c = 2; - export var x, y, z; - } - - // Shouldn't be filtered - export var a1 = 1; - export let b1 = 1; - export var c1: string = 'a'; - export let d1: number = 1; - class D {} - export var e1 = new D; - export let f1 = new D; - export var g1: D = new D; - export let h1: D = new D; - } \ No newline at end of file diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.js b/tests/baselines/reference/NonInitializedExportInInternalModule.js deleted file mode 100644 index ecc4cb85f4043..0000000000000 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.js +++ /dev/null @@ -1,66 +0,0 @@ -//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// - -//// [NonInitializedExportInInternalModule.ts] -namespace Inner { - var; - let; - const; - - export var a; - export let b; - export var c: string; - export let d: number; - class A {} - export var e: A; - export let f: A; - - namespace B { - export let a = 1, b, c = 2; - export let x, y, z; - } - - namespace C { - export var a = 1, b, c = 2; - export var x, y, z; - } - - // Shouldn't be filtered - export var a1 = 1; - export let b1 = 1; - export var c1: string = 'a'; - export let d1: number = 1; - class D {} - export var e1 = new D; - export let f1 = new D; - export var g1: D = new D; - export let h1: D = new D; -} - -//// [NonInitializedExportInInternalModule.js] -var Inner; -(function (Inner) { - var ; - let; - const ; - class A { - } - let B; - (function (B) { - B.a = 1, B.c = 2; - })(B || (B = {})); - let C; - (function (C) { - C.a = 1, C.c = 2; - })(C || (C = {})); - // Shouldn't be filtered - Inner.a1 = 1; - Inner.b1 = 1; - Inner.c1 = 'a'; - Inner.d1 = 1; - class D { - } - Inner.e1 = new D; - Inner.f1 = new D; - Inner.g1 = new D; - Inner.h1 = new D; -})(Inner || (Inner = {})); diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.symbols b/tests/baselines/reference/NonInitializedExportInInternalModule.symbols deleted file mode 100644 index 62f7c0d2e5258..0000000000000 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.symbols +++ /dev/null @@ -1,95 +0,0 @@ -//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// - -=== NonInitializedExportInInternalModule.ts === -namespace Inner { ->Inner : Symbol(Inner, Decl(NonInitializedExportInInternalModule.ts, 0, 0)) - - var; - let; - const; - - export var a; ->a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 5, 14)) - - export let b; ->b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 6, 14)) - - export var c: string; ->c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 7, 14)) - - export let d: number; ->d : Symbol(d, Decl(NonInitializedExportInInternalModule.ts, 8, 14)) - - class A {} ->A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) - - export var e: A; ->e : Symbol(e, Decl(NonInitializedExportInInternalModule.ts, 10, 14)) ->A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) - - export let f: A; ->f : Symbol(f, Decl(NonInitializedExportInInternalModule.ts, 11, 14)) ->A : Symbol(A, Decl(NonInitializedExportInInternalModule.ts, 8, 25)) - - namespace B { ->B : Symbol(B, Decl(NonInitializedExportInInternalModule.ts, 11, 20)) - - export let a = 1, b, c = 2; ->a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 14, 18)) ->b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 14, 25)) ->c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 14, 28)) - - export let x, y, z; ->x : Symbol(x, Decl(NonInitializedExportInInternalModule.ts, 15, 18)) ->y : Symbol(y, Decl(NonInitializedExportInInternalModule.ts, 15, 21)) ->z : Symbol(z, Decl(NonInitializedExportInInternalModule.ts, 15, 24)) - } - - namespace C { ->C : Symbol(C, Decl(NonInitializedExportInInternalModule.ts, 16, 5)) - - export var a = 1, b, c = 2; ->a : Symbol(a, Decl(NonInitializedExportInInternalModule.ts, 19, 18)) ->b : Symbol(b, Decl(NonInitializedExportInInternalModule.ts, 19, 25)) ->c : Symbol(c, Decl(NonInitializedExportInInternalModule.ts, 19, 28)) - - export var x, y, z; ->x : Symbol(x, Decl(NonInitializedExportInInternalModule.ts, 20, 18)) ->y : Symbol(y, Decl(NonInitializedExportInInternalModule.ts, 20, 21)) ->z : Symbol(z, Decl(NonInitializedExportInInternalModule.ts, 20, 24)) - } - - // Shouldn't be filtered - export var a1 = 1; ->a1 : Symbol(a1, Decl(NonInitializedExportInInternalModule.ts, 24, 14)) - - export let b1 = 1; ->b1 : Symbol(b1, Decl(NonInitializedExportInInternalModule.ts, 25, 14)) - - export var c1: string = 'a'; ->c1 : Symbol(c1, Decl(NonInitializedExportInInternalModule.ts, 26, 14)) - - export let d1: number = 1; ->d1 : Symbol(d1, Decl(NonInitializedExportInInternalModule.ts, 27, 14)) - - class D {} ->D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) - - export var e1 = new D; ->e1 : Symbol(e1, Decl(NonInitializedExportInInternalModule.ts, 29, 14)) ->D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) - - export let f1 = new D; ->f1 : Symbol(f1, Decl(NonInitializedExportInInternalModule.ts, 30, 14)) ->D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) - - export var g1: D = new D; ->g1 : Symbol(g1, Decl(NonInitializedExportInInternalModule.ts, 31, 14)) ->D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) ->D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) - - export let h1: D = new D; ->h1 : Symbol(h1, Decl(NonInitializedExportInInternalModule.ts, 32, 14)) ->D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) ->D : Symbol(D, Decl(NonInitializedExportInInternalModule.ts, 27, 30)) -} diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.types b/tests/baselines/reference/NonInitializedExportInInternalModule.types deleted file mode 100644 index 4c715dc8fe518..0000000000000 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.types +++ /dev/null @@ -1,153 +0,0 @@ -//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// - -=== NonInitializedExportInInternalModule.ts === -namespace Inner { ->Inner : typeof Inner -> : ^^^^^^^^^^^^ - - var; - let; ->let : any -> : ^^^ - - const; - - export var a; ->a : any -> : ^^^ - - export let b; ->b : any -> : ^^^ - - export var c: string; ->c : string -> : ^^^^^^ - - export let d: number; ->d : number -> : ^^^^^^ - - class A {} ->A : A -> : ^ - - export var e: A; ->e : A -> : ^ - - export let f: A; ->f : A -> : ^ - - namespace B { ->B : typeof B -> : ^^^^^^^^ - - export let a = 1, b, c = 2; ->a : number -> : ^^^^^^ ->1 : 1 -> : ^ ->b : any -> : ^^^ ->c : number -> : ^^^^^^ ->2 : 2 -> : ^ - - export let x, y, z; ->x : any -> : ^^^ ->y : any -> : ^^^ ->z : any -> : ^^^ - } - - namespace C { ->C : typeof C -> : ^^^^^^^^ - - export var a = 1, b, c = 2; ->a : number -> : ^^^^^^ ->1 : 1 -> : ^ ->b : any -> : ^^^ ->c : number -> : ^^^^^^ ->2 : 2 -> : ^ - - export var x, y, z; ->x : any -> : ^^^ ->y : any -> : ^^^ ->z : any -> : ^^^ - } - - // Shouldn't be filtered - export var a1 = 1; ->a1 : number -> : ^^^^^^ ->1 : 1 -> : ^ - - export let b1 = 1; ->b1 : number -> : ^^^^^^ ->1 : 1 -> : ^ - - export var c1: string = 'a'; ->c1 : string -> : ^^^^^^ ->'a' : "a" -> : ^^^ - - export let d1: number = 1; ->d1 : number -> : ^^^^^^ ->1 : 1 -> : ^ - - class D {} ->D : D -> : ^ - - export var e1 = new D; ->e1 : D -> : ^ ->new D : D -> : ^ ->D : typeof D -> : ^^^^^^^^ - - export let f1 = new D; ->f1 : D -> : ^ ->new D : D -> : ^ ->D : typeof D -> : ^^^^^^^^ - - export var g1: D = new D; ->g1 : D -> : ^ ->new D : D -> : ^ ->D : typeof D -> : ^^^^^^^^ - - export let h1: D = new D; ->h1 : D -> : ^ ->new D : D -> : ^ ->D : typeof D -> : ^^^^^^^^ -} diff --git a/tests/baselines/reference/ambientWithStatements.errors.txt b/tests/baselines/reference/ambientWithStatements.errors.txt deleted file mode 100644 index 348d591e2f79b..0000000000000 --- a/tests/baselines/reference/ambientWithStatements.errors.txt +++ /dev/null @@ -1,44 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. -ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. -ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body. -ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== ambientWithStatements.ts (4 errors) ==== - declare namespace M { - break; - ~~~~~ -!!! error TS1036: Statements are not allowed in ambient contexts. - continue; - ~~~~~~~~~ -!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. - debugger; - do { } while (true); - var x; - for (x in null) { } - if (true) { } else { } - 1; - L: var y; - return; - ~~~~~~ -!!! error TS1108: A 'return' statement can only be used within a function body. - switch (x) { - case 1: - break; - default: - break; - } - throw "nooo"; - try { - } - catch (e) { - } - finally { - } - with (x) { - ~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/ambientWithStatements.js b/tests/baselines/reference/ambientWithStatements.js deleted file mode 100644 index d56d11b02142e..0000000000000 --- a/tests/baselines/reference/ambientWithStatements.js +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/compiler/ambientWithStatements.ts] //// - -//// [ambientWithStatements.ts] -declare namespace M { - break; - continue; - debugger; - do { } while (true); - var x; - for (x in null) { } - if (true) { } else { } - 1; - L: var y; - return; - switch (x) { - case 1: - break; - default: - break; - } - throw "nooo"; - try { - } - catch (e) { - } - finally { - } - with (x) { - } -} - -//// [ambientWithStatements.js] diff --git a/tests/baselines/reference/ambientWithStatements.symbols b/tests/baselines/reference/ambientWithStatements.symbols deleted file mode 100644 index 9442562aa5e3e..0000000000000 --- a/tests/baselines/reference/ambientWithStatements.symbols +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/compiler/ambientWithStatements.ts] //// - -=== ambientWithStatements.ts === -declare namespace M { ->M : Symbol(M, Decl(ambientWithStatements.ts, 0, 0)) - - break; - continue; - debugger; - do { } while (true); - var x; ->x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) - - for (x in null) { } ->x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) - - if (true) { } else { } - 1; - L: var y; ->y : Symbol(y, Decl(ambientWithStatements.ts, 9, 10)) - - return; - switch (x) { ->x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) - - case 1: - break; - default: - break; - } - throw "nooo"; - try { - } - catch (e) { ->e : Symbol(e, Decl(ambientWithStatements.ts, 20, 11)) - } - finally { - } - with (x) { ->x : Symbol(x, Decl(ambientWithStatements.ts, 5, 7)) - } -} diff --git a/tests/baselines/reference/ambientWithStatements.types b/tests/baselines/reference/ambientWithStatements.types deleted file mode 100644 index b980ece7ef31d..0000000000000 --- a/tests/baselines/reference/ambientWithStatements.types +++ /dev/null @@ -1,66 +0,0 @@ -//// [tests/cases/compiler/ambientWithStatements.ts] //// - -=== ambientWithStatements.ts === -declare namespace M { ->M : typeof M -> : ^^^^^^^^ - - break; - continue; - debugger; - do { } while (true); ->true : true -> : ^^^^ - - var x; ->x : any -> : ^^^ - - for (x in null) { } ->x : any -> : ^^^ - - if (true) { } else { } ->true : true -> : ^^^^ - - 1; ->1 : 1 -> : ^ - - L: var y; ->L : any -> : ^^^ ->y : any -> : ^^^ - - return; - switch (x) { ->x : any -> : ^^^ - - case 1: ->1 : 1 -> : ^ - - break; - default: - break; - } - throw "nooo"; ->"nooo" : "nooo" -> : ^^^^^^ - - try { - } - catch (e) { ->e : any -> : ^^^ - } - finally { - } - with (x) { ->x : any -> : ^^^ - } -} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt deleted file mode 100644 index 03a336ae6d41f..0000000000000 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ==== - var arguments = 10; - function foo(a) { - arguments = 10; /// This shouldnt be of type number and result in error. - ~~~~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'IArguments'. - } \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js deleted file mode 100644 index b18f1cc7d05f8..0000000000000 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// - -//// [argumentsBindsToFunctionScopeArgumentList.ts] -var arguments = 10; -function foo(a) { - arguments = 10; /// This shouldnt be of type number and result in error. -} - -//// [argumentsBindsToFunctionScopeArgumentList.js] -var arguments = 10; -function foo(a) { - arguments = 10; /// This shouldnt be of type number and result in error. -} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols deleted file mode 100644 index a7c67c1447cce..0000000000000 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// - -=== argumentsBindsToFunctionScopeArgumentList.ts === -var arguments = 10; ->arguments : Symbol(arguments, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 0, 3)) - -function foo(a) { ->foo : Symbol(foo, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 0, 19)) ->a : Symbol(a, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 1, 13)) - - arguments = 10; /// This shouldnt be of type number and result in error. ->arguments : Symbol(arguments) -} diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types deleted file mode 100644 index e85419e2d06be..0000000000000 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// - -=== argumentsBindsToFunctionScopeArgumentList.ts === -var arguments = 10; ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - -function foo(a) { ->foo : (a: any) => void -> : ^ ^^^^^^^^^^^^^^ ->a : any -> : ^^^ - - arguments = 10; /// This shouldnt be of type number and result in error. ->arguments = 10 : 10 -> : ^^ ->arguments : IArguments -> : ^^^^^^^^^^ ->10 : 10 -> : ^^ -} diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt deleted file mode 100644 index 3eebdee2768c0..0000000000000 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -/a.js(16,9): error TS18004: No value exists in scope for the shorthand property 'arguments'. Either declare one or provide an initializer. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== /a.js (1 errors) ==== - const a = () => { - return { - arguments: [], - }; - }; - - const b = () => { - const c = { - arguments: [], - } - return c; - }; - - const c = () => { - return { - arguments, - ~~~~~~~~~ -!!! error TS18004: No value exists in scope for the shorthand property 'arguments'. Either declare one or provide an initializer. - }; - } - - const d = () => { - const arguments = undefined; - return { - arguments, - }; - } - \ No newline at end of file diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js deleted file mode 100644 index d2b7a2997e9e9..0000000000000 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// - -//// [a.js] -const a = () => { - return { - arguments: [], - }; -}; - -const b = () => { - const c = { - arguments: [], - } - return c; -}; - -const c = () => { - return { - arguments, - }; -} - -const d = () => { - const arguments = undefined; - return { - arguments, - }; -} - - -//// [a.js] -const a = () => { - return { - arguments: [], - }; -}; -const b = () => { - const c = { - arguments: [], - }; - return c; -}; -const c = () => { - return { - arguments, - }; -}; -const d = () => { - const arguments = undefined; - return { - arguments, - }; -}; diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols deleted file mode 100644 index aa97a19bca110..0000000000000 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// - -=== /a.js === -const a = () => { ->a : Symbol(a, Decl(a.js, 0, 5)) - - return { - arguments: [], ->arguments : Symbol(arguments, Decl(a.js, 1, 12)) - - }; -}; - -const b = () => { ->b : Symbol(b, Decl(a.js, 6, 5)) - - const c = { ->c : Symbol(c, Decl(a.js, 7, 9)) - - arguments: [], ->arguments : Symbol(arguments, Decl(a.js, 7, 15)) - } - return c; ->c : Symbol(c, Decl(a.js, 7, 9)) - -}; - -const c = () => { ->c : Symbol(c, Decl(a.js, 13, 5)) - - return { - arguments, ->arguments : Symbol(arguments, Decl(a.js, 14, 12)) - - }; -} - -const d = () => { ->d : Symbol(d, Decl(a.js, 19, 5)) - - const arguments = undefined; ->arguments : Symbol(arguments, Decl(a.js, 20, 9)) ->undefined : Symbol(undefined) - - return { - arguments, ->arguments : Symbol(arguments, Decl(a.js, 21, 12)) - - }; -} - diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types deleted file mode 100644 index be6df31991ee4..0000000000000 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types +++ /dev/null @@ -1,86 +0,0 @@ -//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// - -=== /a.js === -const a = () => { ->a : () => { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->() => { return { arguments: [], };} : () => { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - return { ->{ arguments: [], } : { arguments: undefined[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - arguments: [], ->arguments : undefined[] -> : ^^^^^^^^^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - - }; -}; - -const b = () => { ->b : () => { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->() => { const c = { arguments: [], } return c;} : () => { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const c = { ->c : { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^ ->{ arguments: [], } : { arguments: undefined[]; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - arguments: [], ->arguments : undefined[] -> : ^^^^^^^^^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - } - return c; ->c : { arguments: any[]; } -> : ^^^^^^^^^^^^^^^^^^^^^ - -}; - -const c = () => { ->c : () => { arguments: any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ ->() => { return { arguments, };} : () => { arguments: any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ - - return { ->{ arguments, } : { arguments: any; } -> : ^^^^^^^^^^^^^^^^^^^ - - arguments, ->arguments : any -> : ^^^ - - }; -} - -const d = () => { ->d : () => { arguments: any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ ->() => { const arguments = undefined; return { arguments, };} : () => { arguments: any; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^ - - const arguments = undefined; ->arguments : any -> : ^^^ ->undefined : undefined -> : ^^^^^^^^^ - - return { ->{ arguments, } : { arguments: any; } -> : ^^^^^^^^^^^^^^^^^^^ - - arguments, ->arguments : any -> : ^^^ - - }; -} - diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt deleted file mode 100644 index b452b1fd5196e..0000000000000 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ /dev/null @@ -1,118 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. -arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== arrowFunctionContexts.ts (6 errors) ==== - // Arrow function used in with statement - with (window) { - ~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number) => ''; - var obj: { (n: number): string; }; // OK - - var arr = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - ~~~~~~~ -!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - y = (() => this).length // error, can't use this in enum - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - // Arrow function as module variable initializer - namespace M { - export var a = (s) => ''; - var b = (s) => s; - } - - // Repeat above for module members that are functions? (necessary to redo all of them?) - namespace M2 { - // Arrow function used in with statement - with (window) { - ~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number) => ''; - var obj: { (n: number): string; }; // OK - - var arr = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - ~~~~~~~ -!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - y = (() => this).length - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - // Arrow function as module variable initializer - namespace M { - export var a = (s) => ''; - var b = (s) => s; - } - - } - - // (ParamList) => { ... } is a generic arrow function - var generic1 = (n: T) => [n]; - var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 - var generic2 = (n: T) => { return [n]; }; - var generic2: { (n: T): T[] }; - - // ((ParamList) => { ... } ) is a type assertion to an arrow function - var asserted1 = ((n) => [n]); - var asserted1: any; - var asserted2 = ((n) => { return n; }); - var asserted2: any; - - \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js deleted file mode 100644 index a8114b4ebcfbd..0000000000000 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ /dev/null @@ -1,178 +0,0 @@ -//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// - -//// [arrowFunctionContexts.ts] -// Arrow function used in with statement -with (window) { - var p = () => this; -} - -// Arrow function as argument to super call -class Base { - constructor(n: any) { } -} - -class Derived extends Base { - constructor() { - super(() => this); - } -} - -// Arrow function as function argument -window.setTimeout(() => null, 100); - -// Arrow function as value in array literal - -var obj = (n: number) => ''; -var obj: { (n: number): string; }; // OK - -var arr = [(n: number) => '']; -var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - -// Arrow function as enum value -enum E { - x = () => 4, // Error expected - y = (() => this).length // error, can't use this in enum -} - -// Arrow function as module variable initializer -namespace M { - export var a = (s) => ''; - var b = (s) => s; -} - -// Repeat above for module members that are functions? (necessary to redo all of them?) -namespace M2 { - // Arrow function used in with statement - with (window) { - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number) => ''; - var obj: { (n: number): string; }; // OK - - var arr = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - y = (() => this).length - } - - // Arrow function as module variable initializer - namespace M { - export var a = (s) => ''; - var b = (s) => s; - } - -} - -// (ParamList) => { ... } is a generic arrow function -var generic1 = (n: T) => [n]; -var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 -var generic2 = (n: T) => { return [n]; }; -var generic2: { (n: T): T[] }; - -// ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = ((n) => [n]); -var asserted1: any; -var asserted2 = ((n) => { return n; }); -var asserted2: any; - - - -//// [arrowFunctionContexts.js] -// Arrow function used in with statement -with (window) { - var p = () => this; -} -// Arrow function as argument to super call -class Base { - constructor(n) { } -} -class Derived extends Base { - constructor() { - super(() => this); - } -} -// Arrow function as function argument -window.setTimeout(() => null, 100); -// Arrow function as value in array literal -var obj = (n) => ''; -var obj; // OK -var arr = [(n) => '']; -var arr; // Incorrect error here (bug 829597) -// Arrow function as enum value -var E; -(function (E) { - E[E["x"] = () => 4] = "x"; - E[E["y"] = (() => this).length] = "y"; // error, can't use this in enum -})(E || (E = {})); -// Arrow function as module variable initializer -var M; -(function (M) { - M.a = (s) => ''; - var b = (s) => s; -})(M || (M = {})); -// Repeat above for module members that are functions? (necessary to redo all of them?) -var M2; -(function (M2) { - // Arrow function used in with statement - with (window) { - var p = () => this; - } - // Arrow function as argument to super call - class Base { - constructor(n) { } - } - class Derived extends Base { - constructor() { - super(() => this); - } - } - // Arrow function as function argument - window.setTimeout(() => null, 100); - // Arrow function as value in array literal - var obj = (n) => ''; - var obj; // OK - var arr = [(n) => '']; - var arr; // Incorrect error here (bug 829597) - // Arrow function as enum value - let E; - (function (E) { - E[E["x"] = () => 4] = "x"; - E[E["y"] = (() => this).length] = "y"; - })(E || (E = {})); - // Arrow function as module variable initializer - let M; - (function (M) { - M.a = (s) => ''; - var b = (s) => s; - })(M || (M = {})); -})(M2 || (M2 = {})); -// (ParamList) => { ... } is a generic arrow function -var generic1 = (n) => [n]; -var generic1; // Incorrect error, Bug 829597 -var generic2 = (n) => { return [n]; }; -var generic2; -// ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = ((n) => [n]); -var asserted1; -var asserted2 = ((n) => { return n; }); -var asserted2; diff --git a/tests/baselines/reference/arrowFunctionContexts.symbols b/tests/baselines/reference/arrowFunctionContexts.symbols deleted file mode 100644 index 3f0542e16a482..0000000000000 --- a/tests/baselines/reference/arrowFunctionContexts.symbols +++ /dev/null @@ -1,210 +0,0 @@ -//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// - -=== arrowFunctionContexts.ts === -// Arrow function used in with statement -with (window) { ->window : Symbol(window, Decl(lib.dom.d.ts, --, --)) - - var p = () => this; -} - -// Arrow function as argument to super call -class Base { ->Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) - - constructor(n: any) { } ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 7, 16)) -} - -class Derived extends Base { ->Derived : Symbol(Derived, Decl(arrowFunctionContexts.ts, 8, 1)) ->Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) - - constructor() { - super(() => this); ->super : Symbol(Base, Decl(arrowFunctionContexts.ts, 3, 1)) ->this : Symbol(Derived, Decl(arrowFunctionContexts.ts, 8, 1)) - } -} - -// Arrow function as function argument -window.setTimeout(() => null, 100); ->window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->window : Symbol(window, Decl(lib.dom.d.ts, --, --)) ->setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) - -// Arrow function as value in array literal - -var obj = (n: number) => ''; ->obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 21, 3), Decl(arrowFunctionContexts.ts, 22, 3)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 21, 11)) - -var obj: { (n: number): string; }; // OK ->obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 21, 3), Decl(arrowFunctionContexts.ts, 22, 3)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 22, 12)) - -var arr = [(n: number) => '']; ->arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 24, 3), Decl(arrowFunctionContexts.ts, 25, 3)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 24, 12)) - -var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) ->arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 24, 3), Decl(arrowFunctionContexts.ts, 25, 3)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 25, 12)) - -// Arrow function as enum value -enum E { ->E : Symbol(E, Decl(arrowFunctionContexts.ts, 25, 36)) - - x = () => 4, // Error expected ->x : Symbol(E.x, Decl(arrowFunctionContexts.ts, 28, 8)) - - y = (() => this).length // error, can't use this in enum ->y : Symbol(E.y, Decl(arrowFunctionContexts.ts, 29, 16)) ->(() => this).length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) ->length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) -} - -// Arrow function as module variable initializer -namespace M { ->M : Symbol(M, Decl(arrowFunctionContexts.ts, 31, 1)) - - export var a = (s) => ''; ->a : Symbol(a, Decl(arrowFunctionContexts.ts, 35, 14)) ->s : Symbol(s, Decl(arrowFunctionContexts.ts, 35, 20)) - - var b = (s) => s; ->b : Symbol(b, Decl(arrowFunctionContexts.ts, 36, 7)) ->s : Symbol(s, Decl(arrowFunctionContexts.ts, 36, 13)) ->s : Symbol(s, Decl(arrowFunctionContexts.ts, 36, 13)) -} - -// Repeat above for module members that are functions? (necessary to redo all of them?) -namespace M2 { ->M2 : Symbol(M2, Decl(arrowFunctionContexts.ts, 37, 1)) - - // Arrow function used in with statement - with (window) { ->window : Symbol(window, Decl(lib.dom.d.ts, --, --)) - - var p = () => this; - } - - // Arrow function as argument to super call - class Base { ->Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) - - constructor(n: any) { } ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 48, 20)) - } - - class Derived extends Base { ->Derived : Symbol(Derived, Decl(arrowFunctionContexts.ts, 49, 5)) ->Base : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) - - constructor() { - super(() => this); ->super : Symbol(Base, Decl(arrowFunctionContexts.ts, 44, 5)) ->this : Symbol(Derived, Decl(arrowFunctionContexts.ts, 49, 5)) - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); ->window.setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) ->window : Symbol(window, Decl(lib.dom.d.ts, --, --)) ->setTimeout : Symbol(setTimeout, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) - - // Arrow function as value in array literal - - var obj = (n: number) => ''; ->obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 62, 7), Decl(arrowFunctionContexts.ts, 63, 7)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 62, 15)) - - var obj: { (n: number): string; }; // OK ->obj : Symbol(obj, Decl(arrowFunctionContexts.ts, 62, 7), Decl(arrowFunctionContexts.ts, 63, 7)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 63, 16)) - - var arr = [(n: number) => '']; ->arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 65, 7), Decl(arrowFunctionContexts.ts, 66, 7)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 65, 16)) - - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) ->arr : Symbol(arr, Decl(arrowFunctionContexts.ts, 65, 7), Decl(arrowFunctionContexts.ts, 66, 7)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 66, 16)) - - // Arrow function as enum value - enum E { ->E : Symbol(E, Decl(arrowFunctionContexts.ts, 66, 40)) - - x = () => 4, // Error expected ->x : Symbol(E.x, Decl(arrowFunctionContexts.ts, 69, 12)) - - y = (() => this).length ->y : Symbol(E.y, Decl(arrowFunctionContexts.ts, 70, 20)) ->(() => this).length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) ->length : Symbol(Function.length, Decl(lib.es5.d.ts, --, --)) - } - - // Arrow function as module variable initializer - namespace M { ->M : Symbol(M, Decl(arrowFunctionContexts.ts, 72, 5)) - - export var a = (s) => ''; ->a : Symbol(a, Decl(arrowFunctionContexts.ts, 76, 18)) ->s : Symbol(s, Decl(arrowFunctionContexts.ts, 76, 24)) - - var b = (s) => s; ->b : Symbol(b, Decl(arrowFunctionContexts.ts, 77, 11)) ->s : Symbol(s, Decl(arrowFunctionContexts.ts, 77, 17)) ->s : Symbol(s, Decl(arrowFunctionContexts.ts, 77, 17)) - } - -} - -// (ParamList) => { ... } is a generic arrow function -var generic1 = (n: T) => [n]; ->generic1 : Symbol(generic1, Decl(arrowFunctionContexts.ts, 83, 3), Decl(arrowFunctionContexts.ts, 84, 3)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 83, 16)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 83, 19)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 83, 16)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 83, 19)) - -var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 ->generic1 : Symbol(generic1, Decl(arrowFunctionContexts.ts, 83, 3), Decl(arrowFunctionContexts.ts, 84, 3)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 84, 20)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 84, 17)) - -var generic2 = (n: T) => { return [n]; }; ->generic2 : Symbol(generic2, Decl(arrowFunctionContexts.ts, 85, 3), Decl(arrowFunctionContexts.ts, 86, 3)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 85, 16)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 85, 19)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 85, 16)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 85, 19)) - -var generic2: { (n: T): T[] }; ->generic2 : Symbol(generic2, Decl(arrowFunctionContexts.ts, 85, 3), Decl(arrowFunctionContexts.ts, 86, 3)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 86, 20)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) ->T : Symbol(T, Decl(arrowFunctionContexts.ts, 86, 17)) - -// ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = ((n) => [n]); ->asserted1 : Symbol(asserted1, Decl(arrowFunctionContexts.ts, 89, 3), Decl(arrowFunctionContexts.ts, 90, 3)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 89, 23)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 89, 23)) - -var asserted1: any; ->asserted1 : Symbol(asserted1, Decl(arrowFunctionContexts.ts, 89, 3), Decl(arrowFunctionContexts.ts, 90, 3)) - -var asserted2 = ((n) => { return n; }); ->asserted2 : Symbol(asserted2, Decl(arrowFunctionContexts.ts, 91, 3), Decl(arrowFunctionContexts.ts, 92, 3)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 91, 23)) ->n : Symbol(n, Decl(arrowFunctionContexts.ts, 91, 23)) - -var asserted2: any; ->asserted2 : Symbol(asserted2, Decl(arrowFunctionContexts.ts, 91, 3), Decl(arrowFunctionContexts.ts, 92, 3)) - - diff --git a/tests/baselines/reference/arrowFunctionContexts.types b/tests/baselines/reference/arrowFunctionContexts.types deleted file mode 100644 index e51d001d126a5..0000000000000 --- a/tests/baselines/reference/arrowFunctionContexts.types +++ /dev/null @@ -1,383 +0,0 @@ -//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// - -=== arrowFunctionContexts.ts === -// Arrow function used in with statement -with (window) { ->window : Window & typeof globalThis -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ - - var p = () => this; ->p : any -> : ^^^ ->() => this : any -> : ^^^ ->this : any -> : ^^^ -} - -// Arrow function as argument to super call -class Base { ->Base : Base -> : ^^^^ - - constructor(n: any) { } ->n : any -> : ^^^ -} - -class Derived extends Base { ->Derived : Derived -> : ^^^^^^^ ->Base : Base -> : ^^^^ - - constructor() { - super(() => this); ->super(() => this) : void -> : ^^^^ ->super : typeof Base -> : ^^^^^^^^^^^ ->() => this : () => this -> : ^^^^^^^^^^ ->this : this -> : ^^^^ - } -} - -// Arrow function as function argument -window.setTimeout(() => null, 100); ->window.setTimeout(() => null, 100) : number -> : ^^^^^^ ->window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) -> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ ->window : Window & typeof globalThis -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ ->setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) -> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ ->() => null : () => any -> : ^^^^^^^^^ ->100 : 100 -> : ^^^ - -// Arrow function as value in array literal - -var obj = (n: number) => ''; ->obj : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->(n: number) => '' : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->n : number -> : ^^^^^^ ->'' : "" -> : ^^ - -var obj: { (n: number): string; }; // OK ->obj : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->n : number -> : ^^^^^^ - -var arr = [(n: number) => '']; ->arr : ((n: number) => string)[] -> : ^^ ^^ ^^^^^^^^^^^^^^ ->[(n: number) => ''] : ((n: number) => string)[] -> : ^^ ^^ ^^^^^^^^^^^^^^ ->(n: number) => '' : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->n : number -> : ^^^^^^ ->'' : "" -> : ^^ - -var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) ->arr : ((n: number) => string)[] -> : ^^ ^^ ^^^^^^^^^^^^^^ ->n : number -> : ^^^^^^ - -// Arrow function as enum value -enum E { ->E : E -> : ^ - - x = () => 4, // Error expected ->x : E.x -> : ^^^ ->() => 4 : () => number -> : ^^^^^^^^^^^^ ->4 : 4 -> : ^ - - y = (() => this).length // error, can't use this in enum ->y : E.y -> : ^^^ ->(() => this).length : number -> : ^^^^^^ ->(() => this) : () => any -> : ^^^^^^^^^ ->() => this : () => any -> : ^^^^^^^^^ ->this : any -> : ^^^ ->length : number -> : ^^^^^^ -} - -// Arrow function as module variable initializer -namespace M { ->M : typeof M -> : ^^^^^^^^ - - export var a = (s) => ''; ->a : (s: any) => string -> : ^ ^^^^^^^^^^^^^^^^ ->(s) => '' : (s: any) => string -> : ^ ^^^^^^^^^^^^^^^^ ->s : any -> : ^^^ ->'' : "" -> : ^^ - - var b = (s) => s; ->b : (s: any) => any -> : ^ ^^^^^^^^^^^^^ ->(s) => s : (s: any) => any -> : ^ ^^^^^^^^^^^^^ ->s : any -> : ^^^ ->s : any -> : ^^^ -} - -// Repeat above for module members that are functions? (necessary to redo all of them?) -namespace M2 { ->M2 : typeof M2 -> : ^^^^^^^^^ - - // Arrow function used in with statement - with (window) { ->window : Window & typeof globalThis -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ - - var p = () => this; ->p : any -> : ^^^ ->() => this : any -> : ^^^ ->this : any -> : ^^^ - } - - // Arrow function as argument to super call - class Base { ->Base : Base -> : ^^^^ - - constructor(n: any) { } ->n : any -> : ^^^ - } - - class Derived extends Base { ->Derived : Derived -> : ^^^^^^^ ->Base : Base -> : ^^^^ - - constructor() { - super(() => this); ->super(() => this) : void -> : ^^^^ ->super : typeof Base -> : ^^^^^^^^^^^ ->() => this : () => this -> : ^^^^^^^^^^ ->this : this -> : ^^^^ - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); ->window.setTimeout(() => null, 100) : number -> : ^^^^^^ ->window.setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) -> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ ->window : Window & typeof globalThis -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ ->setTimeout : ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & ((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) -> : ^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^ ^^^ ^^^^^ ^^ ^^^^^ ^ ->() => null : () => any -> : ^^^^^^^^^ ->100 : 100 -> : ^^^ - - // Arrow function as value in array literal - - var obj = (n: number) => ''; ->obj : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->(n: number) => '' : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->n : number -> : ^^^^^^ ->'' : "" -> : ^^ - - var obj: { (n: number): string; }; // OK ->obj : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->n : number -> : ^^^^^^ - - var arr = [(n: number) => '']; ->arr : ((n: number) => string)[] -> : ^^ ^^ ^^^^^^^^^^^^^^ ->[(n: number) => ''] : ((n: number) => string)[] -> : ^^ ^^ ^^^^^^^^^^^^^^ ->(n: number) => '' : (n: number) => string -> : ^ ^^ ^^^^^^^^^^^ ->n : number -> : ^^^^^^ ->'' : "" -> : ^^ - - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) ->arr : ((n: number) => string)[] -> : ^^ ^^ ^^^^^^^^^^^^^^ ->n : number -> : ^^^^^^ - - // Arrow function as enum value - enum E { ->E : E -> : ^ - - x = () => 4, // Error expected ->x : E.x -> : ^^^ ->() => 4 : () => number -> : ^^^^^^^^^^^^ ->4 : 4 -> : ^ - - y = (() => this).length ->y : E.y -> : ^^^ ->(() => this).length : number -> : ^^^^^^ ->(() => this) : () => any -> : ^^^^^^^^^ ->() => this : () => any -> : ^^^^^^^^^ ->this : any -> : ^^^ ->length : number -> : ^^^^^^ - } - - // Arrow function as module variable initializer - namespace M { ->M : typeof M -> : ^^^^^^^^ - - export var a = (s) => ''; ->a : (s: any) => string -> : ^ ^^^^^^^^^^^^^^^^ ->(s) => '' : (s: any) => string -> : ^ ^^^^^^^^^^^^^^^^ ->s : any -> : ^^^ ->'' : "" -> : ^^ - - var b = (s) => s; ->b : (s: any) => any -> : ^ ^^^^^^^^^^^^^ ->(s) => s : (s: any) => any -> : ^ ^^^^^^^^^^^^^ ->s : any -> : ^^^ ->s : any -> : ^^^ - } - -} - -// (ParamList) => { ... } is a generic arrow function -var generic1 = (n: T) => [n]; ->generic1 : (n: T) => T[] -> : ^ ^^ ^^ ^^^^^^^^ ->(n: T) => [n] : (n: T) => T[] -> : ^ ^^ ^^ ^^^^^^^^ ->n : T -> : ^ ->[n] : T[] -> : ^^^ ->n : T -> : ^ - -var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 ->generic1 : (n: T) => T[] -> : ^ ^^ ^^ ^^^^^^^^ ->n : T -> : ^ - -var generic2 = (n: T) => { return [n]; }; ->generic2 : (n: T) => T[] -> : ^ ^^ ^^ ^^^^^^^^ ->(n: T) => { return [n]; } : (n: T) => T[] -> : ^ ^^ ^^ ^^^^^^^^ ->n : T -> : ^ ->[n] : T[] -> : ^^^ ->n : T -> : ^ - -var generic2: { (n: T): T[] }; ->generic2 : (n: T) => T[] -> : ^ ^^ ^^ ^^^^^^^^ ->n : T -> : ^ - -// ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = ((n) => [n]); ->asserted1 : any -> : ^^^ ->((n) => [n]) : any -> : ^^^ ->((n) => [n]) : (n: any) => any[] -> : ^ ^^^^^^^^^^^^^^^ ->(n) => [n] : (n: any) => any[] -> : ^ ^^^^^^^^^^^^^^^ ->n : any -> : ^^^ ->[n] : any[] -> : ^^^^^ ->n : any -> : ^^^ - -var asserted1: any; ->asserted1 : any -> : ^^^ - -var asserted2 = ((n) => { return n; }); ->asserted2 : any -> : ^^^ ->((n) => { return n; }) : any -> : ^^^ ->((n) => { return n; }) : (n: any) => any -> : ^ ^^^^^^^^^^^^^ ->(n) => { return n; } : (n: any) => any -> : ^ ^^^^^^^^^^^^^ ->n : any -> : ^^^ ->n : any -> : ^^^ - -var asserted2: any; ->asserted2 : any -> : ^^^ - - diff --git a/tests/baselines/reference/asiPublicPrivateProtected.errors.txt b/tests/baselines/reference/asiPublicPrivateProtected.errors.txt deleted file mode 100644 index 0e8ee32639698..0000000000000 --- a/tests/baselines/reference/asiPublicPrivateProtected.errors.txt +++ /dev/null @@ -1,54 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -asiPublicPrivateProtected.ts(1,1): error TS2304: Cannot find name 'public'. -asiPublicPrivateProtected.ts(12,1): error TS2304: Cannot find name 'private'. -asiPublicPrivateProtected.ts(23,1): error TS2304: Cannot find name 'protected'. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== asiPublicPrivateProtected.ts (3 errors) ==== - public - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - class NonPublicClass { - public s() { - } - } - - class NonPublicClass2 { - public - private nonPublicFunction() { - } - } - private - ~~~~~~~ -!!! error TS2304: Cannot find name 'private'. - class NonPrivateClass { - private s() { - } - } - - class NonPrivateClass2 { - private - public nonPrivateFunction() { - } - } - protected - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'protected'. - class NonProtectedClass { - protected s() { - } - } - - class NonProtectedClass2 { - protected - public nonProtectedFunction() { - } - } - - class ClassWithThreeMembers { - public - private - protected - } - \ No newline at end of file diff --git a/tests/baselines/reference/asiPublicPrivateProtected.js b/tests/baselines/reference/asiPublicPrivateProtected.js deleted file mode 100644 index 17806e03bd62b..0000000000000 --- a/tests/baselines/reference/asiPublicPrivateProtected.js +++ /dev/null @@ -1,74 +0,0 @@ -//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// - -//// [asiPublicPrivateProtected.ts] -public -class NonPublicClass { - public s() { - } -} - -class NonPublicClass2 { - public - private nonPublicFunction() { - } -} -private -class NonPrivateClass { - private s() { - } -} - -class NonPrivateClass2 { - private - public nonPrivateFunction() { - } -} -protected -class NonProtectedClass { - protected s() { - } -} - -class NonProtectedClass2 { - protected - public nonProtectedFunction() { - } -} - -class ClassWithThreeMembers { - public - private - protected -} - - -//// [asiPublicPrivateProtected.js] -public; -class NonPublicClass { - s() { - } -} -class NonPublicClass2 { - nonPublicFunction() { - } -} -private; -class NonPrivateClass { - s() { - } -} -class NonPrivateClass2 { - nonPrivateFunction() { - } -} -protected; -class NonProtectedClass { - s() { - } -} -class NonProtectedClass2 { - nonProtectedFunction() { - } -} -class ClassWithThreeMembers { -} diff --git a/tests/baselines/reference/asiPublicPrivateProtected.symbols b/tests/baselines/reference/asiPublicPrivateProtected.symbols deleted file mode 100644 index 546fbb632777f..0000000000000 --- a/tests/baselines/reference/asiPublicPrivateProtected.symbols +++ /dev/null @@ -1,74 +0,0 @@ -//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// - -=== asiPublicPrivateProtected.ts === -public -class NonPublicClass { ->NonPublicClass : Symbol(NonPublicClass, Decl(asiPublicPrivateProtected.ts, 0, 6)) - - public s() { ->s : Symbol(NonPublicClass.s, Decl(asiPublicPrivateProtected.ts, 1, 22)) - } -} - -class NonPublicClass2 { ->NonPublicClass2 : Symbol(NonPublicClass2, Decl(asiPublicPrivateProtected.ts, 4, 1)) - - public ->public : Symbol(NonPublicClass2.public, Decl(asiPublicPrivateProtected.ts, 6, 23)) - - private nonPublicFunction() { ->nonPublicFunction : Symbol(NonPublicClass2.nonPublicFunction, Decl(asiPublicPrivateProtected.ts, 7, 10)) - } -} -private -class NonPrivateClass { ->NonPrivateClass : Symbol(NonPrivateClass, Decl(asiPublicPrivateProtected.ts, 11, 7)) - - private s() { ->s : Symbol(NonPrivateClass.s, Decl(asiPublicPrivateProtected.ts, 12, 23)) - } -} - -class NonPrivateClass2 { ->NonPrivateClass2 : Symbol(NonPrivateClass2, Decl(asiPublicPrivateProtected.ts, 15, 1)) - - private ->private : Symbol(NonPrivateClass2.private, Decl(asiPublicPrivateProtected.ts, 17, 24)) - - public nonPrivateFunction() { ->nonPrivateFunction : Symbol(NonPrivateClass2.nonPrivateFunction, Decl(asiPublicPrivateProtected.ts, 18, 11)) - } -} -protected -class NonProtectedClass { ->NonProtectedClass : Symbol(NonProtectedClass, Decl(asiPublicPrivateProtected.ts, 22, 9)) - - protected s() { ->s : Symbol(NonProtectedClass.s, Decl(asiPublicPrivateProtected.ts, 23, 25)) - } -} - -class NonProtectedClass2 { ->NonProtectedClass2 : Symbol(NonProtectedClass2, Decl(asiPublicPrivateProtected.ts, 26, 1)) - - protected ->protected : Symbol(NonProtectedClass2.protected, Decl(asiPublicPrivateProtected.ts, 28, 26)) - - public nonProtectedFunction() { ->nonProtectedFunction : Symbol(NonProtectedClass2.nonProtectedFunction, Decl(asiPublicPrivateProtected.ts, 29, 13)) - } -} - -class ClassWithThreeMembers { ->ClassWithThreeMembers : Symbol(ClassWithThreeMembers, Decl(asiPublicPrivateProtected.ts, 32, 1)) - - public ->public : Symbol(ClassWithThreeMembers.public, Decl(asiPublicPrivateProtected.ts, 34, 29)) - - private ->private : Symbol(ClassWithThreeMembers.private, Decl(asiPublicPrivateProtected.ts, 35, 10)) - - protected ->protected : Symbol(ClassWithThreeMembers.protected, Decl(asiPublicPrivateProtected.ts, 36, 11)) -} - diff --git a/tests/baselines/reference/asiPublicPrivateProtected.types b/tests/baselines/reference/asiPublicPrivateProtected.types deleted file mode 100644 index 31cd61c55aee3..0000000000000 --- a/tests/baselines/reference/asiPublicPrivateProtected.types +++ /dev/null @@ -1,102 +0,0 @@ -//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// - -=== asiPublicPrivateProtected.ts === -public ->public : any -> : ^^^ - -class NonPublicClass { ->NonPublicClass : NonPublicClass -> : ^^^^^^^^^^^^^^ - - public s() { ->s : () => void -> : ^^^^^^^^^^ - } -} - -class NonPublicClass2 { ->NonPublicClass2 : NonPublicClass2 -> : ^^^^^^^^^^^^^^^ - - public ->public : any -> : ^^^ - - private nonPublicFunction() { ->nonPublicFunction : () => void -> : ^^^^^^^^^^ - } -} -private ->private : any -> : ^^^ - -class NonPrivateClass { ->NonPrivateClass : NonPrivateClass -> : ^^^^^^^^^^^^^^^ - - private s() { ->s : () => void -> : ^^^^^^^^^^ - } -} - -class NonPrivateClass2 { ->NonPrivateClass2 : NonPrivateClass2 -> : ^^^^^^^^^^^^^^^^ - - private ->private : any -> : ^^^ - - public nonPrivateFunction() { ->nonPrivateFunction : () => void -> : ^^^^^^^^^^ - } -} -protected ->protected : any -> : ^^^ - -class NonProtectedClass { ->NonProtectedClass : NonProtectedClass -> : ^^^^^^^^^^^^^^^^^ - - protected s() { ->s : () => void -> : ^^^^^^^^^^ - } -} - -class NonProtectedClass2 { ->NonProtectedClass2 : NonProtectedClass2 -> : ^^^^^^^^^^^^^^^^^^ - - protected ->protected : any -> : ^^^ - - public nonProtectedFunction() { ->nonProtectedFunction : () => void -> : ^^^^^^^^^^ - } -} - -class ClassWithThreeMembers { ->ClassWithThreeMembers : ClassWithThreeMembers -> : ^^^^^^^^^^^^^^^^^^^^^ - - public ->public : any -> : ^^^ - - private ->private : any -> : ^^^ - - protected ->protected : any -> : ^^^ -} - diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt deleted file mode 100644 index 93224be35b1f5..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsArrowFunctions.ts (0 errors) ==== - var f1 = (i: number, ...arguments) => { //arguments is error - var arguments: any[]; // no error - } - var f12 = (arguments: number, ...rest) => { //arguments is error - var arguments = 10; // no error - } - var f1NoError = (arguments: number) => { // no error - var arguments = 10; // no error - } - - var f2 = (...restParameters) => { - var arguments = 10; // No Error - } - var f2NoError = () => { - var arguments = 10; // no error - } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).js b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).js deleted file mode 100644 index 3e7ae866ed007..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).js +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// - -//// [collisionArgumentsArrowFunctions.ts] -var f1 = (i: number, ...arguments) => { //arguments is error - var arguments: any[]; // no error -} -var f12 = (arguments: number, ...rest) => { //arguments is error - var arguments = 10; // no error -} -var f1NoError = (arguments: number) => { // no error - var arguments = 10; // no error -} - -var f2 = (...restParameters) => { - var arguments = 10; // No Error -} -var f2NoError = () => { - var arguments = 10; // no error -} - -//// [collisionArgumentsArrowFunctions.js] -var f1 = (i, ...arguments) => { - var arguments; // no error -}; -var f12 = (arguments, ...rest) => { - var arguments = 10; // no error -}; -var f1NoError = (arguments) => { - var arguments = 10; // no error -}; -var f2 = (...restParameters) => { - var arguments = 10; // No Error -}; -var f2NoError = () => { - var arguments = 10; // no error -}; diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).symbols b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).symbols deleted file mode 100644 index 9c3e817607a43..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).symbols +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// - -=== collisionArgumentsArrowFunctions.ts === -var f1 = (i: number, ...arguments) => { //arguments is error ->f1 : Symbol(f1, Decl(collisionArgumentsArrowFunctions.ts, 0, 3)) ->i : Symbol(i, Decl(collisionArgumentsArrowFunctions.ts, 0, 10)) ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) - - var arguments: any[]; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) -} -var f12 = (arguments: number, ...rest) => { //arguments is error ->f12 : Symbol(f12, Decl(collisionArgumentsArrowFunctions.ts, 3, 3)) ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) ->rest : Symbol(rest, Decl(collisionArgumentsArrowFunctions.ts, 3, 29)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) -} -var f1NoError = (arguments: number) => { // no error ->f1NoError : Symbol(f1NoError, Decl(collisionArgumentsArrowFunctions.ts, 6, 3)) ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) -} - -var f2 = (...restParameters) => { ->f2 : Symbol(f2, Decl(collisionArgumentsArrowFunctions.ts, 10, 3)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsArrowFunctions.ts, 10, 10)) - - var arguments = 10; // No Error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 11, 7)) -} -var f2NoError = () => { ->f2NoError : Symbol(f2NoError, Decl(collisionArgumentsArrowFunctions.ts, 13, 3)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 14, 7)) -} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).types b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).types deleted file mode 100644 index 1d02346f69ebd..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es2015).types +++ /dev/null @@ -1,74 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// - -=== collisionArgumentsArrowFunctions.ts === -var f1 = (i: number, ...arguments) => { //arguments is error ->f1 : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->(i: number, ...arguments) => { //arguments is error var arguments: any[]; // no error} : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // no error ->arguments : any[] -> : ^^^^^ -} -var f12 = (arguments: number, ...rest) => { //arguments is error ->f12 : (arguments: number, ...rest: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->(arguments: number, ...rest) => { //arguments is error var arguments = 10; // no error} : (arguments: number, ...rest: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -var f1NoError = (arguments: number) => { // no error ->f1NoError : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->(arguments: number) => { // no error var arguments = 10; // no error} : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} - -var f2 = (...restParameters) => { ->f2 : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->(...restParameters) => { var arguments = 10; // No Error} : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // No Error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -var f2NoError = () => { ->f2NoError : () => void -> : ^^^^^^^^^^ ->() => { var arguments = 10; // no error} : () => void -> : ^^^^^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt deleted file mode 100644 index c6df7ffcaba28..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -collisionArgumentsArrowFunctions.ts(1,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. -collisionArgumentsArrowFunctions.ts(4,12): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsArrowFunctions.ts (2 errors) ==== - var f1 = (i: number, ...arguments) => { //arguments is error - ~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments: any[]; // no error - } - var f12 = (arguments: number, ...rest) => { //arguments is error - ~~~~~~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments = 10; // no error - } - var f1NoError = (arguments: number) => { // no error - var arguments = 10; // no error - } - - var f2 = (...restParameters) => { - var arguments = 10; // No Error - } - var f2NoError = () => { - var arguments = 10; // no error - } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).js b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).js deleted file mode 100644 index 78527c71736da..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).js +++ /dev/null @@ -1,48 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// - -//// [collisionArgumentsArrowFunctions.ts] -var f1 = (i: number, ...arguments) => { //arguments is error - var arguments: any[]; // no error -} -var f12 = (arguments: number, ...rest) => { //arguments is error - var arguments = 10; // no error -} -var f1NoError = (arguments: number) => { // no error - var arguments = 10; // no error -} - -var f2 = (...restParameters) => { - var arguments = 10; // No Error -} -var f2NoError = () => { - var arguments = 10; // no error -} - -//// [collisionArgumentsArrowFunctions.js] -var f1 = function (i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } - var arguments; // no error -}; -var f12 = function (arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - var arguments = 10; // no error -}; -var f1NoError = function (arguments) { - var arguments = 10; // no error -}; -var f2 = function () { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } - var arguments = 10; // No Error -}; -var f2NoError = function () { - var arguments = 10; // no error -}; diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).symbols b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).symbols deleted file mode 100644 index 9c3e817607a43..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).symbols +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// - -=== collisionArgumentsArrowFunctions.ts === -var f1 = (i: number, ...arguments) => { //arguments is error ->f1 : Symbol(f1, Decl(collisionArgumentsArrowFunctions.ts, 0, 3)) ->i : Symbol(i, Decl(collisionArgumentsArrowFunctions.ts, 0, 10)) ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) - - var arguments: any[]; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 0, 20), Decl(collisionArgumentsArrowFunctions.ts, 1, 7)) -} -var f12 = (arguments: number, ...rest) => { //arguments is error ->f12 : Symbol(f12, Decl(collisionArgumentsArrowFunctions.ts, 3, 3)) ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) ->rest : Symbol(rest, Decl(collisionArgumentsArrowFunctions.ts, 3, 29)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 3, 11), Decl(collisionArgumentsArrowFunctions.ts, 4, 7)) -} -var f1NoError = (arguments: number) => { // no error ->f1NoError : Symbol(f1NoError, Decl(collisionArgumentsArrowFunctions.ts, 6, 3)) ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 6, 17), Decl(collisionArgumentsArrowFunctions.ts, 7, 7)) -} - -var f2 = (...restParameters) => { ->f2 : Symbol(f2, Decl(collisionArgumentsArrowFunctions.ts, 10, 3)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsArrowFunctions.ts, 10, 10)) - - var arguments = 10; // No Error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 11, 7)) -} -var f2NoError = () => { ->f2NoError : Symbol(f2NoError, Decl(collisionArgumentsArrowFunctions.ts, 13, 3)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsArrowFunctions.ts, 14, 7)) -} diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).types b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).types deleted file mode 100644 index 1d02346f69ebd..0000000000000 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).types +++ /dev/null @@ -1,74 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsArrowFunctions.ts] //// - -=== collisionArgumentsArrowFunctions.ts === -var f1 = (i: number, ...arguments) => { //arguments is error ->f1 : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->(i: number, ...arguments) => { //arguments is error var arguments: any[]; // no error} : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // no error ->arguments : any[] -> : ^^^^^ -} -var f12 = (arguments: number, ...rest) => { //arguments is error ->f12 : (arguments: number, ...rest: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->(arguments: number, ...rest) => { //arguments is error var arguments = 10; // no error} : (arguments: number, ...rest: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -var f1NoError = (arguments: number) => { // no error ->f1NoError : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->(arguments: number) => { // no error var arguments = 10; // no error} : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} - -var f2 = (...restParameters) => { ->f2 : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->(...restParameters) => { var arguments = 10; // No Error} : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // No Error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -var f2NoError = () => { ->f2NoError : () => void -> : ^^^^^^^^^^ ->() => { var arguments = 10; // no error} : () => void -> : ^^^^^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt deleted file mode 100644 index 164196a14f4ce..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).errors.txt +++ /dev/null @@ -1,49 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsFunction.ts (0 errors) ==== - // Functions - function f1(arguments: number, ...restParameters) { //arguments is error - var arguments = 10; // no error - } - function f12(i: number, ...arguments) { //arguments is error - var arguments: any[]; // no error - } - function f1NoError(arguments: number) { // no error - var arguments = 10; // no error - } - - declare function f2(i: number, ...arguments); // no error - no code gen - declare function f21(arguments: number, ...rest); // no error - no code gen - declare function f2NoError(arguments: number); // no error - - function f3(...restParameters) { - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - - function f4(arguments: number, ...rest); // no codegen no error - function f4(arguments: string, ...rest); // no codegen no error - function f4(arguments: any, ...rest) { // error - var arguments: any; // No error - } - function f42(i: number, ...arguments); // no codegen no error - function f42(i: string, ...arguments); // no codegen no error - function f42(i: any, ...arguments) { // error - var arguments: any[]; // No error - } - function f4NoError(arguments: number); // no error - function f4NoError(arguments: string); // no error - function f4NoError(arguments: any) { // no error - var arguments: any; // No error - } - - declare function f5(arguments: number, ...rest); // no codegen no error - declare function f5(arguments: string, ...rest); // no codegen no error - declare function f52(i: number, ...arguments); // no codegen no error - declare function f52(i: string, ...arguments); // no codegen no error - declare function f6(arguments: number); // no codegen no error - declare function f6(arguments: string); // no codegen no error \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).js b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).js deleted file mode 100644 index b25325c55411d..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).js +++ /dev/null @@ -1,74 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// - -//// [collisionArgumentsFunction.ts] -// Functions -function f1(arguments: number, ...restParameters) { //arguments is error - var arguments = 10; // no error -} -function f12(i: number, ...arguments) { //arguments is error - var arguments: any[]; // no error -} -function f1NoError(arguments: number) { // no error - var arguments = 10; // no error -} - -declare function f2(i: number, ...arguments); // no error - no code gen -declare function f21(arguments: number, ...rest); // no error - no code gen -declare function f2NoError(arguments: number); // no error - -function f3(...restParameters) { - var arguments = 10; // no error -} -function f3NoError() { - var arguments = 10; // no error -} - -function f4(arguments: number, ...rest); // no codegen no error -function f4(arguments: string, ...rest); // no codegen no error -function f4(arguments: any, ...rest) { // error - var arguments: any; // No error -} -function f42(i: number, ...arguments); // no codegen no error -function f42(i: string, ...arguments); // no codegen no error -function f42(i: any, ...arguments) { // error - var arguments: any[]; // No error -} -function f4NoError(arguments: number); // no error -function f4NoError(arguments: string); // no error -function f4NoError(arguments: any) { // no error - var arguments: any; // No error -} - -declare function f5(arguments: number, ...rest); // no codegen no error -declare function f5(arguments: string, ...rest); // no codegen no error -declare function f52(i: number, ...arguments); // no codegen no error -declare function f52(i: string, ...arguments); // no codegen no error -declare function f6(arguments: number); // no codegen no error -declare function f6(arguments: string); // no codegen no error - -//// [collisionArgumentsFunction.js] -// Functions -function f1(arguments, ...restParameters) { - var arguments = 10; // no error -} -function f12(i, ...arguments) { - var arguments; // no error -} -function f1NoError(arguments) { - var arguments = 10; // no error -} -function f3(...restParameters) { - var arguments = 10; // no error -} -function f3NoError() { - var arguments = 10; // no error -} -function f4(arguments, ...rest) { - var arguments; // No error -} -function f42(i, ...arguments) { - var arguments; // No error -} -function f4NoError(arguments) { - var arguments; // No error -} diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).symbols b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).symbols deleted file mode 100644 index 833fd4b0dedcc..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).symbols +++ /dev/null @@ -1,136 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// - -=== collisionArgumentsFunction.ts === -// Functions -function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : Symbol(f1, Decl(collisionArgumentsFunction.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 1, 30)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) -} -function f12(i: number, ...arguments) { //arguments is error ->f12 : Symbol(f12, Decl(collisionArgumentsFunction.ts, 3, 1)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 4, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) - - var arguments: any[]; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) -} -function f1NoError(arguments: number) { // no error ->f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunction.ts, 6, 1)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) -} - -declare function f2(i: number, ...arguments); // no error - no code gen ->f2 : Symbol(f2, Decl(collisionArgumentsFunction.ts, 9, 1)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 11, 20)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 11, 30)) - -declare function f21(arguments: number, ...rest); // no error - no code gen ->f21 : Symbol(f21, Decl(collisionArgumentsFunction.ts, 11, 45)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 12, 21)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 12, 39)) - -declare function f2NoError(arguments: number); // no error ->f2NoError : Symbol(f2NoError, Decl(collisionArgumentsFunction.ts, 12, 49)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 13, 27)) - -function f3(...restParameters) { ->f3 : Symbol(f3, Decl(collisionArgumentsFunction.ts, 13, 46)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 15, 12)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 16, 7)) -} -function f3NoError() { ->f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunction.ts, 17, 1)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 19, 7)) -} - -function f4(arguments: number, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 22, 12)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 22, 30)) - -function f4(arguments: string, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 23, 12)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 23, 30)) - -function f4(arguments: any, ...rest) { // error ->f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 24, 27)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) -} -function f42(i: number, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 27, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 27, 23)) - -function f42(i: string, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 28, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 28, 23)) - -function f42(i: any, ...arguments) { // error ->f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 29, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) - - var arguments: any[]; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) -} -function f4NoError(arguments: number); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 32, 19)) - -function f4NoError(arguments: string); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 33, 19)) - -function f4NoError(arguments: any) { // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) -} - -declare function f5(arguments: number, ...rest); // no codegen no error ->f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 38, 20)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 38, 38)) - -declare function f5(arguments: string, ...rest); // no codegen no error ->f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 39, 20)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 39, 38)) - -declare function f52(i: number, ...arguments); // no codegen no error ->f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 40, 21)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 40, 31)) - -declare function f52(i: string, ...arguments); // no codegen no error ->f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 41, 21)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 41, 31)) - -declare function f6(arguments: number); // no codegen no error ->f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 42, 20)) - -declare function f6(arguments: string); // no codegen no error ->f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 43, 20)) - diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).types b/tests/baselines/reference/collisionArgumentsFunction(target=es2015).types deleted file mode 100644 index 88c4107b45ae9..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es2015).types +++ /dev/null @@ -1,211 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// - -=== collisionArgumentsFunction.ts === -// Functions -function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : (arguments: number, ...restParameters: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -function f12(i: number, ...arguments) { //arguments is error ->f12 : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // no error ->arguments : any[] -> : ^^^^^ -} -function f1NoError(arguments: number) { // no error ->f1NoError : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} - -declare function f2(i: number, ...arguments); // no error - no code gen ->f2 : (i: number, ...arguments: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -declare function f21(arguments: number, ...rest); // no error - no code gen ->f21 : (arguments: number, ...rest: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -declare function f2NoError(arguments: number); // no error ->f2NoError : (arguments: number) => any -> : ^ ^^ ^^^^^^^^ ->arguments : number -> : ^^^^^^ - -function f3(...restParameters) { ->f3 : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -function f3NoError() { ->f3NoError : () => void -> : ^^^^^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} - -function f4(arguments: number, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -function f4(arguments: string, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -function f4(arguments: any, ...rest) { // error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->rest : any[] -> : ^^^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ -} -function f42(i: number, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -function f42(i: string, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : string -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -function f42(i: any, ...arguments) { // error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : any -> : ^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // No error ->arguments : any[] -> : ^^^^^ -} -function f4NoError(arguments: number); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - -function f4NoError(arguments: string); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : string -> : ^^^^^^ - -function f4NoError(arguments: any) { // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : any -> : ^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ -} - -declare function f5(arguments: number, ...rest); // no codegen no error ->f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -declare function f5(arguments: string, ...rest); // no codegen no error ->f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -declare function f52(i: number, ...arguments); // no codegen no error ->f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -declare function f52(i: string, ...arguments); // no codegen no error ->f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : string -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -declare function f6(arguments: number); // no codegen no error ->f6 : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - -declare function f6(arguments: string); // no codegen no error ->f6 : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : string -> : ^^^^^^ - diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt deleted file mode 100644 index d09fada5e7d14..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt +++ /dev/null @@ -1,63 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -collisionArgumentsFunction.ts(2,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. -collisionArgumentsFunction.ts(5,25): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. -collisionArgumentsFunction.ts(25,13): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. -collisionArgumentsFunction.ts(30,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsFunction.ts (4 errors) ==== - // Functions - function f1(arguments: number, ...restParameters) { //arguments is error - ~~~~~~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments = 10; // no error - } - function f12(i: number, ...arguments) { //arguments is error - ~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments: any[]; // no error - } - function f1NoError(arguments: number) { // no error - var arguments = 10; // no error - } - - declare function f2(i: number, ...arguments); // no error - no code gen - declare function f21(arguments: number, ...rest); // no error - no code gen - declare function f2NoError(arguments: number); // no error - - function f3(...restParameters) { - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - - function f4(arguments: number, ...rest); // no codegen no error - function f4(arguments: string, ...rest); // no codegen no error - function f4(arguments: any, ...rest) { // error - ~~~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments: any; // No error - } - function f42(i: number, ...arguments); // no codegen no error - function f42(i: string, ...arguments); // no codegen no error - function f42(i: any, ...arguments) { // error - ~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments: any[]; // No error - } - function f4NoError(arguments: number); // no error - function f4NoError(arguments: string); // no error - function f4NoError(arguments: any) { // no error - var arguments: any; // No error - } - - declare function f5(arguments: number, ...rest); // no codegen no error - declare function f5(arguments: string, ...rest); // no codegen no error - declare function f52(i: number, ...arguments); // no codegen no error - declare function f52(i: string, ...arguments); // no codegen no error - declare function f6(arguments: number); // no codegen no error - declare function f6(arguments: string); // no codegen no error \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es5).js b/tests/baselines/reference/collisionArgumentsFunction(target=es5).js deleted file mode 100644 index e23bb139ffca5..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es5).js +++ /dev/null @@ -1,94 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// - -//// [collisionArgumentsFunction.ts] -// Functions -function f1(arguments: number, ...restParameters) { //arguments is error - var arguments = 10; // no error -} -function f12(i: number, ...arguments) { //arguments is error - var arguments: any[]; // no error -} -function f1NoError(arguments: number) { // no error - var arguments = 10; // no error -} - -declare function f2(i: number, ...arguments); // no error - no code gen -declare function f21(arguments: number, ...rest); // no error - no code gen -declare function f2NoError(arguments: number); // no error - -function f3(...restParameters) { - var arguments = 10; // no error -} -function f3NoError() { - var arguments = 10; // no error -} - -function f4(arguments: number, ...rest); // no codegen no error -function f4(arguments: string, ...rest); // no codegen no error -function f4(arguments: any, ...rest) { // error - var arguments: any; // No error -} -function f42(i: number, ...arguments); // no codegen no error -function f42(i: string, ...arguments); // no codegen no error -function f42(i: any, ...arguments) { // error - var arguments: any[]; // No error -} -function f4NoError(arguments: number); // no error -function f4NoError(arguments: string); // no error -function f4NoError(arguments: any) { // no error - var arguments: any; // No error -} - -declare function f5(arguments: number, ...rest); // no codegen no error -declare function f5(arguments: string, ...rest); // no codegen no error -declare function f52(i: number, ...arguments); // no codegen no error -declare function f52(i: string, ...arguments); // no codegen no error -declare function f6(arguments: number); // no codegen no error -declare function f6(arguments: string); // no codegen no error - -//// [collisionArgumentsFunction.js] -// Functions -function f1(arguments) { - var restParameters = []; - for (var _i = 1; _i < arguments.length; _i++) { - restParameters[_i - 1] = arguments[_i]; - } - var arguments = 10; // no error -} -function f12(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } - var arguments; // no error -} -function f1NoError(arguments) { - var arguments = 10; // no error -} -function f3() { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } - var arguments = 10; // no error -} -function f3NoError() { - var arguments = 10; // no error -} -function f4(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - var arguments; // No error -} -function f42(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } - var arguments; // No error -} -function f4NoError(arguments) { - var arguments; // No error -} diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es5).symbols b/tests/baselines/reference/collisionArgumentsFunction(target=es5).symbols deleted file mode 100644 index 833fd4b0dedcc..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es5).symbols +++ /dev/null @@ -1,136 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// - -=== collisionArgumentsFunction.ts === -// Functions -function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : Symbol(f1, Decl(collisionArgumentsFunction.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 1, 30)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 1, 12), Decl(collisionArgumentsFunction.ts, 2, 7)) -} -function f12(i: number, ...arguments) { //arguments is error ->f12 : Symbol(f12, Decl(collisionArgumentsFunction.ts, 3, 1)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 4, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) - - var arguments: any[]; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 4, 23), Decl(collisionArgumentsFunction.ts, 5, 7)) -} -function f1NoError(arguments: number) { // no error ->f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunction.ts, 6, 1)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 7, 19), Decl(collisionArgumentsFunction.ts, 8, 7)) -} - -declare function f2(i: number, ...arguments); // no error - no code gen ->f2 : Symbol(f2, Decl(collisionArgumentsFunction.ts, 9, 1)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 11, 20)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 11, 30)) - -declare function f21(arguments: number, ...rest); // no error - no code gen ->f21 : Symbol(f21, Decl(collisionArgumentsFunction.ts, 11, 45)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 12, 21)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 12, 39)) - -declare function f2NoError(arguments: number); // no error ->f2NoError : Symbol(f2NoError, Decl(collisionArgumentsFunction.ts, 12, 49)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 13, 27)) - -function f3(...restParameters) { ->f3 : Symbol(f3, Decl(collisionArgumentsFunction.ts, 13, 46)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunction.ts, 15, 12)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 16, 7)) -} -function f3NoError() { ->f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunction.ts, 17, 1)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 19, 7)) -} - -function f4(arguments: number, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 22, 12)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 22, 30)) - -function f4(arguments: string, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 23, 12)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 23, 30)) - -function f4(arguments: any, ...rest) { // error ->f4 : Symbol(f4, Decl(collisionArgumentsFunction.ts, 20, 1), Decl(collisionArgumentsFunction.ts, 22, 40), Decl(collisionArgumentsFunction.ts, 23, 40)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 24, 27)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 24, 12), Decl(collisionArgumentsFunction.ts, 25, 7)) -} -function f42(i: number, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 27, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 27, 23)) - -function f42(i: string, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 28, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 28, 23)) - -function f42(i: any, ...arguments) { // error ->f42 : Symbol(f42, Decl(collisionArgumentsFunction.ts, 26, 1), Decl(collisionArgumentsFunction.ts, 27, 38), Decl(collisionArgumentsFunction.ts, 28, 38)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 29, 13)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) - - var arguments: any[]; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 29, 20), Decl(collisionArgumentsFunction.ts, 30, 7)) -} -function f4NoError(arguments: number); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 32, 19)) - -function f4NoError(arguments: string); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 33, 19)) - -function f4NoError(arguments: any) { // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunction.ts, 31, 1), Decl(collisionArgumentsFunction.ts, 32, 38), Decl(collisionArgumentsFunction.ts, 33, 38)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 34, 19), Decl(collisionArgumentsFunction.ts, 35, 7)) -} - -declare function f5(arguments: number, ...rest); // no codegen no error ->f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 38, 20)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 38, 38)) - -declare function f5(arguments: string, ...rest); // no codegen no error ->f5 : Symbol(f5, Decl(collisionArgumentsFunction.ts, 36, 1), Decl(collisionArgumentsFunction.ts, 38, 48)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 39, 20)) ->rest : Symbol(rest, Decl(collisionArgumentsFunction.ts, 39, 38)) - -declare function f52(i: number, ...arguments); // no codegen no error ->f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 40, 21)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 40, 31)) - -declare function f52(i: string, ...arguments); // no codegen no error ->f52 : Symbol(f52, Decl(collisionArgumentsFunction.ts, 39, 48), Decl(collisionArgumentsFunction.ts, 40, 46)) ->i : Symbol(i, Decl(collisionArgumentsFunction.ts, 41, 21)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 41, 31)) - -declare function f6(arguments: number); // no codegen no error ->f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 42, 20)) - -declare function f6(arguments: string); // no codegen no error ->f6 : Symbol(f6, Decl(collisionArgumentsFunction.ts, 41, 46), Decl(collisionArgumentsFunction.ts, 42, 39)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunction.ts, 43, 20)) - diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es5).types b/tests/baselines/reference/collisionArgumentsFunction(target=es5).types deleted file mode 100644 index 88c4107b45ae9..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunction(target=es5).types +++ /dev/null @@ -1,211 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunction.ts] //// - -=== collisionArgumentsFunction.ts === -// Functions -function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : (arguments: number, ...restParameters: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -function f12(i: number, ...arguments) { //arguments is error ->f12 : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // no error ->arguments : any[] -> : ^^^^^ -} -function f1NoError(arguments: number) { // no error ->f1NoError : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} - -declare function f2(i: number, ...arguments); // no error - no code gen ->f2 : (i: number, ...arguments: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -declare function f21(arguments: number, ...rest); // no error - no code gen ->f21 : (arguments: number, ...rest: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -declare function f2NoError(arguments: number); // no error ->f2NoError : (arguments: number) => any -> : ^ ^^ ^^^^^^^^ ->arguments : number -> : ^^^^^^ - -function f3(...restParameters) { ->f3 : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} -function f3NoError() { ->f3NoError : () => void -> : ^^^^^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} - -function f4(arguments: number, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -function f4(arguments: string, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -function f4(arguments: any, ...rest) { // error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->rest : any[] -> : ^^^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ -} -function f42(i: number, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -function f42(i: string, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : string -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -function f42(i: any, ...arguments) { // error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : any -> : ^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // No error ->arguments : any[] -> : ^^^^^ -} -function f4NoError(arguments: number); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - -function f4NoError(arguments: string); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : string -> : ^^^^^^ - -function f4NoError(arguments: any) { // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : any -> : ^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ -} - -declare function f5(arguments: number, ...rest); // no codegen no error ->f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -declare function f5(arguments: string, ...rest); // no codegen no error ->f5 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - -declare function f52(i: number, ...arguments); // no codegen no error ->f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -declare function f52(i: string, ...arguments); // no codegen no error ->f52 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : string -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -declare function f6(arguments: number); // no codegen no error ->f6 : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - -declare function f6(arguments: string); // no codegen no error ->f6 : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : string -> : ^^^^^^ - diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt deleted file mode 100644 index 065c131b32a7b..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).errors.txt +++ /dev/null @@ -1,39 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsFunctionExpressions.ts (0 errors) ==== - function foo() { - function f1(arguments: number, ...restParameters) { //arguments is error - var arguments = 10; // no error - } - function f12(i: number, ...arguments) { //arguments is error - var arguments: any[]; // no error - } - function f1NoError(arguments: number) { // no error - var arguments = 10; // no error - } - - function f3(...restParameters) { - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - - function f4(arguments: number, ...rest); // no codegen no error - function f4(arguments: string, ...rest); // no codegen no error - function f4(arguments: any, ...rest) { // error - var arguments: any; // No error - } - function f42(i: number, ...arguments); // no codegen no error - function f42(i: string, ...arguments); // no codegen no error - function f42(i: any, ...arguments) { // error - var arguments: any[]; // No error - } - function f4NoError(arguments: number); // no error - function f4NoError(arguments: string); // no error - function f4NoError(arguments: any) { // no error - var arguments: any; // No error - } - } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).js b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).js deleted file mode 100644 index eb8d260654f32..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).js +++ /dev/null @@ -1,65 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// - -//// [collisionArgumentsFunctionExpressions.ts] -function foo() { - function f1(arguments: number, ...restParameters) { //arguments is error - var arguments = 10; // no error - } - function f12(i: number, ...arguments) { //arguments is error - var arguments: any[]; // no error - } - function f1NoError(arguments: number) { // no error - var arguments = 10; // no error - } - - function f3(...restParameters) { - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - - function f4(arguments: number, ...rest); // no codegen no error - function f4(arguments: string, ...rest); // no codegen no error - function f4(arguments: any, ...rest) { // error - var arguments: any; // No error - } - function f42(i: number, ...arguments); // no codegen no error - function f42(i: string, ...arguments); // no codegen no error - function f42(i: any, ...arguments) { // error - var arguments: any[]; // No error - } - function f4NoError(arguments: number); // no error - function f4NoError(arguments: string); // no error - function f4NoError(arguments: any) { // no error - var arguments: any; // No error - } -} - -//// [collisionArgumentsFunctionExpressions.js] -function foo() { - function f1(arguments, ...restParameters) { - var arguments = 10; // no error - } - function f12(i, ...arguments) { - var arguments; // no error - } - function f1NoError(arguments) { - var arguments = 10; // no error - } - function f3(...restParameters) { - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - function f4(arguments, ...rest) { - var arguments; // No error - } - function f42(i, ...arguments) { - var arguments; // No error - } - function f4NoError(arguments) { - var arguments; // No error - } -} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).symbols b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).symbols deleted file mode 100644 index 6538436c61ed7..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).symbols +++ /dev/null @@ -1,96 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// - -=== collisionArgumentsFunctionExpressions.ts === -function foo() { ->foo : Symbol(foo, Decl(collisionArgumentsFunctionExpressions.ts, 0, 0)) - - function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : Symbol(f1, Decl(collisionArgumentsFunctionExpressions.ts, 0, 16)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 1, 34)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) - } - function f12(i: number, ...arguments) { //arguments is error ->f12 : Symbol(f12, Decl(collisionArgumentsFunctionExpressions.ts, 3, 5)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 4, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) - - var arguments: any[]; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) - } - function f1NoError(arguments: number) { // no error ->f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunctionExpressions.ts, 6, 5)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) - } - - function f3(...restParameters) { ->f3 : Symbol(f3, Decl(collisionArgumentsFunctionExpressions.ts, 9, 5)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 11, 16)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 12, 11)) - } - function f3NoError() { ->f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunctionExpressions.ts, 13, 5)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 15, 11)) - } - - function f4(arguments: number, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 18, 16)) ->rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 18, 34)) - - function f4(arguments: string, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 19, 16)) ->rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 19, 34)) - - function f4(arguments: any, ...rest) { // error ->f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) ->rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 20, 31)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) - } - function f42(i: number, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 23, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 23, 27)) - - function f42(i: string, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 24, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 24, 27)) - - function f42(i: any, ...arguments) { // error ->f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 25, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) - - var arguments: any[]; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) - } - function f4NoError(arguments: number); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 28, 23)) - - function f4NoError(arguments: string); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 29, 23)) - - function f4NoError(arguments: any) { // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) - } -} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types deleted file mode 100644 index 6ede79355c201..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es2015).types +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// - -=== collisionArgumentsFunctionExpressions.ts === -function foo() { ->foo : () => void -> : ^^^^^^^^^^ - - function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : (arguments: number, ...restParameters: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - function f12(i: number, ...arguments) { //arguments is error ->f12 : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // no error ->arguments : any[] -> : ^^^^^ - } - function f1NoError(arguments: number) { // no error ->f1NoError : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - - function f3(...restParameters) { ->f3 : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - function f3NoError() { ->f3NoError : () => void -> : ^^^^^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - - function f4(arguments: number, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - - function f4(arguments: string, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - - function f4(arguments: any, ...rest) { // error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->rest : any[] -> : ^^^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ - } - function f42(i: number, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - function f42(i: string, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : string -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - function f42(i: any, ...arguments) { // error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : any -> : ^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // No error ->arguments : any[] -> : ^^^^^ - } - function f4NoError(arguments: number); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - function f4NoError(arguments: string); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : string -> : ^^^^^^ - - function f4NoError(arguments: any) { // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : any -> : ^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ - } -} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt deleted file mode 100644 index 007fd652a0957..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt +++ /dev/null @@ -1,53 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -collisionArgumentsFunctionExpressions.ts(2,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. -collisionArgumentsFunctionExpressions.ts(5,29): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. -collisionArgumentsFunctionExpressions.ts(21,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. -collisionArgumentsFunctionExpressions.ts(26,26): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsFunctionExpressions.ts (4 errors) ==== - function foo() { - function f1(arguments: number, ...restParameters) { //arguments is error - ~~~~~~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments = 10; // no error - } - function f12(i: number, ...arguments) { //arguments is error - ~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments: any[]; // no error - } - function f1NoError(arguments: number) { // no error - var arguments = 10; // no error - } - - function f3(...restParameters) { - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - - function f4(arguments: number, ...rest); // no codegen no error - function f4(arguments: string, ...rest); // no codegen no error - function f4(arguments: any, ...rest) { // error - ~~~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments: any; // No error - } - function f42(i: number, ...arguments); // no codegen no error - function f42(i: string, ...arguments); // no codegen no error - function f42(i: any, ...arguments) { // error - ~~~~~~~~~~~~ -!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. - var arguments: any[]; // No error - } - function f4NoError(arguments: number); // no error - function f4NoError(arguments: string); // no error - function f4NoError(arguments: any) { // no error - var arguments: any; // No error - } - } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).js b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).js deleted file mode 100644 index 85bd9f641bd4b..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).js +++ /dev/null @@ -1,85 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// - -//// [collisionArgumentsFunctionExpressions.ts] -function foo() { - function f1(arguments: number, ...restParameters) { //arguments is error - var arguments = 10; // no error - } - function f12(i: number, ...arguments) { //arguments is error - var arguments: any[]; // no error - } - function f1NoError(arguments: number) { // no error - var arguments = 10; // no error - } - - function f3(...restParameters) { - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - - function f4(arguments: number, ...rest); // no codegen no error - function f4(arguments: string, ...rest); // no codegen no error - function f4(arguments: any, ...rest) { // error - var arguments: any; // No error - } - function f42(i: number, ...arguments); // no codegen no error - function f42(i: string, ...arguments); // no codegen no error - function f42(i: any, ...arguments) { // error - var arguments: any[]; // No error - } - function f4NoError(arguments: number); // no error - function f4NoError(arguments: string); // no error - function f4NoError(arguments: any) { // no error - var arguments: any; // No error - } -} - -//// [collisionArgumentsFunctionExpressions.js] -function foo() { - function f1(arguments) { - var restParameters = []; - for (var _i = 1; _i < arguments.length; _i++) { - restParameters[_i - 1] = arguments[_i]; - } - var arguments = 10; // no error - } - function f12(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } - var arguments; // no error - } - function f1NoError(arguments) { - var arguments = 10; // no error - } - function f3() { - var restParameters = []; - for (var _i = 0; _i < arguments.length; _i++) { - restParameters[_i] = arguments[_i]; - } - var arguments = 10; // no error - } - function f3NoError() { - var arguments = 10; // no error - } - function f4(arguments) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - var arguments; // No error - } - function f42(i) { - var arguments = []; - for (var _i = 1; _i < arguments.length; _i++) { - arguments[_i - 1] = arguments[_i]; - } - var arguments; // No error - } - function f4NoError(arguments) { - var arguments; // No error - } -} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).symbols b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).symbols deleted file mode 100644 index 6538436c61ed7..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).symbols +++ /dev/null @@ -1,96 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// - -=== collisionArgumentsFunctionExpressions.ts === -function foo() { ->foo : Symbol(foo, Decl(collisionArgumentsFunctionExpressions.ts, 0, 0)) - - function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : Symbol(f1, Decl(collisionArgumentsFunctionExpressions.ts, 0, 16)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 1, 34)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 1, 16), Decl(collisionArgumentsFunctionExpressions.ts, 2, 11)) - } - function f12(i: number, ...arguments) { //arguments is error ->f12 : Symbol(f12, Decl(collisionArgumentsFunctionExpressions.ts, 3, 5)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 4, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) - - var arguments: any[]; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 4, 27), Decl(collisionArgumentsFunctionExpressions.ts, 5, 11)) - } - function f1NoError(arguments: number) { // no error ->f1NoError : Symbol(f1NoError, Decl(collisionArgumentsFunctionExpressions.ts, 6, 5)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 7, 23), Decl(collisionArgumentsFunctionExpressions.ts, 8, 11)) - } - - function f3(...restParameters) { ->f3 : Symbol(f3, Decl(collisionArgumentsFunctionExpressions.ts, 9, 5)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsFunctionExpressions.ts, 11, 16)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 12, 11)) - } - function f3NoError() { ->f3NoError : Symbol(f3NoError, Decl(collisionArgumentsFunctionExpressions.ts, 13, 5)) - - var arguments = 10; // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 15, 11)) - } - - function f4(arguments: number, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 18, 16)) ->rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 18, 34)) - - function f4(arguments: string, ...rest); // no codegen no error ->f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 19, 16)) ->rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 19, 34)) - - function f4(arguments: any, ...rest) { // error ->f4 : Symbol(f4, Decl(collisionArgumentsFunctionExpressions.ts, 16, 5), Decl(collisionArgumentsFunctionExpressions.ts, 18, 44), Decl(collisionArgumentsFunctionExpressions.ts, 19, 44)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) ->rest : Symbol(rest, Decl(collisionArgumentsFunctionExpressions.ts, 20, 31)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 20, 16), Decl(collisionArgumentsFunctionExpressions.ts, 21, 11)) - } - function f42(i: number, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 23, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 23, 27)) - - function f42(i: string, ...arguments); // no codegen no error ->f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 24, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 24, 27)) - - function f42(i: any, ...arguments) { // error ->f42 : Symbol(f42, Decl(collisionArgumentsFunctionExpressions.ts, 22, 5), Decl(collisionArgumentsFunctionExpressions.ts, 23, 42), Decl(collisionArgumentsFunctionExpressions.ts, 24, 42)) ->i : Symbol(i, Decl(collisionArgumentsFunctionExpressions.ts, 25, 17)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) - - var arguments: any[]; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 25, 24), Decl(collisionArgumentsFunctionExpressions.ts, 26, 11)) - } - function f4NoError(arguments: number); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 28, 23)) - - function f4NoError(arguments: string); // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 29, 23)) - - function f4NoError(arguments: any) { // no error ->f4NoError : Symbol(f4NoError, Decl(collisionArgumentsFunctionExpressions.ts, 27, 5), Decl(collisionArgumentsFunctionExpressions.ts, 28, 42), Decl(collisionArgumentsFunctionExpressions.ts, 29, 42)) ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) - - var arguments: any; // No error ->arguments : Symbol(arguments, Decl(collisionArgumentsFunctionExpressions.ts, 30, 23), Decl(collisionArgumentsFunctionExpressions.ts, 31, 11)) - } -} diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).types b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).types deleted file mode 100644 index 6ede79355c201..0000000000000 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).types +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsFunctionExpressions.ts] //// - -=== collisionArgumentsFunctionExpressions.ts === -function foo() { ->foo : () => void -> : ^^^^^^^^^^ - - function f1(arguments: number, ...restParameters) { //arguments is error ->f1 : (arguments: number, ...restParameters: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - function f12(i: number, ...arguments) { //arguments is error ->f12 : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // no error ->arguments : any[] -> : ^^^^^ - } - function f1NoError(arguments: number) { // no error ->f1NoError : (arguments: number) => void -> : ^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - - function f3(...restParameters) { ->f3 : (...restParameters: any[]) => void -> : ^^^^ ^^^^^^^^^^^^^^^^ ->restParameters : any[] -> : ^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - function f3NoError() { ->f3NoError : () => void -> : ^^^^^^^^^^ - - var arguments = 10; // no error ->arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - } - - function f4(arguments: number, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - - function f4(arguments: string, ...rest); // no codegen no error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - - function f4(arguments: any, ...rest) { // error ->f4 : { (arguments: number, ...rest: any[]): any; (arguments: string, ...rest: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->rest : any[] -> : ^^^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ - } - function f42(i: number, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - function f42(i: string, ...arguments); // no codegen no error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : string -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - function f42(i: any, ...arguments) { // error ->f42 : { (i: number, ...arguments: any[]): any; (i: string, ...arguments: any[]): any; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->i : any -> : ^^^ ->arguments : any[] -> : ^^^^^ - - var arguments: any[]; // No error ->arguments : any[] -> : ^^^^^ - } - function f4NoError(arguments: number); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : number -> : ^^^^^^ - - function f4NoError(arguments: string); // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : string -> : ^^^^^^ - - function f4NoError(arguments: any) { // no error ->f4NoError : { (arguments: number): any; (arguments: string): any; } -> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^ ->arguments : any -> : ^^^ - - var arguments: any; // No error ->arguments : any -> : ^^^ - } -} diff --git a/tests/baselines/reference/collisionArgumentsInType.errors.txt b/tests/baselines/reference/collisionArgumentsInType.errors.txt deleted file mode 100644 index b6fbcc0deabd5..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInType.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsInType.ts (0 errors) ==== - var v1: (i: number, ...arguments) => void; // no error - no code gen - var v12: (arguments: number, ...restParameters) => void; // no error - no code gen - var v2: { - (arguments: number, ...restParameters); // no error - no code gen - new (arguments: number, ...restParameters); // no error - no code gen - foo(arguments: number, ...restParameters); // no error - no code gen - prop: (arguments: number, ...restParameters) => void; // no error - no code gen - } - var v21: { - (i: number, ...arguments); // no error - no code gen - new (i: number, ...arguments); // no error - no code gen - foo(i: number, ...arguments); // no error - no code gen - prop: (i: number, ...arguments) => void; // no error - no code gen - } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsInType.js b/tests/baselines/reference/collisionArgumentsInType.js deleted file mode 100644 index 751e4d3a93a3b..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInType.js +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsInType.ts] //// - -//// [collisionArgumentsInType.ts] -var v1: (i: number, ...arguments) => void; // no error - no code gen -var v12: (arguments: number, ...restParameters) => void; // no error - no code gen -var v2: { - (arguments: number, ...restParameters); // no error - no code gen - new (arguments: number, ...restParameters); // no error - no code gen - foo(arguments: number, ...restParameters); // no error - no code gen - prop: (arguments: number, ...restParameters) => void; // no error - no code gen -} -var v21: { - (i: number, ...arguments); // no error - no code gen - new (i: number, ...arguments); // no error - no code gen - foo(i: number, ...arguments); // no error - no code gen - prop: (i: number, ...arguments) => void; // no error - no code gen -} - -//// [collisionArgumentsInType.js] -var v1; // no error - no code gen -var v12; // no error - no code gen -var v2; -var v21; diff --git a/tests/baselines/reference/collisionArgumentsInType.symbols b/tests/baselines/reference/collisionArgumentsInType.symbols deleted file mode 100644 index 1b614f0902ad0..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInType.symbols +++ /dev/null @@ -1,55 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsInType.ts] //// - -=== collisionArgumentsInType.ts === -var v1: (i: number, ...arguments) => void; // no error - no code gen ->v1 : Symbol(v1, Decl(collisionArgumentsInType.ts, 0, 3)) ->i : Symbol(i, Decl(collisionArgumentsInType.ts, 0, 9)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 0, 19)) - -var v12: (arguments: number, ...restParameters) => void; // no error - no code gen ->v12 : Symbol(v12, Decl(collisionArgumentsInType.ts, 1, 3)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 1, 10)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 1, 28)) - -var v2: { ->v2 : Symbol(v2, Decl(collisionArgumentsInType.ts, 2, 3)) - - (arguments: number, ...restParameters); // no error - no code gen ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 3, 5)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 3, 23)) - - new (arguments: number, ...restParameters); // no error - no code gen ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 4, 9)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 4, 27)) - - foo(arguments: number, ...restParameters); // no error - no code gen ->foo : Symbol(foo, Decl(collisionArgumentsInType.ts, 4, 47)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 5, 8)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 5, 26)) - - prop: (arguments: number, ...restParameters) => void; // no error - no code gen ->prop : Symbol(prop, Decl(collisionArgumentsInType.ts, 5, 46)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 6, 11)) ->restParameters : Symbol(restParameters, Decl(collisionArgumentsInType.ts, 6, 29)) -} -var v21: { ->v21 : Symbol(v21, Decl(collisionArgumentsInType.ts, 8, 3)) - - (i: number, ...arguments); // no error - no code gen ->i : Symbol(i, Decl(collisionArgumentsInType.ts, 9, 5)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 9, 15)) - - new (i: number, ...arguments); // no error - no code gen ->i : Symbol(i, Decl(collisionArgumentsInType.ts, 10, 9)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 10, 19)) - - foo(i: number, ...arguments); // no error - no code gen ->foo : Symbol(foo, Decl(collisionArgumentsInType.ts, 10, 34)) ->i : Symbol(i, Decl(collisionArgumentsInType.ts, 11, 8)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 11, 18)) - - prop: (i: number, ...arguments) => void; // no error - no code gen ->prop : Symbol(prop, Decl(collisionArgumentsInType.ts, 11, 33)) ->i : Symbol(i, Decl(collisionArgumentsInType.ts, 12, 11)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInType.ts, 12, 21)) -} diff --git a/tests/baselines/reference/collisionArgumentsInType.types b/tests/baselines/reference/collisionArgumentsInType.types deleted file mode 100644 index c89460089758e..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInType.types +++ /dev/null @@ -1,83 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsInType.ts] //// - -=== collisionArgumentsInType.ts === -var v1: (i: number, ...arguments) => void; // no error - no code gen ->v1 : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - -var v12: (arguments: number, ...restParameters) => void; // no error - no code gen ->v12 : (arguments: number, ...restParameters: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - -var v2: { ->v2 : { (arguments: number, ...restParameters: any[]): any; new (arguments: number, ...restParameters: any[]): any; foo(arguments: number, ...restParameters: any[]): any; prop: (arguments: number, ...restParameters: any) => void; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ - - (arguments: number, ...restParameters); // no error - no code gen ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - - new (arguments: number, ...restParameters); // no error - no code gen ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - - foo(arguments: number, ...restParameters); // no error - no code gen ->foo : (arguments: number, ...restParameters: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ - - prop: (arguments: number, ...restParameters) => void; // no error - no code gen ->prop : (arguments: number, ...restParameters: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->restParameters : any[] -> : ^^^^^ -} -var v21: { ->v21 : { (i: number, ...arguments: any[]): any; new (i: number, ...arguments: any[]): any; foo(i: number, ...arguments: any[]): any; prop: (i: number, ...arguments: any) => void; } -> : ^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ - - (i: number, ...arguments); // no error - no code gen ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - new (i: number, ...arguments); // no error - no code gen ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - foo(i: number, ...arguments); // no error - no code gen ->foo : (i: number, ...arguments: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - prop: (i: number, ...arguments) => void; // no error - no code gen ->prop : (i: number, ...arguments: any[]) => void -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ -} diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt b/tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt deleted file mode 100644 index 13a163d5bb541..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInterfaceMembers.errors.txt +++ /dev/null @@ -1,33 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== collisionArgumentsInterfaceMembers.ts (0 errors) ==== - // call - interface i1 { - (i: number, ...arguments); // no error - no code gen - } - interface i12 { - (arguments: number, ...rest); // no error - no code gen - } - interface i1NoError { - (arguments: number); // no error - } - - // new - interface i2 { - new (i: number, ...arguments); // no error - no code gen - } - interface i21 { - new (arguments: number, ...rest); // no error - no code gen - } - interface i2NoError { - new (arguments: number); // no error - } - - // method - interface i3 { - foo(i: number, ...arguments); // no error - no code gen - foo1(arguments: number, ...rest); // no error - no code gen - fooNoError(arguments: number); // no error - } \ No newline at end of file diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers.js b/tests/baselines/reference/collisionArgumentsInterfaceMembers.js deleted file mode 100644 index f0a187da57d34..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInterfaceMembers.js +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// - -//// [collisionArgumentsInterfaceMembers.ts] -// call -interface i1 { - (i: number, ...arguments); // no error - no code gen -} -interface i12 { - (arguments: number, ...rest); // no error - no code gen -} -interface i1NoError { - (arguments: number); // no error -} - -// new -interface i2 { - new (i: number, ...arguments); // no error - no code gen -} -interface i21 { - new (arguments: number, ...rest); // no error - no code gen -} -interface i2NoError { - new (arguments: number); // no error -} - -// method -interface i3 { - foo(i: number, ...arguments); // no error - no code gen - foo1(arguments: number, ...rest); // no error - no code gen - fooNoError(arguments: number); // no error -} - -//// [collisionArgumentsInterfaceMembers.js] diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers.symbols b/tests/baselines/reference/collisionArgumentsInterfaceMembers.symbols deleted file mode 100644 index 890a134c92581..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInterfaceMembers.symbols +++ /dev/null @@ -1,65 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// - -=== collisionArgumentsInterfaceMembers.ts === -// call -interface i1 { ->i1 : Symbol(i1, Decl(collisionArgumentsInterfaceMembers.ts, 0, 0)) - - (i: number, ...arguments); // no error - no code gen ->i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 2, 5)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 2, 15)) -} -interface i12 { ->i12 : Symbol(i12, Decl(collisionArgumentsInterfaceMembers.ts, 3, 1)) - - (arguments: number, ...rest); // no error - no code gen ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 5, 5)) ->rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 5, 23)) -} -interface i1NoError { ->i1NoError : Symbol(i1NoError, Decl(collisionArgumentsInterfaceMembers.ts, 6, 1)) - - (arguments: number); // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 8, 5)) -} - -// new -interface i2 { ->i2 : Symbol(i2, Decl(collisionArgumentsInterfaceMembers.ts, 9, 1)) - - new (i: number, ...arguments); // no error - no code gen ->i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 13, 9)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 13, 19)) -} -interface i21 { ->i21 : Symbol(i21, Decl(collisionArgumentsInterfaceMembers.ts, 14, 1)) - - new (arguments: number, ...rest); // no error - no code gen ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 16, 9)) ->rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 16, 27)) -} -interface i2NoError { ->i2NoError : Symbol(i2NoError, Decl(collisionArgumentsInterfaceMembers.ts, 17, 1)) - - new (arguments: number); // no error ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 19, 9)) -} - -// method -interface i3 { ->i3 : Symbol(i3, Decl(collisionArgumentsInterfaceMembers.ts, 20, 1)) - - foo(i: number, ...arguments); // no error - no code gen ->foo : Symbol(i3.foo, Decl(collisionArgumentsInterfaceMembers.ts, 23, 14)) ->i : Symbol(i, Decl(collisionArgumentsInterfaceMembers.ts, 24, 8)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 24, 18)) - - foo1(arguments: number, ...rest); // no error - no code gen ->foo1 : Symbol(i3.foo1, Decl(collisionArgumentsInterfaceMembers.ts, 24, 33)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 25, 9)) ->rest : Symbol(rest, Decl(collisionArgumentsInterfaceMembers.ts, 25, 27)) - - fooNoError(arguments: number); // no error ->fooNoError : Symbol(i3.fooNoError, Decl(collisionArgumentsInterfaceMembers.ts, 25, 37)) ->arguments : Symbol(arguments, Decl(collisionArgumentsInterfaceMembers.ts, 26, 15)) -} diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers.types b/tests/baselines/reference/collisionArgumentsInterfaceMembers.types deleted file mode 100644 index 66030e9306cd5..0000000000000 --- a/tests/baselines/reference/collisionArgumentsInterfaceMembers.types +++ /dev/null @@ -1,69 +0,0 @@ -//// [tests/cases/compiler/collisionArgumentsInterfaceMembers.ts] //// - -=== collisionArgumentsInterfaceMembers.ts === -// call -interface i1 { - (i: number, ...arguments); // no error - no code gen ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ -} -interface i12 { - (arguments: number, ...rest); // no error - no code gen ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ -} -interface i1NoError { - (arguments: number); // no error ->arguments : number -> : ^^^^^^ -} - -// new -interface i2 { - new (i: number, ...arguments); // no error - no code gen ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ -} -interface i21 { - new (arguments: number, ...rest); // no error - no code gen ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ -} -interface i2NoError { - new (arguments: number); // no error ->arguments : number -> : ^^^^^^ -} - -// method -interface i3 { - foo(i: number, ...arguments); // no error - no code gen ->foo : (i: number, ...arguments: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->i : number -> : ^^^^^^ ->arguments : any[] -> : ^^^^^ - - foo1(arguments: number, ...rest); // no error - no code gen ->foo1 : (arguments: number, ...rest: any[]) => any -> : ^ ^^ ^^^^^ ^^^^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ ->rest : any[] -> : ^^^^^ - - fooNoError(arguments: number); // no error ->fooNoError : (arguments: number) => any -> : ^ ^^ ^^^^^^^^ ->arguments : number -> : ^^^^^^ -} diff --git a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt b/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt deleted file mode 100644 index 267bc161474d1..0000000000000 --- a/tests/baselines/reference/constDeclarations-invalidContexts.errors.txt +++ /dev/null @@ -1,64 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -constDeclarations-invalidContexts.ts(3,5): error TS1156: 'const' declarations can only be declared inside a block. -constDeclarations-invalidContexts.ts(5,5): error TS1156: 'const' declarations can only be declared inside a block. -constDeclarations-invalidContexts.ts(8,5): error TS1156: 'const' declarations can only be declared inside a block. -constDeclarations-invalidContexts.ts(11,5): error TS1156: 'const' declarations can only be declared inside a block. -constDeclarations-invalidContexts.ts(15,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -constDeclarations-invalidContexts.ts(19,5): error TS1156: 'const' declarations can only be declared inside a block. -constDeclarations-invalidContexts.ts(22,5): error TS1156: 'const' declarations can only be declared inside a block. -constDeclarations-invalidContexts.ts(25,12): error TS1156: 'const' declarations can only be declared inside a block. -constDeclarations-invalidContexts.ts(28,29): error TS1156: 'const' declarations can only be declared inside a block. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== constDeclarations-invalidContexts.ts (9 errors) ==== - // Errors, const must be defined inside a block - if (true) - const c1 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - else - const c2 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - - while (true) - const c3 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - - do - const c4 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - while (true); - - var obj; - with (obj) - ~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - const c5 = 0; // No Error will be reported here since we turn off all type checking - - for (var i = 0; i < 10; i++) - const c6 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - - for (var i2 in {}) - const c7 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - - if (true) - label: const c8 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - - while (false) - label2: label3: label4: const c9 = 0; - ~~~~~~~~~~~~~ -!!! error TS1156: 'const' declarations can only be declared inside a block. - - - - \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-invalidContexts.js b/tests/baselines/reference/constDeclarations-invalidContexts.js deleted file mode 100644 index 89f0d6d18cc27..0000000000000 --- a/tests/baselines/reference/constDeclarations-invalidContexts.js +++ /dev/null @@ -1,58 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// - -//// [constDeclarations-invalidContexts.ts] -// Errors, const must be defined inside a block -if (true) - const c1 = 0; -else - const c2 = 0; - -while (true) - const c3 = 0; - -do - const c4 = 0; -while (true); - -var obj; -with (obj) - const c5 = 0; // No Error will be reported here since we turn off all type checking - -for (var i = 0; i < 10; i++) - const c6 = 0; - -for (var i2 in {}) - const c7 = 0; - -if (true) - label: const c8 = 0; - -while (false) - label2: label3: label4: const c9 = 0; - - - - - -//// [constDeclarations-invalidContexts.js] -// Errors, const must be defined inside a block -if (true) - const c1 = 0; -else - const c2 = 0; -while (true) - const c3 = 0; -do - const c4 = 0; -while (true); -var obj; -with (obj) - const c5 = 0; // No Error will be reported here since we turn off all type checking -for (var i = 0; i < 10; i++) - const c6 = 0; -for (var i2 in {}) - const c7 = 0; -if (true) - label: const c8 = 0; -while (false) - label2: label3: label4: const c9 = 0; diff --git a/tests/baselines/reference/constDeclarations-invalidContexts.symbols b/tests/baselines/reference/constDeclarations-invalidContexts.symbols deleted file mode 100644 index f85a1f2738dab..0000000000000 --- a/tests/baselines/reference/constDeclarations-invalidContexts.symbols +++ /dev/null @@ -1,55 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// - -=== constDeclarations-invalidContexts.ts === -// Errors, const must be defined inside a block -if (true) - const c1 = 0; ->c1 : Symbol(c1, Decl(constDeclarations-invalidContexts.ts, 2, 9)) - -else - const c2 = 0; ->c2 : Symbol(c2, Decl(constDeclarations-invalidContexts.ts, 4, 9)) - -while (true) - const c3 = 0; ->c3 : Symbol(c3, Decl(constDeclarations-invalidContexts.ts, 7, 9)) - -do - const c4 = 0; ->c4 : Symbol(c4, Decl(constDeclarations-invalidContexts.ts, 10, 9)) - -while (true); - -var obj; ->obj : Symbol(obj, Decl(constDeclarations-invalidContexts.ts, 13, 3)) - -with (obj) ->obj : Symbol(obj, Decl(constDeclarations-invalidContexts.ts, 13, 3)) - - const c5 = 0; // No Error will be reported here since we turn off all type checking - -for (var i = 0; i < 10; i++) ->i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) ->i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) ->i : Symbol(i, Decl(constDeclarations-invalidContexts.ts, 17, 8)) - - const c6 = 0; ->c6 : Symbol(c6, Decl(constDeclarations-invalidContexts.ts, 18, 9)) - -for (var i2 in {}) ->i2 : Symbol(i2, Decl(constDeclarations-invalidContexts.ts, 20, 8)) - - const c7 = 0; ->c7 : Symbol(c7, Decl(constDeclarations-invalidContexts.ts, 21, 9)) - -if (true) - label: const c8 = 0; ->c8 : Symbol(c8, Decl(constDeclarations-invalidContexts.ts, 24, 16)) - -while (false) - label2: label3: label4: const c9 = 0; ->c9 : Symbol(c9, Decl(constDeclarations-invalidContexts.ts, 27, 33)) - - - - diff --git a/tests/baselines/reference/constDeclarations-invalidContexts.types b/tests/baselines/reference/constDeclarations-invalidContexts.types deleted file mode 100644 index c994ab6621eb4..0000000000000 --- a/tests/baselines/reference/constDeclarations-invalidContexts.types +++ /dev/null @@ -1,121 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-invalidContexts.ts] //// - -=== constDeclarations-invalidContexts.ts === -// Errors, const must be defined inside a block -if (true) ->true : true -> : ^^^^ - - const c1 = 0; ->c1 : 0 -> : ^ ->0 : 0 -> : ^ - -else - const c2 = 0; ->c2 : 0 -> : ^ ->0 : 0 -> : ^ - -while (true) ->true : true -> : ^^^^ - - const c3 = 0; ->c3 : 0 -> : ^ ->0 : 0 -> : ^ - -do - const c4 = 0; ->c4 : 0 -> : ^ ->0 : 0 -> : ^ - -while (true); ->true : true -> : ^^^^ - -var obj; ->obj : any -> : ^^^ - -with (obj) ->obj : any -> : ^^^ - - const c5 = 0; // No Error will be reported here since we turn off all type checking ->c5 : any -> : ^^^ ->0 : any -> : ^^^ - -for (var i = 0; i < 10; i++) ->i : number -> : ^^^^^^ ->0 : 0 -> : ^ ->i < 10 : boolean -> : ^^^^^^^ ->i : number -> : ^^^^^^ ->10 : 10 -> : ^^ ->i++ : number -> : ^^^^^^ ->i : number -> : ^^^^^^ - - const c6 = 0; ->c6 : 0 -> : ^ ->0 : 0 -> : ^ - -for (var i2 in {}) ->i2 : string -> : ^^^^^^ ->{} : {} -> : ^^ - - const c7 = 0; ->c7 : 0 -> : ^ ->0 : 0 -> : ^ - -if (true) ->true : true -> : ^^^^ - - label: const c8 = 0; ->label : any -> : ^^^ ->c8 : 0 -> : ^ ->0 : 0 -> : ^ - -while (false) ->false : false -> : ^^^^^ - - label2: label3: label4: const c9 = 0; ->label2 : any -> : ^^^ ->label3 : any -> : ^^^ ->label4 : any -> : ^^^ ->c9 : 0 -> : ^ ->0 : 0 -> : ^ - - - - diff --git a/tests/baselines/reference/constDeclarations-scopes.errors.txt b/tests/baselines/reference/constDeclarations-scopes.errors.txt deleted file mode 100644 index d3ca880a9cbda..0000000000000 --- a/tests/baselines/reference/constDeclarations-scopes.errors.txt +++ /dev/null @@ -1,154 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -constDeclarations-scopes.ts(27,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== constDeclarations-scopes.ts (1 errors) ==== - // global - const c = "string"; - - var n: number; - - // Control flow statements with blocks - if (true) { - const c = 0; - n = c; - } - else { - const c = 0; - n = c; - } - - while (true) { - const c = 0; - n = c; - } - - do { - const c = 0; - n = c; - } while (true); - - var obj; - with (obj) { - ~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - const c = 0; - n = c; - } - - for (var i = 0; i < 10; i++) { - const c = 0; - n = c; - } - - for (var i2 in {}) { - const c = 0; - n = c; - } - - if (true) { - label: const c = 0; - n = c; - } - - while (false) { - label2: label3: label4: const c = 0; - n = c; - } - - // Try/catch/finally - try { - const c = 0; - n = c; - } - catch (e) { - const c = 0; - n = c; - } - finally { - const c = 0; - n = c; - } - - // Switch - switch (0) { - case 0: - const c = 0; - n = c; - break; - } - - // blocks - { - const c = 0; - n = c; - { - const c = false; - var b: boolean = c; - } - } - - // functions - - function F() { - const c = 0; - n = c; - } - - var F2 = () => { - const c = 0; - n = c; - }; - - var F3 = function () { - const c = 0; - n = c; - }; - - // modules - namespace m { - const c = 0; - n = c; - - { - const c = false; - var b2: boolean = c; - } - } - - // methods - class C { - constructor() { - const c = 0; - n = c; - } - - method() { - const c = 0; - n = c; - } - - get v() { - const c = 0; - n = c; - return n; - } - - set v(value) { - const c = 0; - n = c; - } - } - - // object literals - var o = { - f() { - const c = 0; - n = c; - }, - f2: () => { - const c = 0; - n = c; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-scopes.js b/tests/baselines/reference/constDeclarations-scopes.js deleted file mode 100644 index b7fbe9021102f..0000000000000 --- a/tests/baselines/reference/constDeclarations-scopes.js +++ /dev/null @@ -1,275 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-scopes.ts] //// - -//// [constDeclarations-scopes.ts] -// global -const c = "string"; - -var n: number; - -// Control flow statements with blocks -if (true) { - const c = 0; - n = c; -} -else { - const c = 0; - n = c; -} - -while (true) { - const c = 0; - n = c; -} - -do { - const c = 0; - n = c; -} while (true); - -var obj; -with (obj) { - const c = 0; - n = c; -} - -for (var i = 0; i < 10; i++) { - const c = 0; - n = c; -} - -for (var i2 in {}) { - const c = 0; - n = c; -} - -if (true) { - label: const c = 0; - n = c; -} - -while (false) { - label2: label3: label4: const c = 0; - n = c; -} - -// Try/catch/finally -try { - const c = 0; - n = c; -} -catch (e) { - const c = 0; - n = c; -} -finally { - const c = 0; - n = c; -} - -// Switch -switch (0) { - case 0: - const c = 0; - n = c; - break; -} - -// blocks -{ - const c = 0; - n = c; - { - const c = false; - var b: boolean = c; - } -} - -// functions - -function F() { - const c = 0; - n = c; -} - -var F2 = () => { - const c = 0; - n = c; -}; - -var F3 = function () { - const c = 0; - n = c; -}; - -// modules -namespace m { - const c = 0; - n = c; - - { - const c = false; - var b2: boolean = c; - } -} - -// methods -class C { - constructor() { - const c = 0; - n = c; - } - - method() { - const c = 0; - n = c; - } - - get v() { - const c = 0; - n = c; - return n; - } - - set v(value) { - const c = 0; - n = c; - } -} - -// object literals -var o = { - f() { - const c = 0; - n = c; - }, - f2: () => { - const c = 0; - n = c; - } -} - -//// [constDeclarations-scopes.js] -// global -const c = "string"; -var n; -// Control flow statements with blocks -if (true) { - const c = 0; - n = c; -} -else { - const c = 0; - n = c; -} -while (true) { - const c = 0; - n = c; -} -do { - const c = 0; - n = c; -} while (true); -var obj; -with (obj) { - const c = 0; - n = c; -} -for (var i = 0; i < 10; i++) { - const c = 0; - n = c; -} -for (var i2 in {}) { - const c = 0; - n = c; -} -if (true) { - label: const c = 0; - n = c; -} -while (false) { - label2: label3: label4: const c = 0; - n = c; -} -// Try/catch/finally -try { - const c = 0; - n = c; -} -catch (e) { - const c = 0; - n = c; -} -finally { - const c = 0; - n = c; -} -// Switch -switch (0) { - case 0: - const c = 0; - n = c; - break; -} -// blocks -{ - const c = 0; - n = c; - { - const c = false; - var b = c; - } -} -// functions -function F() { - const c = 0; - n = c; -} -var F2 = () => { - const c = 0; - n = c; -}; -var F3 = function () { - const c = 0; - n = c; -}; -// modules -var m; -(function (m) { - const c = 0; - n = c; - { - const c = false; - var b2 = c; - } -})(m || (m = {})); -// methods -class C { - constructor() { - const c = 0; - n = c; - } - method() { - const c = 0; - n = c; - } - get v() { - const c = 0; - n = c; - return n; - } - set v(value) { - const c = 0; - n = c; - } -} -// object literals -var o = { - f() { - const c = 0; - n = c; - }, - f2: () => { - const c = 0; - n = c; - } -}; diff --git a/tests/baselines/reference/constDeclarations-scopes.symbols b/tests/baselines/reference/constDeclarations-scopes.symbols deleted file mode 100644 index 6093e1a4ada4b..0000000000000 --- a/tests/baselines/reference/constDeclarations-scopes.symbols +++ /dev/null @@ -1,293 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-scopes.ts] //// - -=== constDeclarations-scopes.ts === -// global -const c = "string"; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 1, 5)) - -var n: number; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) - -// Control flow statements with blocks -if (true) { - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 7, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 7, 9)) -} -else { - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 11, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 11, 9)) -} - -while (true) { - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 16, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 16, 9)) -} - -do { - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 21, 8)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 21, 8)) - -} while (true); - -var obj; ->obj : Symbol(obj, Decl(constDeclarations-scopes.ts, 25, 3)) - -with (obj) { ->obj : Symbol(obj, Decl(constDeclarations-scopes.ts, 25, 3)) - - const c = 0; - n = c; -} - -for (var i = 0; i < 10; i++) { ->i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) ->i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) ->i : Symbol(i, Decl(constDeclarations-scopes.ts, 31, 8)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 32, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 32, 9)) -} - -for (var i2 in {}) { ->i2 : Symbol(i2, Decl(constDeclarations-scopes.ts, 36, 8)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 37, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 37, 9)) -} - -if (true) { - label: const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 42, 16)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 42, 16)) -} - -while (false) { - label2: label3: label4: const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 47, 33)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 47, 33)) -} - -// Try/catch/finally -try { - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 53, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 53, 9)) -} -catch (e) { ->e : Symbol(e, Decl(constDeclarations-scopes.ts, 56, 7)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 57, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 57, 9)) -} -finally { - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 61, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 61, 9)) -} - -// Switch -switch (0) { - case 0: - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 68, 13)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 68, 13)) - - break; -} - -// blocks -{ - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 75, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 75, 9)) - { - const c = false; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 78, 13)) - - var b: boolean = c; ->b : Symbol(b, Decl(constDeclarations-scopes.ts, 79, 11)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 78, 13)) - } -} - -// functions - -function F() { ->F : Symbol(F, Decl(constDeclarations-scopes.ts, 81, 1)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 86, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 86, 9)) -} - -var F2 = () => { ->F2 : Symbol(F2, Decl(constDeclarations-scopes.ts, 90, 3)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 91, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 91, 9)) - -}; - -var F3 = function () { ->F3 : Symbol(F3, Decl(constDeclarations-scopes.ts, 95, 3)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 96, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 96, 9)) - -}; - -// modules -namespace m { ->m : Symbol(m, Decl(constDeclarations-scopes.ts, 98, 2)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 102, 9)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 102, 9)) - - { - const c = false; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 106, 12)) - - var b2: boolean = c; ->b2 : Symbol(b2, Decl(constDeclarations-scopes.ts, 107, 10)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 106, 12)) - } -} - -// methods -class C { ->C : Symbol(C, Decl(constDeclarations-scopes.ts, 109, 1)) - - constructor() { - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 114, 13)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 114, 13)) - } - - method() { ->method : Symbol(C.method, Decl(constDeclarations-scopes.ts, 116, 5)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 119, 13)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 119, 13)) - } - - get v() { ->v : Symbol(C.v, Decl(constDeclarations-scopes.ts, 121, 5), Decl(constDeclarations-scopes.ts, 127, 5)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 124, 13)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 124, 13)) - - return n; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) - } - - set v(value) { ->v : Symbol(C.v, Decl(constDeclarations-scopes.ts, 121, 5), Decl(constDeclarations-scopes.ts, 127, 5)) ->value : Symbol(value, Decl(constDeclarations-scopes.ts, 129, 10)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 130, 13)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 130, 13)) - } -} - -// object literals -var o = { ->o : Symbol(o, Decl(constDeclarations-scopes.ts, 136, 3)) - - f() { ->f : Symbol(f, Decl(constDeclarations-scopes.ts, 136, 9)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 138, 13)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 138, 13)) - - }, - f2: () => { ->f2 : Symbol(f2, Decl(constDeclarations-scopes.ts, 140, 6)) - - const c = 0; ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 142, 13)) - - n = c; ->n : Symbol(n, Decl(constDeclarations-scopes.ts, 3, 3)) ->c : Symbol(c, Decl(constDeclarations-scopes.ts, 142, 13)) - } -} diff --git a/tests/baselines/reference/constDeclarations-scopes.types b/tests/baselines/reference/constDeclarations-scopes.types deleted file mode 100644 index 78aa5573412bc..0000000000000 --- a/tests/baselines/reference/constDeclarations-scopes.types +++ /dev/null @@ -1,545 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-scopes.ts] //// - -=== constDeclarations-scopes.ts === -// global -const c = "string"; ->c : "string" -> : ^^^^^^^^ ->"string" : "string" -> : ^^^^^^^^ - -var n: number; ->n : number -> : ^^^^^^ - -// Control flow statements with blocks -if (true) { ->true : true -> : ^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} -else { - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -while (true) { ->true : true -> : ^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -do { - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - -} while (true); ->true : true -> : ^^^^ - -var obj; ->obj : any -> : ^^^ - -with (obj) { ->obj : any -> : ^^^ - - const c = 0; ->c : any -> : ^^^ ->0 : any -> : ^^^ - - n = c; ->n = c : any -> : ^^^ ->n : any -> : ^^^ ->c : any -> : ^^^ -} - -for (var i = 0; i < 10; i++) { ->i : number -> : ^^^^^^ ->0 : 0 -> : ^ ->i < 10 : boolean -> : ^^^^^^^ ->i : number -> : ^^^^^^ ->10 : 10 -> : ^^ ->i++ : number -> : ^^^^^^ ->i : number -> : ^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -for (var i2 in {}) { ->i2 : string -> : ^^^^^^ ->{} : {} -> : ^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -if (true) { ->true : true -> : ^^^^ - - label: const c = 0; ->label : any -> : ^^^ ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -while (false) { ->false : false -> : ^^^^^ - - label2: label3: label4: const c = 0; ->label2 : any -> : ^^^ ->label3 : any -> : ^^^ ->label4 : any -> : ^^^ ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -// Try/catch/finally -try { - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} -catch (e) { ->e : any -> : ^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} -finally { - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -// Switch -switch (0) { ->0 : 0 -> : ^ - - case 0: ->0 : 0 -> : ^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - - break; -} - -// blocks -{ - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - { - const c = false; ->c : false -> : ^^^^^ ->false : false -> : ^^^^^ - - var b: boolean = c; ->b : boolean -> : ^^^^^^^ ->c : false -> : ^^^^^ - } -} - -// functions - -function F() { ->F : () => void -> : ^^^^^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ -} - -var F2 = () => { ->F2 : () => void -> : ^^^^^^^^^^ ->() => { const c = 0; n = c;} : () => void -> : ^^^^^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - -}; - -var F3 = function () { ->F3 : () => void -> : ^^^^^^^^^^ ->function () { const c = 0; n = c;} : () => void -> : ^^^^^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - -}; - -// modules -namespace m { ->m : typeof m -> : ^^^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - - { - const c = false; ->c : false -> : ^^^^^ ->false : false -> : ^^^^^ - - var b2: boolean = c; ->b2 : boolean -> : ^^^^^^^ ->c : false -> : ^^^^^ - } -} - -// methods -class C { ->C : C -> : ^ - - constructor() { - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - } - - method() { ->method : () => void -> : ^^^^^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - } - - get v() { ->v : number -> : ^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - - return n; ->n : number -> : ^^^^^^ - } - - set v(value) { ->v : number -> : ^^^^^^ ->value : number -> : ^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - } -} - -// object literals -var o = { ->o : { f(): void; f2: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ f() { const c = 0; n = c; }, f2: () => { const c = 0; n = c; }} : { f(): void; f2: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - f() { ->f : () => void -> : ^^^^^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - - }, - f2: () => { ->f2 : () => void -> : ^^^^^^^^^^ ->() => { const c = 0; n = c; } : () => void -> : ^^^^^^^^^^ - - const c = 0; ->c : 0 -> : ^ ->0 : 0 -> : ^ - - n = c; ->n = c : 0 -> : ^ ->n : number -> : ^^^^^^ ->c : 0 -> : ^ - } -} diff --git a/tests/baselines/reference/constDeclarations-validContexts.errors.txt b/tests/baselines/reference/constDeclarations-validContexts.errors.txt deleted file mode 100644 index 22a753be189f5..0000000000000 --- a/tests/baselines/reference/constDeclarations-validContexts.errors.txt +++ /dev/null @@ -1,129 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -constDeclarations-validContexts.ts(18,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== constDeclarations-validContexts.ts (1 errors) ==== - // Control flow statements with blocks - if (true) { - const c1 = 0; - } - else { - const c2 = 0; - } - - while (true) { - const c3 = 0; - } - - do { - const c4 = 0; - } while (true); - - var obj; - with (obj) { - ~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - const c5 = 0; - } - - for (var i = 0; i < 10; i++) { - const c6 = 0; - } - - for (var i2 in {}) { - const c7 = 0; - } - - if (true) { - label: const c8 = 0; - } - - while (false) { - label2: label3: label4: const c9 = 0; - } - - // Try/catch/finally - try { - const c10 = 0; - } - catch (e) { - const c11 = 0; - } - finally { - const c12 = 0; - } - - // Switch - switch (0) { - case 0: - const c13 = 0; - break; - default: - const c14 = 0; - break; - } - - // blocks - { - const c15 = 0; - { - const c16 = 0 - label17: const c17 = 0; - } - } - - // global - const c18 = 0; - - // functions - function F() { - const c19 = 0; - } - - var F2 = () => { - const c20 = 0; - }; - - var F3 = function () { - const c21 = 0; - }; - - // modules - namespace m { - const c22 = 0; - - { - const c23 = 0; - } - } - - // methods - class C { - constructor() { - const c24 = 0; - } - - method() { - const c25 = 0; - } - - get v() { - const c26 = 0; - return c26; - } - - set v(value) { - const c27 = value; - } - } - - // object literals - var o = { - f() { - const c28 = 0; - }, - f2: () => { - const c29 = 0; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-validContexts.js b/tests/baselines/reference/constDeclarations-validContexts.js deleted file mode 100644 index 138e4828780c8..0000000000000 --- a/tests/baselines/reference/constDeclarations-validContexts.js +++ /dev/null @@ -1,227 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// - -//// [constDeclarations-validContexts.ts] -// Control flow statements with blocks -if (true) { - const c1 = 0; -} -else { - const c2 = 0; -} - -while (true) { - const c3 = 0; -} - -do { - const c4 = 0; -} while (true); - -var obj; -with (obj) { - const c5 = 0; -} - -for (var i = 0; i < 10; i++) { - const c6 = 0; -} - -for (var i2 in {}) { - const c7 = 0; -} - -if (true) { - label: const c8 = 0; -} - -while (false) { - label2: label3: label4: const c9 = 0; -} - -// Try/catch/finally -try { - const c10 = 0; -} -catch (e) { - const c11 = 0; -} -finally { - const c12 = 0; -} - -// Switch -switch (0) { - case 0: - const c13 = 0; - break; - default: - const c14 = 0; - break; -} - -// blocks -{ - const c15 = 0; - { - const c16 = 0 - label17: const c17 = 0; - } -} - -// global -const c18 = 0; - -// functions -function F() { - const c19 = 0; -} - -var F2 = () => { - const c20 = 0; -}; - -var F3 = function () { - const c21 = 0; -}; - -// modules -namespace m { - const c22 = 0; - - { - const c23 = 0; - } -} - -// methods -class C { - constructor() { - const c24 = 0; - } - - method() { - const c25 = 0; - } - - get v() { - const c26 = 0; - return c26; - } - - set v(value) { - const c27 = value; - } -} - -// object literals -var o = { - f() { - const c28 = 0; - }, - f2: () => { - const c29 = 0; - } -} - -//// [constDeclarations-validContexts.js] -// Control flow statements with blocks -if (true) { - const c1 = 0; -} -else { - const c2 = 0; -} -while (true) { - const c3 = 0; -} -do { - const c4 = 0; -} while (true); -var obj; -with (obj) { - const c5 = 0; -} -for (var i = 0; i < 10; i++) { - const c6 = 0; -} -for (var i2 in {}) { - const c7 = 0; -} -if (true) { - label: const c8 = 0; -} -while (false) { - label2: label3: label4: const c9 = 0; -} -// Try/catch/finally -try { - const c10 = 0; -} -catch (e) { - const c11 = 0; -} -finally { - const c12 = 0; -} -// Switch -switch (0) { - case 0: - const c13 = 0; - break; - default: - const c14 = 0; - break; -} -// blocks -{ - const c15 = 0; - { - const c16 = 0; - label17: const c17 = 0; - } -} -// global -const c18 = 0; -// functions -function F() { - const c19 = 0; -} -var F2 = () => { - const c20 = 0; -}; -var F3 = function () { - const c21 = 0; -}; -// modules -var m; -(function (m) { - const c22 = 0; - { - const c23 = 0; - } -})(m || (m = {})); -// methods -class C { - constructor() { - const c24 = 0; - } - method() { - const c25 = 0; - } - get v() { - const c26 = 0; - return c26; - } - set v(value) { - const c27 = value; - } -} -// object literals -var o = { - f() { - const c28 = 0; - }, - f2: () => { - const c29 = 0; - } -}; diff --git a/tests/baselines/reference/constDeclarations-validContexts.symbols b/tests/baselines/reference/constDeclarations-validContexts.symbols deleted file mode 100644 index 3496aabc5bb02..0000000000000 --- a/tests/baselines/reference/constDeclarations-validContexts.symbols +++ /dev/null @@ -1,197 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// - -=== constDeclarations-validContexts.ts === -// Control flow statements with blocks -if (true) { - const c1 = 0; ->c1 : Symbol(c1, Decl(constDeclarations-validContexts.ts, 2, 9)) -} -else { - const c2 = 0; ->c2 : Symbol(c2, Decl(constDeclarations-validContexts.ts, 5, 9)) -} - -while (true) { - const c3 = 0; ->c3 : Symbol(c3, Decl(constDeclarations-validContexts.ts, 9, 9)) -} - -do { - const c4 = 0; ->c4 : Symbol(c4, Decl(constDeclarations-validContexts.ts, 13, 9)) - -} while (true); - -var obj; ->obj : Symbol(obj, Decl(constDeclarations-validContexts.ts, 16, 3)) - -with (obj) { ->obj : Symbol(obj, Decl(constDeclarations-validContexts.ts, 16, 3)) - - const c5 = 0; -} - -for (var i = 0; i < 10; i++) { ->i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) ->i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) ->i : Symbol(i, Decl(constDeclarations-validContexts.ts, 21, 8)) - - const c6 = 0; ->c6 : Symbol(c6, Decl(constDeclarations-validContexts.ts, 22, 9)) -} - -for (var i2 in {}) { ->i2 : Symbol(i2, Decl(constDeclarations-validContexts.ts, 25, 8)) - - const c7 = 0; ->c7 : Symbol(c7, Decl(constDeclarations-validContexts.ts, 26, 9)) -} - -if (true) { - label: const c8 = 0; ->c8 : Symbol(c8, Decl(constDeclarations-validContexts.ts, 30, 16)) -} - -while (false) { - label2: label3: label4: const c9 = 0; ->c9 : Symbol(c9, Decl(constDeclarations-validContexts.ts, 34, 33)) -} - -// Try/catch/finally -try { - const c10 = 0; ->c10 : Symbol(c10, Decl(constDeclarations-validContexts.ts, 39, 9)) -} -catch (e) { ->e : Symbol(e, Decl(constDeclarations-validContexts.ts, 41, 7)) - - const c11 = 0; ->c11 : Symbol(c11, Decl(constDeclarations-validContexts.ts, 42, 9)) -} -finally { - const c12 = 0; ->c12 : Symbol(c12, Decl(constDeclarations-validContexts.ts, 45, 9)) -} - -// Switch -switch (0) { - case 0: - const c13 = 0; ->c13 : Symbol(c13, Decl(constDeclarations-validContexts.ts, 51, 13)) - - break; - default: - const c14 = 0; ->c14 : Symbol(c14, Decl(constDeclarations-validContexts.ts, 54, 13)) - - break; -} - -// blocks -{ - const c15 = 0; ->c15 : Symbol(c15, Decl(constDeclarations-validContexts.ts, 60, 9)) - { - const c16 = 0 ->c16 : Symbol(c16, Decl(constDeclarations-validContexts.ts, 62, 13)) - - label17: const c17 = 0; ->c17 : Symbol(c17, Decl(constDeclarations-validContexts.ts, 63, 22)) - } -} - -// global -const c18 = 0; ->c18 : Symbol(c18, Decl(constDeclarations-validContexts.ts, 68, 5)) - -// functions -function F() { ->F : Symbol(F, Decl(constDeclarations-validContexts.ts, 68, 14)) - - const c19 = 0; ->c19 : Symbol(c19, Decl(constDeclarations-validContexts.ts, 72, 9)) -} - -var F2 = () => { ->F2 : Symbol(F2, Decl(constDeclarations-validContexts.ts, 75, 3)) - - const c20 = 0; ->c20 : Symbol(c20, Decl(constDeclarations-validContexts.ts, 76, 9)) - -}; - -var F3 = function () { ->F3 : Symbol(F3, Decl(constDeclarations-validContexts.ts, 79, 3)) - - const c21 = 0; ->c21 : Symbol(c21, Decl(constDeclarations-validContexts.ts, 80, 9)) - -}; - -// modules -namespace m { ->m : Symbol(m, Decl(constDeclarations-validContexts.ts, 81, 2)) - - const c22 = 0; ->c22 : Symbol(c22, Decl(constDeclarations-validContexts.ts, 85, 9)) - - { - const c23 = 0; ->c23 : Symbol(c23, Decl(constDeclarations-validContexts.ts, 88, 15)) - } -} - -// methods -class C { ->C : Symbol(C, Decl(constDeclarations-validContexts.ts, 90, 1)) - - constructor() { - const c24 = 0; ->c24 : Symbol(c24, Decl(constDeclarations-validContexts.ts, 95, 13)) - } - - method() { ->method : Symbol(C.method, Decl(constDeclarations-validContexts.ts, 96, 5)) - - const c25 = 0; ->c25 : Symbol(c25, Decl(constDeclarations-validContexts.ts, 99, 13)) - } - - get v() { ->v : Symbol(C.v, Decl(constDeclarations-validContexts.ts, 100, 5), Decl(constDeclarations-validContexts.ts, 105, 5)) - - const c26 = 0; ->c26 : Symbol(c26, Decl(constDeclarations-validContexts.ts, 103, 13)) - - return c26; ->c26 : Symbol(c26, Decl(constDeclarations-validContexts.ts, 103, 13)) - } - - set v(value) { ->v : Symbol(C.v, Decl(constDeclarations-validContexts.ts, 100, 5), Decl(constDeclarations-validContexts.ts, 105, 5)) ->value : Symbol(value, Decl(constDeclarations-validContexts.ts, 107, 10)) - - const c27 = value; ->c27 : Symbol(c27, Decl(constDeclarations-validContexts.ts, 108, 13)) ->value : Symbol(value, Decl(constDeclarations-validContexts.ts, 107, 10)) - } -} - -// object literals -var o = { ->o : Symbol(o, Decl(constDeclarations-validContexts.ts, 113, 3)) - - f() { ->f : Symbol(f, Decl(constDeclarations-validContexts.ts, 113, 9)) - - const c28 = 0; ->c28 : Symbol(c28, Decl(constDeclarations-validContexts.ts, 115, 13)) - - }, - f2: () => { ->f2 : Symbol(f2, Decl(constDeclarations-validContexts.ts, 116, 6)) - - const c29 = 0; ->c29 : Symbol(c29, Decl(constDeclarations-validContexts.ts, 118, 13)) - } -} diff --git a/tests/baselines/reference/constDeclarations-validContexts.types b/tests/baselines/reference/constDeclarations-validContexts.types deleted file mode 100644 index 7ca9c9b2f2dd3..0000000000000 --- a/tests/baselines/reference/constDeclarations-validContexts.types +++ /dev/null @@ -1,352 +0,0 @@ -//// [tests/cases/compiler/constDeclarations-validContexts.ts] //// - -=== constDeclarations-validContexts.ts === -// Control flow statements with blocks -if (true) { ->true : true -> : ^^^^ - - const c1 = 0; ->c1 : 0 -> : ^ ->0 : 0 -> : ^ -} -else { - const c2 = 0; ->c2 : 0 -> : ^ ->0 : 0 -> : ^ -} - -while (true) { ->true : true -> : ^^^^ - - const c3 = 0; ->c3 : 0 -> : ^ ->0 : 0 -> : ^ -} - -do { - const c4 = 0; ->c4 : 0 -> : ^ ->0 : 0 -> : ^ - -} while (true); ->true : true -> : ^^^^ - -var obj; ->obj : any -> : ^^^ - -with (obj) { ->obj : any -> : ^^^ - - const c5 = 0; ->c5 : any -> : ^^^ ->0 : any -> : ^^^ -} - -for (var i = 0; i < 10; i++) { ->i : number -> : ^^^^^^ ->0 : 0 -> : ^ ->i < 10 : boolean -> : ^^^^^^^ ->i : number -> : ^^^^^^ ->10 : 10 -> : ^^ ->i++ : number -> : ^^^^^^ ->i : number -> : ^^^^^^ - - const c6 = 0; ->c6 : 0 -> : ^ ->0 : 0 -> : ^ -} - -for (var i2 in {}) { ->i2 : string -> : ^^^^^^ ->{} : {} -> : ^^ - - const c7 = 0; ->c7 : 0 -> : ^ ->0 : 0 -> : ^ -} - -if (true) { ->true : true -> : ^^^^ - - label: const c8 = 0; ->label : any -> : ^^^ ->c8 : 0 -> : ^ ->0 : 0 -> : ^ -} - -while (false) { ->false : false -> : ^^^^^ - - label2: label3: label4: const c9 = 0; ->label2 : any -> : ^^^ ->label3 : any -> : ^^^ ->label4 : any -> : ^^^ ->c9 : 0 -> : ^ ->0 : 0 -> : ^ -} - -// Try/catch/finally -try { - const c10 = 0; ->c10 : 0 -> : ^ ->0 : 0 -> : ^ -} -catch (e) { ->e : any -> : ^^^ - - const c11 = 0; ->c11 : 0 -> : ^ ->0 : 0 -> : ^ -} -finally { - const c12 = 0; ->c12 : 0 -> : ^ ->0 : 0 -> : ^ -} - -// Switch -switch (0) { ->0 : 0 -> : ^ - - case 0: ->0 : 0 -> : ^ - - const c13 = 0; ->c13 : 0 -> : ^ ->0 : 0 -> : ^ - - break; - default: - const c14 = 0; ->c14 : 0 -> : ^ ->0 : 0 -> : ^ - - break; -} - -// blocks -{ - const c15 = 0; ->c15 : 0 -> : ^ ->0 : 0 -> : ^ - { - const c16 = 0 ->c16 : 0 -> : ^ ->0 : 0 -> : ^ - - label17: const c17 = 0; ->label17 : any -> : ^^^ ->c17 : 0 -> : ^ ->0 : 0 -> : ^ - } -} - -// global -const c18 = 0; ->c18 : 0 -> : ^ ->0 : 0 -> : ^ - -// functions -function F() { ->F : () => void -> : ^^^^^^^^^^ - - const c19 = 0; ->c19 : 0 -> : ^ ->0 : 0 -> : ^ -} - -var F2 = () => { ->F2 : () => void -> : ^^^^^^^^^^ ->() => { const c20 = 0;} : () => void -> : ^^^^^^^^^^ - - const c20 = 0; ->c20 : 0 -> : ^ ->0 : 0 -> : ^ - -}; - -var F3 = function () { ->F3 : () => void -> : ^^^^^^^^^^ ->function () { const c21 = 0;} : () => void -> : ^^^^^^^^^^ - - const c21 = 0; ->c21 : 0 -> : ^ ->0 : 0 -> : ^ - -}; - -// modules -namespace m { ->m : typeof m -> : ^^^^^^^^ - - const c22 = 0; ->c22 : 0 -> : ^ ->0 : 0 -> : ^ - - { - const c23 = 0; ->c23 : 0 -> : ^ ->0 : 0 -> : ^ - } -} - -// methods -class C { ->C : C -> : ^ - - constructor() { - const c24 = 0; ->c24 : 0 -> : ^ ->0 : 0 -> : ^ - } - - method() { ->method : () => void -> : ^^^^^^^^^^ - - const c25 = 0; ->c25 : 0 -> : ^ ->0 : 0 -> : ^ - } - - get v() { ->v : number -> : ^^^^^^ - - const c26 = 0; ->c26 : 0 -> : ^ ->0 : 0 -> : ^ - - return c26; ->c26 : 0 -> : ^ - } - - set v(value) { ->v : number -> : ^^^^^^ ->value : number -> : ^^^^^^ - - const c27 = value; ->c27 : number -> : ^^^^^^ ->value : number -> : ^^^^^^ - } -} - -// object literals -var o = { ->o : { f(): void; f2: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ f() { const c28 = 0; }, f2: () => { const c29 = 0; }} : { f(): void; f2: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - f() { ->f : () => void -> : ^^^^^^^^^^ - - const c28 = 0; ->c28 : 0 -> : ^ ->0 : 0 -> : ^ - - }, - f2: () => { ->f2 : () => void -> : ^^^^^^^^^^ ->() => { const c29 = 0; } : () => void -> : ^^^^^^^^^^ - - const c29 = 0; ->c29 : 0 -> : ^ ->0 : 0 -> : ^ - } -} diff --git a/tests/baselines/reference/convertKeywordsYes.errors.txt b/tests/baselines/reference/convertKeywordsYes.errors.txt deleted file mode 100644 index f4775668f1ab0..0000000000000 --- a/tests/baselines/reference/convertKeywordsYes.errors.txt +++ /dev/null @@ -1,340 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -convertKeywordsYes.ts(175,12): error TS18006: Classes may not have a field named 'constructor'. -convertKeywordsYes.ts(292,11): error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(293,11): error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(294,11): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(296,11): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(297,11): error TS1213: Identifier expected. 'private' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(298,11): error TS1213: Identifier expected. 'protected' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(299,11): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(301,11): error TS1213: Identifier expected. 'static' is a reserved word in strict mode. Class definitions are automatically in strict mode. -convertKeywordsYes.ts(303,11): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== convertKeywordsYes.ts (10 errors) ==== - // reserved ES5 future in strict mode - - var constructor = 0; - var any = 0; - var boolean = 0; - var implements = 0; - var interface = 0; - var let = 0; - var module = 0; - var number = 0; - var package = 0; - var private = 0; - var protected = 0; - var public = 0; - var set = 0; - var static = 0; - var string = 0; - var get = 0; - var yield = 0; - var declare = 0; - - function bigGeneric< - constructor, - implements , - interface , - let, - module , - package, - private , - protected, - public , - set , - static , - get , - yield, - declare - >(c: constructor, - a: any, - b2: boolean, - i: implements , - i2: interface , - l: let, - m: module , - n: number, - p: package, - p2: private , - p3: protected, - p4: public , - s: set , - s2: static , - s3: string, - g: get , - y: yield, - d: declare ) { } - - var bigObject = { - constructor: 0, - any: 0, - boolean: 0, - implements: 0, - interface: 0, - let: 0, - module: 0, - number: 0, - package: 0, - private: 0, - protected: 0, - public: 0, - set: 0, - static: 0, - string: 0, - get: 0, - yield: 0, - break: 0, - case: 0, - catch: 0, - class: 0, - continue: 0, - const: 0, - - debugger: 0, - declare: 0, - default: 0, - delete: 0, - do: 0, - else: 0, - enum: 0, - export: 0, - extends: 0, - false: 0, - finally: 0, - for: 0, - function: 0, - if: 0, - - import: 0, - in: 0, - instanceof: 0, - new: 0, - null: 0, - return: 0, - super: 0, - switch: 0, - this: 0, - throw: 0, - true: 0, - try: 0, - typeof: 0, - var: 0, - void: 0, - while: 0, - with: 0, - }; - - interface bigInterface { - constructor; - any; - boolean; - implements; - interface; - let; - module; - number; - package; - private; - protected; - public; - set; - static; - string; - get; - yield; - break; - case; - catch; - class; - continue; - const; - - debugger; - declare; - default; - delete; - do; - else; - enum; - export; - extends; - false; - finally; - for; - function; - if; - - import; - in; - instanceof; - new; - null; - return; - super; - switch; - this; - throw; - true; - try; - typeof; - var; - void; - while; - with; - } - - class bigClass { - public "constructor" = 0; - ~~~~~~~~~~~~~ -!!! error TS18006: Classes may not have a field named 'constructor'. - public any = 0; - public boolean = 0; - public implements = 0; - public interface = 0; - public let = 0; - public module = 0; - public number = 0; - public package = 0; - public private = 0; - public protected = 0; - public public = 0; - public set = 0; - public static = 0; - public string = 0; - public get = 0; - public yield = 0; - public break = 0; - public case = 0; - public catch = 0; - public class = 0; - public continue = 0; - public const = 0; - public debugger = 0; - public declare = 0; - public default = 0; - public delete = 0; - public do = 0; - public else = 0; - public enum = 0; - public export = 0; - public extends = 0; - public false = 0; - public finally = 0; - public for = 0; - public function = 0; - public if = 0; - public import = 0; - public in = 0; - public instanceof = 0; - public new = 0; - public null = 0; - public return = 0; - public super = 0; - public switch = 0; - public this = 0; - public throw = 0; - public true = 0; - public try = 0; - public typeof = 0; - public var = 0; - public void = 0; - public while = 0; - public with = 0; - } - - enum bigEnum { - constructor, - any, - boolean, - implements, - interface, - let, - module, - number, - package, - private, - protected, - public, - set, - static, - string, - get, - yield, - break, - case, - catch, - class, - continue, - const, - - debugger, - declare, - default, - delete, - do, - else, - enum, - export, - extends, - false, - finally, - for, - function, - if, - - import, - in, - instanceof, - new, - null, - return, - super, - switch, - this, - throw, - true, - try, - typeof, - var, - void, - while, - with, - } - - namespace bigModule { - class constructor { } - class implements { } - ~~~~~~~~~~ -!!! error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class interface { } - ~~~~~~~~~ -!!! error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class let { } - ~~~ -!!! error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class module { } - class package { } - ~~~~~~~ -!!! error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class private { } - ~~~~~~~ -!!! error TS1213: Identifier expected. 'private' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class protected { } - ~~~~~~~~~ -!!! error TS1213: Identifier expected. 'protected' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class public { } - ~~~~~~ -!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class set { } - class static { } - ~~~~~~ -!!! error TS1213: Identifier expected. 'static' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class get { } - class yield { } - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - class declare { } - } \ No newline at end of file diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js deleted file mode 100644 index 4eef6bc0316b2..0000000000000 --- a/tests/baselines/reference/convertKeywordsYes.js +++ /dev/null @@ -1,532 +0,0 @@ -//// [tests/cases/compiler/convertKeywordsYes.ts] //// - -//// [convertKeywordsYes.ts] -// reserved ES5 future in strict mode - -var constructor = 0; -var any = 0; -var boolean = 0; -var implements = 0; -var interface = 0; -var let = 0; -var module = 0; -var number = 0; -var package = 0; -var private = 0; -var protected = 0; -var public = 0; -var set = 0; -var static = 0; -var string = 0; -var get = 0; -var yield = 0; -var declare = 0; - -function bigGeneric< - constructor, - implements , - interface , - let, - module , - package, - private , - protected, - public , - set , - static , - get , - yield, - declare - >(c: constructor, - a: any, - b2: boolean, - i: implements , - i2: interface , - l: let, - m: module , - n: number, - p: package, - p2: private , - p3: protected, - p4: public , - s: set , - s2: static , - s3: string, - g: get , - y: yield, - d: declare ) { } - -var bigObject = { - constructor: 0, - any: 0, - boolean: 0, - implements: 0, - interface: 0, - let: 0, - module: 0, - number: 0, - package: 0, - private: 0, - protected: 0, - public: 0, - set: 0, - static: 0, - string: 0, - get: 0, - yield: 0, - break: 0, - case: 0, - catch: 0, - class: 0, - continue: 0, - const: 0, - - debugger: 0, - declare: 0, - default: 0, - delete: 0, - do: 0, - else: 0, - enum: 0, - export: 0, - extends: 0, - false: 0, - finally: 0, - for: 0, - function: 0, - if: 0, - - import: 0, - in: 0, - instanceof: 0, - new: 0, - null: 0, - return: 0, - super: 0, - switch: 0, - this: 0, - throw: 0, - true: 0, - try: 0, - typeof: 0, - var: 0, - void: 0, - while: 0, - with: 0, -}; - -interface bigInterface { - constructor; - any; - boolean; - implements; - interface; - let; - module; - number; - package; - private; - protected; - public; - set; - static; - string; - get; - yield; - break; - case; - catch; - class; - continue; - const; - - debugger; - declare; - default; - delete; - do; - else; - enum; - export; - extends; - false; - finally; - for; - function; - if; - - import; - in; - instanceof; - new; - null; - return; - super; - switch; - this; - throw; - true; - try; - typeof; - var; - void; - while; - with; -} - -class bigClass { - public "constructor" = 0; - public any = 0; - public boolean = 0; - public implements = 0; - public interface = 0; - public let = 0; - public module = 0; - public number = 0; - public package = 0; - public private = 0; - public protected = 0; - public public = 0; - public set = 0; - public static = 0; - public string = 0; - public get = 0; - public yield = 0; - public break = 0; - public case = 0; - public catch = 0; - public class = 0; - public continue = 0; - public const = 0; - public debugger = 0; - public declare = 0; - public default = 0; - public delete = 0; - public do = 0; - public else = 0; - public enum = 0; - public export = 0; - public extends = 0; - public false = 0; - public finally = 0; - public for = 0; - public function = 0; - public if = 0; - public import = 0; - public in = 0; - public instanceof = 0; - public new = 0; - public null = 0; - public return = 0; - public super = 0; - public switch = 0; - public this = 0; - public throw = 0; - public true = 0; - public try = 0; - public typeof = 0; - public var = 0; - public void = 0; - public while = 0; - public with = 0; -} - -enum bigEnum { - constructor, - any, - boolean, - implements, - interface, - let, - module, - number, - package, - private, - protected, - public, - set, - static, - string, - get, - yield, - break, - case, - catch, - class, - continue, - const, - - debugger, - declare, - default, - delete, - do, - else, - enum, - export, - extends, - false, - finally, - for, - function, - if, - - import, - in, - instanceof, - new, - null, - return, - super, - switch, - this, - throw, - true, - try, - typeof, - var, - void, - while, - with, -} - -namespace bigModule { - class constructor { } - class implements { } - class interface { } - class let { } - class module { } - class package { } - class private { } - class protected { } - class public { } - class set { } - class static { } - class get { } - class yield { } - class declare { } -} - -//// [convertKeywordsYes.js] -// reserved ES5 future in strict mode -var constructor = 0; -var any = 0; -var boolean = 0; -var implements = 0; -var interface = 0; -var let = 0; -var module = 0; -var number = 0; -var package = 0; -var private = 0; -var protected = 0; -var public = 0; -var set = 0; -var static = 0; -var string = 0; -var get = 0; -var yield = 0; -var declare = 0; -function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { } -var bigObject = { - constructor: 0, - any: 0, - boolean: 0, - implements: 0, - interface: 0, - let: 0, - module: 0, - number: 0, - package: 0, - private: 0, - protected: 0, - public: 0, - set: 0, - static: 0, - string: 0, - get: 0, - yield: 0, - break: 0, - case: 0, - catch: 0, - class: 0, - continue: 0, - const: 0, - debugger: 0, - declare: 0, - default: 0, - delete: 0, - do: 0, - else: 0, - enum: 0, - export: 0, - extends: 0, - false: 0, - finally: 0, - for: 0, - function: 0, - if: 0, - import: 0, - in: 0, - instanceof: 0, - new: 0, - null: 0, - return: 0, - super: 0, - switch: 0, - this: 0, - throw: 0, - true: 0, - try: 0, - typeof: 0, - var: 0, - void: 0, - while: 0, - with: 0, -}; -class bigClass { - constructor() { - this["constructor"] = 0; - this.any = 0; - this.boolean = 0; - this.implements = 0; - this.interface = 0; - this.let = 0; - this.module = 0; - this.number = 0; - this.package = 0; - this.private = 0; - this.protected = 0; - this.public = 0; - this.set = 0; - this.static = 0; - this.string = 0; - this.get = 0; - this.yield = 0; - this.break = 0; - this.case = 0; - this.catch = 0; - this.class = 0; - this.continue = 0; - this.const = 0; - this.debugger = 0; - this.declare = 0; - this.default = 0; - this.delete = 0; - this.do = 0; - this.else = 0; - this.enum = 0; - this.export = 0; - this.extends = 0; - this.false = 0; - this.finally = 0; - this.for = 0; - this.function = 0; - this.if = 0; - this.import = 0; - this.in = 0; - this.instanceof = 0; - this.new = 0; - this.null = 0; - this.return = 0; - this.super = 0; - this.switch = 0; - this.this = 0; - this.throw = 0; - this.true = 0; - this.try = 0; - this.typeof = 0; - this.var = 0; - this.void = 0; - this.while = 0; - this.with = 0; - } -} -var bigEnum; -(function (bigEnum) { - bigEnum[bigEnum["constructor"] = 0] = "constructor"; - bigEnum[bigEnum["any"] = 1] = "any"; - bigEnum[bigEnum["boolean"] = 2] = "boolean"; - bigEnum[bigEnum["implements"] = 3] = "implements"; - bigEnum[bigEnum["interface"] = 4] = "interface"; - bigEnum[bigEnum["let"] = 5] = "let"; - bigEnum[bigEnum["module"] = 6] = "module"; - bigEnum[bigEnum["number"] = 7] = "number"; - bigEnum[bigEnum["package"] = 8] = "package"; - bigEnum[bigEnum["private"] = 9] = "private"; - bigEnum[bigEnum["protected"] = 10] = "protected"; - bigEnum[bigEnum["public"] = 11] = "public"; - bigEnum[bigEnum["set"] = 12] = "set"; - bigEnum[bigEnum["static"] = 13] = "static"; - bigEnum[bigEnum["string"] = 14] = "string"; - bigEnum[bigEnum["get"] = 15] = "get"; - bigEnum[bigEnum["yield"] = 16] = "yield"; - bigEnum[bigEnum["break"] = 17] = "break"; - bigEnum[bigEnum["case"] = 18] = "case"; - bigEnum[bigEnum["catch"] = 19] = "catch"; - bigEnum[bigEnum["class"] = 20] = "class"; - bigEnum[bigEnum["continue"] = 21] = "continue"; - bigEnum[bigEnum["const"] = 22] = "const"; - bigEnum[bigEnum["debugger"] = 23] = "debugger"; - bigEnum[bigEnum["declare"] = 24] = "declare"; - bigEnum[bigEnum["default"] = 25] = "default"; - bigEnum[bigEnum["delete"] = 26] = "delete"; - bigEnum[bigEnum["do"] = 27] = "do"; - bigEnum[bigEnum["else"] = 28] = "else"; - bigEnum[bigEnum["enum"] = 29] = "enum"; - bigEnum[bigEnum["export"] = 30] = "export"; - bigEnum[bigEnum["extends"] = 31] = "extends"; - bigEnum[bigEnum["false"] = 32] = "false"; - bigEnum[bigEnum["finally"] = 33] = "finally"; - bigEnum[bigEnum["for"] = 34] = "for"; - bigEnum[bigEnum["function"] = 35] = "function"; - bigEnum[bigEnum["if"] = 36] = "if"; - bigEnum[bigEnum["import"] = 37] = "import"; - bigEnum[bigEnum["in"] = 38] = "in"; - bigEnum[bigEnum["instanceof"] = 39] = "instanceof"; - bigEnum[bigEnum["new"] = 40] = "new"; - bigEnum[bigEnum["null"] = 41] = "null"; - bigEnum[bigEnum["return"] = 42] = "return"; - bigEnum[bigEnum["super"] = 43] = "super"; - bigEnum[bigEnum["switch"] = 44] = "switch"; - bigEnum[bigEnum["this"] = 45] = "this"; - bigEnum[bigEnum["throw"] = 46] = "throw"; - bigEnum[bigEnum["true"] = 47] = "true"; - bigEnum[bigEnum["try"] = 48] = "try"; - bigEnum[bigEnum["typeof"] = 49] = "typeof"; - bigEnum[bigEnum["var"] = 50] = "var"; - bigEnum[bigEnum["void"] = 51] = "void"; - bigEnum[bigEnum["while"] = 52] = "while"; - bigEnum[bigEnum["with"] = 53] = "with"; -})(bigEnum || (bigEnum = {})); -var bigModule; -(function (bigModule) { - class constructor { - } - class implements { - } - class interface { - } - class let { - } - class module { - } - class package { - } - class private { - } - class protected { - } - class public { - } - class set { - } - class static { - } - class get { - } - class yield { - } - class declare { - } -})(bigModule || (bigModule = {})); diff --git a/tests/baselines/reference/convertKeywordsYes.symbols b/tests/baselines/reference/convertKeywordsYes.symbols deleted file mode 100644 index 62d0a7f5df65b..0000000000000 --- a/tests/baselines/reference/convertKeywordsYes.symbols +++ /dev/null @@ -1,882 +0,0 @@ -//// [tests/cases/compiler/convertKeywordsYes.ts] //// - -=== convertKeywordsYes.ts === -// reserved ES5 future in strict mode - -var constructor = 0; ->constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 2, 3)) - -var any = 0; ->any : Symbol(any, Decl(convertKeywordsYes.ts, 3, 3)) - -var boolean = 0; ->boolean : Symbol(boolean, Decl(convertKeywordsYes.ts, 4, 3)) - -var implements = 0; ->implements : Symbol(implements, Decl(convertKeywordsYes.ts, 5, 3)) - -var interface = 0; ->interface : Symbol(interface, Decl(convertKeywordsYes.ts, 6, 3)) - -var let = 0; ->let : Symbol(let, Decl(convertKeywordsYes.ts, 7, 3)) - -var module = 0; ->module : Symbol(module, Decl(convertKeywordsYes.ts, 8, 3)) - -var number = 0; ->number : Symbol(number, Decl(convertKeywordsYes.ts, 9, 3)) - -var package = 0; ->package : Symbol(package, Decl(convertKeywordsYes.ts, 10, 3)) - -var private = 0; ->private : Symbol(private, Decl(convertKeywordsYes.ts, 11, 3)) - -var protected = 0; ->protected : Symbol(protected, Decl(convertKeywordsYes.ts, 12, 3)) - -var public = 0; ->public : Symbol(public, Decl(convertKeywordsYes.ts, 13, 3)) - -var set = 0; ->set : Symbol(set, Decl(convertKeywordsYes.ts, 14, 3)) - -var static = 0; ->static : Symbol(static, Decl(convertKeywordsYes.ts, 15, 3)) - -var string = 0; ->string : Symbol(string, Decl(convertKeywordsYes.ts, 16, 3)) - -var get = 0; ->get : Symbol(get, Decl(convertKeywordsYes.ts, 17, 3)) - -var yield = 0; ->yield : Symbol(yield, Decl(convertKeywordsYes.ts, 18, 3)) - -var declare = 0; ->declare : Symbol(declare, Decl(convertKeywordsYes.ts, 19, 3)) - -function bigGeneric< ->bigGeneric : Symbol(bigGeneric, Decl(convertKeywordsYes.ts, 19, 16)) - - constructor, ->constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 21, 20)) - - implements , ->implements : Symbol(implements, Decl(convertKeywordsYes.ts, 22, 16)) - - interface , ->interface : Symbol(interface, Decl(convertKeywordsYes.ts, 23, 16)) - - let, ->let : Symbol(let, Decl(convertKeywordsYes.ts, 24, 15)) - - module , ->module : Symbol(module, Decl(convertKeywordsYes.ts, 25, 8)) - - package, ->package : Symbol(package, Decl(convertKeywordsYes.ts, 26, 12)) - - private , ->private : Symbol(private, Decl(convertKeywordsYes.ts, 27, 12)) - - protected, ->protected : Symbol(protected, Decl(convertKeywordsYes.ts, 28, 13)) - - public , ->public : Symbol(public, Decl(convertKeywordsYes.ts, 29, 14)) - - set , ->set : Symbol(set, Decl(convertKeywordsYes.ts, 30, 12)) - - static , ->static : Symbol(static, Decl(convertKeywordsYes.ts, 31, 9)) - - get , ->get : Symbol(get, Decl(convertKeywordsYes.ts, 32, 12)) - - yield, ->yield : Symbol(yield, Decl(convertKeywordsYes.ts, 33, 9)) - - declare ->declare : Symbol(declare, Decl(convertKeywordsYes.ts, 34, 10)) - - >(c: constructor, ->c : Symbol(c, Decl(convertKeywordsYes.ts, 36, 6)) ->constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 21, 20)) - - a: any, ->a : Symbol(a, Decl(convertKeywordsYes.ts, 36, 21)) - - b2: boolean, ->b2 : Symbol(b2, Decl(convertKeywordsYes.ts, 37, 11)) - - i: implements , ->i : Symbol(i, Decl(convertKeywordsYes.ts, 38, 16)) ->implements : Symbol(implements, Decl(convertKeywordsYes.ts, 22, 16)) - - i2: interface , ->i2 : Symbol(i2, Decl(convertKeywordsYes.ts, 39, 19)) ->interface : Symbol(interface, Decl(convertKeywordsYes.ts, 23, 16)) - - l: let, ->l : Symbol(l, Decl(convertKeywordsYes.ts, 40, 19)) ->let : Symbol(let, Decl(convertKeywordsYes.ts, 24, 15)) - - m: module , ->m : Symbol(m, Decl(convertKeywordsYes.ts, 41, 11)) ->module : Symbol(module, Decl(convertKeywordsYes.ts, 25, 8)) - - n: number, ->n : Symbol(n, Decl(convertKeywordsYes.ts, 42, 15)) - - p: package, ->p : Symbol(p, Decl(convertKeywordsYes.ts, 43, 14)) ->package : Symbol(package, Decl(convertKeywordsYes.ts, 26, 12)) - - p2: private , ->p2 : Symbol(p2, Decl(convertKeywordsYes.ts, 44, 15)) ->private : Symbol(private, Decl(convertKeywordsYes.ts, 27, 12)) - - p3: protected, ->p3 : Symbol(p3, Decl(convertKeywordsYes.ts, 45, 17)) ->protected : Symbol(protected, Decl(convertKeywordsYes.ts, 28, 13)) - - p4: public , ->p4 : Symbol(p4, Decl(convertKeywordsYes.ts, 46, 18)) ->public : Symbol(public, Decl(convertKeywordsYes.ts, 29, 14)) - - s: set , ->s : Symbol(s, Decl(convertKeywordsYes.ts, 47, 16)) ->set : Symbol(set, Decl(convertKeywordsYes.ts, 30, 12)) - - s2: static , ->s2 : Symbol(s2, Decl(convertKeywordsYes.ts, 48, 12)) ->static : Symbol(static, Decl(convertKeywordsYes.ts, 31, 9)) - - s3: string, ->s3 : Symbol(s3, Decl(convertKeywordsYes.ts, 49, 16)) - - g: get , ->g : Symbol(g, Decl(convertKeywordsYes.ts, 50, 15)) ->get : Symbol(get, Decl(convertKeywordsYes.ts, 32, 12)) - - y: yield, ->y : Symbol(y, Decl(convertKeywordsYes.ts, 51, 12)) ->yield : Symbol(yield, Decl(convertKeywordsYes.ts, 33, 9)) - - d: declare ) { } ->d : Symbol(d, Decl(convertKeywordsYes.ts, 52, 13)) ->declare : Symbol(declare, Decl(convertKeywordsYes.ts, 34, 10)) - -var bigObject = { ->bigObject : Symbol(bigObject, Decl(convertKeywordsYes.ts, 55, 3)) - - constructor: 0, ->constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 55, 17)) - - any: 0, ->any : Symbol(any, Decl(convertKeywordsYes.ts, 56, 19)) - - boolean: 0, ->boolean : Symbol(boolean, Decl(convertKeywordsYes.ts, 57, 11)) - - implements: 0, ->implements : Symbol(implements, Decl(convertKeywordsYes.ts, 58, 15)) - - interface: 0, ->interface : Symbol(interface, Decl(convertKeywordsYes.ts, 59, 18)) - - let: 0, ->let : Symbol(let, Decl(convertKeywordsYes.ts, 60, 17)) - - module: 0, ->module : Symbol(module, Decl(convertKeywordsYes.ts, 61, 11)) - - number: 0, ->number : Symbol(number, Decl(convertKeywordsYes.ts, 62, 14)) - - package: 0, ->package : Symbol(package, Decl(convertKeywordsYes.ts, 63, 14)) - - private: 0, ->private : Symbol(private, Decl(convertKeywordsYes.ts, 64, 15)) - - protected: 0, ->protected : Symbol(protected, Decl(convertKeywordsYes.ts, 65, 15)) - - public: 0, ->public : Symbol(public, Decl(convertKeywordsYes.ts, 66, 17)) - - set: 0, ->set : Symbol(set, Decl(convertKeywordsYes.ts, 67, 14)) - - static: 0, ->static : Symbol(static, Decl(convertKeywordsYes.ts, 68, 11)) - - string: 0, ->string : Symbol(string, Decl(convertKeywordsYes.ts, 69, 14)) - - get: 0, ->get : Symbol(get, Decl(convertKeywordsYes.ts, 70, 14)) - - yield: 0, ->yield : Symbol(yield, Decl(convertKeywordsYes.ts, 71, 11)) - - break: 0, ->break : Symbol(break, Decl(convertKeywordsYes.ts, 72, 13)) - - case: 0, ->case : Symbol(case, Decl(convertKeywordsYes.ts, 73, 13)) - - catch: 0, ->catch : Symbol(catch, Decl(convertKeywordsYes.ts, 74, 12)) - - class: 0, ->class : Symbol(class, Decl(convertKeywordsYes.ts, 75, 13)) - - continue: 0, ->continue : Symbol(continue, Decl(convertKeywordsYes.ts, 76, 13)) - - const: 0, ->const : Symbol(const, Decl(convertKeywordsYes.ts, 77, 16)) - - debugger: 0, ->debugger : Symbol(debugger, Decl(convertKeywordsYes.ts, 78, 13)) - - declare: 0, ->declare : Symbol(declare, Decl(convertKeywordsYes.ts, 80, 16)) - - default: 0, ->default : Symbol(default, Decl(convertKeywordsYes.ts, 81, 15)) - - delete: 0, ->delete : Symbol(delete, Decl(convertKeywordsYes.ts, 82, 15)) - - do: 0, ->do : Symbol(do, Decl(convertKeywordsYes.ts, 83, 14)) - - else: 0, ->else : Symbol(else, Decl(convertKeywordsYes.ts, 84, 10)) - - enum: 0, ->enum : Symbol(enum, Decl(convertKeywordsYes.ts, 85, 12)) - - export: 0, ->export : Symbol(export, Decl(convertKeywordsYes.ts, 86, 12)) - - extends: 0, ->extends : Symbol(extends, Decl(convertKeywordsYes.ts, 87, 14)) - - false: 0, ->false : Symbol(false, Decl(convertKeywordsYes.ts, 88, 15)) - - finally: 0, ->finally : Symbol(finally, Decl(convertKeywordsYes.ts, 89, 13)) - - for: 0, ->for : Symbol(for, Decl(convertKeywordsYes.ts, 90, 15)) - - function: 0, ->function : Symbol(function, Decl(convertKeywordsYes.ts, 91, 11)) - - if: 0, ->if : Symbol(if, Decl(convertKeywordsYes.ts, 92, 16)) - - import: 0, ->import : Symbol(import, Decl(convertKeywordsYes.ts, 93, 10)) - - in: 0, ->in : Symbol(in, Decl(convertKeywordsYes.ts, 95, 14)) - - instanceof: 0, ->instanceof : Symbol(instanceof, Decl(convertKeywordsYes.ts, 96, 10)) - - new: 0, ->new : Symbol(new, Decl(convertKeywordsYes.ts, 97, 18)) - - null: 0, ->null : Symbol(null, Decl(convertKeywordsYes.ts, 98, 11)) - - return: 0, ->return : Symbol(return, Decl(convertKeywordsYes.ts, 99, 12)) - - super: 0, ->super : Symbol(super, Decl(convertKeywordsYes.ts, 100, 14)) - - switch: 0, ->switch : Symbol(switch, Decl(convertKeywordsYes.ts, 101, 13)) - - this: 0, ->this : Symbol(this, Decl(convertKeywordsYes.ts, 102, 14)) - - throw: 0, ->throw : Symbol(throw, Decl(convertKeywordsYes.ts, 103, 12)) - - true: 0, ->true : Symbol(true, Decl(convertKeywordsYes.ts, 104, 13)) - - try: 0, ->try : Symbol(try, Decl(convertKeywordsYes.ts, 105, 12)) - - typeof: 0, ->typeof : Symbol(typeof, Decl(convertKeywordsYes.ts, 106, 11)) - - var: 0, ->var : Symbol(var, Decl(convertKeywordsYes.ts, 107, 14)) - - void: 0, ->void : Symbol(void, Decl(convertKeywordsYes.ts, 108, 11)) - - while: 0, ->while : Symbol(while, Decl(convertKeywordsYes.ts, 109, 12)) - - with: 0, ->with : Symbol(with, Decl(convertKeywordsYes.ts, 110, 13)) - -}; - -interface bigInterface { ->bigInterface : Symbol(bigInterface, Decl(convertKeywordsYes.ts, 112, 2)) - - constructor; ->constructor : Symbol(bigInterface.constructor, Decl(convertKeywordsYes.ts, 114, 24)) - - any; ->any : Symbol(bigInterface.any, Decl(convertKeywordsYes.ts, 115, 16)) - - boolean; ->boolean : Symbol(bigInterface.boolean, Decl(convertKeywordsYes.ts, 116, 8)) - - implements; ->implements : Symbol(bigInterface.implements, Decl(convertKeywordsYes.ts, 117, 12)) - - interface; ->interface : Symbol(bigInterface.interface, Decl(convertKeywordsYes.ts, 118, 15)) - - let; ->let : Symbol(bigInterface.let, Decl(convertKeywordsYes.ts, 119, 14)) - - module; ->module : Symbol(bigInterface.module, Decl(convertKeywordsYes.ts, 120, 8)) - - number; ->number : Symbol(bigInterface.number, Decl(convertKeywordsYes.ts, 121, 11)) - - package; ->package : Symbol(bigInterface.package, Decl(convertKeywordsYes.ts, 122, 11)) - - private; ->private : Symbol(bigInterface.private, Decl(convertKeywordsYes.ts, 123, 12)) - - protected; ->protected : Symbol(bigInterface.protected, Decl(convertKeywordsYes.ts, 124, 12)) - - public; ->public : Symbol(bigInterface.public, Decl(convertKeywordsYes.ts, 125, 14)) - - set; ->set : Symbol(bigInterface.set, Decl(convertKeywordsYes.ts, 126, 11)) - - static; ->static : Symbol(bigInterface.static, Decl(convertKeywordsYes.ts, 127, 8)) - - string; ->string : Symbol(bigInterface.string, Decl(convertKeywordsYes.ts, 128, 11)) - - get; ->get : Symbol(bigInterface.get, Decl(convertKeywordsYes.ts, 129, 11)) - - yield; ->yield : Symbol(bigInterface.yield, Decl(convertKeywordsYes.ts, 130, 8)) - - break; ->break : Symbol(bigInterface.break, Decl(convertKeywordsYes.ts, 131, 10)) - - case; ->case : Symbol(bigInterface.case, Decl(convertKeywordsYes.ts, 132, 10)) - - catch; ->catch : Symbol(bigInterface.catch, Decl(convertKeywordsYes.ts, 133, 9)) - - class; ->class : Symbol(bigInterface.class, Decl(convertKeywordsYes.ts, 134, 10)) - - continue; ->continue : Symbol(bigInterface.continue, Decl(convertKeywordsYes.ts, 135, 10)) - - const; ->const : Symbol(bigInterface.const, Decl(convertKeywordsYes.ts, 136, 13)) - - debugger; ->debugger : Symbol(bigInterface.debugger, Decl(convertKeywordsYes.ts, 137, 10)) - - declare; ->declare : Symbol(bigInterface.declare, Decl(convertKeywordsYes.ts, 139, 13)) - - default; ->default : Symbol(bigInterface.default, Decl(convertKeywordsYes.ts, 140, 12)) - - delete; ->delete : Symbol(bigInterface.delete, Decl(convertKeywordsYes.ts, 141, 12)) - - do; ->do : Symbol(bigInterface.do, Decl(convertKeywordsYes.ts, 142, 11)) - - else; ->else : Symbol(bigInterface.else, Decl(convertKeywordsYes.ts, 143, 7)) - - enum; ->enum : Symbol(bigInterface.enum, Decl(convertKeywordsYes.ts, 144, 9)) - - export; ->export : Symbol(bigInterface.export, Decl(convertKeywordsYes.ts, 145, 9)) - - extends; ->extends : Symbol(bigInterface.extends, Decl(convertKeywordsYes.ts, 146, 11)) - - false; ->false : Symbol(bigInterface.false, Decl(convertKeywordsYes.ts, 147, 12)) - - finally; ->finally : Symbol(bigInterface.finally, Decl(convertKeywordsYes.ts, 148, 10)) - - for; ->for : Symbol(bigInterface.for, Decl(convertKeywordsYes.ts, 149, 12)) - - function; ->function : Symbol(bigInterface.function, Decl(convertKeywordsYes.ts, 150, 8)) - - if; ->if : Symbol(bigInterface.if, Decl(convertKeywordsYes.ts, 151, 13)) - - import; ->import : Symbol(bigInterface.import, Decl(convertKeywordsYes.ts, 152, 7)) - - in; ->in : Symbol(bigInterface.in, Decl(convertKeywordsYes.ts, 154, 11)) - - instanceof; ->instanceof : Symbol(bigInterface.instanceof, Decl(convertKeywordsYes.ts, 155, 7)) - - new; ->new : Symbol(bigInterface.new, Decl(convertKeywordsYes.ts, 156, 15)) - - null; ->null : Symbol(bigInterface.null, Decl(convertKeywordsYes.ts, 157, 8)) - - return; ->return : Symbol(bigInterface.return, Decl(convertKeywordsYes.ts, 158, 9)) - - super; ->super : Symbol(bigInterface.super, Decl(convertKeywordsYes.ts, 159, 11)) - - switch; ->switch : Symbol(bigInterface.switch, Decl(convertKeywordsYes.ts, 160, 10)) - - this; ->this : Symbol(bigInterface.this, Decl(convertKeywordsYes.ts, 161, 11)) - - throw; ->throw : Symbol(bigInterface.throw, Decl(convertKeywordsYes.ts, 162, 9)) - - true; ->true : Symbol(bigInterface.true, Decl(convertKeywordsYes.ts, 163, 10)) - - try; ->try : Symbol(bigInterface.try, Decl(convertKeywordsYes.ts, 164, 9)) - - typeof; ->typeof : Symbol(bigInterface.typeof, Decl(convertKeywordsYes.ts, 165, 8)) - - var; ->var : Symbol(bigInterface.var, Decl(convertKeywordsYes.ts, 166, 11)) - - void; ->void : Symbol(bigInterface.void, Decl(convertKeywordsYes.ts, 167, 8)) - - while; ->while : Symbol(bigInterface.while, Decl(convertKeywordsYes.ts, 168, 9)) - - with; ->with : Symbol(bigInterface.with, Decl(convertKeywordsYes.ts, 169, 10)) -} - -class bigClass { ->bigClass : Symbol(bigClass, Decl(convertKeywordsYes.ts, 171, 1)) - - public "constructor" = 0; ->"constructor" : Symbol(bigClass["constructor"], Decl(convertKeywordsYes.ts, 173, 16)) - - public any = 0; ->any : Symbol(bigClass.any, Decl(convertKeywordsYes.ts, 174, 29)) - - public boolean = 0; ->boolean : Symbol(bigClass.boolean, Decl(convertKeywordsYes.ts, 175, 19)) - - public implements = 0; ->implements : Symbol(bigClass.implements, Decl(convertKeywordsYes.ts, 176, 23)) - - public interface = 0; ->interface : Symbol(bigClass.interface, Decl(convertKeywordsYes.ts, 177, 26)) - - public let = 0; ->let : Symbol(bigClass.let, Decl(convertKeywordsYes.ts, 178, 25)) - - public module = 0; ->module : Symbol(bigClass.module, Decl(convertKeywordsYes.ts, 179, 19)) - - public number = 0; ->number : Symbol(bigClass.number, Decl(convertKeywordsYes.ts, 180, 22)) - - public package = 0; ->package : Symbol(bigClass.package, Decl(convertKeywordsYes.ts, 181, 22)) - - public private = 0; ->private : Symbol(bigClass.private, Decl(convertKeywordsYes.ts, 182, 23)) - - public protected = 0; ->protected : Symbol(bigClass.protected, Decl(convertKeywordsYes.ts, 183, 23)) - - public public = 0; ->public : Symbol(bigClass.public, Decl(convertKeywordsYes.ts, 184, 25)) - - public set = 0; ->set : Symbol(bigClass.set, Decl(convertKeywordsYes.ts, 185, 22)) - - public static = 0; ->static : Symbol(bigClass.static, Decl(convertKeywordsYes.ts, 186, 19)) - - public string = 0; ->string : Symbol(bigClass.string, Decl(convertKeywordsYes.ts, 187, 22)) - - public get = 0; ->get : Symbol(bigClass.get, Decl(convertKeywordsYes.ts, 188, 22)) - - public yield = 0; ->yield : Symbol(bigClass.yield, Decl(convertKeywordsYes.ts, 189, 19)) - - public break = 0; ->break : Symbol(bigClass.break, Decl(convertKeywordsYes.ts, 190, 21)) - - public case = 0; ->case : Symbol(bigClass.case, Decl(convertKeywordsYes.ts, 191, 21)) - - public catch = 0; ->catch : Symbol(bigClass.catch, Decl(convertKeywordsYes.ts, 192, 20)) - - public class = 0; ->class : Symbol(bigClass.class, Decl(convertKeywordsYes.ts, 193, 21)) - - public continue = 0; ->continue : Symbol(bigClass.continue, Decl(convertKeywordsYes.ts, 194, 21)) - - public const = 0; ->const : Symbol(bigClass.const, Decl(convertKeywordsYes.ts, 195, 24)) - - public debugger = 0; ->debugger : Symbol(bigClass.debugger, Decl(convertKeywordsYes.ts, 196, 21)) - - public declare = 0; ->declare : Symbol(bigClass.declare, Decl(convertKeywordsYes.ts, 197, 24)) - - public default = 0; ->default : Symbol(bigClass.default, Decl(convertKeywordsYes.ts, 198, 23)) - - public delete = 0; ->delete : Symbol(bigClass.delete, Decl(convertKeywordsYes.ts, 199, 23)) - - public do = 0; ->do : Symbol(bigClass.do, Decl(convertKeywordsYes.ts, 200, 22)) - - public else = 0; ->else : Symbol(bigClass.else, Decl(convertKeywordsYes.ts, 201, 18)) - - public enum = 0; ->enum : Symbol(bigClass.enum, Decl(convertKeywordsYes.ts, 202, 20)) - - public export = 0; ->export : Symbol(bigClass.export, Decl(convertKeywordsYes.ts, 203, 20)) - - public extends = 0; ->extends : Symbol(bigClass.extends, Decl(convertKeywordsYes.ts, 204, 22)) - - public false = 0; ->false : Symbol(bigClass.false, Decl(convertKeywordsYes.ts, 205, 23)) - - public finally = 0; ->finally : Symbol(bigClass.finally, Decl(convertKeywordsYes.ts, 206, 21)) - - public for = 0; ->for : Symbol(bigClass.for, Decl(convertKeywordsYes.ts, 207, 23)) - - public function = 0; ->function : Symbol(bigClass.function, Decl(convertKeywordsYes.ts, 208, 19)) - - public if = 0; ->if : Symbol(bigClass.if, Decl(convertKeywordsYes.ts, 209, 24)) - - public import = 0; ->import : Symbol(bigClass.import, Decl(convertKeywordsYes.ts, 210, 18)) - - public in = 0; ->in : Symbol(bigClass.in, Decl(convertKeywordsYes.ts, 211, 22)) - - public instanceof = 0; ->instanceof : Symbol(bigClass.instanceof, Decl(convertKeywordsYes.ts, 212, 18)) - - public new = 0; ->new : Symbol(bigClass.new, Decl(convertKeywordsYes.ts, 213, 26)) - - public null = 0; ->null : Symbol(bigClass.null, Decl(convertKeywordsYes.ts, 214, 19)) - - public return = 0; ->return : Symbol(bigClass.return, Decl(convertKeywordsYes.ts, 215, 20)) - - public super = 0; ->super : Symbol(bigClass.super, Decl(convertKeywordsYes.ts, 216, 22)) - - public switch = 0; ->switch : Symbol(bigClass.switch, Decl(convertKeywordsYes.ts, 217, 21)) - - public this = 0; ->this : Symbol(bigClass.this, Decl(convertKeywordsYes.ts, 218, 22)) - - public throw = 0; ->throw : Symbol(bigClass.throw, Decl(convertKeywordsYes.ts, 219, 20)) - - public true = 0; ->true : Symbol(bigClass.true, Decl(convertKeywordsYes.ts, 220, 21)) - - public try = 0; ->try : Symbol(bigClass.try, Decl(convertKeywordsYes.ts, 221, 20)) - - public typeof = 0; ->typeof : Symbol(bigClass.typeof, Decl(convertKeywordsYes.ts, 222, 19)) - - public var = 0; ->var : Symbol(bigClass.var, Decl(convertKeywordsYes.ts, 223, 22)) - - public void = 0; ->void : Symbol(bigClass.void, Decl(convertKeywordsYes.ts, 224, 19)) - - public while = 0; ->while : Symbol(bigClass.while, Decl(convertKeywordsYes.ts, 225, 20)) - - public with = 0; ->with : Symbol(bigClass.with, Decl(convertKeywordsYes.ts, 226, 21)) -} - -enum bigEnum { ->bigEnum : Symbol(bigEnum, Decl(convertKeywordsYes.ts, 228, 1)) - - constructor, ->constructor : Symbol(bigEnum.constructor, Decl(convertKeywordsYes.ts, 230, 14)) - - any, ->any : Symbol(bigEnum.any, Decl(convertKeywordsYes.ts, 231, 16)) - - boolean, ->boolean : Symbol(bigEnum.boolean, Decl(convertKeywordsYes.ts, 232, 8)) - - implements, ->implements : Symbol(bigEnum.implements, Decl(convertKeywordsYes.ts, 233, 12)) - - interface, ->interface : Symbol(bigEnum.interface, Decl(convertKeywordsYes.ts, 234, 15)) - - let, ->let : Symbol(bigEnum.let, Decl(convertKeywordsYes.ts, 235, 14)) - - module, ->module : Symbol(bigEnum.module, Decl(convertKeywordsYes.ts, 236, 8)) - - number, ->number : Symbol(bigEnum.number, Decl(convertKeywordsYes.ts, 237, 11)) - - package, ->package : Symbol(bigEnum.package, Decl(convertKeywordsYes.ts, 238, 11)) - - private, ->private : Symbol(bigEnum.private, Decl(convertKeywordsYes.ts, 239, 12)) - - protected, ->protected : Symbol(bigEnum.protected, Decl(convertKeywordsYes.ts, 240, 12)) - - public, ->public : Symbol(bigEnum.public, Decl(convertKeywordsYes.ts, 241, 14)) - - set, ->set : Symbol(bigEnum.set, Decl(convertKeywordsYes.ts, 242, 11)) - - static, ->static : Symbol(bigEnum.static, Decl(convertKeywordsYes.ts, 243, 8)) - - string, ->string : Symbol(bigEnum.string, Decl(convertKeywordsYes.ts, 244, 11)) - - get, ->get : Symbol(bigEnum.get, Decl(convertKeywordsYes.ts, 245, 11)) - - yield, ->yield : Symbol(bigEnum.yield, Decl(convertKeywordsYes.ts, 246, 8)) - - break, ->break : Symbol(bigEnum.break, Decl(convertKeywordsYes.ts, 247, 10)) - - case, ->case : Symbol(bigEnum.case, Decl(convertKeywordsYes.ts, 248, 10)) - - catch, ->catch : Symbol(bigEnum.catch, Decl(convertKeywordsYes.ts, 249, 9)) - - class, ->class : Symbol(bigEnum.class, Decl(convertKeywordsYes.ts, 250, 10)) - - continue, ->continue : Symbol(bigEnum.continue, Decl(convertKeywordsYes.ts, 251, 10)) - - const, ->const : Symbol(bigEnum.const, Decl(convertKeywordsYes.ts, 252, 13)) - - debugger, ->debugger : Symbol(bigEnum.debugger, Decl(convertKeywordsYes.ts, 253, 10)) - - declare, ->declare : Symbol(bigEnum.declare, Decl(convertKeywordsYes.ts, 255, 13)) - - default, ->default : Symbol(bigEnum.default, Decl(convertKeywordsYes.ts, 256, 12)) - - delete, ->delete : Symbol(bigEnum.delete, Decl(convertKeywordsYes.ts, 257, 12)) - - do, ->do : Symbol(bigEnum.do, Decl(convertKeywordsYes.ts, 258, 11)) - - else, ->else : Symbol(bigEnum.else, Decl(convertKeywordsYes.ts, 259, 7)) - - enum, ->enum : Symbol(bigEnum.enum, Decl(convertKeywordsYes.ts, 260, 9)) - - export, ->export : Symbol(bigEnum.export, Decl(convertKeywordsYes.ts, 261, 9)) - - extends, ->extends : Symbol(bigEnum.extends, Decl(convertKeywordsYes.ts, 262, 11)) - - false, ->false : Symbol(bigEnum.false, Decl(convertKeywordsYes.ts, 263, 12)) - - finally, ->finally : Symbol(bigEnum.finally, Decl(convertKeywordsYes.ts, 264, 10)) - - for, ->for : Symbol(bigEnum.for, Decl(convertKeywordsYes.ts, 265, 12)) - - function, ->function : Symbol(bigEnum.function, Decl(convertKeywordsYes.ts, 266, 8)) - - if, ->if : Symbol(bigEnum.if, Decl(convertKeywordsYes.ts, 267, 13)) - - import, ->import : Symbol(bigEnum.import, Decl(convertKeywordsYes.ts, 268, 7)) - - in, ->in : Symbol(bigEnum.in, Decl(convertKeywordsYes.ts, 270, 11)) - - instanceof, ->instanceof : Symbol(bigEnum.instanceof, Decl(convertKeywordsYes.ts, 271, 7)) - - new, ->new : Symbol(bigEnum.new, Decl(convertKeywordsYes.ts, 272, 15)) - - null, ->null : Symbol(bigEnum.null, Decl(convertKeywordsYes.ts, 273, 8)) - - return, ->return : Symbol(bigEnum.return, Decl(convertKeywordsYes.ts, 274, 9)) - - super, ->super : Symbol(bigEnum.super, Decl(convertKeywordsYes.ts, 275, 11)) - - switch, ->switch : Symbol(bigEnum.switch, Decl(convertKeywordsYes.ts, 276, 10)) - - this, ->this : Symbol(bigEnum.this, Decl(convertKeywordsYes.ts, 277, 11)) - - throw, ->throw : Symbol(bigEnum.throw, Decl(convertKeywordsYes.ts, 278, 9)) - - true, ->true : Symbol(bigEnum.true, Decl(convertKeywordsYes.ts, 279, 10)) - - try, ->try : Symbol(bigEnum.try, Decl(convertKeywordsYes.ts, 280, 9)) - - typeof, ->typeof : Symbol(bigEnum.typeof, Decl(convertKeywordsYes.ts, 281, 8)) - - var, ->var : Symbol(bigEnum.var, Decl(convertKeywordsYes.ts, 282, 11)) - - void, ->void : Symbol(bigEnum.void, Decl(convertKeywordsYes.ts, 283, 8)) - - while, ->while : Symbol(bigEnum.while, Decl(convertKeywordsYes.ts, 284, 9)) - - with, ->with : Symbol(bigEnum.with, Decl(convertKeywordsYes.ts, 285, 10)) -} - -namespace bigModule { ->bigModule : Symbol(bigModule, Decl(convertKeywordsYes.ts, 287, 1)) - - class constructor { } ->constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 289, 21)) - - class implements { } ->implements : Symbol(implements, Decl(convertKeywordsYes.ts, 290, 25)) - - class interface { } ->interface : Symbol(interface, Decl(convertKeywordsYes.ts, 291, 24)) - - class let { } ->let : Symbol(let, Decl(convertKeywordsYes.ts, 292, 23)) - - class module { } ->module : Symbol(module, Decl(convertKeywordsYes.ts, 293, 17)) - - class package { } ->package : Symbol(package, Decl(convertKeywordsYes.ts, 294, 20)) - - class private { } ->private : Symbol(private, Decl(convertKeywordsYes.ts, 295, 21)) - - class protected { } ->protected : Symbol(protected, Decl(convertKeywordsYes.ts, 296, 21)) - - class public { } ->public : Symbol(public, Decl(convertKeywordsYes.ts, 297, 23)) - - class set { } ->set : Symbol(set, Decl(convertKeywordsYes.ts, 298, 20)) - - class static { } ->static : Symbol(static, Decl(convertKeywordsYes.ts, 299, 17)) - - class get { } ->get : Symbol(get, Decl(convertKeywordsYes.ts, 300, 20)) - - class yield { } ->yield : Symbol(yield, Decl(convertKeywordsYes.ts, 301, 17)) - - class declare { } ->declare : Symbol(declare, Decl(convertKeywordsYes.ts, 302, 19)) -} diff --git a/tests/baselines/reference/convertKeywordsYes.types b/tests/baselines/reference/convertKeywordsYes.types deleted file mode 100644 index 8526b317c275e..0000000000000 --- a/tests/baselines/reference/convertKeywordsYes.types +++ /dev/null @@ -1,1363 +0,0 @@ -//// [tests/cases/compiler/convertKeywordsYes.ts] //// - -=== convertKeywordsYes.ts === -// reserved ES5 future in strict mode - -var constructor = 0; ->constructor : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var any = 0; ->any : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var boolean = 0; ->boolean : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var implements = 0; ->implements : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var interface = 0; ->interface : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var let = 0; ->let : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var module = 0; ->module : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var number = 0; ->number : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var package = 0; ->package : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var private = 0; ->private : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var protected = 0; ->protected : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var public = 0; ->public : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var set = 0; ->set : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var static = 0; ->static : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var string = 0; ->string : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var get = 0; ->get : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var yield = 0; ->yield : number -> : ^^^^^^ ->0 : 0 -> : ^ - -var declare = 0; ->declare : number -> : ^^^^^^ ->0 : 0 -> : ^ - -function bigGeneric< ->bigGeneric : (c: constructor, a: any, b2: boolean, i: implements, i2: interface, l: let, m: module, n: number, p: package, p2: private, p3: protected, p4: public, s: set, s2: static, s3: string, g: get, y: yield, d: declare) => void -> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^ - - constructor, - implements , - interface , - let, - module , - package, - private , - protected, - public , - set , - static , - get , - yield, - declare - >(c: constructor, ->c : constructor -> : ^^^^^^^^^^^ - - a: any, ->a : any -> : ^^^ - - b2: boolean, ->b2 : boolean -> : ^^^^^^^ - - i: implements , ->i : implements -> : ^^^^^^^^^^ - - i2: interface , ->i2 : interface -> : ^^^^^^^^^ - - l: let, ->l : let -> : ^^^ - - m: module , ->m : module -> : ^^^^^^ - - n: number, ->n : number -> : ^^^^^^ - - p: package, ->p : package -> : ^^^^^^^ - - p2: private , ->p2 : private -> : ^^^^^^^ - - p3: protected, ->p3 : protected -> : ^^^^^^^^^ - - p4: public , ->p4 : public -> : ^^^^^^ - - s: set , ->s : set -> : ^^^ - - s2: static , ->s2 : static -> : ^^^^^^ - - s3: string, ->s3 : string -> : ^^^^^^ - - g: get , ->g : get -> : ^^^ - - y: yield, ->y : yield -> : ^^^^^ - - d: declare ) { } ->d : declare -> : ^^^^^^^ - -var bigObject = { ->bigObject : { constructor: number; any: number; boolean: number; implements: number; interface: number; let: number; module: number; number: number; package: number; private: number; protected: number; public: number; set: number; static: number; string: number; get: number; yield: number; break: number; case: number; catch: number; class: number; continue: number; const: number; debugger: number; declare: number; default: number; delete: number; do: number; else: number; enum: number; export: number; extends: number; false: number; finally: number; for: number; function: number; if: number; import: number; in: number; instanceof: number; new: number; null: number; return: number; super: number; switch: number; this: number; throw: number; true: number; try: number; typeof: number; var: number; void: number; while: number; with: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ constructor: 0, any: 0, boolean: 0, implements: 0, interface: 0, let: 0, module: 0, number: 0, package: 0, private: 0, protected: 0, public: 0, set: 0, static: 0, string: 0, get: 0, yield: 0, break: 0, case: 0, catch: 0, class: 0, continue: 0, const: 0, debugger: 0, declare: 0, default: 0, delete: 0, do: 0, else: 0, enum: 0, export: 0, extends: 0, false: 0, finally: 0, for: 0, function: 0, if: 0, import: 0, in: 0, instanceof: 0, new: 0, null: 0, return: 0, super: 0, switch: 0, this: 0, throw: 0, true: 0, try: 0, typeof: 0, var: 0, void: 0, while: 0, with: 0,} : { constructor: number; any: number; boolean: number; implements: number; interface: number; let: number; module: number; number: number; package: number; private: number; protected: number; public: number; set: number; static: number; string: number; get: number; yield: number; break: number; case: number; catch: number; class: number; continue: number; const: number; debugger: number; declare: number; default: number; delete: number; do: number; else: number; enum: number; export: number; extends: number; false: number; finally: number; for: number; function: number; if: number; import: number; in: number; instanceof: number; new: number; null: number; return: number; super: number; switch: number; this: number; throw: number; true: number; try: number; typeof: number; var: number; void: number; while: number; with: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - constructor: 0, ->constructor : number -> : ^^^^^^ ->0 : 0 -> : ^ - - any: 0, ->any : number -> : ^^^^^^ ->0 : 0 -> : ^ - - boolean: 0, ->boolean : number -> : ^^^^^^ ->0 : 0 -> : ^ - - implements: 0, ->implements : number -> : ^^^^^^ ->0 : 0 -> : ^ - - interface: 0, ->interface : number -> : ^^^^^^ ->0 : 0 -> : ^ - - let: 0, ->let : number -> : ^^^^^^ ->0 : 0 -> : ^ - - module: 0, ->module : number -> : ^^^^^^ ->0 : 0 -> : ^ - - number: 0, ->number : number -> : ^^^^^^ ->0 : 0 -> : ^ - - package: 0, ->package : number -> : ^^^^^^ ->0 : 0 -> : ^ - - private: 0, ->private : number -> : ^^^^^^ ->0 : 0 -> : ^ - - protected: 0, ->protected : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public: 0, ->public : number -> : ^^^^^^ ->0 : 0 -> : ^ - - set: 0, ->set : number -> : ^^^^^^ ->0 : 0 -> : ^ - - static: 0, ->static : number -> : ^^^^^^ ->0 : 0 -> : ^ - - string: 0, ->string : number -> : ^^^^^^ ->0 : 0 -> : ^ - - get: 0, ->get : number -> : ^^^^^^ ->0 : 0 -> : ^ - - yield: 0, ->yield : number -> : ^^^^^^ ->0 : 0 -> : ^ - - break: 0, ->break : number -> : ^^^^^^ ->0 : 0 -> : ^ - - case: 0, ->case : number -> : ^^^^^^ ->0 : 0 -> : ^ - - catch: 0, ->catch : number -> : ^^^^^^ ->0 : 0 -> : ^ - - class: 0, ->class : number -> : ^^^^^^ ->0 : 0 -> : ^ - - continue: 0, ->continue : number -> : ^^^^^^ ->0 : 0 -> : ^ - - const: 0, ->const : number -> : ^^^^^^ ->0 : 0 -> : ^ - - debugger: 0, ->debugger : number -> : ^^^^^^ ->0 : 0 -> : ^ - - declare: 0, ->declare : number -> : ^^^^^^ ->0 : 0 -> : ^ - - default: 0, ->default : number -> : ^^^^^^ ->0 : 0 -> : ^ - - delete: 0, ->delete : number -> : ^^^^^^ ->0 : 0 -> : ^ - - do: 0, ->do : number -> : ^^^^^^ ->0 : 0 -> : ^ - - else: 0, ->else : number -> : ^^^^^^ ->0 : 0 -> : ^ - - enum: 0, ->enum : number -> : ^^^^^^ ->0 : 0 -> : ^ - - export: 0, ->export : number -> : ^^^^^^ ->0 : 0 -> : ^ - - extends: 0, ->extends : number -> : ^^^^^^ ->0 : 0 -> : ^ - - false: 0, ->false : number -> : ^^^^^^ ->0 : 0 -> : ^ - - finally: 0, ->finally : number -> : ^^^^^^ ->0 : 0 -> : ^ - - for: 0, ->for : number -> : ^^^^^^ ->0 : 0 -> : ^ - - function: 0, ->function : number -> : ^^^^^^ ->0 : 0 -> : ^ - - if: 0, ->if : number -> : ^^^^^^ ->0 : 0 -> : ^ - - import: 0, ->import : number -> : ^^^^^^ ->0 : 0 -> : ^ - - in: 0, ->in : number -> : ^^^^^^ ->0 : 0 -> : ^ - - instanceof: 0, ->instanceof : number -> : ^^^^^^ ->0 : 0 -> : ^ - - new: 0, ->new : number -> : ^^^^^^ ->0 : 0 -> : ^ - - null: 0, ->null : number -> : ^^^^^^ ->0 : 0 -> : ^ - - return: 0, ->return : number -> : ^^^^^^ ->0 : 0 -> : ^ - - super: 0, ->super : number -> : ^^^^^^ ->0 : 0 -> : ^ - - switch: 0, ->switch : number -> : ^^^^^^ ->0 : 0 -> : ^ - - this: 0, ->this : number -> : ^^^^^^ ->0 : 0 -> : ^ - - throw: 0, ->throw : number -> : ^^^^^^ ->0 : 0 -> : ^ - - true: 0, ->true : number -> : ^^^^^^ ->0 : 0 -> : ^ - - try: 0, ->try : number -> : ^^^^^^ ->0 : 0 -> : ^ - - typeof: 0, ->typeof : number -> : ^^^^^^ ->0 : 0 -> : ^ - - var: 0, ->var : number -> : ^^^^^^ ->0 : 0 -> : ^ - - void: 0, ->void : number -> : ^^^^^^ ->0 : 0 -> : ^ - - while: 0, ->while : number -> : ^^^^^^ ->0 : 0 -> : ^ - - with: 0, ->with : number -> : ^^^^^^ ->0 : 0 -> : ^ - -}; - -interface bigInterface { - constructor; ->constructor : any -> : ^^^ - - any; ->any : any -> : ^^^ - - boolean; ->boolean : any -> : ^^^ - - implements; ->implements : any -> : ^^^ - - interface; ->interface : any -> : ^^^ - - let; ->let : any -> : ^^^ - - module; ->module : any -> : ^^^ - - number; ->number : any -> : ^^^ - - package; ->package : any -> : ^^^ - - private; ->private : any -> : ^^^ - - protected; ->protected : any -> : ^^^ - - public; ->public : any -> : ^^^ - - set; ->set : any -> : ^^^ - - static; ->static : any -> : ^^^ - - string; ->string : any -> : ^^^ - - get; ->get : any -> : ^^^ - - yield; ->yield : any -> : ^^^ - - break; ->break : any -> : ^^^ - - case; ->case : any -> : ^^^ - - catch; ->catch : any -> : ^^^ - - class; ->class : any -> : ^^^ - - continue; ->continue : any -> : ^^^ - - const; ->const : any -> : ^^^ - - debugger; ->debugger : any -> : ^^^ - - declare; ->declare : any -> : ^^^ - - default; ->default : any -> : ^^^ - - delete; ->delete : any -> : ^^^ - - do; ->do : any -> : ^^^ - - else; ->else : any -> : ^^^ - - enum; ->enum : any -> : ^^^ - - export; ->export : any -> : ^^^ - - extends; ->extends : any -> : ^^^ - - false; ->false : any -> : ^^^ - - finally; ->finally : any -> : ^^^ - - for; ->for : any -> : ^^^ - - function; ->function : any -> : ^^^ - - if; ->if : any -> : ^^^ - - import; ->import : any -> : ^^^ - - in; ->in : any -> : ^^^ - - instanceof; ->instanceof : any -> : ^^^ - - new; ->new : any -> : ^^^ - - null; ->null : any -> : ^^^ - - return; ->return : any -> : ^^^ - - super; ->super : any -> : ^^^ - - switch; ->switch : any -> : ^^^ - - this; ->this : any -> : ^^^ - - throw; ->throw : any -> : ^^^ - - true; ->true : any -> : ^^^ - - try; ->try : any -> : ^^^ - - typeof; ->typeof : any -> : ^^^ - - var; ->var : any -> : ^^^ - - void; ->void : any -> : ^^^ - - while; ->while : any -> : ^^^ - - with; ->with : any -> : ^^^ -} - -class bigClass { ->bigClass : bigClass -> : ^^^^^^^^ - - public "constructor" = 0; ->"constructor" : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public any = 0; ->any : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public boolean = 0; ->boolean : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public implements = 0; ->implements : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public interface = 0; ->interface : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public let = 0; ->let : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public module = 0; ->module : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public number = 0; ->number : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public package = 0; ->package : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public private = 0; ->private : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public protected = 0; ->protected : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public public = 0; ->public : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public set = 0; ->set : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public static = 0; ->static : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public string = 0; ->string : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public get = 0; ->get : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public yield = 0; ->yield : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public break = 0; ->break : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public case = 0; ->case : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public catch = 0; ->catch : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public class = 0; ->class : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public continue = 0; ->continue : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public const = 0; ->const : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public debugger = 0; ->debugger : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public declare = 0; ->declare : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public default = 0; ->default : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public delete = 0; ->delete : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public do = 0; ->do : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public else = 0; ->else : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public enum = 0; ->enum : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public export = 0; ->export : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public extends = 0; ->extends : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public false = 0; ->false : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public finally = 0; ->finally : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public for = 0; ->for : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public function = 0; ->function : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public if = 0; ->if : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public import = 0; ->import : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public in = 0; ->in : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public instanceof = 0; ->instanceof : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public new = 0; ->new : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public null = 0; ->null : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public return = 0; ->return : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public super = 0; ->super : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public switch = 0; ->switch : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public this = 0; ->this : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public throw = 0; ->throw : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public true = 0; ->true : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public try = 0; ->try : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public typeof = 0; ->typeof : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public var = 0; ->var : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public void = 0; ->void : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public while = 0; ->while : number -> : ^^^^^^ ->0 : 0 -> : ^ - - public with = 0; ->with : number -> : ^^^^^^ ->0 : 0 -> : ^ -} - -enum bigEnum { ->bigEnum : bigEnum -> : ^^^^^^^ - - constructor, ->constructor : bigEnum.constructor -> : ^^^^^^^^^^^^^^^^^^^ - - any, ->any : bigEnum.any -> : ^^^^^^^^^^^ - - boolean, ->boolean : bigEnum.boolean -> : ^^^^^^^^^^^^^^^ - - implements, ->implements : bigEnum.implements -> : ^^^^^^^^^^^^^^^^^^ - - interface, ->interface : bigEnum.interface -> : ^^^^^^^^^^^^^^^^^ - - let, ->let : bigEnum.let -> : ^^^^^^^^^^^ - - module, ->module : bigEnum.module -> : ^^^^^^^^^^^^^^ - - number, ->number : bigEnum.number -> : ^^^^^^^^^^^^^^ - - package, ->package : bigEnum.package -> : ^^^^^^^^^^^^^^^ - - private, ->private : bigEnum.private -> : ^^^^^^^^^^^^^^^ - - protected, ->protected : bigEnum.protected -> : ^^^^^^^^^^^^^^^^^ - - public, ->public : bigEnum.public -> : ^^^^^^^^^^^^^^ - - set, ->set : bigEnum.set -> : ^^^^^^^^^^^ - - static, ->static : bigEnum.static -> : ^^^^^^^^^^^^^^ - - string, ->string : bigEnum.string -> : ^^^^^^^^^^^^^^ - - get, ->get : bigEnum.get -> : ^^^^^^^^^^^ - - yield, ->yield : bigEnum.yield -> : ^^^^^^^^^^^^^ - - break, ->break : bigEnum.break -> : ^^^^^^^^^^^^^ - - case, ->case : bigEnum.case -> : ^^^^^^^^^^^^ - - catch, ->catch : bigEnum.catch -> : ^^^^^^^^^^^^^ - - class, ->class : bigEnum.class -> : ^^^^^^^^^^^^^ - - continue, ->continue : bigEnum.continue -> : ^^^^^^^^^^^^^^^^ - - const, ->const : bigEnum.const -> : ^^^^^^^^^^^^^ - - debugger, ->debugger : bigEnum.debugger -> : ^^^^^^^^^^^^^^^^ - - declare, ->declare : bigEnum.declare -> : ^^^^^^^^^^^^^^^ - - default, ->default : bigEnum.default -> : ^^^^^^^^^^^^^^^ - - delete, ->delete : bigEnum.delete -> : ^^^^^^^^^^^^^^ - - do, ->do : bigEnum.do -> : ^^^^^^^^^^ - - else, ->else : bigEnum.else -> : ^^^^^^^^^^^^ - - enum, ->enum : bigEnum.enum -> : ^^^^^^^^^^^^ - - export, ->export : bigEnum.export -> : ^^^^^^^^^^^^^^ - - extends, ->extends : bigEnum.extends -> : ^^^^^^^^^^^^^^^ - - false, ->false : bigEnum.false -> : ^^^^^^^^^^^^^ - - finally, ->finally : bigEnum.finally -> : ^^^^^^^^^^^^^^^ - - for, ->for : bigEnum.for -> : ^^^^^^^^^^^ - - function, ->function : bigEnum.function -> : ^^^^^^^^^^^^^^^^ - - if, ->if : bigEnum.if -> : ^^^^^^^^^^ - - import, ->import : bigEnum.import -> : ^^^^^^^^^^^^^^ - - in, ->in : bigEnum.in -> : ^^^^^^^^^^ - - instanceof, ->instanceof : bigEnum.instanceof -> : ^^^^^^^^^^^^^^^^^^ - - new, ->new : bigEnum.new -> : ^^^^^^^^^^^ - - null, ->null : bigEnum.null -> : ^^^^^^^^^^^^ - - return, ->return : bigEnum.return -> : ^^^^^^^^^^^^^^ - - super, ->super : bigEnum.super -> : ^^^^^^^^^^^^^ - - switch, ->switch : bigEnum.switch -> : ^^^^^^^^^^^^^^ - - this, ->this : bigEnum.this -> : ^^^^^^^^^^^^ - - throw, ->throw : bigEnum.throw -> : ^^^^^^^^^^^^^ - - true, ->true : bigEnum.true -> : ^^^^^^^^^^^^ - - try, ->try : bigEnum.try -> : ^^^^^^^^^^^ - - typeof, ->typeof : bigEnum.typeof -> : ^^^^^^^^^^^^^^ - - var, ->var : bigEnum.var -> : ^^^^^^^^^^^ - - void, ->void : bigEnum.void -> : ^^^^^^^^^^^^ - - while, ->while : bigEnum.while -> : ^^^^^^^^^^^^^ - - with, ->with : bigEnum.with -> : ^^^^^^^^^^^^ -} - -namespace bigModule { ->bigModule : typeof bigModule -> : ^^^^^^^^^^^^^^^^ - - class constructor { } ->constructor : constructor -> : ^^^^^^^^^^^ - - class implements { } ->implements : implements -> : ^^^^^^^^^^ - - class interface { } ->interface : interface -> : ^^^^^^^^^ - - class let { } ->let : let -> : ^^^ - - class module { } ->module : module -> : ^^^^^^ - - class package { } ->package : package -> : ^^^^^^^ - - class private { } ->private : private -> : ^^^^^^^ - - class protected { } ->protected : protected -> : ^^^^^^^^^ - - class public { } ->public : public -> : ^^^^^^ - - class set { } ->set : set -> : ^^^ - - class static { } ->static : static -> : ^^^^^^ - - class get { } ->get : get -> : ^^^ - - class yield { } ->yield : yield -> : ^^^^^ - - class declare { } ->declare : declare -> : ^^^^^^^ -} diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt deleted file mode 100644 index b02c086b50018..0000000000000 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt +++ /dev/null @@ -1,141 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(28,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(29,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(30,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(33,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(34,31): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(42,32): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(43,32): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(44,33): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(45,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. -deleteOperatorWithAnyOtherType.ts(45,33): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(46,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. -deleteOperatorWithAnyOtherType.ts(46,33): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(47,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. -deleteOperatorWithAnyOtherType.ts(47,33): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(50,32): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(50,39): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(51,32): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(51,39): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(51,47): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(54,8): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a 'delete' operator must be a property reference. -deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a 'delete' operator must be a property reference. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== deleteOperatorWithAnyOtherType.ts (25 errors) ==== - // delete operator on any type - - declare var ANY: any; - declare var ANY1; - var ANY2: any[] = ["", ""]; - declare var obj: () => {}; - var obj1 = { x: "", y: () => { }}; - function foo(): any { - var a; - return a; - } - class A { - public a: any; - static foo() { - var a; - return a; - } - } - namespace M { - export var n: any; - } - var objA = new A(); - - // any type var - var ResultIsBoolean1 = delete ANY1; - ~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean2 = delete ANY2; - ~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean3 = delete A; - ~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean4 = delete M; - ~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean5 = delete obj; - ~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean6 = delete obj1; - ~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - - // any type literal - var ResultIsBoolean7 = delete undefined; - ~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean8 = delete null; - ~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - - // any type expressions - var ResultIsBoolean9 = delete ANY2[0]; - var ResultIsBoolean10 = delete obj1.x; - var ResultIsBoolean11 = delete obj1.y; - var ResultIsBoolean12 = delete objA.a; - var ResultIsBoolean13 = delete M.n; - var ResultIsBoolean14 = delete foo(); - ~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean15 = delete A.foo(); - ~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean16 = delete (ANY + ANY1); - ~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean17 = delete (null + undefined); - ~~~~~~~~~~~~~~~~ -!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. - ~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean18 = delete (null + null); - ~~~~~~~~~~~ -!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. - ~~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean19 = delete (undefined + undefined); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - - // multiple delete operators - var ResultIsBoolean20 = delete delete ANY; - ~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - ~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - var ResultIsBoolean21 = delete delete delete (ANY + ANY1); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - ~~~~~~~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - - // miss assignment operators - delete ANY; - ~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - delete ANY1; - ~~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - delete ANY2[0]; - delete ANY, ANY1; - ~~~ -!!! error TS2703: The operand of a 'delete' operator must be a property reference. - delete obj1.x; - delete obj1.y; - delete objA.a; - delete M.n; \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js b/tests/baselines/reference/deleteOperatorWithAnyOtherType.js deleted file mode 100644 index d5e86519b2e76..0000000000000 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js +++ /dev/null @@ -1,117 +0,0 @@ -//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// - -//// [deleteOperatorWithAnyOtherType.ts] -// delete operator on any type - -declare var ANY: any; -declare var ANY1; -var ANY2: any[] = ["", ""]; -declare var obj: () => {}; -var obj1 = { x: "", y: () => { }}; -function foo(): any { - var a; - return a; -} -class A { - public a: any; - static foo() { - var a; - return a; - } -} -namespace M { - export var n: any; -} -var objA = new A(); - -// any type var -var ResultIsBoolean1 = delete ANY1; -var ResultIsBoolean2 = delete ANY2; -var ResultIsBoolean3 = delete A; -var ResultIsBoolean4 = delete M; -var ResultIsBoolean5 = delete obj; -var ResultIsBoolean6 = delete obj1; - -// any type literal -var ResultIsBoolean7 = delete undefined; -var ResultIsBoolean8 = delete null; - -// any type expressions -var ResultIsBoolean9 = delete ANY2[0]; -var ResultIsBoolean10 = delete obj1.x; -var ResultIsBoolean11 = delete obj1.y; -var ResultIsBoolean12 = delete objA.a; -var ResultIsBoolean13 = delete M.n; -var ResultIsBoolean14 = delete foo(); -var ResultIsBoolean15 = delete A.foo(); -var ResultIsBoolean16 = delete (ANY + ANY1); -var ResultIsBoolean17 = delete (null + undefined); -var ResultIsBoolean18 = delete (null + null); -var ResultIsBoolean19 = delete (undefined + undefined); - -// multiple delete operators -var ResultIsBoolean20 = delete delete ANY; -var ResultIsBoolean21 = delete delete delete (ANY + ANY1); - -// miss assignment operators -delete ANY; -delete ANY1; -delete ANY2[0]; -delete ANY, ANY1; -delete obj1.x; -delete obj1.y; -delete objA.a; -delete M.n; - -//// [deleteOperatorWithAnyOtherType.js] -// delete operator on any type -var ANY2 = ["", ""]; -var obj1 = { x: "", y: () => { } }; -function foo() { - var a; - return a; -} -class A { - static foo() { - var a; - return a; - } -} -var M; -(function (M) { -})(M || (M = {})); -var objA = new A(); -// any type var -var ResultIsBoolean1 = delete ANY1; -var ResultIsBoolean2 = delete ANY2; -var ResultIsBoolean3 = delete A; -var ResultIsBoolean4 = delete M; -var ResultIsBoolean5 = delete obj; -var ResultIsBoolean6 = delete obj1; -// any type literal -var ResultIsBoolean7 = delete undefined; -var ResultIsBoolean8 = delete null; -// any type expressions -var ResultIsBoolean9 = delete ANY2[0]; -var ResultIsBoolean10 = delete obj1.x; -var ResultIsBoolean11 = delete obj1.y; -var ResultIsBoolean12 = delete objA.a; -var ResultIsBoolean13 = delete M.n; -var ResultIsBoolean14 = delete foo(); -var ResultIsBoolean15 = delete A.foo(); -var ResultIsBoolean16 = delete (ANY + ANY1); -var ResultIsBoolean17 = delete (null + undefined); -var ResultIsBoolean18 = delete (null + null); -var ResultIsBoolean19 = delete (undefined + undefined); -// multiple delete operators -var ResultIsBoolean20 = delete delete ANY; -var ResultIsBoolean21 = delete delete delete (ANY + ANY1); -// miss assignment operators -delete ANY; -delete ANY1; -delete ANY2[0]; -delete ANY, ANY1; -delete obj1.x; -delete obj1.y; -delete objA.a; -delete M.n; diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.symbols b/tests/baselines/reference/deleteOperatorWithAnyOtherType.symbols deleted file mode 100644 index e307ee95891ed..0000000000000 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.symbols +++ /dev/null @@ -1,190 +0,0 @@ -//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// - -=== deleteOperatorWithAnyOtherType.ts === -// delete operator on any type - -declare var ANY: any; ->ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) - -declare var ANY1; ->ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) - -var ANY2: any[] = ["", ""]; ->ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) - -declare var obj: () => {}; ->obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 11)) - -var obj1 = { x: "", y: () => { }}; ->obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) ->x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) ->y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) - -function foo(): any { ->foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34)) - - var a; ->a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7)) - - return a; ->a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7)) -} -class A { ->A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) - - public a: any; ->a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) - - static foo() { ->foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) - - var a; ->a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11)) - - return a; ->a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11)) - } -} -namespace M { ->M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) - - export var n: any; ->n : Symbol(n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) -} -var objA = new A(); ->objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) ->A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) - -// any type var -var ResultIsBoolean1 = delete ANY1; ->ResultIsBoolean1 : Symbol(ResultIsBoolean1, Decl(deleteOperatorWithAnyOtherType.ts, 24, 3)) ->ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) - -var ResultIsBoolean2 = delete ANY2; ->ResultIsBoolean2 : Symbol(ResultIsBoolean2, Decl(deleteOperatorWithAnyOtherType.ts, 25, 3)) ->ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) - -var ResultIsBoolean3 = delete A; ->ResultIsBoolean3 : Symbol(ResultIsBoolean3, Decl(deleteOperatorWithAnyOtherType.ts, 26, 3)) ->A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) - -var ResultIsBoolean4 = delete M; ->ResultIsBoolean4 : Symbol(ResultIsBoolean4, Decl(deleteOperatorWithAnyOtherType.ts, 27, 3)) ->M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) - -var ResultIsBoolean5 = delete obj; ->ResultIsBoolean5 : Symbol(ResultIsBoolean5, Decl(deleteOperatorWithAnyOtherType.ts, 28, 3)) ->obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 11)) - -var ResultIsBoolean6 = delete obj1; ->ResultIsBoolean6 : Symbol(ResultIsBoolean6, Decl(deleteOperatorWithAnyOtherType.ts, 29, 3)) ->obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) - -// any type literal -var ResultIsBoolean7 = delete undefined; ->ResultIsBoolean7 : Symbol(ResultIsBoolean7, Decl(deleteOperatorWithAnyOtherType.ts, 32, 3)) ->undefined : Symbol(undefined) - -var ResultIsBoolean8 = delete null; ->ResultIsBoolean8 : Symbol(ResultIsBoolean8, Decl(deleteOperatorWithAnyOtherType.ts, 33, 3)) - -// any type expressions -var ResultIsBoolean9 = delete ANY2[0]; ->ResultIsBoolean9 : Symbol(ResultIsBoolean9, Decl(deleteOperatorWithAnyOtherType.ts, 36, 3)) ->ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) - -var ResultIsBoolean10 = delete obj1.x; ->ResultIsBoolean10 : Symbol(ResultIsBoolean10, Decl(deleteOperatorWithAnyOtherType.ts, 37, 3)) ->obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) ->obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) ->x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) - -var ResultIsBoolean11 = delete obj1.y; ->ResultIsBoolean11 : Symbol(ResultIsBoolean11, Decl(deleteOperatorWithAnyOtherType.ts, 38, 3)) ->obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) ->obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) ->y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) - -var ResultIsBoolean12 = delete objA.a; ->ResultIsBoolean12 : Symbol(ResultIsBoolean12, Decl(deleteOperatorWithAnyOtherType.ts, 39, 3)) ->objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) ->objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) ->a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) - -var ResultIsBoolean13 = delete M.n; ->ResultIsBoolean13 : Symbol(ResultIsBoolean13, Decl(deleteOperatorWithAnyOtherType.ts, 40, 3)) ->M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) ->M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) ->n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) - -var ResultIsBoolean14 = delete foo(); ->ResultIsBoolean14 : Symbol(ResultIsBoolean14, Decl(deleteOperatorWithAnyOtherType.ts, 41, 3)) ->foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34)) - -var ResultIsBoolean15 = delete A.foo(); ->ResultIsBoolean15 : Symbol(ResultIsBoolean15, Decl(deleteOperatorWithAnyOtherType.ts, 42, 3)) ->A.foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) ->A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1)) ->foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18)) - -var ResultIsBoolean16 = delete (ANY + ANY1); ->ResultIsBoolean16 : Symbol(ResultIsBoolean16, Decl(deleteOperatorWithAnyOtherType.ts, 43, 3)) ->ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) ->ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) - -var ResultIsBoolean17 = delete (null + undefined); ->ResultIsBoolean17 : Symbol(ResultIsBoolean17, Decl(deleteOperatorWithAnyOtherType.ts, 44, 3)) ->undefined : Symbol(undefined) - -var ResultIsBoolean18 = delete (null + null); ->ResultIsBoolean18 : Symbol(ResultIsBoolean18, Decl(deleteOperatorWithAnyOtherType.ts, 45, 3)) - -var ResultIsBoolean19 = delete (undefined + undefined); ->ResultIsBoolean19 : Symbol(ResultIsBoolean19, Decl(deleteOperatorWithAnyOtherType.ts, 46, 3)) ->undefined : Symbol(undefined) ->undefined : Symbol(undefined) - -// multiple delete operators -var ResultIsBoolean20 = delete delete ANY; ->ResultIsBoolean20 : Symbol(ResultIsBoolean20, Decl(deleteOperatorWithAnyOtherType.ts, 49, 3)) ->ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) - -var ResultIsBoolean21 = delete delete delete (ANY + ANY1); ->ResultIsBoolean21 : Symbol(ResultIsBoolean21, Decl(deleteOperatorWithAnyOtherType.ts, 50, 3)) ->ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) ->ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) - -// miss assignment operators -delete ANY; ->ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) - -delete ANY1; ->ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) - -delete ANY2[0]; ->ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3)) - -delete ANY, ANY1; ->ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 11)) ->ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 11)) - -delete obj1.x; ->obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) ->obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) ->x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12)) - -delete obj1.y; ->obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) ->obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3)) ->y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19)) - -delete objA.a; ->objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) ->objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3)) ->a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9)) - -delete M.n; ->M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) ->M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1)) ->n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14)) - diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.types b/tests/baselines/reference/deleteOperatorWithAnyOtherType.types deleted file mode 100644 index f86f73f992e5d..0000000000000 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.types +++ /dev/null @@ -1,391 +0,0 @@ -//// [tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts] //// - -=== deleteOperatorWithAnyOtherType.ts === -// delete operator on any type - -declare var ANY: any; ->ANY : any -> : ^^^ - -declare var ANY1; ->ANY1 : any -> : ^^^ - -var ANY2: any[] = ["", ""]; ->ANY2 : any[] -> : ^^^^^ ->["", ""] : string[] -> : ^^^^^^^^ ->"" : "" -> : ^^ ->"" : "" -> : ^^ - -declare var obj: () => {}; ->obj : () => {} -> : ^^^^^^ - -var obj1 = { x: "", y: () => { }}; ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ x: "", y: () => { }} : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->x : string -> : ^^^^^^ ->"" : "" -> : ^^ ->y : () => void -> : ^^^^^^^^^^ ->() => { } : () => void -> : ^^^^^^^^^^ - -function foo(): any { ->foo : () => any -> : ^^^^^^ - - var a; ->a : any -> : ^^^ - - return a; ->a : any -> : ^^^ -} -class A { ->A : A -> : ^ - - public a: any; ->a : any -> : ^^^ - - static foo() { ->foo : () => any -> : ^^^^^^^^^ - - var a; ->a : any -> : ^^^ - - return a; ->a : any -> : ^^^ - } -} -namespace M { ->M : typeof M -> : ^^^^^^^^ - - export var n: any; ->n : any -> : ^^^ -} -var objA = new A(); ->objA : A -> : ^ ->new A() : A -> : ^ ->A : typeof A -> : ^^^^^^^^ - -// any type var -var ResultIsBoolean1 = delete ANY1; ->ResultIsBoolean1 : boolean -> : ^^^^^^^ ->delete ANY1 : boolean -> : ^^^^^^^ ->ANY1 : any -> : ^^^ - -var ResultIsBoolean2 = delete ANY2; ->ResultIsBoolean2 : boolean -> : ^^^^^^^ ->delete ANY2 : boolean -> : ^^^^^^^ ->ANY2 : any[] -> : ^^^^^ - -var ResultIsBoolean3 = delete A; ->ResultIsBoolean3 : boolean -> : ^^^^^^^ ->delete A : boolean -> : ^^^^^^^ ->A : typeof A -> : ^^^^^^^^ - -var ResultIsBoolean4 = delete M; ->ResultIsBoolean4 : boolean -> : ^^^^^^^ ->delete M : boolean -> : ^^^^^^^ ->M : typeof M -> : ^^^^^^^^ - -var ResultIsBoolean5 = delete obj; ->ResultIsBoolean5 : boolean -> : ^^^^^^^ ->delete obj : boolean -> : ^^^^^^^ ->obj : () => {} -> : ^^^^^^ - -var ResultIsBoolean6 = delete obj1; ->ResultIsBoolean6 : boolean -> : ^^^^^^^ ->delete obj1 : boolean -> : ^^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -// any type literal -var ResultIsBoolean7 = delete undefined; ->ResultIsBoolean7 : boolean -> : ^^^^^^^ ->delete undefined : boolean -> : ^^^^^^^ ->undefined : undefined -> : ^^^^^^^^^ - -var ResultIsBoolean8 = delete null; ->ResultIsBoolean8 : boolean -> : ^^^^^^^ ->delete null : boolean -> : ^^^^^^^ - -// any type expressions -var ResultIsBoolean9 = delete ANY2[0]; ->ResultIsBoolean9 : boolean -> : ^^^^^^^ ->delete ANY2[0] : boolean -> : ^^^^^^^ ->ANY2[0] : any -> : ^^^ ->ANY2 : any[] -> : ^^^^^ ->0 : 0 -> : ^ - -var ResultIsBoolean10 = delete obj1.x; ->ResultIsBoolean10 : boolean -> : ^^^^^^^ ->delete obj1.x : boolean -> : ^^^^^^^ ->obj1.x : string -> : ^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->x : string -> : ^^^^^^ - -var ResultIsBoolean11 = delete obj1.y; ->ResultIsBoolean11 : boolean -> : ^^^^^^^ ->delete obj1.y : boolean -> : ^^^^^^^ ->obj1.y : () => void -> : ^^^^^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->y : () => void -> : ^^^^^^^^^^ - -var ResultIsBoolean12 = delete objA.a; ->ResultIsBoolean12 : boolean -> : ^^^^^^^ ->delete objA.a : boolean -> : ^^^^^^^ ->objA.a : any -> : ^^^ ->objA : A -> : ^ ->a : any -> : ^^^ - -var ResultIsBoolean13 = delete M.n; ->ResultIsBoolean13 : boolean -> : ^^^^^^^ ->delete M.n : boolean -> : ^^^^^^^ ->M.n : any -> : ^^^ ->M : typeof M -> : ^^^^^^^^ ->n : any -> : ^^^ - -var ResultIsBoolean14 = delete foo(); ->ResultIsBoolean14 : boolean -> : ^^^^^^^ ->delete foo() : boolean -> : ^^^^^^^ ->foo() : any -> : ^^^ ->foo : () => any -> : ^^^^^^ - -var ResultIsBoolean15 = delete A.foo(); ->ResultIsBoolean15 : boolean -> : ^^^^^^^ ->delete A.foo() : boolean -> : ^^^^^^^ ->A.foo() : any -> : ^^^ ->A.foo : () => any -> : ^^^^^^^^^ ->A : typeof A -> : ^^^^^^^^ ->foo : () => any -> : ^^^^^^^^^ - -var ResultIsBoolean16 = delete (ANY + ANY1); ->ResultIsBoolean16 : boolean -> : ^^^^^^^ ->delete (ANY + ANY1) : boolean -> : ^^^^^^^ ->(ANY + ANY1) : any -> : ^^^ ->ANY + ANY1 : any -> : ^^^ ->ANY : any -> : ^^^ ->ANY1 : any -> : ^^^ - -var ResultIsBoolean17 = delete (null + undefined); ->ResultIsBoolean17 : boolean -> : ^^^^^^^ ->delete (null + undefined) : boolean -> : ^^^^^^^ ->(null + undefined) : any -> : ^^^ ->null + undefined : any -> : ^^^ ->undefined : undefined -> : ^^^^^^^^^ - -var ResultIsBoolean18 = delete (null + null); ->ResultIsBoolean18 : boolean -> : ^^^^^^^ ->delete (null + null) : boolean -> : ^^^^^^^ ->(null + null) : any -> : ^^^ ->null + null : any -> : ^^^ - -var ResultIsBoolean19 = delete (undefined + undefined); ->ResultIsBoolean19 : boolean -> : ^^^^^^^ ->delete (undefined + undefined) : boolean -> : ^^^^^^^ ->(undefined + undefined) : any -> : ^^^ ->undefined + undefined : any -> : ^^^ ->undefined : undefined -> : ^^^^^^^^^ ->undefined : undefined -> : ^^^^^^^^^ - -// multiple delete operators -var ResultIsBoolean20 = delete delete ANY; ->ResultIsBoolean20 : boolean -> : ^^^^^^^ ->delete delete ANY : boolean -> : ^^^^^^^ ->delete ANY : boolean -> : ^^^^^^^ ->ANY : any -> : ^^^ - -var ResultIsBoolean21 = delete delete delete (ANY + ANY1); ->ResultIsBoolean21 : boolean -> : ^^^^^^^ ->delete delete delete (ANY + ANY1) : boolean -> : ^^^^^^^ ->delete delete (ANY + ANY1) : boolean -> : ^^^^^^^ ->delete (ANY + ANY1) : boolean -> : ^^^^^^^ ->(ANY + ANY1) : any -> : ^^^ ->ANY + ANY1 : any -> : ^^^ ->ANY : any -> : ^^^ ->ANY1 : any -> : ^^^ - -// miss assignment operators -delete ANY; ->delete ANY : boolean -> : ^^^^^^^ ->ANY : any -> : ^^^ - -delete ANY1; ->delete ANY1 : boolean -> : ^^^^^^^ ->ANY1 : any -> : ^^^ - -delete ANY2[0]; ->delete ANY2[0] : boolean -> : ^^^^^^^ ->ANY2[0] : any -> : ^^^ ->ANY2 : any[] -> : ^^^^^ ->0 : 0 -> : ^ - -delete ANY, ANY1; ->delete ANY, ANY1 : any -> : ^^^ ->delete ANY : boolean -> : ^^^^^^^ ->ANY : any -> : ^^^ ->ANY1 : any -> : ^^^ - -delete obj1.x; ->delete obj1.x : boolean -> : ^^^^^^^ ->obj1.x : string -> : ^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->x : string -> : ^^^^^^ - -delete obj1.y; ->delete obj1.y : boolean -> : ^^^^^^^ ->obj1.y : () => void -> : ^^^^^^^^^^ ->obj1 : { x: string; y: () => void; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->y : () => void -> : ^^^^^^^^^^ - -delete objA.a; ->delete objA.a : boolean -> : ^^^^^^^ ->objA.a : any -> : ^^^ ->objA : A -> : ^ ->a : any -> : ^^^ - -delete M.n; ->delete M.n : boolean -> : ^^^^^^^ ->M.n : any -> : ^^^ ->M : typeof M -> : ^^^^^^^^ ->n : any -> : ^^^ - diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt deleted file mode 100644 index 8bd5b59026a50..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments03.ts (0 errors) ==== - var arguments; - var a = () => arguments; \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).js deleted file mode 100644 index 2f4e914f53e4f..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).js +++ /dev/null @@ -1,9 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// - -//// [emitArrowFunctionWhenUsingArguments03.ts] -var arguments; -var a = () => arguments; - -//// [emitArrowFunctionWhenUsingArguments03.js] -var arguments; -var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).symbols deleted file mode 100644 index e54b9ef5bd414..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).symbols +++ /dev/null @@ -1,10 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// - -=== emitArrowFunctionWhenUsingArguments03.ts === -var arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) - -var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) - diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types deleted file mode 100644 index 7dc5ae672597e..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es2015).types +++ /dev/null @@ -1,15 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// - -=== emitArrowFunctionWhenUsingArguments03.ts === -var arguments; ->arguments : any -> : ^^^ - -var a = () => arguments; ->a : () => any -> : ^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ - diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt deleted file mode 100644 index 3f7f0e65148a1..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments03.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments03.ts (1 errors) ==== - var arguments; - var a = () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).js deleted file mode 100644 index 4db9f4458466b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).js +++ /dev/null @@ -1,9 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// - -//// [emitArrowFunctionWhenUsingArguments03.ts] -var arguments; -var a = () => arguments; - -//// [emitArrowFunctionWhenUsingArguments03.js] -var arguments; -var a = function () { return arguments; }; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).symbols deleted file mode 100644 index 330ee3789816c..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).symbols +++ /dev/null @@ -1,10 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// - -=== emitArrowFunctionWhenUsingArguments03.ts === -var arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3)) - -var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3)) ->arguments : Symbol(arguments) - diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).types deleted file mode 100644 index 756142e72f371..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03(target=es5).types +++ /dev/null @@ -1,15 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts] //// - -=== emitArrowFunctionWhenUsingArguments03.ts === -var arguments; ->arguments : any -> : ^^^ - -var a = () => arguments; ->a : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ - diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt deleted file mode 100644 index e1dee69e74b9b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments03_ES6.ts (0 errors) ==== - var arguments; - var a = () => arguments; \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.js deleted file mode 100644 index 35b1f55d59aff..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.js +++ /dev/null @@ -1,9 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments03_ES6.ts] -var arguments; -var a = () => arguments; - -//// [emitArrowFunctionWhenUsingArguments03_ES6.js] -var arguments; -var a = () => arguments; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.symbols deleted file mode 100644 index 35b0aedddde28..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.symbols +++ /dev/null @@ -1,10 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments03_ES6.ts === -var arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 0, 3)) - -var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 1, 3)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 0, 3)) - diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types deleted file mode 100644 index 2779840ecb7b9..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments03_ES6.types +++ /dev/null @@ -1,15 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments03_ES6.ts === -var arguments; ->arguments : any -> : ^^^ - -var a = () => arguments; ->a : () => any -> : ^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ - diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt deleted file mode 100644 index 8ef2d24c760d3..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments04.ts (0 errors) ==== - function f() { - var arguments; - var a = () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).js deleted file mode 100644 index 58bab00c79850..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// - -//// [emitArrowFunctionWhenUsingArguments04.ts] -function f() { - var arguments; - var a = () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments04.js] -function f() { - var arguments; - var a = () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).symbols deleted file mode 100644 index 1b2fc7cf3feba..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).symbols +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// - -=== emitArrowFunctionWhenUsingArguments04.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04.ts, 0, 0)) - - var arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) - - var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types deleted file mode 100644 index d3abb68829e4d..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es2015).types +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// - -=== emitArrowFunctionWhenUsingArguments04.ts === -function f() { ->f : () => void -> : ^^^^^^^^^^ - - var arguments; ->arguments : any -> : ^^^ - - var a = () => arguments; ->a : () => any -> : ^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt deleted file mode 100644 index de843bf991879..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments04.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments04.ts (1 errors) ==== - function f() { - var arguments; - var a = () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).js deleted file mode 100644 index bd1afafa0ce85..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// - -//// [emitArrowFunctionWhenUsingArguments04.ts] -function f() { - var arguments; - var a = () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments04.js] -function f() { - var arguments; - var a = function () { return arguments; }; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).symbols deleted file mode 100644 index ed04a6c54cd57..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).symbols +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// - -=== emitArrowFunctionWhenUsingArguments04.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04.ts, 0, 0)) - - var arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7)) - - var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7)) ->arguments : Symbol(arguments) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).types deleted file mode 100644 index 74e000ce61f6a..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04(target=es5).types +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts] //// - -=== emitArrowFunctionWhenUsingArguments04.ts === -function f() { ->f : () => void -> : ^^^^^^^^^^ - - var arguments; ->arguments : any -> : ^^^ - - var a = () => arguments; ->a : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt deleted file mode 100644 index 30e8e7bba16dc..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments04_ES6.ts (0 errors) ==== - function f() { - var arguments; - var a = () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.js deleted file mode 100644 index 47904c4522437..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments04_ES6.ts] -function f() { - var arguments; - var a = () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments04_ES6.js] -function f() { - var arguments; - var a = () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.symbols deleted file mode 100644 index 0d8ae60fd6d8f..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.symbols +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments04_ES6.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 0, 0)) - - var arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 1, 7)) - - var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 2, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 1, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types deleted file mode 100644 index f165f38180df0..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments04_ES6.types +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments04_ES6.ts === -function f() { ->f : () => void -> : ^^^^^^^^^^ - - var arguments; ->arguments : any -> : ^^^ - - var a = () => arguments; ->a : () => any -> : ^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt deleted file mode 100644 index 50e45f86136a5..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments05.ts (0 errors) ==== - function f(arguments) { - var a = () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).js deleted file mode 100644 index 40a8871a27ebb..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// - -//// [emitArrowFunctionWhenUsingArguments05.ts] -function f(arguments) { - var a = () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments05.js] -function f(arguments) { - var a = () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).symbols deleted file mode 100644 index 254d7203b21f2..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).symbols +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// - -=== emitArrowFunctionWhenUsingArguments05.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) - - var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types deleted file mode 100644 index 39ab21aa27494..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es2015).types +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// - -=== emitArrowFunctionWhenUsingArguments05.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => arguments; ->a : () => any -> : ^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt deleted file mode 100644 index 1caab7bc40f98..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments05.ts(2,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments05.ts (1 errors) ==== - function f(arguments) { - var a = () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).js deleted file mode 100644 index 79c891f4409e9..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// - -//// [emitArrowFunctionWhenUsingArguments05.ts] -function f(arguments) { - var a = () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments05.js] -function f(arguments) { - var a = function () { return arguments; }; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).symbols deleted file mode 100644 index 1bb2d9b8d32b3..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).symbols +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// - -=== emitArrowFunctionWhenUsingArguments05.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11)) - - var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7)) ->arguments : Symbol(arguments) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).types deleted file mode 100644 index 69a46a305c427..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05(target=es5).types +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts] //// - -=== emitArrowFunctionWhenUsingArguments05.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => arguments; ->a : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt deleted file mode 100644 index 77b7c2f969d41..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments05_ES6.ts (0 errors) ==== - function f(arguments) { - var a = () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.js deleted file mode 100644 index 8ba62e67f2e6a..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments05_ES6.ts] -function f(arguments) { - var a = () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments05_ES6.js] -function f(arguments) { - var a = () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.symbols deleted file mode 100644 index 4541c98910354..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.symbols +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments05_ES6.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 11)) - - var a = () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 11)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types deleted file mode 100644 index 121ea6447a88a..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments05_ES6.types +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments05_ES6.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => arguments; ->a : () => any -> : ^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt deleted file mode 100644 index 161eae697b9d7..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments06.ts (0 errors) ==== - function f(arguments) { - var a = () => () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).js deleted file mode 100644 index 93ab665ea5d62..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// - -//// [emitArrowFunctionWhenUsingArguments06.ts] -function f(arguments) { - var a = () => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments06.js] -function f(arguments) { - var a = () => () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).symbols deleted file mode 100644 index b9bf50b481ae3..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).symbols +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// - -=== emitArrowFunctionWhenUsingArguments06.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) - - var a = () => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types deleted file mode 100644 index c584b87a2998c..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es2015).types +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// - -=== emitArrowFunctionWhenUsingArguments06.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => () => arguments; ->a : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => () => arguments : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt deleted file mode 100644 index 6453091c1d0ee..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments06.ts(2,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments06.ts (1 errors) ==== - function f(arguments) { - var a = () => () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).js deleted file mode 100644 index 5492bb1d00e34..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// - -//// [emitArrowFunctionWhenUsingArguments06.ts] -function f(arguments) { - var a = () => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments06.js] -function f(arguments) { - var a = function () { return function () { return arguments; }; }; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).symbols deleted file mode 100644 index 9b8370f3f0e49..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).symbols +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// - -=== emitArrowFunctionWhenUsingArguments06.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11)) - - var a = () => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7)) ->arguments : Symbol(arguments) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).types deleted file mode 100644 index ee4e78ccfd433..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06(target=es5).types +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts] //// - -=== emitArrowFunctionWhenUsingArguments06.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => () => arguments; ->a : () => () => IArguments -> : ^^^^^^^^^^^^^^^^^^^^^^ ->() => () => arguments : () => () => IArguments -> : ^^^^^^^^^^^^^^^^^^^^^^ ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt deleted file mode 100644 index be374a6d4f8c4..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments06_ES6.ts (0 errors) ==== - function f(arguments) { - var a = () => () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.js deleted file mode 100644 index 4e9e45b715a5e..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments06_ES6.ts] -function f(arguments) { - var a = () => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments06_ES6.js] -function f(arguments) { - var a = () => () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.symbols deleted file mode 100644 index 0f0037ef64df7..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.symbols +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments06_ES6.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 11)) - - var a = () => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 11)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types deleted file mode 100644 index 18aed6b01e027..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments06_ES6.types +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments06_ES6.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => () => arguments; ->a : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => () => arguments : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt deleted file mode 100644 index ddf2a824c5a16..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments07.ts (0 errors) ==== - function f(arguments) { - var a = (arguments) => () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).js deleted file mode 100644 index 8371f0eca726c..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// - -//// [emitArrowFunctionWhenUsingArguments07.ts] -function f(arguments) { - var a = (arguments) => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments07.js] -function f(arguments) { - var a = (arguments) => () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).symbols deleted file mode 100644 index bbfaf7221f80b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).symbols +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// - -=== emitArrowFunctionWhenUsingArguments07.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 11)) - - var a = (arguments) => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types deleted file mode 100644 index 6f1de7cc685ae..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es2015).types +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// - -=== emitArrowFunctionWhenUsingArguments07.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = (arguments) => () => arguments; ->a : (arguments: any) => () => any -> : ^ ^^^^^^^^^^^^^^^^^^^ ->(arguments) => () => arguments : (arguments: any) => () => any -> : ^ ^^^^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt deleted file mode 100644 index 6f84ae69d69ca..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments07.ts(2,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments07.ts (1 errors) ==== - function f(arguments) { - var a = (arguments) => () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).js deleted file mode 100644 index 75ca5939bccd2..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// - -//// [emitArrowFunctionWhenUsingArguments07.ts] -function f(arguments) { - var a = (arguments) => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments07.js] -function f(arguments) { - var a = function (arguments) { return function () { return arguments; }; }; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).symbols deleted file mode 100644 index 4bccf38d83dab..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).symbols +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// - -=== emitArrowFunctionWhenUsingArguments07.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 0, 11)) - - var a = (arguments) => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13)) ->arguments : Symbol(arguments) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).types deleted file mode 100644 index 36785c96f6a32..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07(target=es5).types +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts] //// - -=== emitArrowFunctionWhenUsingArguments07.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = (arguments) => () => arguments; ->a : (arguments: any) => () => IArguments -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ->(arguments) => () => arguments : (arguments: any) => () => IArguments -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt deleted file mode 100644 index adb49935c96f8..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments07_ES6.ts (0 errors) ==== - function f(arguments) { - var a = (arguments) => () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.js deleted file mode 100644 index e9ffad32a6d6a..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments07_ES6.ts] -function f(arguments) { - var a = (arguments) => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments07_ES6.js] -function f(arguments) { - var a = (arguments) => () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.symbols deleted file mode 100644 index e0ad9357de250..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.symbols +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments07_ES6.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 0, 11)) - - var a = (arguments) => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 13)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 13)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types deleted file mode 100644 index fcd4f4569c791..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments07_ES6.types +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments07_ES6.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = (arguments) => () => arguments; ->a : (arguments: any) => () => any -> : ^ ^^^^^^^^^^^^^^^^^^^ ->(arguments) => () => arguments : (arguments: any) => () => any -> : ^ ^^^^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt deleted file mode 100644 index 87b979ac40825..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments08.ts (0 errors) ==== - function f(arguments) { - var a = () => (arguments) => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).js deleted file mode 100644 index 750d98ae7853b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// - -//// [emitArrowFunctionWhenUsingArguments08.ts] -function f(arguments) { - var a = () => (arguments) => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments08.js] -function f(arguments) { - var a = () => (arguments) => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).symbols deleted file mode 100644 index b06a65d46f817..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).symbols +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// - -=== emitArrowFunctionWhenUsingArguments08.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 11)) - - var a = () => (arguments) => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types deleted file mode 100644 index 90a6b46b58d41..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es2015).types +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// - -=== emitArrowFunctionWhenUsingArguments08.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => (arguments) => arguments; ->a : () => (arguments: any) => any -> : ^^^^^^^ ^^^^^^^^^^^ ->() => (arguments) => arguments : () => (arguments: any) => any -> : ^^^^^^^ ^^^^^^^^^^^ ->(arguments) => arguments : (arguments: any) => any -> : ^ ^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt deleted file mode 100644 index baacb6d06c003..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments08.ts (0 errors) ==== - function f(arguments) { - var a = () => (arguments) => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).js deleted file mode 100644 index 51f14ad3f5ab1..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// - -//// [emitArrowFunctionWhenUsingArguments08.ts] -function f(arguments) { - var a = () => (arguments) => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments08.js] -function f(arguments) { - var a = function () { return function (arguments) { return arguments; }; }; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).symbols deleted file mode 100644 index b06a65d46f817..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).symbols +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// - -=== emitArrowFunctionWhenUsingArguments08.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 0, 11)) - - var a = () => (arguments) => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08.ts, 1, 19)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).types deleted file mode 100644 index 90a6b46b58d41..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08(target=es5).types +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts] //// - -=== emitArrowFunctionWhenUsingArguments08.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => (arguments) => arguments; ->a : () => (arguments: any) => any -> : ^^^^^^^ ^^^^^^^^^^^ ->() => (arguments) => arguments : () => (arguments: any) => any -> : ^^^^^^^ ^^^^^^^^^^^ ->(arguments) => arguments : (arguments: any) => any -> : ^ ^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt deleted file mode 100644 index 6ccd51bc546da..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments08_ES6.ts (0 errors) ==== - function f(arguments) { - var a = () => (arguments) => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.js deleted file mode 100644 index 63b6b875386c4..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments08_ES6.ts] -function f(arguments) { - var a = () => (arguments) => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments08_ES6.js] -function f(arguments) { - var a = () => (arguments) => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.symbols deleted file mode 100644 index fbc0487329377..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.symbols +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments08_ES6.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 0, 11)) - - var a = () => (arguments) => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 19)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments08_ES6.ts, 1, 19)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types deleted file mode 100644 index aeea922a665ba..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments08_ES6.types +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments08_ES6.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var a = () => (arguments) => arguments; ->a : () => (arguments: any) => any -> : ^^^^^^^ ^^^^^^^^^^^ ->() => (arguments) => arguments : () => (arguments: any) => any -> : ^^^^^^^ ^^^^^^^^^^^ ->(arguments) => arguments : (arguments: any) => any -> : ^ ^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt deleted file mode 100644 index c518b32e87b6b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments11.ts (0 errors) ==== - function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).js deleted file mode 100644 index d6919f26aa88e..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// - -//// [emitArrowFunctionWhenUsingArguments11.ts] -function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments11.js] -function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).symbols deleted file mode 100644 index 96debf73c8304..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).symbols +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// - -=== emitArrowFunctionWhenUsingArguments11.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) - - var _arguments = 10; ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 1, 7)) - - var a = () => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11.ts, 2, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types deleted file mode 100644 index 4ce4bc6cec552..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es2015).types +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// - -=== emitArrowFunctionWhenUsingArguments11.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var _arguments = 10; ->_arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - - var a = () => () => arguments; ->a : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => () => arguments : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt deleted file mode 100644 index 91facbc8420fd..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments11.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments11.ts (1 errors) ==== - function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).js deleted file mode 100644 index 85de56283837c..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// - -//// [emitArrowFunctionWhenUsingArguments11.ts] -function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments11.js] -function f(arguments) { - var _arguments = 10; - var a = function () { return function () { return arguments; }; }; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).symbols deleted file mode 100644 index c554e449a98f7..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).symbols +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// - -=== emitArrowFunctionWhenUsingArguments11.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11)) - - var _arguments = 10; ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 1, 7)) - - var a = () => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11.ts, 2, 7)) ->arguments : Symbol(arguments) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).types deleted file mode 100644 index 94009bca9e4ad..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11(target=es5).types +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts] //// - -=== emitArrowFunctionWhenUsingArguments11.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var _arguments = 10; ->_arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - - var a = () => () => arguments; ->a : () => () => IArguments -> : ^^^^^^^^^^^^^^^^^^^^^^ ->() => () => arguments : () => () => IArguments -> : ^^^^^^^^^^^^^^^^^^^^^^ ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt deleted file mode 100644 index 922866d404512..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments11_ES6.ts (0 errors) ==== - function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.js deleted file mode 100644 index 2d8a1f65a34e7..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments11_ES6.ts] -function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; -} - -//// [emitArrowFunctionWhenUsingArguments11_ES6.js] -function f(arguments) { - var _arguments = 10; - var a = () => () => arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.symbols deleted file mode 100644 index 9f40cf1de3a29..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.symbols +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments11_ES6.ts === -function f(arguments) { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 0)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 11)) - - var _arguments = 10; ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 1, 7)) - - var a = () => () => arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 2, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 11)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types deleted file mode 100644 index 2ec0fa53e0742..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments11_ES6.types +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments11_ES6.ts === -function f(arguments) { ->f : (arguments: any) => void -> : ^ ^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ - - var _arguments = 10; ->_arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - - var a = () => () => arguments; ->a : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => () => arguments : () => () => any -> : ^^^^^^^^^^^^^^^ ->() => arguments : () => any -> : ^^^^^^^^^ ->arguments : any -> : ^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt deleted file mode 100644 index 77b90781e1155..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments13.ts (0 errors) ==== - function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).js deleted file mode 100644 index 5ca8028ea71b2..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// - -//// [emitArrowFunctionWhenUsingArguments13.ts] -function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; -} - -//// [emitArrowFunctionWhenUsingArguments13.js] -function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).symbols deleted file mode 100644 index c326e772a4203..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).symbols +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// - -=== emitArrowFunctionWhenUsingArguments13.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13.ts, 0, 0)) - - var _arguments = 10; ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) - - var a = (arguments) => () => _arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 13)) ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types deleted file mode 100644 index 90f2c840dc66c..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es2015).types +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// - -=== emitArrowFunctionWhenUsingArguments13.ts === -function f() { ->f : () => void -> : ^^^^^^^^^^ - - var _arguments = 10; ->_arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - - var a = (arguments) => () => _arguments; ->a : (arguments: any) => () => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ->(arguments) => () => _arguments : (arguments: any) => () => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->() => _arguments : () => number -> : ^^^^^^^^^^^^ ->_arguments : number -> : ^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt deleted file mode 100644 index fe9761c698daa..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments13.ts (0 errors) ==== - function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).js deleted file mode 100644 index 0f80793d82cbf..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// - -//// [emitArrowFunctionWhenUsingArguments13.ts] -function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; -} - -//// [emitArrowFunctionWhenUsingArguments13.js] -function f() { - var _arguments = 10; - var a = function (arguments) { return function () { return _arguments; }; }; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).symbols deleted file mode 100644 index c326e772a4203..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).symbols +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// - -=== emitArrowFunctionWhenUsingArguments13.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13.ts, 0, 0)) - - var _arguments = 10; ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) - - var a = (arguments) => () => _arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 2, 13)) ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13.ts, 1, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).types deleted file mode 100644 index 90f2c840dc66c..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13(target=es5).types +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts] //// - -=== emitArrowFunctionWhenUsingArguments13.ts === -function f() { ->f : () => void -> : ^^^^^^^^^^ - - var _arguments = 10; ->_arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - - var a = (arguments) => () => _arguments; ->a : (arguments: any) => () => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ->(arguments) => () => _arguments : (arguments: any) => () => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->() => _arguments : () => number -> : ^^^^^^^^^^^^ ->_arguments : number -> : ^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt deleted file mode 100644 index 04eea8a41ee27..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments13_ES6.ts (0 errors) ==== - function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.js deleted file mode 100644 index 8182b097389d4..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments13_ES6.ts] -function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; -} - -//// [emitArrowFunctionWhenUsingArguments13_ES6.js] -function f() { - var _arguments = 10; - var a = (arguments) => () => _arguments; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.symbols deleted file mode 100644 index 0b1107b185b8b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.symbols +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments13_ES6.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 0, 0)) - - var _arguments = 10; ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 1, 7)) - - var a = (arguments) => () => _arguments; ->a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 2, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 2, 13)) ->_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments13_ES6.ts, 1, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types deleted file mode 100644 index c3f12720f0f3c..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments13_ES6.types +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments13_ES6.ts === -function f() { ->f : () => void -> : ^^^^^^^^^^ - - var _arguments = 10; ->_arguments : number -> : ^^^^^^ ->10 : 10 -> : ^^ - - var a = (arguments) => () => _arguments; ->a : (arguments: any) => () => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ->(arguments) => () => _arguments : (arguments: any) => () => number -> : ^ ^^^^^^^^^^^^^^^^^^^^^^ ->arguments : any -> : ^^^ ->() => _arguments : () => number -> : ^^^^^^^^^^^^ ->_arguments : number -> : ^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt deleted file mode 100644 index 45701db0e80a1..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments14.ts (0 errors) ==== - function f() { - if (Math.random()) { - const arguments = 100; - return () => arguments; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).js deleted file mode 100644 index 4150c6c440a08..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).js +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// - -//// [emitArrowFunctionWhenUsingArguments14.ts] -function f() { - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} - -//// [emitArrowFunctionWhenUsingArguments14.js] -function f() { - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).symbols deleted file mode 100644 index 790f5dc7a16d2..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).symbols +++ /dev/null @@ -1,18 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// - -=== emitArrowFunctionWhenUsingArguments14.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14.ts, 0, 0)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - const arguments = 100; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) - - return () => arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).types deleted file mode 100644 index 63f66daca2a4b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es2015).types +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// - -=== emitArrowFunctionWhenUsingArguments14.ts === -function f() { ->f : () => () => number -> : ^^^^^^^^^^^^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - const arguments = 100; ->arguments : 100 -> : ^^^ ->100 : 100 -> : ^^^ - - return () => arguments; ->() => arguments : () => number -> : ^^^^^^^^^^^^ ->arguments : 100 -> : ^^^ - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt deleted file mode 100644 index ee4d293da7a02..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments14.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments14.ts (1 errors) ==== - function f() { - if (Math.random()) { - const arguments = 100; - return () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).js deleted file mode 100644 index 4685edabaa3c0..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).js +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// - -//// [emitArrowFunctionWhenUsingArguments14.ts] -function f() { - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} - -//// [emitArrowFunctionWhenUsingArguments14.js] -function f() { - if (Math.random()) { - var arguments_1 = 100; - return function () { return arguments; }; - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).symbols deleted file mode 100644 index d68e36476a445..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).symbols +++ /dev/null @@ -1,18 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// - -=== emitArrowFunctionWhenUsingArguments14.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14.ts, 0, 0)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - const arguments = 100; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13)) - - return () => arguments; ->arguments : Symbol(arguments) - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).types deleted file mode 100644 index 4f265d5bc112b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14(target=es5).types +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts] //// - -=== emitArrowFunctionWhenUsingArguments14.ts === -function f() { ->f : () => () => IArguments -> : ^^^^^^^^^^^^^^^^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - const arguments = 100; ->arguments : 100 -> : ^^^ ->100 : 100 -> : ^^^ - - return () => arguments; ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt deleted file mode 100644 index 1482618236673..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments14_ES6.ts (0 errors) ==== - function f() { - if (Math.random()) { - let arguments = 100; - return () => arguments; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.js deleted file mode 100644 index 1fd80c55f2070..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.js +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments14_ES6.ts] -function f() { - if (Math.random()) { - let arguments = 100; - return () => arguments; - } -} - -//// [emitArrowFunctionWhenUsingArguments14_ES6.js] -function f() { - if (Math.random()) { - let arguments = 100; - return () => arguments; - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols deleted file mode 100644 index bd672ba012041..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols +++ /dev/null @@ -1,18 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments14_ES6.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 0, 0)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - let arguments = 100; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 2, 11)) - - return () => arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 2, 11)) - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.types deleted file mode 100644 index a22eb9a22b3b7..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.types +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments14_ES6.ts === -function f() { ->f : () => () => number -> : ^^^^^^^^^^^^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - let arguments = 100; ->arguments : number -> : ^^^^^^ ->100 : 100 -> : ^^^ - - return () => arguments; ->() => arguments : () => number -> : ^^^^^^^^^^^^ ->arguments : number -> : ^^^^^^ - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt deleted file mode 100644 index 12af555d93a80..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments15.ts (0 errors) ==== - function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).js deleted file mode 100644 index 3c7ae3d1d047d..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// - -//// [emitArrowFunctionWhenUsingArguments15.ts] -function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} - -//// [emitArrowFunctionWhenUsingArguments15.js] -function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).symbols deleted file mode 100644 index e7792c1e733c7..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// - -=== emitArrowFunctionWhenUsingArguments15.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15.ts, 0, 0)) - - var arguments = "hello"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 1, 7)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - const arguments = 100; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) - - return () => arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).types deleted file mode 100644 index c83d8ca35e8b5..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es2015).types +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// - -=== emitArrowFunctionWhenUsingArguments15.ts === -function f() { ->f : () => () => number -> : ^^^^^^^^^^^^^^^^^^ - - var arguments = "hello"; ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - const arguments = 100; ->arguments : 100 -> : ^^^ ->100 : 100 -> : ^^^ - - return () => arguments; ->() => arguments : () => number -> : ^^^^^^^^^^^^ ->arguments : 100 -> : ^^^ - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt deleted file mode 100644 index 5f63621cb79be..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments15.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments15.ts (1 errors) ==== - function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).js deleted file mode 100644 index 8e320e0253202..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// - -//// [emitArrowFunctionWhenUsingArguments15.ts] -function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} - -//// [emitArrowFunctionWhenUsingArguments15.js] -function f() { - var arguments = "hello"; - if (Math.random()) { - var arguments_1 = 100; - return function () { return arguments; }; - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).symbols deleted file mode 100644 index 561af3e8bcdbd..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// - -=== emitArrowFunctionWhenUsingArguments15.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15.ts, 0, 0)) - - var arguments = "hello"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 1, 7)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - const arguments = 100; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13)) - - return () => arguments; ->arguments : Symbol(arguments) - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).types deleted file mode 100644 index f8f496216b06a..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15(target=es5).types +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts] //// - -=== emitArrowFunctionWhenUsingArguments15.ts === -function f() { ->f : () => () => IArguments -> : ^^^^^^^^^^^^^^^^^^^^^^ - - var arguments = "hello"; ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - const arguments = 100; ->arguments : 100 -> : ^^^ ->100 : 100 -> : ^^^ - - return () => arguments; ->() => arguments : () => IArguments -> : ^^^^^^^^^^^^^^^^ ->arguments : IArguments -> : ^^^^^^^^^^ - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt deleted file mode 100644 index cc6085a6839b8..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments15_ES6.ts (0 errors) ==== - function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.js deleted file mode 100644 index 5927b5a452f51..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments15_ES6.ts] -function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} - -//// [emitArrowFunctionWhenUsingArguments15_ES6.js] -function f() { - var arguments = "hello"; - if (Math.random()) { - const arguments = 100; - return () => arguments; - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols deleted file mode 100644 index 34da49790434e..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments15_ES6.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 0, 0)) - - var arguments = "hello"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 1, 7)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - const arguments = 100; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 3, 13)) - - return () => arguments; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 3, 13)) - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types deleted file mode 100644 index 7fb3a830d44a9..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.types +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments15_ES6.ts === -function f() { ->f : () => () => number -> : ^^^^^^^^^^^^^^^^^^ - - var arguments = "hello"; ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - const arguments = 100; ->arguments : 100 -> : ^^^ ->100 : 100 -> : ^^^ - - return () => arguments; ->() => arguments : () => number -> : ^^^^^^^^^^^^ ->arguments : 100 -> : ^^^ - } -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt deleted file mode 100644 index a64862cee8af0..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments16.ts (0 errors) ==== - function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).js deleted file mode 100644 index 5ac3f2f5b157a..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// - -//// [emitArrowFunctionWhenUsingArguments16.ts] -function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} - -//// [emitArrowFunctionWhenUsingArguments16.js] -function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).symbols deleted file mode 100644 index 03ff76ba6952b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).symbols +++ /dev/null @@ -1,20 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// - -=== emitArrowFunctionWhenUsingArguments16.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16.ts, 0, 0)) - - var arguments = "hello"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - return () => arguments[0]; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) - } - var arguments = "world"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).types deleted file mode 100644 index 780601d9fc530..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es2015).types +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// - -=== emitArrowFunctionWhenUsingArguments16.ts === -function f() { ->f : () => () => string -> : ^^^^^^^^^^^^^^^^^^ - - var arguments = "hello"; ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - return () => arguments[0]; ->() => arguments[0] : () => string -> : ^^^^^^^^^^^^ ->arguments[0] : string -> : ^^^^^^ ->arguments : string -> : ^^^^^^ ->0 : 0 -> : ^ - } - var arguments = "world"; ->arguments : string -> : ^^^^^^ ->"world" : "world" -> : ^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt deleted file mode 100644 index ffe6b821d4b12..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments16.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments16.ts (1 errors) ==== - function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } - var arguments = "world"; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).js deleted file mode 100644 index 15fcfde8676ca..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// - -//// [emitArrowFunctionWhenUsingArguments16.ts] -function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} - -//// [emitArrowFunctionWhenUsingArguments16.js] -function f() { - var arguments = "hello"; - if (Math.random()) { - return function () { return arguments[0]; }; - } - var arguments = "world"; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).symbols deleted file mode 100644 index 586e68c176a9b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).symbols +++ /dev/null @@ -1,20 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// - -=== emitArrowFunctionWhenUsingArguments16.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16.ts, 0, 0)) - - var arguments = "hello"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - return () => arguments[0]; ->arguments : Symbol(arguments) - } - var arguments = "world"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).types deleted file mode 100644 index e5ffd84d04bc3..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16(target=es5).types +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts] //// - -=== emitArrowFunctionWhenUsingArguments16.ts === -function f() { ->f : () => () => any -> : ^^^^^^^^^^^^^^^ - - var arguments = "hello"; ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - return () => arguments[0]; ->() => arguments[0] : () => any -> : ^^^^^^^^^ ->arguments[0] : any -> : ^^^ ->arguments : IArguments -> : ^^^^^^^^^^ ->0 : 0 -> : ^ - } - var arguments = "world"; ->arguments : string -> : ^^^^^^ ->"world" : "world" -> : ^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt deleted file mode 100644 index 53f19b94bab6f..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments16_ES6.ts (0 errors) ==== - function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.js deleted file mode 100644 index 143355efe1f2b..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments16_ES6.ts] -function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} - -//// [emitArrowFunctionWhenUsingArguments16_ES6.js] -function f() { - var arguments = "hello"; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols deleted file mode 100644 index 6c65b5b89bbd0..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols +++ /dev/null @@ -1,20 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments16_ES6.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 0, 0)) - - var arguments = "hello"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - return () => arguments[0]; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) - } - var arguments = "world"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 5, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types deleted file mode 100644 index 8ddc725812a31..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.types +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments16_ES6.ts === -function f() { ->f : () => () => string -> : ^^^^^^^^^^^^^^^^^^ - - var arguments = "hello"; ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - return () => arguments[0]; ->() => arguments[0] : () => string -> : ^^^^^^^^^^^^ ->arguments[0] : string -> : ^^^^^^ ->arguments : string -> : ^^^^^^ ->0 : 0 -> : ^ - } - var arguments = "world"; ->arguments : string -> : ^^^^^^ ->"world" : "world" -> : ^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt deleted file mode 100644 index 4e373e7f84c3f..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments17.ts (0 errors) ==== - function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).js deleted file mode 100644 index e64cdc282d316..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// - -//// [emitArrowFunctionWhenUsingArguments17.ts] -function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} - -//// [emitArrowFunctionWhenUsingArguments17.js] -function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).symbols deleted file mode 100644 index afab9d24135d9..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// - -=== emitArrowFunctionWhenUsingArguments17.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17.ts, 0, 0)) - - var { arguments } = { arguments: "hello" }; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 25)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - return () => arguments[0]; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) - } - var arguments = "world"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).types deleted file mode 100644 index 08520075773a1..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es2015).types +++ /dev/null @@ -1,43 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// - -=== emitArrowFunctionWhenUsingArguments17.ts === -function f() { ->f : () => () => string -> : ^^^^^^^^^^^^^^^^^^ - - var { arguments } = { arguments: "hello" }; ->arguments : string -> : ^^^^^^ ->{ arguments: "hello" } : { arguments: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - return () => arguments[0]; ->() => arguments[0] : () => string -> : ^^^^^^^^^^^^ ->arguments[0] : string -> : ^^^^^^ ->arguments : string -> : ^^^^^^ ->0 : 0 -> : ^ - } - var arguments = "world"; ->arguments : string -> : ^^^^^^ ->"world" : "world" -> : ^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt deleted file mode 100644 index 1a1f301ffbd83..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -emitArrowFunctionWhenUsingArguments17.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments17.ts (1 errors) ==== - function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - ~~~~~~~~~ -!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression. - } - var arguments = "world"; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).js deleted file mode 100644 index 9d5574d864de9..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// - -//// [emitArrowFunctionWhenUsingArguments17.ts] -function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} - -//// [emitArrowFunctionWhenUsingArguments17.js] -function f() { - var arguments = { arguments: "hello" }.arguments; - if (Math.random()) { - return function () { return arguments[0]; }; - } - var arguments = "world"; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).symbols deleted file mode 100644 index 599a54500165f..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// - -=== emitArrowFunctionWhenUsingArguments17.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17.ts, 0, 0)) - - var { arguments } = { arguments: "hello" }; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 25)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - return () => arguments[0]; ->arguments : Symbol(arguments) - } - var arguments = "world"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).types deleted file mode 100644 index d9d6a3594c278..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17(target=es5).types +++ /dev/null @@ -1,43 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts] //// - -=== emitArrowFunctionWhenUsingArguments17.ts === -function f() { ->f : () => () => any -> : ^^^^^^^^^^^^^^^ - - var { arguments } = { arguments: "hello" }; ->arguments : string -> : ^^^^^^ ->{ arguments: "hello" } : { arguments: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - return () => arguments[0]; ->() => arguments[0] : () => any -> : ^^^^^^^^^ ->arguments[0] : any -> : ^^^ ->arguments : IArguments -> : ^^^^^^^^^^ ->0 : 0 -> : ^ - } - var arguments = "world"; ->arguments : string -> : ^^^^^^ ->"world" : "world" -> : ^^^^^^^ -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt deleted file mode 100644 index bfbe1991c9634..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== emitArrowFunctionWhenUsingArguments17_ES6.ts (0 errors) ==== - function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; - } \ No newline at end of file diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.js deleted file mode 100644 index 1abdb2a0c4049..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// - -//// [emitArrowFunctionWhenUsingArguments17_ES6.ts] -function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} - -//// [emitArrowFunctionWhenUsingArguments17_ES6.js] -function f() { - var { arguments } = { arguments: "hello" }; - if (Math.random()) { - return () => arguments[0]; - } - var arguments = "world"; -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols deleted file mode 100644 index 1d1ea3732bc75..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments17_ES6.ts === -function f() { ->f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 0, 0)) - - var { arguments } = { arguments: "hello" }; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 25)) - - if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - - return () => arguments[0]; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) - } - var arguments = "world"; ->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 5, 7)) -} diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types deleted file mode 100644 index 52cc042304621..0000000000000 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.types +++ /dev/null @@ -1,43 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts] //// - -=== emitArrowFunctionWhenUsingArguments17_ES6.ts === -function f() { ->f : () => () => string -> : ^^^^^^^^^^^^^^^^^^ - - var { arguments } = { arguments: "hello" }; ->arguments : string -> : ^^^^^^ ->{ arguments: "hello" } : { arguments: string; } -> : ^^^^^^^^^^^^^^^^^^^^^^ ->arguments : string -> : ^^^^^^ ->"hello" : "hello" -> : ^^^^^^^ - - if (Math.random()) { ->Math.random() : number -> : ^^^^^^ ->Math.random : () => number -> : ^^^^^^ ->Math : Math -> : ^^^^ ->random : () => number -> : ^^^^^^ - - return () => arguments[0]; ->() => arguments[0] : () => string -> : ^^^^^^^^^^^^ ->arguments[0] : string -> : ^^^^^^ ->arguments : string -> : ^^^^^^ ->0 : 0 -> : ^ - } - var arguments = "world"; ->arguments : string -> : ^^^^^^ ->"world" : "world" -> : ^^^^^^^ -} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt deleted file mode 100644 index 20ce2004d602a..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).errors.txt +++ /dev/null @@ -1,60 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -es5-asyncFunctionWithStatements.ts(10,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(10,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -es5-asyncFunctionWithStatements.ts(16,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(16,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== es5-asyncFunctionWithStatements.ts (8 errors) ==== - declare var x, y, z, a, b, c; - - async function withStatement0() { - with (x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - y; - } - } - - async function withStatement1() { - with (await x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - y; - } - } - - async function withStatement2() { - with (x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - a; - await y; - b; - } - } - - async function withStatement3() { - with (x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - with (z) { - a; - await y; - b; - } - } - } \ No newline at end of file diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).js b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).js deleted file mode 100644 index 4f6e75aeff5ed..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).js +++ /dev/null @@ -1,70 +0,0 @@ -//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// - -//// [es5-asyncFunctionWithStatements.ts] -declare var x, y, z, a, b, c; - -async function withStatement0() { - with (x) { - y; - } -} - -async function withStatement1() { - with (await x) { - y; - } -} - -async function withStatement2() { - with (x) { - a; - await y; - b; - } -} - -async function withStatement3() { - with (x) { - with (z) { - a; - await y; - b; - } - } -} - -//// [es5-asyncFunctionWithStatements.js] -function withStatement0() { - return __awaiter(this, void 0, void 0, function* () { - with (x) { - y; - } - }); -} -function withStatement1() { - return __awaiter(this, void 0, void 0, function* () { - with (yield x) { - y; - } - }); -} -function withStatement2() { - return __awaiter(this, void 0, void 0, function* () { - with (x) { - a; - yield y; - b; - } - }); -} -function withStatement3() { - return __awaiter(this, void 0, void 0, function* () { - with (x) { - with (z) { - a; - yield y; - b; - } - } - }); -} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).symbols b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).symbols deleted file mode 100644 index 13a98479a6dbb..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).symbols +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// - -=== es5-asyncFunctionWithStatements.ts === -declare var x, y, z, a, b, c; ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) ->y : Symbol(y, Decl(es5-asyncFunctionWithStatements.ts, 0, 14)) ->z : Symbol(z, Decl(es5-asyncFunctionWithStatements.ts, 0, 17)) ->a : Symbol(a, Decl(es5-asyncFunctionWithStatements.ts, 0, 20)) ->b : Symbol(b, Decl(es5-asyncFunctionWithStatements.ts, 0, 23)) ->c : Symbol(c, Decl(es5-asyncFunctionWithStatements.ts, 0, 26)) - -async function withStatement0() { ->withStatement0 : Symbol(withStatement0, Decl(es5-asyncFunctionWithStatements.ts, 0, 29)) - - with (x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - y; - } -} - -async function withStatement1() { ->withStatement1 : Symbol(withStatement1, Decl(es5-asyncFunctionWithStatements.ts, 6, 1)) - - with (await x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - y; - } -} - -async function withStatement2() { ->withStatement2 : Symbol(withStatement2, Decl(es5-asyncFunctionWithStatements.ts, 12, 1)) - - with (x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - a; - await y; - b; - } -} - -async function withStatement3() { ->withStatement3 : Symbol(withStatement3, Decl(es5-asyncFunctionWithStatements.ts, 20, 1)) - - with (x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - with (z) { - a; - await y; - b; - } - } -} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).types b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).types deleted file mode 100644 index cc171bfdef044..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es2015).types +++ /dev/null @@ -1,99 +0,0 @@ -//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// - -=== es5-asyncFunctionWithStatements.ts === -declare var x, y, z, a, b, c; ->x : any -> : ^^^ ->y : any -> : ^^^ ->z : any -> : ^^^ ->a : any -> : ^^^ ->b : any -> : ^^^ ->c : any -> : ^^^ - -async function withStatement0() { ->withStatement0 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (x) { ->x : any -> : ^^^ - - y; ->y : any -> : ^^^ - } -} - -async function withStatement1() { ->withStatement1 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (await x) { ->await x : any -> : ^^^ ->x : any -> : ^^^ - - y; ->y : any -> : ^^^ - } -} - -async function withStatement2() { ->withStatement2 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (x) { ->x : any -> : ^^^ - - a; ->a : any -> : ^^^ - - await y; ->await y : any -> : ^^^ ->y : any -> : ^^^ - - b; ->b : any -> : ^^^ - } -} - -async function withStatement3() { ->withStatement3 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (x) { ->x : any -> : ^^^ - - with (z) { ->z : any -> : ^^^ - - a; ->a : any -> : ^^^ - - await y; ->await y : any -> : ^^^ ->y : any -> : ^^^ - - b; ->b : any -> : ^^^ - } - } -} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt deleted file mode 100644 index f91911577485c..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).errors.txt +++ /dev/null @@ -1,62 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -es5-asyncFunctionWithStatements.ts(4,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(4,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -es5-asyncFunctionWithStatements.ts(10,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(10,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -es5-asyncFunctionWithStatements.ts(16,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(16,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -es5-asyncFunctionWithStatements.ts(24,5): error TS1300: 'with' statements are not allowed in an async function block. -es5-asyncFunctionWithStatements.ts(24,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== es5-asyncFunctionWithStatements.ts (8 errors) ==== - declare var x, y, z, a, b, c; - - async function withStatement0() { - with (x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - y; - } - } - - async function withStatement1() { - with (await x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - y; - } - } - - async function withStatement2() { - with (x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - a; - await y; - b; - } - } - - async function withStatement3() { - with (x) { - ~~~~ -!!! error TS1300: 'with' statements are not allowed in an async function block. - ~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - with (z) { - a; - await y; - b; - } - } - } \ No newline at end of file diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).js b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).js deleted file mode 100644 index efa005107e9b2..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).js +++ /dev/null @@ -1,120 +0,0 @@ -//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// - -//// [es5-asyncFunctionWithStatements.ts] -declare var x, y, z, a, b, c; - -async function withStatement0() { - with (x) { - y; - } -} - -async function withStatement1() { - with (await x) { - y; - } -} - -async function withStatement2() { - with (x) { - a; - await y; - b; - } -} - -async function withStatement3() { - with (x) { - with (z) { - a; - await y; - b; - } - } -} - -//// [es5-asyncFunctionWithStatements.js] -function withStatement0() { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - with (x) { - y; - } - return [2 /*return*/]; - }); - }); -} -function withStatement1() { - return __awaiter(this, void 0, void 0, function () { - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, x]; - case 1: - _a = _b.sent(); - _b.label = 2; - case 2: - with (_a) { - y; - } - _b.label = 3; - case 3: return [2 /*return*/]; - } - }); - }); -} -function withStatement2() { - return __awaiter(this, void 0, void 0, function () { - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = x; - _b.label = 1; - case 1: with (_a) { - a; - return [4 /*yield*/, y]; - } - case 2: - with (_a) { - _b.sent(); - b; - } - _b.label = 3; - case 3: return [2 /*return*/]; - } - }); - }); -} -function withStatement3() { - return __awaiter(this, void 0, void 0, function () { - var _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - _a = x; - _c.label = 1; - case 1: - with (_a) { - _b = z; - } - _c.label = 2; - case 2: with (_a) { - with (_b) { - a; - return [4 /*yield*/, y]; - } - } - case 3: - with (_a) { - with (_b) { - _c.sent(); - b; - } - } - _c.label = 4; - case 4: return [2 /*return*/]; - } - }); - }); -} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).symbols b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).symbols deleted file mode 100644 index 13a98479a6dbb..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).symbols +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// - -=== es5-asyncFunctionWithStatements.ts === -declare var x, y, z, a, b, c; ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) ->y : Symbol(y, Decl(es5-asyncFunctionWithStatements.ts, 0, 14)) ->z : Symbol(z, Decl(es5-asyncFunctionWithStatements.ts, 0, 17)) ->a : Symbol(a, Decl(es5-asyncFunctionWithStatements.ts, 0, 20)) ->b : Symbol(b, Decl(es5-asyncFunctionWithStatements.ts, 0, 23)) ->c : Symbol(c, Decl(es5-asyncFunctionWithStatements.ts, 0, 26)) - -async function withStatement0() { ->withStatement0 : Symbol(withStatement0, Decl(es5-asyncFunctionWithStatements.ts, 0, 29)) - - with (x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - y; - } -} - -async function withStatement1() { ->withStatement1 : Symbol(withStatement1, Decl(es5-asyncFunctionWithStatements.ts, 6, 1)) - - with (await x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - y; - } -} - -async function withStatement2() { ->withStatement2 : Symbol(withStatement2, Decl(es5-asyncFunctionWithStatements.ts, 12, 1)) - - with (x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - a; - await y; - b; - } -} - -async function withStatement3() { ->withStatement3 : Symbol(withStatement3, Decl(es5-asyncFunctionWithStatements.ts, 20, 1)) - - with (x) { ->x : Symbol(x, Decl(es5-asyncFunctionWithStatements.ts, 0, 11)) - - with (z) { - a; - await y; - b; - } - } -} diff --git a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).types b/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).types deleted file mode 100644 index cc171bfdef044..0000000000000 --- a/tests/baselines/reference/es5-asyncFunctionWithStatements(target=es5).types +++ /dev/null @@ -1,99 +0,0 @@ -//// [tests/cases/compiler/es5-asyncFunctionWithStatements.ts] //// - -=== es5-asyncFunctionWithStatements.ts === -declare var x, y, z, a, b, c; ->x : any -> : ^^^ ->y : any -> : ^^^ ->z : any -> : ^^^ ->a : any -> : ^^^ ->b : any -> : ^^^ ->c : any -> : ^^^ - -async function withStatement0() { ->withStatement0 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (x) { ->x : any -> : ^^^ - - y; ->y : any -> : ^^^ - } -} - -async function withStatement1() { ->withStatement1 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (await x) { ->await x : any -> : ^^^ ->x : any -> : ^^^ - - y; ->y : any -> : ^^^ - } -} - -async function withStatement2() { ->withStatement2 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (x) { ->x : any -> : ^^^ - - a; ->a : any -> : ^^^ - - await y; ->await y : any -> : ^^^ ->y : any -> : ^^^ - - b; ->b : any -> : ^^^ - } -} - -async function withStatement3() { ->withStatement3 : () => Promise -> : ^^^^^^^^^^^^^^^^^^^ - - with (x) { ->x : any -> : ^^^ - - with (z) { ->z : any -> : ^^^ - - a; ->a : any -> : ^^^ - - await y; ->await y : any -> : ^^^ ->y : any -> : ^^^ - - b; ->b : any -> : ^^^ - } - } -} diff --git a/tests/baselines/reference/for-of56.errors.txt b/tests/baselines/reference/for-of56.errors.txt deleted file mode 100644 index 75d34f65ae231..0000000000000 --- a/tests/baselines/reference/for-of56.errors.txt +++ /dev/null @@ -1,6 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== for-of56.ts (0 errors) ==== - for (var let of []) {} \ No newline at end of file diff --git a/tests/baselines/reference/for-of56.js b/tests/baselines/reference/for-of56.js deleted file mode 100644 index 02c44effd6dfe..0000000000000 --- a/tests/baselines/reference/for-of56.js +++ /dev/null @@ -1,7 +0,0 @@ -//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// - -//// [for-of56.ts] -for (var let of []) {} - -//// [for-of56.js] -for (var let of []) { } diff --git a/tests/baselines/reference/for-of56.symbols b/tests/baselines/reference/for-of56.symbols deleted file mode 100644 index 791222da436bf..0000000000000 --- a/tests/baselines/reference/for-of56.symbols +++ /dev/null @@ -1,6 +0,0 @@ -//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// - -=== for-of56.ts === -for (var let of []) {} ->let : Symbol(let, Decl(for-of56.ts, 0, 8)) - diff --git a/tests/baselines/reference/for-of56.types b/tests/baselines/reference/for-of56.types deleted file mode 100644 index 0571d0cd09367..0000000000000 --- a/tests/baselines/reference/for-of56.types +++ /dev/null @@ -1,9 +0,0 @@ -//// [tests/cases/conformance/es6/for-ofStatements/for-of56.ts] //// - -=== for-of56.ts === -for (var let of []) {} ->let : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - diff --git a/tests/baselines/reference/generatorTypeCheck38.errors.txt b/tests/baselines/reference/generatorTypeCheck38.errors.txt deleted file mode 100644 index 62ad808f14e08..0000000000000 --- a/tests/baselines/reference/generatorTypeCheck38.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== generatorTypeCheck38.ts (0 errors) ==== - var yield; - function* g() { - yield 0; - var v: typeof yield; - } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck38.js b/tests/baselines/reference/generatorTypeCheck38.js deleted file mode 100644 index c682bf9566561..0000000000000 --- a/tests/baselines/reference/generatorTypeCheck38.js +++ /dev/null @@ -1,15 +0,0 @@ -//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// - -//// [generatorTypeCheck38.ts] -var yield; -function* g() { - yield 0; - var v: typeof yield; -} - -//// [generatorTypeCheck38.js] -var yield; -function* g() { - yield 0; - var v; -} diff --git a/tests/baselines/reference/generatorTypeCheck38.symbols b/tests/baselines/reference/generatorTypeCheck38.symbols deleted file mode 100644 index 1eb86c1eaba4e..0000000000000 --- a/tests/baselines/reference/generatorTypeCheck38.symbols +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// - -=== generatorTypeCheck38.ts === -var yield; ->yield : Symbol(yield, Decl(generatorTypeCheck38.ts, 0, 3)) - -function* g() { ->g : Symbol(g, Decl(generatorTypeCheck38.ts, 0, 10)) - - yield 0; - var v: typeof yield; ->v : Symbol(v, Decl(generatorTypeCheck38.ts, 3, 7)) ->yield : Symbol(yield, Decl(generatorTypeCheck38.ts, 0, 3)) -} diff --git a/tests/baselines/reference/generatorTypeCheck38.types b/tests/baselines/reference/generatorTypeCheck38.types deleted file mode 100644 index d8ad76a698fc6..0000000000000 --- a/tests/baselines/reference/generatorTypeCheck38.types +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts] //// - -=== generatorTypeCheck38.ts === -var yield; ->yield : any -> : ^^^ - -function* g() { ->g : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield 0; ->yield 0 : any -> : ^^^ ->0 : 0 -> : ^ - - var v: typeof yield; ->v : any -> : ^^^ ->yield : any -> : ^^^ -} diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt deleted file mode 100644 index a5537848cdc33..0000000000000 --- a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.errors.txt +++ /dev/null @@ -1,33 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -a.js(3,9): error TS7029: Fallthrough case in switch. -a.js(16,5): error TS7027: Unreachable code detected. -a.js(19,1): error TS7028: Unused label. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== a.js (3 errors) ==== - function foo(a, b) { - switch (a) { - case 10: - ~~~~~~~~ -!!! error TS7029: Fallthrough case in switch. - if (b) { - return b; - } - case 20: - return a; - } - } - - function bar() { - return x; - function bar2() { - } - var x = 10; // error - ~~~~~~~~~~~ -!!! error TS7027: Unreachable code detected. - } - - label1: var x2 = 10; - ~~~~~~ -!!! error TS7028: Unused label. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.symbols b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.symbols deleted file mode 100644 index adb3816e10d1a..0000000000000 --- a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.symbols +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts] //// - -=== a.js === -function foo(a, b) { ->foo : Symbol(foo, Decl(a.js, 0, 0)) ->a : Symbol(a, Decl(a.js, 0, 13)) ->b : Symbol(b, Decl(a.js, 0, 15)) - - switch (a) { ->a : Symbol(a, Decl(a.js, 0, 13)) - - case 10: - if (b) { ->b : Symbol(b, Decl(a.js, 0, 15)) - - return b; ->b : Symbol(b, Decl(a.js, 0, 15)) - } - case 20: - return a; ->a : Symbol(a, Decl(a.js, 0, 13)) - } -} - -function bar() { ->bar : Symbol(bar, Decl(a.js, 9, 1)) - - return x; ->x : Symbol(x, Decl(a.js, 15, 7)) - - function bar2() { ->bar2 : Symbol(bar2, Decl(a.js, 12, 13)) - } - var x = 10; // error ->x : Symbol(x, Decl(a.js, 15, 7)) -} - -label1: var x2 = 10; ->x2 : Symbol(x2, Decl(a.js, 18, 12)) - diff --git a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.types b/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.types deleted file mode 100644 index 951f18b71aa7b..0000000000000 --- a/tests/baselines/reference/jsFileCompilationBindReachabilityErrors.types +++ /dev/null @@ -1,64 +0,0 @@ -//// [tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts] //// - -=== a.js === -function foo(a, b) { ->foo : (a: any, b: any) => any -> : ^ ^^^^^^^ ^^^^^^^^^^^^^ ->a : any -> : ^^^ ->b : any -> : ^^^ - - switch (a) { ->a : any -> : ^^^ - - case 10: ->10 : 10 -> : ^^ - - if (b) { ->b : any -> : ^^^ - - return b; ->b : any -> : ^^^ - } - case 20: ->20 : 20 -> : ^^ - - return a; ->a : any -> : ^^^ - } -} - -function bar() { ->bar : () => number -> : ^^^^^^^^^^^^ - - return x; ->x : number -> : ^^^^^^ - - function bar2() { ->bar2 : () => void -> : ^^^^^^^^^^ - } - var x = 10; // error ->x : number -> : ^^^^^^ ->10 : 10 -> : ^^ -} - -label1: var x2 = 10; ->label1 : any -> : ^^^ ->x2 : number -> : ^^^^^^ ->10 : 10 -> : ^^ - diff --git a/tests/baselines/reference/missingCloseParenStatements.errors.txt b/tests/baselines/reference/missingCloseParenStatements.errors.txt deleted file mode 100644 index fced4eaf15df5..0000000000000 --- a/tests/baselines/reference/missingCloseParenStatements.errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -missingCloseParenStatements.ts(2,26): error TS1005: ')' expected. -missingCloseParenStatements.ts(4,5): error TS1005: ')' expected. -missingCloseParenStatements.ts(8,39): error TS1005: ')' expected. -missingCloseParenStatements.ts(11,35): error TS1005: ')' expected. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== missingCloseParenStatements.ts (4 errors) ==== - var a1, a2, a3 = 0; - if ( a1 && (a2 + a3 > 0) { - ~ -!!! error TS1005: ')' expected. -!!! related TS1007 missingCloseParenStatements.ts:2:4: The parser expected to find a ')' to match the '(' token here. - while( (a2 > 0) && a1 - { - ~ -!!! error TS1005: ')' expected. -!!! related TS1007 missingCloseParenStatements.ts:3:10: The parser expected to find a ')' to match the '(' token here. - do { - var i = i + 1; - a1 = a1 + i; - with ((a2 + a3 > 0) && a1 { - ~ -!!! error TS1005: ')' expected. -!!! related TS1007 missingCloseParenStatements.ts:8:18: The parser expected to find a ')' to match the '(' token here. - console.log(x); - } - } while (i < 5 && (a1 > 5); - ~ -!!! error TS1005: ')' expected. -!!! related TS1007 missingCloseParenStatements.ts:11:17: The parser expected to find a ')' to match the '(' token here. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/missingCloseParenStatements.js b/tests/baselines/reference/missingCloseParenStatements.js deleted file mode 100644 index f0e4de88167a5..0000000000000 --- a/tests/baselines/reference/missingCloseParenStatements.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/missingCloseParenStatements.ts] //// - -//// [missingCloseParenStatements.ts] -var a1, a2, a3 = 0; -if ( a1 && (a2 + a3 > 0) { - while( (a2 > 0) && a1 - { - do { - var i = i + 1; - a1 = a1 + i; - with ((a2 + a3 > 0) && a1 { - console.log(x); - } - } while (i < 5 && (a1 > 5); - } -} - -//// [missingCloseParenStatements.js] -var a1, a2, a3 = 0; -if (a1 && (a2 + a3 > 0)) { - while ((a2 > 0) && a1) { - do { - var i = i + 1; - a1 = a1 + i; - with ((a2 + a3 > 0) && a1) { - console.log(x); - } - } while (i < 5 && (a1 > 5)); - } -} diff --git a/tests/baselines/reference/missingCloseParenStatements.symbols b/tests/baselines/reference/missingCloseParenStatements.symbols deleted file mode 100644 index 00e76343b192a..0000000000000 --- a/tests/baselines/reference/missingCloseParenStatements.symbols +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/compiler/missingCloseParenStatements.ts] //// - -=== missingCloseParenStatements.ts === -var a1, a2, a3 = 0; ->a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) ->a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) ->a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) - -if ( a1 && (a2 + a3 > 0) { ->a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) ->a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) ->a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) - - while( (a2 > 0) && a1 ->a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) ->a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) - { - do { - var i = i + 1; ->i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) ->i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) - - a1 = a1 + i; ->a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) ->a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) ->i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) - - with ((a2 + a3 > 0) && a1 { ->a2 : Symbol(a2, Decl(missingCloseParenStatements.ts, 0, 7)) ->a3 : Symbol(a3, Decl(missingCloseParenStatements.ts, 0, 11)) ->a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) - - console.log(x); - } - } while (i < 5 && (a1 > 5); ->i : Symbol(i, Decl(missingCloseParenStatements.ts, 5, 15)) ->a1 : Symbol(a1, Decl(missingCloseParenStatements.ts, 0, 3)) - } -} diff --git a/tests/baselines/reference/missingCloseParenStatements.types b/tests/baselines/reference/missingCloseParenStatements.types deleted file mode 100644 index e051609f67f7b..0000000000000 --- a/tests/baselines/reference/missingCloseParenStatements.types +++ /dev/null @@ -1,117 +0,0 @@ -//// [tests/cases/compiler/missingCloseParenStatements.ts] //// - -=== missingCloseParenStatements.ts === -var a1, a2, a3 = 0; ->a1 : any -> : ^^^ ->a2 : any -> : ^^^ ->a3 : number -> : ^^^^^^ ->0 : 0 -> : ^ - -if ( a1 && (a2 + a3 > 0) { ->a1 && (a2 + a3 > 0) : boolean -> : ^^^^^^^ ->a1 : any -> : ^^^ ->(a2 + a3 > 0) : boolean -> : ^^^^^^^ ->a2 + a3 > 0 : boolean -> : ^^^^^^^ ->a2 + a3 : any -> : ^^^ ->a2 : any -> : ^^^ ->a3 : number -> : ^^^^^^ ->0 : 0 -> : ^ - - while( (a2 > 0) && a1 ->(a2 > 0) && a1 : any -> : ^^^ ->(a2 > 0) : boolean -> : ^^^^^^^ ->a2 > 0 : boolean -> : ^^^^^^^ ->a2 : any -> : ^^^ ->0 : 0 -> : ^ ->a1 : any -> : ^^^ - { - do { - var i = i + 1; ->i : any -> : ^^^ ->i + 1 : any -> : ^^^ ->i : any -> : ^^^ ->1 : 1 -> : ^ - - a1 = a1 + i; ->a1 = a1 + i : any -> : ^^^ ->a1 : any -> : ^^^ ->a1 + i : any -> : ^^^ ->a1 : any -> : ^^^ ->i : any -> : ^^^ - - with ((a2 + a3 > 0) && a1 { ->(a2 + a3 > 0) && a1 : any -> : ^^^ ->(a2 + a3 > 0) : boolean -> : ^^^^^^^ ->a2 + a3 > 0 : boolean -> : ^^^^^^^ ->a2 + a3 : any -> : ^^^ ->a2 : any -> : ^^^ ->a3 : number -> : ^^^^^^ ->0 : 0 -> : ^ ->a1 : any -> : ^^^ - - console.log(x); ->console.log(x) : any -> : ^^^ ->console.log : any -> : ^^^ ->console : any -> : ^^^ ->log : any -> : ^^^ ->x : any -> : ^^^ - } - } while (i < 5 && (a1 > 5); ->i < 5 && (a1 > 5) : boolean -> : ^^^^^^^ ->i < 5 : boolean -> : ^^^^^^^ ->i : any -> : ^^^ ->5 : 5 -> : ^ ->(a1 > 5) : boolean -> : ^^^^^^^ ->a1 > 5 : boolean -> : ^^^^^^^ ->a1 : any -> : ^^^ ->5 : 5 -> : ^ - } -} diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt deleted file mode 100644 index 8241f0bb2837c..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.errors.txt +++ /dev/null @@ -1,199 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. -asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. -asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. -awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. -awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. -yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== methodIsOk.ts (0 errors) ==== - class C1 { - async * f() { - } - } -==== awaitMethodNameIsOk.ts (0 errors) ==== - class C2 { - async * await() { - } - } -==== yieldMethodNameIsOk.ts (0 errors) ==== - class C3 { - async * yield() { - } - } -==== awaitParameterIsError.ts (1 errors) ==== - class C4 { - async * f(await) { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } -==== yieldParameterIsError.ts (1 errors) ==== - class C5 { - async * f(yield) { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - class C6 { - async * f(a = await 1) { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - } - } -==== yieldInParameterInitializerIsError.ts (1 errors) ==== - class C7 { - async * f(a = yield) { - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - } - } -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - class C8 { - async * f() { - async function * g() { - } - } - } -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - class C9 { - async * f() { - function yield() { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } - } -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - class C10 { - async * f() { - const x = function yield() { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - }; - } - } -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - class C11 { - async * f() { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } - } -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - class C12 { - async * f() { - const x = function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; - } - } -==== yieldIsOk.ts (0 errors) ==== - class C13 { - async * f() { - yield; - } - } -==== yieldWithValueIsOk.ts (0 errors) ==== - class C14 { - async * f() { - yield 1; - } - } -==== yieldStarMissingValueIsError.ts (1 errors) ==== - class C15 { - async * f() { - yield *; - ~ -!!! error TS1109: Expression expected. - } - } -==== yieldStarWithValueIsOk.ts (0 errors) ==== - class C16 { - async * f() { - yield * []; - } - } -==== awaitWithValueIsOk.ts (0 errors) ==== - class C17 { - async * f() { - await 1; - } - } -==== awaitMissingValueIsError.ts (1 errors) ==== - class C18 { - async * f() { - await; - ~ -!!! error TS1109: Expression expected. - } - } -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - class C19 { - async * f() { - let x: await; - } - } -==== yieldAsTypeIsStrictError.ts (1 errors) ==== - interface yield {} - class C20 { - async * f() { - let x: yield; - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } -==== yieldInClassComputedPropertyIsError.ts (2 errors) ==== - class C21 { - async * [yield]() { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~ -!!! error TS2693: 'yield' only refers to a type, but is being used as a value here. - } - } -==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== - class C22 { - async * f() { - const x = { [yield]: 1 }; - } - } -==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== - class C23 { - async * get x() { - ~ -!!! error TS1005: '(' expected. - return 1; - } - } -==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== - class C24 { - async * set x(value: number) { - ~ -!!! error TS1005: '(' expected. - } - } -==== asyncGeneratorPropertyIsError.ts (1 errors) ==== - class C25 { - async * x = 1; - ~ -!!! error TS1005: '(' expected. - } - \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.symbols b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.symbols deleted file mode 100644 index 61fa90d72959e..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.symbols +++ /dev/null @@ -1,266 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// - -=== methodIsOk.ts === -class C1 { ->C1 : Symbol(C1, Decl(methodIsOk.ts, 0, 0)) - - async * f() { ->f : Symbol(C1.f, Decl(methodIsOk.ts, 0, 10)) - } -} -=== awaitMethodNameIsOk.ts === -class C2 { ->C2 : Symbol(C2, Decl(awaitMethodNameIsOk.ts, 0, 0)) - - async * await() { ->await : Symbol(C2.await, Decl(awaitMethodNameIsOk.ts, 0, 10)) - } -} -=== yieldMethodNameIsOk.ts === -class C3 { ->C3 : Symbol(C3, Decl(yieldMethodNameIsOk.ts, 0, 0)) - - async * yield() { ->yield : Symbol(C3.yield, Decl(yieldMethodNameIsOk.ts, 0, 10)) - } -} -=== awaitParameterIsError.ts === -class C4 { ->C4 : Symbol(C4, Decl(awaitParameterIsError.ts, 0, 0)) - - async * f(await) { ->f : Symbol(C4.f, Decl(awaitParameterIsError.ts, 0, 10)) ->await : Symbol(await, Decl(awaitParameterIsError.ts, 1, 14)) - } -} -=== yieldParameterIsError.ts === -class C5 { ->C5 : Symbol(C5, Decl(yieldParameterIsError.ts, 0, 0)) - - async * f(yield) { ->f : Symbol(C5.f, Decl(yieldParameterIsError.ts, 0, 10)) ->yield : Symbol(yield, Decl(yieldParameterIsError.ts, 1, 14)) - } -} -=== awaitInParameterInitializerIsError.ts === -class C6 { ->C6 : Symbol(C6, Decl(awaitInParameterInitializerIsError.ts, 0, 0)) - - async * f(a = await 1) { ->f : Symbol(C6.f, Decl(awaitInParameterInitializerIsError.ts, 0, 10)) ->a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14)) - } -} -=== yieldInParameterInitializerIsError.ts === -class C7 { ->C7 : Symbol(C7, Decl(yieldInParameterInitializerIsError.ts, 0, 0)) - - async * f(a = yield) { ->f : Symbol(C7.f, Decl(yieldInParameterInitializerIsError.ts, 0, 10)) ->a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14)) - } -} -=== nestedAsyncGeneratorIsOk.ts === -class C8 { ->C8 : Symbol(C8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0)) - - async * f() { ->f : Symbol(C8.f, Decl(nestedAsyncGeneratorIsOk.ts, 0, 10)) - - async function * g() { ->g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 1, 17)) - } - } -} -=== nestedFunctionDeclarationNamedYieldIsError.ts === -class C9 { ->C9 : Symbol(C9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0)) - - async * f() { ->f : Symbol(C9.f, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 10)) - - function yield() { ->yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 1, 17)) - } - } -} -=== nestedFunctionExpressionNamedYieldIsError.ts === -class C10 { ->C10 : Symbol(C10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0)) - - async * f() { ->f : Symbol(C10.f, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 11)) - - const x = function yield() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 13)) ->yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 17)) - - }; - } -} -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -class C11 { ->C11 : Symbol(C11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0)) - - async * f() { ->f : Symbol(C11.f, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 11)) - - function await() { ->await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 1, 17)) - } - } -} -=== nestedFunctionExpressionNamedAwaitIsError.ts === -class C12 { ->C12 : Symbol(C12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0)) - - async * f() { ->f : Symbol(C12.f, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 11)) - - const x = function await() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 13)) ->await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 17)) - - }; - } -} -=== yieldIsOk.ts === -class C13 { ->C13 : Symbol(C13, Decl(yieldIsOk.ts, 0, 0)) - - async * f() { ->f : Symbol(C13.f, Decl(yieldIsOk.ts, 0, 11)) - - yield; - } -} -=== yieldWithValueIsOk.ts === -class C14 { ->C14 : Symbol(C14, Decl(yieldWithValueIsOk.ts, 0, 0)) - - async * f() { ->f : Symbol(C14.f, Decl(yieldWithValueIsOk.ts, 0, 11)) - - yield 1; - } -} -=== yieldStarMissingValueIsError.ts === -class C15 { ->C15 : Symbol(C15, Decl(yieldStarMissingValueIsError.ts, 0, 0)) - - async * f() { ->f : Symbol(C15.f, Decl(yieldStarMissingValueIsError.ts, 0, 11)) - - yield *; - } -} -=== yieldStarWithValueIsOk.ts === -class C16 { ->C16 : Symbol(C16, Decl(yieldStarWithValueIsOk.ts, 0, 0)) - - async * f() { ->f : Symbol(C16.f, Decl(yieldStarWithValueIsOk.ts, 0, 11)) - - yield * []; - } -} -=== awaitWithValueIsOk.ts === -class C17 { ->C17 : Symbol(C17, Decl(awaitWithValueIsOk.ts, 0, 0)) - - async * f() { ->f : Symbol(C17.f, Decl(awaitWithValueIsOk.ts, 0, 11)) - - await 1; - } -} -=== awaitMissingValueIsError.ts === -class C18 { ->C18 : Symbol(C18, Decl(awaitMissingValueIsError.ts, 0, 0)) - - async * f() { ->f : Symbol(C18.f, Decl(awaitMissingValueIsError.ts, 0, 11)) - - await; - } -} -=== awaitAsTypeIsOk.ts === -interface await {} ->await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) - -class C19 { ->C19 : Symbol(C19, Decl(awaitAsTypeIsOk.ts, 0, 18)) - - async * f() { ->f : Symbol(C19.f, Decl(awaitAsTypeIsOk.ts, 1, 11)) - - let x: await; ->x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 3, 11)) ->await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) - } -} -=== yieldAsTypeIsStrictError.ts === -interface yield {} ->yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0)) - -class C20 { ->C20 : Symbol(C20, Decl(yieldAsTypeIsStrictError.ts, 0, 18)) - - async * f() { ->f : Symbol(C20.f, Decl(yieldAsTypeIsStrictError.ts, 1, 11)) - - let x: yield; ->x : Symbol(x, Decl(yieldAsTypeIsStrictError.ts, 3, 11)) ->yield : Symbol(yield, Decl(yieldAsTypeIsStrictError.ts, 0, 0)) - } -} -=== yieldInClassComputedPropertyIsError.ts === -class C21 { ->C21 : Symbol(C21, Decl(yieldInClassComputedPropertyIsError.ts, 0, 0)) - - async * [yield]() { ->[yield] : Symbol(C21[yield], Decl(yieldInClassComputedPropertyIsError.ts, 0, 11)) - } -} -=== yieldInNestedComputedPropertyIsOk.ts === -class C22 { ->C22 : Symbol(C22, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0)) - - async * f() { ->f : Symbol(C22.f, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 11)) - - const x = { [yield]: 1 }; ->x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 13)) ->[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19)) - } -} -=== asyncGeneratorGetAccessorIsError.ts === -class C23 { ->C23 : Symbol(C23, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 0)) - - async * get x() { ->get : Symbol(C23.get, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 11)) ->x : Symbol(C23.x, Decl(asyncGeneratorGetAccessorIsError.ts, 1, 15)) - - return 1; - } -} -=== asyncGeneratorSetAccessorIsError.ts === -class C24 { ->C24 : Symbol(C24, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 0)) - - async * set x(value: number) { ->set : Symbol(C24.set, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 11)) ->x : Symbol(C24.x, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 15)) ->value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18)) - } -} -=== asyncGeneratorPropertyIsError.ts === -class C25 { ->C25 : Symbol(C25, Decl(asyncGeneratorPropertyIsError.ts, 0, 0)) - - async * x = 1; ->x : Symbol(C25.x, Decl(asyncGeneratorPropertyIsError.ts, 0, 11)) ->1 : Symbol(C25[1], Decl(asyncGeneratorPropertyIsError.ts, 1, 15)) -} - diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types deleted file mode 100644 index 1aa65a69c8cd4..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types +++ /dev/null @@ -1,371 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// - -=== methodIsOk.ts === -class C1 { ->C1 : C1 -> : ^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -} -=== awaitMethodNameIsOk.ts === -class C2 { ->C2 : C2 -> : ^^ - - async * await() { ->await : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -} -=== yieldMethodNameIsOk.ts === -class C3 { ->C3 : C3 -> : ^^ - - async * yield() { ->yield : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -} -=== awaitParameterIsError.ts === -class C4 { ->C4 : C4 -> : ^^ - - async * f(await) { ->f : (await: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->await : any -> : ^^^ - } -} -=== yieldParameterIsError.ts === -class C5 { ->C5 : C5 -> : ^^ - - async * f(yield) { ->f : (yield: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->yield : any -> : ^^^ - } -} -=== awaitInParameterInitializerIsError.ts === -class C6 { ->C6 : C6 -> : ^^ - - async * f(a = await 1) { ->f : (a?: number) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : number -> : ^^^^^^ ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ - } -} -=== yieldInParameterInitializerIsError.ts === -class C7 { ->C7 : C7 -> : ^^ - - async * f(a = yield) { ->f : (a?: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : any -> : ^^^ ->yield : any -> : ^^^ - } -} -=== nestedAsyncGeneratorIsOk.ts === -class C8 { ->C8 : C8 -> : ^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async function * g() { ->g : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } - } -} -=== nestedFunctionDeclarationNamedYieldIsError.ts === -class C9 { ->C9 : C9 -> : ^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function yield() { ->yield : () => void -> : ^^^^^^^^^^ - } - } -} -=== nestedFunctionExpressionNamedYieldIsError.ts === -class C10 { ->C10 : C10 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function yield() { ->x : () => void -> : ^^^^^^^^^^ ->function yield() { } : () => void -> : ^^^^^^^^^^ ->yield : () => void -> : ^^^^^^^^^^ - - }; - } -} -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -class C11 { ->C11 : C11 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function await() { ->await : () => void -> : ^^^^^^^^^^ - } - } -} -=== nestedFunctionExpressionNamedAwaitIsError.ts === -class C12 { ->C12 : C12 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function await() { ->x : () => void -> : ^^^^^^^^^^ ->function await() { } : () => void -> : ^^^^^^^^^^ ->await : () => void -> : ^^^^^^^^^^ - - }; - } -} -=== yieldIsOk.ts === -class C13 { ->C13 : C13 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield; ->yield : any -> : ^^^ - } -} -=== yieldWithValueIsOk.ts === -class C14 { ->C14 : C14 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield 1; ->yield 1 : any -> : ^^^ ->1 : 1 -> : ^ - } -} -=== yieldStarMissingValueIsError.ts === -class C15 { ->C15 : C15 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield *; ->yield * : any -> : ^^^ -> : any -> : ^^^ - } -} -=== yieldStarWithValueIsOk.ts === -class C16 { ->C16 : C16 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield * []; ->yield * [] : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - } -} -=== awaitWithValueIsOk.ts === -class C17 { ->C17 : C17 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await 1; ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ - } -} -=== awaitMissingValueIsError.ts === -class C18 { ->C18 : C18 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await; ->await : any -> : ^^^ -> : any -> : ^^^ - } -} -=== awaitAsTypeIsOk.ts === -interface await {} -class C19 { ->C19 : C19 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: await; ->x : await -> : ^^^^^ - } -} -=== yieldAsTypeIsStrictError.ts === -interface yield {} -class C20 { ->C20 : C20 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: yield; ->x : yield -> : ^^^^^ - } -} -=== yieldInClassComputedPropertyIsError.ts === -class C21 { ->C21 : C21 -> : ^^^ - - async * [yield]() { ->[yield] : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->yield : any -> : ^^^ - } -} -=== yieldInNestedComputedPropertyIsOk.ts === -class C22 { ->C22 : C22 -> : ^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = { [yield]: 1 }; ->x : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->{ [yield]: 1 } : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->[yield] : number -> : ^^^^^^ ->yield : any -> : ^^^ ->1 : 1 -> : ^ - } -} -=== asyncGeneratorGetAccessorIsError.ts === -class C23 { ->C23 : C23 -> : ^^^ - - async * get x() { ->get : () => any -> : ^^^^^^^^^ ->x : () => number -> : ^^^^^^^^^^^^ - - return 1; ->1 : 1 -> : ^ - } -} -=== asyncGeneratorSetAccessorIsError.ts === -class C24 { ->C24 : C24 -> : ^^^ - - async * set x(value: number) { ->set : () => any -> : ^^^^^^^^^ ->x : (value: number) => void -> : ^ ^^ ^^^^^^^^^ ->value : number -> : ^^^^^^ - } -} -=== asyncGeneratorPropertyIsError.ts === -class C25 { ->C25 : C25 -> : ^^^ - - async * x = 1; ->x : () => any -> : ^^^^^^^^^ ->1 : any -> : ^^^ -} - diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt deleted file mode 100644 index f64ec4e397a6f..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.errors.txt +++ /dev/null @@ -1,119 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -awaitInParameterInitializerIsError.ts(1,25): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. -awaitParameterIsError.ts(1,21): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldInParameterInitializerIsError.ts(1,25): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldParameterIsError.ts(1,21): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== functionDeclarationIsOk.ts (0 errors) ==== - async function * f1() { - } -==== awaitNameIsOk.ts (0 errors) ==== - async function * await() { - } -==== yieldNameIsOk.ts (0 errors) ==== - async function * yield() { - } -==== awaitParameterIsError.ts (1 errors) ==== - async function * f4(await) { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } -==== yieldParameterIsError.ts (1 errors) ==== - async function * f5(yield) { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - async function * f6(a = await 1) { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - } -==== yieldInParameterInitializerIsError.ts (1 errors) ==== - async function * f7(a = yield) { - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - } -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - async function * f8() { - async function * g() { - } - } -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - async function * f9() { - function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - } -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - async function * f10() { - const x = function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; - } -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - async function * f11() { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - async function * f12() { - const x = function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; - } -==== yieldIsOk.ts (0 errors) ==== - async function * f13() { - yield; - } -==== yieldWithValueIsOk.ts (0 errors) ==== - async function * f14() { - yield 1; - } -==== yieldStarMissingValueIsError.ts (1 errors) ==== - async function * f15() { - yield *; - ~ -!!! error TS1109: Expression expected. - } -==== yieldStarWithValueIsOk.ts (0 errors) ==== - async function * f16() { - yield * []; - } -==== awaitWithValueIsOk.ts (0 errors) ==== - async function * f17() { - await 1; - } -==== awaitMissingValueIsError.ts (1 errors) ==== - async function * f18() { - await; - ~ -!!! error TS1109: Expression expected. - } -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - async function * f19() { - let x: await; - } -==== yieldAsTypeIsOk.ts (0 errors) ==== - interface yield {} - async function * f20() { - let x: yield; - } -==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== - async function * f21() { - const x = { [yield]: 1 }; - } - \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.symbols b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.symbols deleted file mode 100644 index a09eca527125d..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.symbols +++ /dev/null @@ -1,145 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts] //// - -=== functionDeclarationIsOk.ts === -async function * f1() { ->f1 : Symbol(f1, Decl(functionDeclarationIsOk.ts, 0, 0)) -} -=== awaitNameIsOk.ts === -async function * await() { ->await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) -} -=== yieldNameIsOk.ts === -async function * yield() { ->yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) -} -=== awaitParameterIsError.ts === -async function * f4(await) { ->f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 0)) ->await : Symbol(await, Decl(awaitParameterIsError.ts, 0, 20)) -} -=== yieldParameterIsError.ts === -async function * f5(yield) { ->f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 0)) ->yield : Symbol(yield, Decl(yieldParameterIsError.ts, 0, 20)) -} -=== awaitInParameterInitializerIsError.ts === -async function * f6(a = await 1) { ->f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 0)) ->a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 20)) -} -=== yieldInParameterInitializerIsError.ts === -async function * f7(a = yield) { ->f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 0)) ->a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 20)) -} -=== nestedAsyncGeneratorIsOk.ts === -async function * f8() { ->f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 0)) - - async function * g() { ->g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 23)) - } -} -=== nestedFunctionDeclarationNamedYieldIsError.ts === -async function * f9() { ->f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 0)) - - function yield() { ->yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 23)) - } -} -=== nestedFunctionExpressionNamedYieldIsError.ts === -async function * f10() { ->f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 0)) - - const x = function yield() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 9)) ->yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 13)) - - }; -} -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -async function * f11() { ->f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 0)) - - function await() { ->await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 24)) - } -} -=== nestedFunctionExpressionNamedAwaitIsError.ts === -async function * f12() { ->f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 0)) - - const x = function yield() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 9)) ->yield : Symbol(yield, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 13)) - - }; -} -=== yieldIsOk.ts === -async function * f13() { ->f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 0)) - - yield; -} -=== yieldWithValueIsOk.ts === -async function * f14() { ->f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 0)) - - yield 1; -} -=== yieldStarMissingValueIsError.ts === -async function * f15() { ->f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 0)) - - yield *; -} -=== yieldStarWithValueIsOk.ts === -async function * f16() { ->f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 0)) - - yield * []; -} -=== awaitWithValueIsOk.ts === -async function * f17() { ->f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 0)) - - await 1; -} -=== awaitMissingValueIsError.ts === -async function * f18() { ->f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 0)) - - await; -} -=== awaitAsTypeIsOk.ts === -interface await {} ->await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) - -async function * f19() { ->f19 : Symbol(f19, Decl(awaitAsTypeIsOk.ts, 0, 18)) - - let x: await; ->x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 2, 7)) ->await : Symbol(await, Decl(awaitNameIsOk.ts, 0, 0), Decl(awaitAsTypeIsOk.ts, 0, 0)) -} -=== yieldAsTypeIsOk.ts === -interface yield {} ->yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) - -async function * f20() { ->f20 : Symbol(f20, Decl(yieldAsTypeIsOk.ts, 0, 18)) - - let x: yield; ->x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 2, 7)) ->yield : Symbol(yield, Decl(yieldNameIsOk.ts, 0, 0), Decl(yieldAsTypeIsOk.ts, 0, 0)) -} -=== yieldInNestedComputedPropertyIsOk.ts === -async function * f21() { ->f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 0)) - - const x = { [yield]: 1 }; ->x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 9)) ->[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 15)) -} - diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types deleted file mode 100644 index 8b708f94c95a6..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types +++ /dev/null @@ -1,213 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts] //// - -=== functionDeclarationIsOk.ts === -async function * f1() { ->f1 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -} -=== awaitNameIsOk.ts === -async function * await() { ->await : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -} -=== yieldNameIsOk.ts === -async function * yield() { ->yield : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -} -=== awaitParameterIsError.ts === -async function * f4(await) { ->f4 : (await: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->await : any -> : ^^^ -} -=== yieldParameterIsError.ts === -async function * f5(yield) { ->f5 : (yield: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->yield : any -> : ^^^ -} -=== awaitInParameterInitializerIsError.ts === -async function * f6(a = await 1) { ->f6 : (a?: number) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : number -> : ^^^^^^ ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ -} -=== yieldInParameterInitializerIsError.ts === -async function * f7(a = yield) { ->f7 : (a?: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : any -> : ^^^ ->yield : any -> : ^^^ -} -=== nestedAsyncGeneratorIsOk.ts === -async function * f8() { ->f8 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async function * g() { ->g : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -} -=== nestedFunctionDeclarationNamedYieldIsError.ts === -async function * f9() { ->f9 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function yield() { ->yield : () => void -> : ^^^^^^^^^^ - } -} -=== nestedFunctionExpressionNamedYieldIsError.ts === -async function * f10() { ->f10 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function yield() { ->x : () => void -> : ^^^^^^^^^^ ->function yield() { } : () => void -> : ^^^^^^^^^^ ->yield : () => void -> : ^^^^^^^^^^ - - }; -} -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -async function * f11() { ->f11 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function await() { ->await : () => void -> : ^^^^^^^^^^ - } -} -=== nestedFunctionExpressionNamedAwaitIsError.ts === -async function * f12() { ->f12 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function yield() { ->x : () => void -> : ^^^^^^^^^^ ->function yield() { } : () => void -> : ^^^^^^^^^^ ->yield : () => void -> : ^^^^^^^^^^ - - }; -} -=== yieldIsOk.ts === -async function * f13() { ->f13 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield; ->yield : any -> : ^^^ -} -=== yieldWithValueIsOk.ts === -async function * f14() { ->f14 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield 1; ->yield 1 : any -> : ^^^ ->1 : 1 -> : ^ -} -=== yieldStarMissingValueIsError.ts === -async function * f15() { ->f15 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield *; ->yield * : any -> : ^^^ -> : any -> : ^^^ -} -=== yieldStarWithValueIsOk.ts === -async function * f16() { ->f16 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield * []; ->yield * [] : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ -} -=== awaitWithValueIsOk.ts === -async function * f17() { ->f17 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await 1; ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ -} -=== awaitMissingValueIsError.ts === -async function * f18() { ->f18 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await; ->await : any -> : ^^^ -> : any -> : ^^^ -} -=== awaitAsTypeIsOk.ts === -interface await {} -async function * f19() { ->f19 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: await; ->x : await -> : ^^^^^ -} -=== yieldAsTypeIsOk.ts === -interface yield {} -async function * f20() { ->f20 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: yield; ->x : yield -> : ^^^^^ -} -=== yieldInNestedComputedPropertyIsOk.ts === -async function * f21() { ->f21 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = { [yield]: 1 }; ->x : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->{ [yield]: 1 } : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->[yield] : number -> : ^^^^^^ ->yield : any -> : ^^^ ->1 : 1 -> : ^ -} - diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt deleted file mode 100644 index 804359b2535df..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.errors.txt +++ /dev/null @@ -1,125 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -awaitInParameterInitializerIsError.ts(1,34): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(2,10): error TS1109: Expression expected. -awaitNameIsError.ts(1,29): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -awaitParameterIsError.ts(1,30): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(2,14): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(2,14): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedAwaitIsError.ts(2,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(2,24): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldInParameterInitializerIsError.ts(1,34): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldNameIsError.ts(1,29): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldParameterIsError.ts(1,30): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldStarMissingValueIsError.ts(2,12): error TS1109: Expression expected. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== functionExpressionIsOk.ts (0 errors) ==== - const f1 = async function * f() { - }; -==== awaitNameIsError.ts (1 errors) ==== - const f2 = async function * await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; -==== yieldNameIsError.ts (1 errors) ==== - const f3 = async function * yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; -==== awaitParameterIsError.ts (1 errors) ==== - const f4 = async function * (await) { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; -==== yieldParameterIsError.ts (1 errors) ==== - const f5 = async function * (yield) { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - const f6 = async function * (a = await 1) { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - }; -==== yieldInParameterInitializerIsError.ts (1 errors) ==== - const f7 = async function * (a = yield) { - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - }; -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - const f8 = async function * () { - async function * g() { - } - }; -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - const f9 = async function * () { - function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - }; -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - const f10 = async function * () { - const x = function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; - }; -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - const f11 = async function * () { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - }; -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - const f12 = async function * () { - const x = function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; - }; -==== yieldIsOk.ts (0 errors) ==== - const f13 = async function * () { - yield; - }; -==== yieldWithValueIsOk.ts (0 errors) ==== - const f14 = async function * () { - yield 1; - }; -==== yieldStarMissingValueIsError.ts (1 errors) ==== - const f15 = async function * () { - yield *; - ~ -!!! error TS1109: Expression expected. - }; -==== yieldStarWithValueIsOk.ts (0 errors) ==== - const f16 = async function * () { - yield * []; - }; -==== awaitWithValueIsOk.ts (0 errors) ==== - const f17 = async function * () { - await 1; - }; -==== awaitMissingValueIsError.ts (1 errors) ==== - const f18 = async function * () { - await; - ~ -!!! error TS1109: Expression expected. - }; -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - const f19 = async function * () { - let x: await; - }; -==== yieldAsTypeIsOk.ts (0 errors) ==== - interface yield {} - const f20 = async function * () { - let x: yield; - }; -==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== - const f21 = async function *() { - const x = { [yield]: 1 }; - }; - \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.symbols b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.symbols deleted file mode 100644 index 358adceb0febe..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.symbols +++ /dev/null @@ -1,158 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts] //// - -=== functionExpressionIsOk.ts === -const f1 = async function * f() { ->f1 : Symbol(f1, Decl(functionExpressionIsOk.ts, 0, 5)) ->f : Symbol(f, Decl(functionExpressionIsOk.ts, 0, 10)) - -}; -=== awaitNameIsError.ts === -const f2 = async function * await() { ->f2 : Symbol(f2, Decl(awaitNameIsError.ts, 0, 5)) ->await : Symbol(await, Decl(awaitNameIsError.ts, 0, 10)) - -}; -=== yieldNameIsError.ts === -const f3 = async function * yield() { ->f3 : Symbol(f3, Decl(yieldNameIsError.ts, 0, 5)) ->yield : Symbol(yield, Decl(yieldNameIsError.ts, 0, 10)) - -}; -=== awaitParameterIsError.ts === -const f4 = async function * (await) { ->f4 : Symbol(f4, Decl(awaitParameterIsError.ts, 0, 5)) ->await : Symbol(await, Decl(awaitParameterIsError.ts, 0, 29)) - -}; -=== yieldParameterIsError.ts === -const f5 = async function * (yield) { ->f5 : Symbol(f5, Decl(yieldParameterIsError.ts, 0, 5)) ->yield : Symbol(yield, Decl(yieldParameterIsError.ts, 0, 29)) - -}; -=== awaitInParameterInitializerIsError.ts === -const f6 = async function * (a = await 1) { ->f6 : Symbol(f6, Decl(awaitInParameterInitializerIsError.ts, 0, 5)) ->a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 0, 29)) - -}; -=== yieldInParameterInitializerIsError.ts === -const f7 = async function * (a = yield) { ->f7 : Symbol(f7, Decl(yieldInParameterInitializerIsError.ts, 0, 5)) ->a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 0, 29)) - -}; -=== nestedAsyncGeneratorIsOk.ts === -const f8 = async function * () { ->f8 : Symbol(f8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5)) - - async function * g() { ->g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 0, 32)) - } -}; -=== nestedFunctionDeclarationNamedYieldIsError.ts === -const f9 = async function * () { ->f9 : Symbol(f9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5)) - - function yield() { ->yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 32)) - } -}; -=== nestedFunctionExpressionNamedYieldIsError.ts === -const f10 = async function * () { ->f10 : Symbol(f10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5)) - - const x = function yield() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 9)) ->yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 1, 13)) - - }; -}; -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -const f11 = async function * () { ->f11 : Symbol(f11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5)) - - function await() { ->await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 33)) - } -}; -=== nestedFunctionExpressionNamedAwaitIsError.ts === -const f12 = async function * () { ->f12 : Symbol(f12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5)) - - const x = function await() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 9)) ->await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 1, 13)) - - }; -}; -=== yieldIsOk.ts === -const f13 = async function * () { ->f13 : Symbol(f13, Decl(yieldIsOk.ts, 0, 5)) - - yield; -}; -=== yieldWithValueIsOk.ts === -const f14 = async function * () { ->f14 : Symbol(f14, Decl(yieldWithValueIsOk.ts, 0, 5)) - - yield 1; -}; -=== yieldStarMissingValueIsError.ts === -const f15 = async function * () { ->f15 : Symbol(f15, Decl(yieldStarMissingValueIsError.ts, 0, 5)) - - yield *; -}; -=== yieldStarWithValueIsOk.ts === -const f16 = async function * () { ->f16 : Symbol(f16, Decl(yieldStarWithValueIsOk.ts, 0, 5)) - - yield * []; -}; -=== awaitWithValueIsOk.ts === -const f17 = async function * () { ->f17 : Symbol(f17, Decl(awaitWithValueIsOk.ts, 0, 5)) - - await 1; -}; -=== awaitMissingValueIsError.ts === -const f18 = async function * () { ->f18 : Symbol(f18, Decl(awaitMissingValueIsError.ts, 0, 5)) - - await; -}; -=== awaitAsTypeIsOk.ts === -interface await {} ->await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) - -const f19 = async function * () { ->f19 : Symbol(f19, Decl(awaitAsTypeIsOk.ts, 1, 5)) - - let x: await; ->x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 2, 7)) ->await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) - -}; -=== yieldAsTypeIsOk.ts === -interface yield {} ->yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) - -const f20 = async function * () { ->f20 : Symbol(f20, Decl(yieldAsTypeIsOk.ts, 1, 5)) - - let x: yield; ->x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 2, 7)) ->yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) - -}; -=== yieldInNestedComputedPropertyIsOk.ts === -const f21 = async function *() { ->f21 : Symbol(f21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5)) - - const x = { [yield]: 1 }; ->x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 9)) ->[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 1, 15)) - -}; - diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types deleted file mode 100644 index 036bdb2f62b80..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types +++ /dev/null @@ -1,277 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts] //// - -=== functionExpressionIsOk.ts === -const f1 = async function * f() { ->f1 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * f() {} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -}; -=== awaitNameIsError.ts === -const f2 = async function * await() { ->f2 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * await() {} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->await : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -}; -=== yieldNameIsError.ts === -const f3 = async function * yield() { ->f3 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * yield() {} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->yield : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -}; -=== awaitParameterIsError.ts === -const f4 = async function * (await) { ->f4 : (await: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * (await) {} : (await: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->await : any -> : ^^^ - -}; -=== yieldParameterIsError.ts === -const f5 = async function * (yield) { ->f5 : (yield: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * (yield) {} : (yield: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->yield : any -> : ^^^ - -}; -=== awaitInParameterInitializerIsError.ts === -const f6 = async function * (a = await 1) { ->f6 : (a?: number) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * (a = await 1) {} : (a?: number) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : number -> : ^^^^^^ ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ - -}; -=== yieldInParameterInitializerIsError.ts === -const f7 = async function * (a = yield) { ->f7 : (a?: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * (a = yield) {} : (a?: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : any -> : ^^^ ->yield : any -> : ^^^ - -}; -=== nestedAsyncGeneratorIsOk.ts === -const f8 = async function * () { ->f8 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { async function * g() { }} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async function * g() { ->g : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -}; -=== nestedFunctionDeclarationNamedYieldIsError.ts === -const f9 = async function * () { ->f9 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { function yield() { }} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function yield() { ->yield : () => void -> : ^^^^^^^^^^ - } -}; -=== nestedFunctionExpressionNamedYieldIsError.ts === -const f10 = async function * () { ->f10 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { const x = function yield() { };} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function yield() { ->x : () => void -> : ^^^^^^^^^^ ->function yield() { } : () => void -> : ^^^^^^^^^^ ->yield : () => void -> : ^^^^^^^^^^ - - }; -}; -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -const f11 = async function * () { ->f11 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { function await() { }} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function await() { ->await : () => void -> : ^^^^^^^^^^ - } -}; -=== nestedFunctionExpressionNamedAwaitIsError.ts === -const f12 = async function * () { ->f12 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { const x = function await() { };} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function await() { ->x : () => void -> : ^^^^^^^^^^ ->function await() { } : () => void -> : ^^^^^^^^^^ ->await : () => void -> : ^^^^^^^^^^ - - }; -}; -=== yieldIsOk.ts === -const f13 = async function * () { ->f13 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { yield;} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield; ->yield : any -> : ^^^ - -}; -=== yieldWithValueIsOk.ts === -const f14 = async function * () { ->f14 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { yield 1;} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield 1; ->yield 1 : any -> : ^^^ ->1 : 1 -> : ^ - -}; -=== yieldStarMissingValueIsError.ts === -const f15 = async function * () { ->f15 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { yield *;} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield *; ->yield * : any -> : ^^^ -> : any -> : ^^^ - -}; -=== yieldStarWithValueIsOk.ts === -const f16 = async function * () { ->f16 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { yield * [];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield * []; ->yield * [] : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - -}; -=== awaitWithValueIsOk.ts === -const f17 = async function * () { ->f17 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { await 1;} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await 1; ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ - -}; -=== awaitMissingValueIsError.ts === -const f18 = async function * () { ->f18 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { await;} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await; ->await : any -> : ^^^ -> : any -> : ^^^ - -}; -=== awaitAsTypeIsOk.ts === -interface await {} -const f19 = async function * () { ->f19 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { let x: await;} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: await; ->x : await -> : ^^^^^ - -}; -=== yieldAsTypeIsOk.ts === -interface yield {} -const f20 = async function * () { ->f20 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { let x: yield;} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: yield; ->x : yield -> : ^^^^^ - -}; -=== yieldInNestedComputedPropertyIsOk.ts === -const f21 = async function *() { ->f21 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function *() { const x = { [yield]: 1 };} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = { [yield]: 1 }; ->x : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->{ [yield]: 1 } : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->[yield] : number -> : ^^^^^^ ->yield : any -> : ^^^ ->1 : 1 -> : ^ - -}; - diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt deleted file mode 100644 index 9106197c326da..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.errors.txt +++ /dev/null @@ -1,185 +0,0 @@ -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. -asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. -asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. -awaitInParameterInitializerIsError.ts(2,19): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. -awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldInParameterInitializerIsError.ts(2,19): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldParameterIsError.ts(2,15): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. - - -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== methodIsOk.ts (0 errors) ==== - const o1 = { - async * f() { - } - }; -==== awaitMethodNameIsOk.ts (0 errors) ==== - const o2 = { - async * await() { - } - }; -==== yieldMethodNameIsOk.ts (0 errors) ==== - const o3 = { - async * yield() { - } - }; -==== awaitParameterIsError.ts (1 errors) ==== - const o4 = { - async * f(await) { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - }; -==== yieldParameterIsError.ts (1 errors) ==== - const o5 = { - async * f(yield) { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - }; -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - const o6 = { - async * f(a = await 1) { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - } - }; -==== yieldInParameterInitializerIsError.ts (1 errors) ==== - const o7 = { - async * f(a = yield) { - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - } - }; -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - const o8 = { - async * f() { - async function * g() { - } - } - }; -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - const o9 = { - async * f() { - function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - } - }; -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - const o10 = { - async * f() { - const x = function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; - } - }; -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - const o11 = { - async * f() { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } - }; -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - const o12 = { - async * f() { - const x = function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; - } - }; -==== yieldIsOk.ts (0 errors) ==== - const o13 = { - async * f() { - yield; - } - }; -==== yieldWithValueIsOk.ts (0 errors) ==== - const o14 = { - async * f() { - yield 1; - } - }; -==== yieldStarMissingValueIsError.ts (1 errors) ==== - const o15 = { - async * f() { - yield *; - ~ -!!! error TS1109: Expression expected. - } - }; -==== yieldStarWithValueIsOk.ts (0 errors) ==== - const o16 = { - async * f() { - yield * []; - } - }; -==== awaitWithValueIsOk.ts (0 errors) ==== - const o17 = { - async * f() { - await 1; - } - }; -==== awaitMissingValueIsError.ts (1 errors) ==== - const o18 = { - async * f() { - await; - ~ -!!! error TS1109: Expression expected. - } - }; -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - const o19 = { - async * f() { - let x: await; - } - }; -==== yieldAsTypeIsOk.ts (0 errors) ==== - interface yield {} - const o20 = { - async * f() { - let x: yield; - } - }; -==== yieldInNestedComputedPropertyIsOk.ts (0 errors) ==== - const o21 = { - async * f() { - const x = { [yield]: 1 }; - } - }; -==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== - const o22 = { - async * get x() { - ~ -!!! error TS1005: '(' expected. - return 1; - } - }; -==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== - const o23 = { - async * set x(value: number) { - ~ -!!! error TS1005: '(' expected. - } - }; -==== asyncGeneratorPropertyIsError.ts (1 errors) ==== - const o24 = { - async * x: 1; - ~ -!!! error TS1005: '(' expected. - }; - \ No newline at end of file diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.symbols b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.symbols deleted file mode 100644 index f446450108c68..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.symbols +++ /dev/null @@ -1,258 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// - -=== methodIsOk.ts === -const o1 = { ->o1 : Symbol(o1, Decl(methodIsOk.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(methodIsOk.ts, 0, 12)) - } -}; -=== awaitMethodNameIsOk.ts === -const o2 = { ->o2 : Symbol(o2, Decl(awaitMethodNameIsOk.ts, 0, 5)) - - async * await() { ->await : Symbol(await, Decl(awaitMethodNameIsOk.ts, 0, 12)) - } -}; -=== yieldMethodNameIsOk.ts === -const o3 = { ->o3 : Symbol(o3, Decl(yieldMethodNameIsOk.ts, 0, 5)) - - async * yield() { ->yield : Symbol(yield, Decl(yieldMethodNameIsOk.ts, 0, 12)) - } -}; -=== awaitParameterIsError.ts === -const o4 = { ->o4 : Symbol(o4, Decl(awaitParameterIsError.ts, 0, 5)) - - async * f(await) { ->f : Symbol(f, Decl(awaitParameterIsError.ts, 0, 12)) ->await : Symbol(await, Decl(awaitParameterIsError.ts, 1, 14)) - } -}; -=== yieldParameterIsError.ts === -const o5 = { ->o5 : Symbol(o5, Decl(yieldParameterIsError.ts, 0, 5)) - - async * f(yield) { ->f : Symbol(f, Decl(yieldParameterIsError.ts, 0, 12)) ->yield : Symbol(yield, Decl(yieldParameterIsError.ts, 1, 14)) - } -}; -=== awaitInParameterInitializerIsError.ts === -const o6 = { ->o6 : Symbol(o6, Decl(awaitInParameterInitializerIsError.ts, 0, 5)) - - async * f(a = await 1) { ->f : Symbol(f, Decl(awaitInParameterInitializerIsError.ts, 0, 12)) ->a : Symbol(a, Decl(awaitInParameterInitializerIsError.ts, 1, 14)) - } -}; -=== yieldInParameterInitializerIsError.ts === -const o7 = { ->o7 : Symbol(o7, Decl(yieldInParameterInitializerIsError.ts, 0, 5)) - - async * f(a = yield) { ->f : Symbol(f, Decl(yieldInParameterInitializerIsError.ts, 0, 12)) ->a : Symbol(a, Decl(yieldInParameterInitializerIsError.ts, 1, 14)) - } -}; -=== nestedAsyncGeneratorIsOk.ts === -const o8 = { ->o8 : Symbol(o8, Decl(nestedAsyncGeneratorIsOk.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(nestedAsyncGeneratorIsOk.ts, 0, 12)) - - async function * g() { ->g : Symbol(g, Decl(nestedAsyncGeneratorIsOk.ts, 1, 17)) - } - } -}; -=== nestedFunctionDeclarationNamedYieldIsError.ts === -const o9 = { ->o9 : Symbol(o9, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 0, 12)) - - function yield() { ->yield : Symbol(yield, Decl(nestedFunctionDeclarationNamedYieldIsError.ts, 1, 17)) - } - } -}; -=== nestedFunctionExpressionNamedYieldIsError.ts === -const o10 = { ->o10 : Symbol(o10, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 0, 13)) - - const x = function yield() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 13)) ->yield : Symbol(yield, Decl(nestedFunctionExpressionNamedYieldIsError.ts, 2, 17)) - - }; - } -}; -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -const o11 = { ->o11 : Symbol(o11, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 0, 13)) - - function await() { ->await : Symbol(await, Decl(nestedFunctionDeclarationNamedAwaitIsError.ts, 1, 17)) - } - } -}; -=== nestedFunctionExpressionNamedAwaitIsError.ts === -const o12 = { ->o12 : Symbol(o12, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 0, 13)) - - const x = function await() { ->x : Symbol(x, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 13)) ->await : Symbol(await, Decl(nestedFunctionExpressionNamedAwaitIsError.ts, 2, 17)) - - }; - } -}; -=== yieldIsOk.ts === -const o13 = { ->o13 : Symbol(o13, Decl(yieldIsOk.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(yieldIsOk.ts, 0, 13)) - - yield; - } -}; -=== yieldWithValueIsOk.ts === -const o14 = { ->o14 : Symbol(o14, Decl(yieldWithValueIsOk.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(yieldWithValueIsOk.ts, 0, 13)) - - yield 1; - } -}; -=== yieldStarMissingValueIsError.ts === -const o15 = { ->o15 : Symbol(o15, Decl(yieldStarMissingValueIsError.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(yieldStarMissingValueIsError.ts, 0, 13)) - - yield *; - } -}; -=== yieldStarWithValueIsOk.ts === -const o16 = { ->o16 : Symbol(o16, Decl(yieldStarWithValueIsOk.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(yieldStarWithValueIsOk.ts, 0, 13)) - - yield * []; - } -}; -=== awaitWithValueIsOk.ts === -const o17 = { ->o17 : Symbol(o17, Decl(awaitWithValueIsOk.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(awaitWithValueIsOk.ts, 0, 13)) - - await 1; - } -}; -=== awaitMissingValueIsError.ts === -const o18 = { ->o18 : Symbol(o18, Decl(awaitMissingValueIsError.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(awaitMissingValueIsError.ts, 0, 13)) - - await; - } -}; -=== awaitAsTypeIsOk.ts === -interface await {} ->await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) - -const o19 = { ->o19 : Symbol(o19, Decl(awaitAsTypeIsOk.ts, 1, 5)) - - async * f() { ->f : Symbol(f, Decl(awaitAsTypeIsOk.ts, 1, 13)) - - let x: await; ->x : Symbol(x, Decl(awaitAsTypeIsOk.ts, 3, 11)) ->await : Symbol(await, Decl(awaitAsTypeIsOk.ts, 0, 0)) - } -}; -=== yieldAsTypeIsOk.ts === -interface yield {} ->yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) - -const o20 = { ->o20 : Symbol(o20, Decl(yieldAsTypeIsOk.ts, 1, 5)) - - async * f() { ->f : Symbol(f, Decl(yieldAsTypeIsOk.ts, 1, 13)) - - let x: yield; ->x : Symbol(x, Decl(yieldAsTypeIsOk.ts, 3, 11)) ->yield : Symbol(yield, Decl(yieldAsTypeIsOk.ts, 0, 0)) - } -}; -=== yieldInNestedComputedPropertyIsOk.ts === -const o21 = { ->o21 : Symbol(o21, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 5)) - - async * f() { ->f : Symbol(f, Decl(yieldInNestedComputedPropertyIsOk.ts, 0, 13)) - - const x = { [yield]: 1 }; ->x : Symbol(x, Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 13)) ->[yield] : Symbol([yield], Decl(yieldInNestedComputedPropertyIsOk.ts, 2, 19)) - } -}; -=== asyncGeneratorGetAccessorIsError.ts === -const o22 = { ->o22 : Symbol(o22, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 5)) - - async * get x() { ->get : Symbol(get, Decl(asyncGeneratorGetAccessorIsError.ts, 0, 13)) ->x : Symbol(x, Decl(asyncGeneratorGetAccessorIsError.ts, 1, 15)) - - return 1; - } -}; -=== asyncGeneratorSetAccessorIsError.ts === -const o23 = { ->o23 : Symbol(o23, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 5)) - - async * set x(value: number) { ->set : Symbol(set, Decl(asyncGeneratorSetAccessorIsError.ts, 0, 13)) ->x : Symbol(x, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 15)) ->value : Symbol(value, Decl(asyncGeneratorSetAccessorIsError.ts, 1, 18)) - } -}; -=== asyncGeneratorPropertyIsError.ts === -const o24 = { ->o24 : Symbol(o24, Decl(asyncGeneratorPropertyIsError.ts, 0, 5)) - - async * x: 1; ->x : Symbol(x, Decl(asyncGeneratorPropertyIsError.ts, 0, 13)) - -}; - diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types deleted file mode 100644 index 0a67b43853d48..0000000000000 --- a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types +++ /dev/null @@ -1,406 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// - -=== methodIsOk.ts === -const o1 = { ->o1 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -}; -=== awaitMethodNameIsOk.ts === -const o2 = { ->o2 : { await(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * await() { }} : { await(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * await() { ->await : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -}; -=== yieldMethodNameIsOk.ts === -const o3 = { ->o3 : { yield(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * yield() { }} : { yield(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * yield() { ->yield : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } -}; -=== awaitParameterIsError.ts === -const o4 = { ->o4 : { f(await: any): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f(await) { }} : { f(await: any): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f(await) { ->f : (await: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->await : any -> : ^^^ - } -}; -=== yieldParameterIsError.ts === -const o5 = { ->o5 : { f(yield: any): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f(yield) { }} : { f(yield: any): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f(yield) { ->f : (yield: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->yield : any -> : ^^^ - } -}; -=== awaitInParameterInitializerIsError.ts === -const o6 = { ->o6 : { f(a?: number): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f(a = await 1) { }} : { f(a?: number): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f(a = await 1) { ->f : (a?: number) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : number -> : ^^^^^^ ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ - } -}; -=== yieldInParameterInitializerIsError.ts === -const o7 = { ->o7 : { f(a?: any): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f(a = yield) { }} : { f(a?: any): AsyncGenerator; } -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f(a = yield) { ->f : (a?: any) => AsyncGenerator -> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a : any -> : ^^^ ->yield : any -> : ^^^ - } -}; -=== nestedAsyncGeneratorIsOk.ts === -const o8 = { ->o8 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { async function * g() { } }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async function * g() { ->g : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - } - } -}; -=== nestedFunctionDeclarationNamedYieldIsError.ts === -const o9 = { ->o9 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { function yield() { } }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function yield() { ->yield : () => void -> : ^^^^^^^^^^ - } - } -}; -=== nestedFunctionExpressionNamedYieldIsError.ts === -const o10 = { ->o10 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { const x = function yield() { }; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function yield() { ->x : () => void -> : ^^^^^^^^^^ ->function yield() { } : () => void -> : ^^^^^^^^^^ ->yield : () => void -> : ^^^^^^^^^^ - - }; - } -}; -=== nestedFunctionDeclarationNamedAwaitIsError.ts === -const o11 = { ->o11 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { function await() { } }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - function await() { ->await : () => void -> : ^^^^^^^^^^ - } - } -}; -=== nestedFunctionExpressionNamedAwaitIsError.ts === -const o12 = { ->o12 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { const x = function await() { }; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = function await() { ->x : () => void -> : ^^^^^^^^^^ ->function await() { } : () => void -> : ^^^^^^^^^^ ->await : () => void -> : ^^^^^^^^^^ - - }; - } -}; -=== yieldIsOk.ts === -const o13 = { ->o13 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { yield; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield; ->yield : any -> : ^^^ - } -}; -=== yieldWithValueIsOk.ts === -const o14 = { ->o14 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { yield 1; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield 1; ->yield 1 : any -> : ^^^ ->1 : 1 -> : ^ - } -}; -=== yieldStarMissingValueIsError.ts === -const o15 = { ->o15 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { yield *; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield *; ->yield * : any -> : ^^^ -> : any -> : ^^^ - } -}; -=== yieldStarWithValueIsOk.ts === -const o16 = { ->o16 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { yield * []; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - yield * []; ->yield * [] : any -> : ^^^ ->[] : undefined[] -> : ^^^^^^^^^^^ - } -}; -=== awaitWithValueIsOk.ts === -const o17 = { ->o17 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { await 1; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await 1; ->await 1 : 1 -> : ^ ->1 : 1 -> : ^ - } -}; -=== awaitMissingValueIsError.ts === -const o18 = { ->o18 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { await; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - await; ->await : any -> : ^^^ -> : any -> : ^^^ - } -}; -=== awaitAsTypeIsOk.ts === -interface await {} -const o19 = { ->o19 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { let x: await; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: await; ->x : await -> : ^^^^^ - } -}; -=== yieldAsTypeIsOk.ts === -interface yield {} -const o20 = { ->o20 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { let x: yield; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - let x: yield; ->x : yield -> : ^^^^^ - } -}; -=== yieldInNestedComputedPropertyIsOk.ts === -const o21 = { ->o21 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { const x = { [yield]: 1 }; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - const x = { [yield]: 1 }; ->x : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->{ [yield]: 1 } : { [x: number]: number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^ ->[yield] : number -> : ^^^^^^ ->yield : any -> : ^^^ ->1 : 1 -> : ^ - } -}; -=== asyncGeneratorGetAccessorIsError.ts === -const o22 = { ->o22 : { get(): any; x(): number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * get x() { return 1; }} : { get(): any; x(): number; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - async * get x() { ->get : () => any -> : ^^^^^^^^^ ->x : () => number -> : ^^^^^^^^^^^^ - - return 1; ->1 : 1 -> : ^ - } -}; -=== asyncGeneratorSetAccessorIsError.ts === -const o23 = { ->o23 : { set(): any; x(value: number): void; } -> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ ->{ async * set x(value: number) { }} : { set(): any; x(value: number): void; } -> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^ - - async * set x(value: number) { ->set : () => any -> : ^^^^^^^^^ ->x : (value: number) => void -> : ^ ^^ ^^^^^^^^^ ->value : number -> : ^^^^^^ - } -}; -=== asyncGeneratorPropertyIsError.ts === -const o24 = { ->o24 : { x(): 1; } -> : ^^^^^^^ ^^^ ->{ async * x: 1;} : { x(): 1; } -> : ^^^^^^^ ^^^ - - async * x: 1; ->x : () => 1 -> : ^^^^^^ - -}; - diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt deleted file mode 100644 index 43379dbf8682c..0000000000000 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -parserStatementIsNotAMemberVariableDeclaration1.ts(1,1): error TS1108: A 'return' statement can only be used within a function body. - - -!!! error TS-1: Pre-emit (2) and post-emit (3) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! -!!! related TS-1: The excess diagnostics are: -!!! related TS2304 parserStatementIsNotAMemberVariableDeclaration1.ts:6:5: Cannot find name 'private'. -!!! error TS5107: Option 'alwaysStrict=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error. -==== parserStatementIsNotAMemberVariableDeclaration1.ts (1 errors) ==== - return { - ~~~~~~ -!!! error TS1108: A 'return' statement can only be used within a function body. - - "set": function (key, value) { - - // 'private' should not be considered a member variable here. - private[key] = value; - - } - - }; \ No newline at end of file diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.js b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.js deleted file mode 100644 index 03e70305b7ff0..0000000000000 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.js +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// - -//// [parserStatementIsNotAMemberVariableDeclaration1.ts] -return { - - "set": function (key, value) { - - // 'private' should not be considered a member variable here. - private[key] = value; - - } - -}; - -//// [parserStatementIsNotAMemberVariableDeclaration1.js] -return { - "set": function (key, value) { - // 'private' should not be considered a member variable here. - private[key] = value; - } -}; diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.symbols b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.symbols deleted file mode 100644 index 1ab21d87dc79a..0000000000000 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.symbols +++ /dev/null @@ -1,18 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// - -=== parserStatementIsNotAMemberVariableDeclaration1.ts === -return { - - "set": function (key, value) { ->"set" : Symbol("set", Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 0, 8)) ->key : Symbol(key, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 19)) ->value : Symbol(value, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 23)) - - // 'private' should not be considered a member variable here. - private[key] = value; ->key : Symbol(key, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 19)) ->value : Symbol(value, Decl(parserStatementIsNotAMemberVariableDeclaration1.ts, 2, 23)) - - } - -}; diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.types b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.types deleted file mode 100644 index fba7da3639d62..0000000000000 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.types +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts] //// - -=== parserStatementIsNotAMemberVariableDeclaration1.ts === -return { ->{ "set": function (key, value) { // 'private' should not be considered a member variable here. private[key] = value; }} : { set: (key: any, value: any) => void; } -> : ^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^ - - "set": function (key, value) { ->"set" : (key: any, value: any) => void -> : ^ ^^^^^^^ ^^^^^^^^^^^^^^ ->function (key, value) { // 'private' should not be considered a member variable here. private[key] = value; } : (key: any, value: any) => void -> : ^ ^^^^^^^ ^^^^^^^^^^^^^^ ->key : any -> : ^^^ ->value : any -> : ^^^ - - // 'private' should not be considered a member variable here. - private[key] = value; ->private[key] = value : any -> : ^^^ ->private[key] : any -> : ^^^ ->private : any -> : ^^^ ->key : any -> : ^^^ ->value : any -> : ^^^ - - } - -};