diff --git a/scripts/dtsBundler.mjs b/scripts/dtsBundler.mjs
index ade134287fe57..969bad7589a43 100644
--- a/scripts/dtsBundler.mjs
+++ b/scripts/dtsBundler.mjs
@@ -73,7 +73,7 @@ function getDeclarationStatement(node) {
return undefined;
}
-const program = ts.createProgram([entrypoint], { target: ts.ScriptTarget.ES5 });
+const program = ts.createProgram([entrypoint], { target: ts.ScriptTarget.ES2015 });
const typeChecker = program.getTypeChecker();
diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts
index 236e643b00b3c..88b341409d1d1 100644
--- a/src/compiler/commandLineParser.ts
+++ b/src/compiler/commandLineParser.ts
@@ -579,12 +579,12 @@ export const targetOptionDeclaration: CommandLineOptionOfCustomType = {
affectsModuleResolution: true,
affectsEmit: true,
affectsBuildInfo: true,
- deprecatedKeys: new Set(["es3"]),
+ deprecatedKeys: new Set(["es3", "es5"]),
paramType: Diagnostics.VERSION,
showInSimplifiedHelpView: true,
category: Diagnostics.Language_and_Environment,
description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
- defaultValueDescription: ScriptTarget.ES5,
+ defaultValueDescription: ScriptTarget.CurrentYear,
};
/** @internal */
diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts
index e31d925fadd8f..9336155ab33d7 100644
--- a/src/compiler/factory/nodeFactory.ts
+++ b/src/compiler/factory/nodeFactory.ts
@@ -6052,7 +6052,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
node.path = "" as Path;
node.resolvedPath = "" as Path;
node.originalFileName = "";
- node.languageVersion = ScriptTarget.ES5;
+ node.languageVersion = ScriptTarget.CurrentYear;
node.languageVariant = 0;
node.scriptKind = 0;
node.isDeclarationFile = false;
diff --git a/src/compiler/program.ts b/src/compiler/program.ts
index e56c0353cd3bc..b0314dc12e53a 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.target === ScriptTarget.ES5) {
+ createDeprecatedDiagnostic("target", "ES5");
+ }
if (options.moduleResolution === ModuleResolutionKind.Node10) {
createDeprecatedDiagnostic("moduleResolution", "node10", /*useInstead*/ undefined, Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information);
}
diff --git a/src/compiler/types.ts b/src/compiler/types.ts
index 4e9f872720d79..5771c66d70fc4 100644
--- a/src/compiler/types.ts
+++ b/src/compiler/types.ts
@@ -7659,6 +7659,7 @@ export const enum ScriptKind {
export const enum ScriptTarget {
/** @deprecated */
ES3 = 0,
+ /** @deprecated */
ES5 = 1,
ES2015 = 2,
ES2016 = 3,
@@ -7673,6 +7674,7 @@ export const enum ScriptTarget {
ESNext = 99,
JSON = 100,
Latest = ESNext,
+ CurrentYear = ES2024,
}
export const enum LanguageVariant {
diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts
index 9a78e2de7a949..bec90f8aacb1c 100644
--- a/src/compiler/utilities.ts
+++ b/src/compiler/utilities.ts
@@ -8991,15 +8991,10 @@ const _computedOptions = createComputedCompilerOptions({
},
},
target: {
- dependencies: ["module"],
+ dependencies: [],
computeValue: compilerOptions => {
const target = compilerOptions.target === ScriptTarget.ES3 ? undefined : compilerOptions.target;
- return target ??
- ((compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) ||
- (compilerOptions.module === ModuleKind.Node18 && ScriptTarget.ES2022) ||
- (compilerOptions.module === ModuleKind.Node20 && ScriptTarget.ES2023) ||
- (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) ||
- ScriptTarget.ES5);
+ return target ?? ScriptTarget.CurrentYear;
},
},
module: {
diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts
index 7b434403eb15c..664947bf612b0 100644
--- a/src/harness/evaluatorImpl.ts
+++ b/src/harness/evaluatorImpl.ts
@@ -41,6 +41,7 @@ export function evaluateTypeScript(source: string | { files: vfs.FileSet; rootFi
module: ts.ModuleKind.CommonJS,
strict: false,
lib: ["lib.esnext.d.ts", "lib.dom.d.ts"],
+ ignoreDeprecations: "6.0",
...options,
};
const host = new fakes.CompilerHost(fs, compilerOptions);
diff --git a/src/server/protocol.ts b/src/server/protocol.ts
index 8fdd31e6f00f1..63103e2f4e41a 100644
--- a/src/server/protocol.ts
+++ b/src/server/protocol.ts
@@ -3284,6 +3284,7 @@ export const enum NewLineKind {
export const enum ScriptTarget {
/** @deprecated */
ES3 = "es3",
+ /** @deprecated */
ES5 = "es5",
ES6 = "es6",
ES2015 = "es2015",
@@ -3299,6 +3300,7 @@ export const enum ScriptTarget {
ESNext = "esnext",
JSON = "json",
Latest = ESNext,
+ CurrentYear = ES2024,
}
{
diff --git a/src/services/preProcess.ts b/src/services/preProcess.ts
index 80122c96a2f61..195def5efaa62 100644
--- a/src/services/preProcess.ts
+++ b/src/services/preProcess.ts
@@ -15,7 +15,7 @@ import {
export function preProcessFile(sourceText: string, readImportFiles = true, detectJavaScriptImports = false): PreProcessedFileInfo {
const pragmaContext: PragmaContext = {
- languageVersion: ScriptTarget.ES5, // controls whether the token scanner considers unicode identifiers or not - shouldn't matter, since we're only using it for trivia
+ languageVersion: ScriptTarget.CurrentYear, // controls whether the token scanner considers unicode identifiers or not - shouldn't matter, since we're only using it for trivia
pragmas: undefined,
checkJsDirective: undefined,
referencedFiles: [],
diff --git a/src/services/services.ts b/src/services/services.ts
index bfdff7ceb2767..e5a655597d037 100644
--- a/src/services/services.ts
+++ b/src/services/services.ts
@@ -1382,9 +1382,8 @@ export function displayPartsToString(displayParts: SymbolDisplayPart[] | undefin
}
export function getDefaultCompilerOptions(): CompilerOptions {
- // Always default to "ScriptTarget.ES5" for the language service
return {
- target: ScriptTarget.ES5,
+ target: ScriptTarget.CurrentYear,
jsx: JsxEmit.Preserve,
};
}
diff --git a/src/testRunner/unittests/helpers/contents.ts b/src/testRunner/unittests/helpers/contents.ts
index ddfd14d5695a4..668c64a0a0a87 100644
--- a/src/testRunner/unittests/helpers/contents.ts
+++ b/src/testRunner/unittests/helpers/contents.ts
@@ -32,5 +32,5 @@ interface Symbol {
`;
export function getProjectConfigWithNodeNext(withNodeNext: boolean | undefined): object | undefined {
- return withNodeNext ? { module: "nodenext", target: "es5" } : undefined;
+ return withNodeNext ? { module: "nodenext", target: "es2015" } : undefined;
}
diff --git a/src/testRunner/unittests/helpers/demoProjectReferences.ts b/src/testRunner/unittests/helpers/demoProjectReferences.ts
index 38e7360f704c4..580445c6627b2 100644
--- a/src/testRunner/unittests/helpers/demoProjectReferences.ts
+++ b/src/testRunner/unittests/helpers/demoProjectReferences.ts
@@ -92,7 +92,7 @@ export function getSysForDemoProjectReferences(): TestServerHost {
"/user/username/projects/demo/tsconfig-base.json": jsonToReadableText({
compilerOptions: {
declaration: true,
- target: "es5",
+ target: "es2015",
module: "commonjs",
strict: true,
noUnusedLocals: true,
diff --git a/src/testRunner/unittests/services/convertToAsyncFunction.ts b/src/testRunner/unittests/services/convertToAsyncFunction.ts
index 40249d8b25b81..5ef8a371fe5f0 100644
--- a/src/testRunner/unittests/services/convertToAsyncFunction.ts
+++ b/src/testRunner/unittests/services/convertToAsyncFunction.ts
@@ -414,6 +414,7 @@ function testConvertToAsyncFunction(it: Mocha.PendingTestFunction, caption: stri
}
const host = TestServerHost.createServerHost(files);
const projectService = new TestProjectService(host);
+ projectService.setCompilerOptionsForInferredProjects({ target: ts.server.protocol.ScriptTarget.ES5 });
projectService.openClientFile(file.path);
return ts.first(projectService.inferredProjects).getLanguageService();
}
diff --git a/src/testRunner/unittests/services/transpile.ts b/src/testRunner/unittests/services/transpile.ts
index 66faf0e452a65..ea273f4e93a4e 100644
--- a/src/testRunner/unittests/services/transpile.ts
+++ b/src/testRunner/unittests/services/transpile.ts
@@ -21,6 +21,7 @@ describe("unittests:: services:: Transpile", () => {
}
if (transpileOptions.compilerOptions.target === undefined) {
transpileOptions.compilerOptions.target = ts.ScriptTarget.ES5;
+ transpileOptions.compilerOptions.ignoreDeprecations = "6.0";
}
if (transpileOptions.compilerOptions.newLine === undefined) {
@@ -204,6 +205,7 @@ var x = 0;`,
emitDecoratorMetadata: true,
experimentalDecorators: true,
target: ts.ScriptTarget.ES5,
+ ignoreDeprecations: "6.0",
},
},
testVerbatimModuleSyntax: true,
diff --git a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
index 14761b6ac72c3..7fd8b1fca4c34 100644
--- a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
+++ b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
@@ -35,7 +35,7 @@ describe("unittests:: tsbuild:: on project with emitDeclarationOnly:: set to tru
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
incremental: true,
- target: "es5",
+ target: "es2015",
module: "commonjs",
declaration: true,
declarationMap: true,
diff --git a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
index 0690fea37c0fd..5cb44ee4b92e2 100644
--- a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
+++ b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
@@ -50,7 +50,7 @@ describe("unittests:: tsbuild:: inferredTypeFromTransitiveModule::", () => {
`,
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
declaration: true,
outDir: "obj",
incremental: true,
diff --git a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
index fec8ba82f042d..b053e420b0db5 100644
--- a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
+++ b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
@@ -178,7 +178,7 @@ describe("unittests:: tsbuild:: with resolveJsonModule:: option on project impor
}),
"/home/src/workspaces/solution/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
rootDir: "./",
composite: true,
diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts
index e4ab7334c272c..3d09c5633e3b5 100644
--- a/src/testRunner/unittests/tsbuild/sample.ts
+++ b/src/testRunner/unittests/tsbuild/sample.ts
@@ -1,5 +1,6 @@
import { Baseline } from "../../_namespaces/Harness.js";
import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
import { jsonToReadableText } from "../helpers.js";
import {
fakeTsVersion,
@@ -241,7 +242,7 @@ describe("unittests:: tsbuild:: on 'sample1' project", () => {
sys: getSysForSampleProjectReferences,
commandLineArgs: ["--b", "tests", "--verbose"],
modifySystem: sys => {
- sys.writeFile("tests/tsconfig.base.json", jsonToReadableText({ compilerOptions: { target: "es5" } }));
+ sys.writeFile("tests/tsconfig.base.json", jsonToReadableText({ compilerOptions: { target: "es2015" } }));
sys.replaceFileText("tests/tsconfig.json", `"references": [`, `"extends": "./tsconfig.base.json", "references": [`);
},
edits: [{
@@ -510,6 +511,15 @@ class someClass2 { }`,
libFile.path,
`/// `,
);
+ sys.writeFile(
+ "core/index.ts",
+ dedent`
+ export const someString: string = "HELLO WORLD";
+ export function leftPad(s: string, n: number) { return s + n; }
+ export function multiply(a: number, b: number) { return a * b; }
+ export function exponentiate(a: number, b: number) { return a ** b; }
+ `,
+ );
sys.writeFile(
"core/tsconfig.json",
jsonToReadableText({
@@ -524,7 +534,7 @@ class someClass2 { }`,
},
edits: [{
caption: "incremental-declaration-changes",
- edit: sys => sys.replaceFileText("core/tsconfig.json", "esnext", "es5"),
+ edit: sys => sys.replaceFileText("core/tsconfig.json", "esnext", "es2015"),
}],
});
diff --git a/src/testRunner/unittests/tsc/composite.ts b/src/testRunner/unittests/tsc/composite.ts
index 518ad7290b00e..05d764fae2b15 100644
--- a/src/testRunner/unittests/tsc/composite.ts
+++ b/src/testRunner/unittests/tsc/composite.ts
@@ -13,7 +13,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
},
@@ -33,7 +33,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
},
@@ -53,7 +53,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
tsBuildInfoFile: "tsconfig.json.tsbuildinfo",
@@ -74,7 +74,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
tsBuildInfoFile: "tsconfig.json.tsbuildinfo",
diff --git a/src/testRunner/unittests/tsc/declarationEmit.ts b/src/testRunner/unittests/tsc/declarationEmit.ts
index 83c4540c40ace..91ed1ed08073f 100644
--- a/src/testRunner/unittests/tsc/declarationEmit.ts
+++ b/src/testRunner/unittests/tsc/declarationEmit.ts
@@ -55,7 +55,7 @@ describe("unittests:: tsc:: declarationEmit::", () => {
function pluginOneConfig() {
return jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
declaration: true,
traceResolution: true,
},
@@ -236,7 +236,7 @@ ${pluginOneAction()}`,
compilerOptions: {
outDir: "dist",
rootDir: "src",
- target: "es5",
+ target: "es2015",
module: "commonjs",
strict: true,
esModuleInterop: true,
diff --git a/src/testRunner/unittests/tsc/incremental.ts b/src/testRunner/unittests/tsc/incremental.ts
index fcbd91ab1d296..74d2991b82991 100644
--- a/src/testRunner/unittests/tsc/incremental.ts
+++ b/src/testRunner/unittests/tsc/incremental.ts
@@ -23,7 +23,7 @@ describe("unittests:: tsc:: incremental::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
},
include: [
diff --git a/src/testRunner/unittests/tscWatch/incremental.ts b/src/testRunner/unittests/tscWatch/incremental.ts
index d9cce42321d01..244ab8b6c62f3 100644
--- a/src/testRunner/unittests/tscWatch/incremental.ts
+++ b/src/testRunner/unittests/tscWatch/incremental.ts
@@ -157,7 +157,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
{ currentDirectory: project },
);
const reportDiagnostic = ts.createDiagnosticReporter(system);
- const parsedConfig = ts.parseConfigFileWithSystem("tsconfig.json", {}, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, reportDiagnostic)!;
+ const parsedConfig = ts.parseConfigFileWithSystem("tsconfig.json", { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.AMD }, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, reportDiagnostic)!;
ts.performIncrementalCompilation({
rootNames: parsedConfig.fileNames,
options: parsedConfig.options,
@@ -167,7 +167,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
system,
});
- const command = ts.parseConfigFileWithSystem("tsconfig.json", {}, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, ts.noop)!;
+ const command = ts.parseConfigFileWithSystem("tsconfig.json", { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.AMD }, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, ts.noop)!;
const builderProgram = ts.createIncrementalProgram({
rootNames: command.fileNames,
options: command.options,
@@ -200,6 +200,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
assert.deepEqual(builderProgram.state.compilerOptions, {
incremental: true,
+ target: ts.ScriptTarget.ES5,
module: ts.ModuleKind.AMD,
configFilePath: config.path,
ignoreDeprecations: "6.0",
@@ -242,7 +243,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
content: jsonToReadableText({
compilerOptions: {
incremental: true,
- target: "es5",
+ target: "es2015",
module: "commonjs",
declaration: true,
emitDeclarationOnly: true,
diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts
index 7fab62c966987..f676472804e0c 100644
--- a/src/testRunner/unittests/tscWatch/programUpdates.ts
+++ b/src/testRunner/unittests/tscWatch/programUpdates.ts
@@ -985,7 +985,7 @@ declare const eval: any`,
{
compilerOptions: {
module: "commonjs",
- target: "es5",
+ target: "es2015",
noImplicitAny: true,
sourceMap: false,
lib: [
@@ -1010,7 +1010,7 @@ declare const eval: any`,
{
compilerOptions: {
module: "commonjs",
- target: "es5",
+ target: "es2015",
noImplicitAny: true,
sourceMap: false,
lib: [
diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1(target=es5).errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck1(target=es5).errors.txt
new file mode 100644
index 0000000000000..e58b14591eed2
--- /dev/null
+++ b/tests/baselines/reference/ES3For-ofTypeCheck1(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES3For-ofTypeCheck1.ts (0 errors) ====
+ for (var v of "") { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES3For-ofTypeCheck2(target=es5).errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck2(target=es5).errors.txt
new file mode 100644
index 0000000000000..0c92dcbb455e1
--- /dev/null
+++ b/tests/baselines/reference/ES3For-ofTypeCheck2(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES3For-ofTypeCheck2.ts (0 errors) ====
+ for (var v of [true]) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4(target=es5).errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck4(target=es5).errors.txt
new file mode 100644
index 0000000000000..875b8bc5183ab
--- /dev/null
+++ b/tests/baselines/reference/ES3For-ofTypeCheck4(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES3For-ofTypeCheck4.ts (0 errors) ====
+ var union: string | string[];
+ for (const v of union) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES3For-ofTypeCheck6(target=es5).errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck6(target=es5).errors.txt
new file mode 100644
index 0000000000000..d1d44ab630a64
--- /dev/null
+++ b/tests/baselines/reference/ES3For-ofTypeCheck6(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES3For-ofTypeCheck6.ts (0 errors) ====
+ var union: string[] | number[];
+ for (var v of union) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of1(target=es5).errors.txt b/tests/baselines/reference/ES5For-of1(target=es5).errors.txt
new file mode 100644
index 0000000000000..2c2eb277ba412
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of1(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of1.ts (0 errors) ====
+ for (var v of ['a', 'b', 'c']) {
+ console.log(v);
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of10(target=es5).errors.txt b/tests/baselines/reference/ES5For-of10(target=es5).errors.txt
new file mode 100644
index 0000000000000..0b6562d33c097
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of10(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of10.ts (0 errors) ====
+ function foo() {
+ return { x: 0 };
+ }
+ for (foo().x of []) {
+ for (foo().x of [])
+ var p = foo().x;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of11(target=es5).errors.txt b/tests/baselines/reference/ES5For-of11(target=es5).errors.txt
new file mode 100644
index 0000000000000..003646de07e53
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of11(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of11.ts (0 errors) ====
+ var v;
+ for (v of []) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of11(target=es5).types b/tests/baselines/reference/ES5For-of11(target=es5).types
index 47714be3636ca..296009f658e75 100644
--- a/tests/baselines/reference/ES5For-of11(target=es5).types
+++ b/tests/baselines/reference/ES5For-of11(target=es5).types
@@ -3,9 +3,11 @@
=== ES5For-of11.ts ===
var v;
>v : any
+> : ^^^
for (v of []) { }
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
diff --git a/tests/baselines/reference/ES5For-of12(target=es5).errors.txt b/tests/baselines/reference/ES5For-of12(target=es5).errors.txt
index fe53e92b35951..6feb5333400dd 100644
--- a/tests/baselines/reference/ES5For-of12(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of12(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of12.ts(1,7): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
+!!! 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-of12.ts (1 errors) ====
for ([""] of [[""]]) { }
~~
diff --git a/tests/baselines/reference/ES5For-of13(target=es5).errors.txt b/tests/baselines/reference/ES5For-of13(target=es5).errors.txt
new file mode 100644
index 0000000000000..ba4460ee618b1
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of13(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of13.ts (0 errors) ====
+ for (let v of ['a', 'b', 'c']) {
+ var x = v;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of14(target=es5).errors.txt b/tests/baselines/reference/ES5For-of14(target=es5).errors.txt
new file mode 100644
index 0000000000000..e4bc5437fccb2
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of14(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of14.ts (0 errors) ====
+ for (const v of []) {
+ var x = v;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of14(target=es5).types b/tests/baselines/reference/ES5For-of14(target=es5).types
index 447dfafa6609f..7ca8d1793530e 100644
--- a/tests/baselines/reference/ES5For-of14(target=es5).types
+++ b/tests/baselines/reference/ES5For-of14(target=es5).types
@@ -3,10 +3,13 @@
=== ES5For-of14.ts ===
for (const v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var x = v;
>x : any
+> : ^^^
>v : any
+> : ^^^
}
diff --git a/tests/baselines/reference/ES5For-of15(target=es5).errors.txt b/tests/baselines/reference/ES5For-of15(target=es5).errors.txt
new file mode 100644
index 0000000000000..0840057072f76
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of15(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of15.ts (0 errors) ====
+ for (let v of []) {
+ v;
+ for (const v of []) {
+ var x = v;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of15(target=es5).types b/tests/baselines/reference/ES5For-of15(target=es5).types
index 59dd8fbcb942e..dc274dda81b91 100644
--- a/tests/baselines/reference/ES5For-of15(target=es5).types
+++ b/tests/baselines/reference/ES5For-of15(target=es5).types
@@ -3,19 +3,24 @@
=== ES5For-of15.ts ===
for (let v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
v;
>v : any
+> : ^^^
for (const v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var x = v;
>x : any
+> : ^^^
>v : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/ES5For-of16(target=es5).errors.txt b/tests/baselines/reference/ES5For-of16(target=es5).errors.txt
new file mode 100644
index 0000000000000..005c199af2cbf
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of16(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of16.ts (0 errors) ====
+ for (let v of []) {
+ v;
+ for (let v of []) {
+ var x = v;
+ v++;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of16(target=es5).types b/tests/baselines/reference/ES5For-of16(target=es5).types
index cbb8f86a4c0a6..b0a6564844d00 100644
--- a/tests/baselines/reference/ES5For-of16(target=es5).types
+++ b/tests/baselines/reference/ES5For-of16(target=es5).types
@@ -3,24 +3,30 @@
=== ES5For-of16.ts ===
for (let v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
v;
>v : any
+> : ^^^
for (let v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var x = v;
>x : any
+> : ^^^
>v : any
+> : ^^^
v++;
>v++ : number
> : ^^^^^^
>v : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/ES5For-of17(target=es5).errors.txt b/tests/baselines/reference/ES5For-of17(target=es5).errors.txt
index 8f20fb7f68a15..722a8101e29ab 100644
--- a/tests/baselines/reference/ES5For-of17(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of17(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of17.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration.
+!!! 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-of17.ts (1 errors) ====
for (let v of []) {
v;
diff --git a/tests/baselines/reference/ES5For-of18(target=es5).errors.txt b/tests/baselines/reference/ES5For-of18(target=es5).errors.txt
new file mode 100644
index 0000000000000..7b67fa8c61b55
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of18(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of18.ts (0 errors) ====
+ for (let v of []) {
+ v;
+ }
+ for (let v of []) {
+ v;
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of18(target=es5).types b/tests/baselines/reference/ES5For-of18(target=es5).types
index 4d6d26f7c2245..ea1507d9e2340 100644
--- a/tests/baselines/reference/ES5For-of18(target=es5).types
+++ b/tests/baselines/reference/ES5For-of18(target=es5).types
@@ -3,18 +3,22 @@
=== ES5For-of18.ts ===
for (let v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
v;
>v : any
+> : ^^^
}
for (let 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
new file mode 100644
index 0000000000000..9d68e6c5170b2
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of19(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 '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).types b/tests/baselines/reference/ES5For-of19(target=es5).types
index 30cb86bfdb2ef..67affcfc4c249 100644
--- a/tests/baselines/reference/ES5For-of19(target=es5).types
+++ b/tests/baselines/reference/ES5For-of19(target=es5).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-of2(target=es5).errors.txt b/tests/baselines/reference/ES5For-of2(target=es5).errors.txt
new file mode 100644
index 0000000000000..33225e6abaa7c
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of2(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of2.ts (0 errors) ====
+ for (var v of []) {
+ var x = v;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of2(target=es5).types b/tests/baselines/reference/ES5For-of2(target=es5).types
index 789047457d6dc..57c25b7edc2c3 100644
--- a/tests/baselines/reference/ES5For-of2(target=es5).types
+++ b/tests/baselines/reference/ES5For-of2(target=es5).types
@@ -3,10 +3,13 @@
=== ES5For-of2.ts ===
for (var v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var x = v;
>x : any
+> : ^^^
>v : any
+> : ^^^
}
diff --git a/tests/baselines/reference/ES5For-of20(target=es5).errors.txt b/tests/baselines/reference/ES5For-of20(target=es5).errors.txt
index ff8cf77d27271..c9b28dfcb4f57 100644
--- a/tests/baselines/reference/ES5For-of20(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of20(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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-of20.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration.
ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized.
+!!! 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-of20.ts (2 errors) ====
for (let v of []) {
let v;
diff --git a/tests/baselines/reference/ES5For-of21(target=es5).errors.txt b/tests/baselines/reference/ES5For-of21(target=es5).errors.txt
new file mode 100644
index 0000000000000..1fcdbe6d535d5
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of21(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of21.ts (0 errors) ====
+ for (let v of []) {
+ for (let _i of []) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of21(target=es5).types b/tests/baselines/reference/ES5For-of21(target=es5).types
index df747d6a8da95..375fb3fedf48e 100644
--- a/tests/baselines/reference/ES5For-of21(target=es5).types
+++ b/tests/baselines/reference/ES5For-of21(target=es5).types
@@ -3,11 +3,13 @@
=== ES5For-of21.ts ===
for (let v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
for (let _i of []) { }
>_i : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
}
diff --git a/tests/baselines/reference/ES5For-of22(target=es5).errors.txt b/tests/baselines/reference/ES5For-of22(target=es5).errors.txt
new file mode 100644
index 0000000000000..a40c36ea0b5ff
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of22(target=es5).errors.txt
@@ -0,0 +1,9 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of22.ts (0 errors) ====
+ for (var x of [1, 2, 3]) {
+ let _a = 0;
+ console.log(x);
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of23(target=es5).errors.txt b/tests/baselines/reference/ES5For-of23(target=es5).errors.txt
new file mode 100644
index 0000000000000..f0914f89d4485
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of23(target=es5).errors.txt
@@ -0,0 +1,9 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of23.ts (0 errors) ====
+ for (var x of [1, 2, 3]) {
+ var _a = 0;
+ console.log(x);
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of24(target=es5).errors.txt b/tests/baselines/reference/ES5For-of24(target=es5).errors.txt
new file mode 100644
index 0000000000000..44566cb4e3051
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of24(target=es5).errors.txt
@@ -0,0 +1,9 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of24.ts (0 errors) ====
+ var a = [1, 2, 3];
+ for (var v of a) {
+ let a = 0;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of25(target=es5).errors.txt b/tests/baselines/reference/ES5For-of25(target=es5).errors.txt
new file mode 100644
index 0000000000000..5703ac8906272
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of25(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of25.ts (0 errors) ====
+ var a = [1, 2, 3];
+ for (var v of a) {
+ v;
+ a;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of26(target=es5).errors.txt b/tests/baselines/reference/ES5For-of26(target=es5).errors.txt
index 04c47bcc748ec..8e44a0a909f13 100644
--- a/tests/baselines/reference/ES5For-of26(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of26(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of26.ts(1,10): error TS2461: Type 'number' is not an array type.
+!!! 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-of26.ts (1 errors) ====
for (var [a = 0, b = 1] of [2, 3]) {
~~~~~~~~~~~~~~
diff --git a/tests/baselines/reference/ES5For-of27(target=es5).errors.txt b/tests/baselines/reference/ES5For-of27(target=es5).errors.txt
index 0e8087a19d99f..7ce66a4967a60 100644
--- a/tests/baselines/reference/ES5For-of27(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of27(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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-of27.ts(1,11): error TS2339: Property 'x' does not exist on type 'Number'.
ES5For-of27.ts(1,21): error TS2339: Property 'y' does not exist on type 'Number'.
+!!! 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-of27.ts (2 errors) ====
for (var {x: a = 0, y: b = 1} of [2, 3]) {
~
diff --git a/tests/baselines/reference/ES5For-of28(target=es5).errors.txt b/tests/baselines/reference/ES5For-of28(target=es5).errors.txt
index f669a33fa2a2e..df1b84c303433 100644
--- a/tests/baselines/reference/ES5For-of28(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of28(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of28.ts(1,10): error TS2461: Type 'number' is not an array type.
+!!! 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-of28.ts (1 errors) ====
for (let [a = 0, b = 1] of [2, 3]) {
~~~~~~~~~~~~~~
diff --git a/tests/baselines/reference/ES5For-of29(target=es5).errors.txt b/tests/baselines/reference/ES5For-of29(target=es5).errors.txt
index ff9834e6f86ff..f1450a84ef5ae 100644
--- a/tests/baselines/reference/ES5For-of29(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of29(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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-of29.ts(1,13): error TS2339: Property 'x' does not exist on type 'Number'.
ES5For-of29.ts(1,23): error TS2339: Property 'y' does not exist on type 'Number'.
+!!! 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-of29.ts (2 errors) ====
for (const {x: a = 0, y: b = 1} of [2, 3]) {
~
diff --git a/tests/baselines/reference/ES5For-of3(target=es5).errors.txt b/tests/baselines/reference/ES5For-of3(target=es5).errors.txt
new file mode 100644
index 0000000000000..28fd8e27bcf90
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of3(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of3.ts (0 errors) ====
+ for (var v of ['a', 'b', 'c'])
+ var x = v;
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of30(target=es5).errors.txt b/tests/baselines/reference/ES5For-of30(target=es5).errors.txt
index b2e8a692f7c08..b81fd833e02a2 100644
--- a/tests/baselines/reference/ES5For-of30(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of30(target=es5).errors.txt
@@ -1,8 +1,10 @@
+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-of30.ts(3,6): error TS2461: Type 'string | number' is not an array type.
ES5For-of30.ts(3,7): error TS2322: Type 'number' is not assignable to type 'string'.
ES5For-of30.ts(3,14): error TS2322: Type 'string' is not assignable to type 'number'.
+!!! 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-of30.ts (3 errors) ====
var a: string, b: number;
var tuple: [number, string] = [2, "3"];
diff --git a/tests/baselines/reference/ES5For-of31(target=es5).errors.txt b/tests/baselines/reference/ES5For-of31(target=es5).errors.txt
index 2c311153ffc35..f023f3187d960 100644
--- a/tests/baselines/reference/ES5For-of31(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of31(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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-of31.ts(3,8): error TS2339: Property 'a' does not exist on type 'undefined'.
ES5For-of31.ts(3,18): error TS2339: Property 'b' does not exist on type 'undefined'.
+!!! 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-of31.ts (2 errors) ====
var a: string, b: number;
diff --git a/tests/baselines/reference/ES5For-of33(target=es5).errors.txt b/tests/baselines/reference/ES5For-of33(target=es5).errors.txt
new file mode 100644
index 0000000000000..3c3e980a6111e
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of33(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of33.ts (0 errors) ====
+ for (var v of ['a', 'b', 'c']) {
+ console.log(v);
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of34(target=es5).errors.txt b/tests/baselines/reference/ES5For-of34(target=es5).errors.txt
index f144c20c30d3b..77c17bf4f3ce9 100644
--- a/tests/baselines/reference/ES5For-of34(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of34(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of34.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'.
+!!! 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-of34.ts (1 errors) ====
function foo() {
return { x: 0 };
diff --git a/tests/baselines/reference/ES5For-of35(target=es5).errors.txt b/tests/baselines/reference/ES5For-of35(target=es5).errors.txt
index 64fe6dcc61a3a..0742153fdb980 100644
--- a/tests/baselines/reference/ES5For-of35(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of35(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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-of35.ts(1,13): error TS2339: Property 'x' does not exist on type 'Number'.
ES5For-of35.ts(1,23): error TS2339: Property 'y' does not exist on type 'Number'.
+!!! 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-of35.ts (2 errors) ====
for (const {x: a = 0, y: b = 1} of [2, 3]) {
~
diff --git a/tests/baselines/reference/ES5For-of36(target=es5).errors.txt b/tests/baselines/reference/ES5For-of36(target=es5).errors.txt
index 2c9458b431d35..eb02b78a66de2 100644
--- a/tests/baselines/reference/ES5For-of36(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of36(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of36.ts(1,10): error TS2548: Type 'number' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.
+!!! 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-of36.ts (1 errors) ====
for (let [a = 0, b = 1] of [2, 3]) {
~~~~~~~~~~~~~~
diff --git a/tests/baselines/reference/ES5For-of37(target=es5).errors.txt b/tests/baselines/reference/ES5For-of37(target=es5).errors.txt
new file mode 100644
index 0000000000000..2454a2d838de1
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of37(target=es5).errors.txt
@@ -0,0 +1,20 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of37.ts (0 errors) ====
+ // https://github.com/microsoft/TypeScript/issues/30083
+
+ for (const i of [0, 1, 2, 3, 4]) {
+ try {
+ // Ensure catch binding for the following loop is reset per iteration:
+ for (const j of [1, 2, 3]) {
+ if (i === 2) {
+ throw new Error('ERR');
+ }
+ }
+ console.log(i);
+ } catch (err) {
+ console.log('E %s %s', i, err);
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of37(target=es5).types b/tests/baselines/reference/ES5For-of37(target=es5).types
index 58c2d9689f3f5..232bb657472a6 100644
--- a/tests/baselines/reference/ES5For-of37(target=es5).types
+++ b/tests/baselines/reference/ES5For-of37(target=es5).types
@@ -64,6 +64,7 @@ for (const i of [0, 1, 2, 3, 4]) {
} catch (err) {
>err : any
+> : ^^^
console.log('E %s %s', i, err);
>console.log('E %s %s', i, err) : void
@@ -79,5 +80,6 @@ for (const i of [0, 1, 2, 3, 4]) {
>i : number
> : ^^^^^^
>err : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/ES5For-of4(target=es5).errors.txt b/tests/baselines/reference/ES5For-of4(target=es5).errors.txt
new file mode 100644
index 0000000000000..fe6c947496ba5
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of4(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of4.ts (0 errors) ====
+ for (var v of [])
+ var x = v;
+ var y = v;
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of4(target=es5).types b/tests/baselines/reference/ES5For-of4(target=es5).types
index 7cad355200ff1..267e6533bb295 100644
--- a/tests/baselines/reference/ES5For-of4(target=es5).types
+++ b/tests/baselines/reference/ES5For-of4(target=es5).types
@@ -3,14 +3,19 @@
=== ES5For-of4.ts ===
for (var v of [])
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var x = v;
>x : any
+> : ^^^
>v : any
+> : ^^^
var y = v;
>y : any
+> : ^^^
>v : any
+> : ^^^
diff --git a/tests/baselines/reference/ES5For-of5(target=es5).errors.txt b/tests/baselines/reference/ES5For-of5(target=es5).errors.txt
new file mode 100644
index 0000000000000..552d94c54e7e7
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of5(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of5.ts (0 errors) ====
+ for (var _a of []) {
+ var x = _a;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of5(target=es5).types b/tests/baselines/reference/ES5For-of5(target=es5).types
index cb0edb7986759..009e8368d2e95 100644
--- a/tests/baselines/reference/ES5For-of5(target=es5).types
+++ b/tests/baselines/reference/ES5For-of5(target=es5).types
@@ -3,10 +3,13 @@
=== ES5For-of5.ts ===
for (var _a of []) {
>_a : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var x = _a;
>x : any
+> : ^^^
>_a : any
+> : ^^^
}
diff --git a/tests/baselines/reference/ES5For-of6(target=es5).errors.txt b/tests/baselines/reference/ES5For-of6(target=es5).errors.txt
new file mode 100644
index 0000000000000..cd9142393774e
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of6(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of6.ts (0 errors) ====
+ for (var w of []) {
+ for (var v of []) {
+ var x = [w, v];
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-of6(target=es5).types b/tests/baselines/reference/ES5For-of6(target=es5).types
index 1060c46c2ddc5..5db31f82af2e7 100644
--- a/tests/baselines/reference/ES5For-of6(target=es5).types
+++ b/tests/baselines/reference/ES5For-of6(target=es5).types
@@ -3,11 +3,13 @@
=== ES5For-of6.ts ===
for (var w of []) {
>w : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
for (var v of []) {
>v : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
@@ -17,6 +19,8 @@ for (var w of []) {
>[w, v] : any[]
> : ^^^^^
>w : any
+> : ^^^
>v : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/ES5For-of7(target=es5).errors.txt b/tests/baselines/reference/ES5For-of7(target=es5).errors.txt
index 321726f9e2572..edb709bd4ea5f 100644
--- a/tests/baselines/reference/ES5For-of7(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of7(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of7.ts(6,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'any[]'.
+!!! 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-of7.ts (1 errors) ====
for (var w of []) {
var x = w;
diff --git a/tests/baselines/reference/ES5For-of8(target=es5).errors.txt b/tests/baselines/reference/ES5For-of8(target=es5).errors.txt
index 707302366a09c..2c8db9bd13e3f 100644
--- a/tests/baselines/reference/ES5For-of8(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-of8(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-of8.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'.
+!!! 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-of8.ts (1 errors) ====
function foo() {
return { x: 0 };
diff --git a/tests/baselines/reference/ES5For-of9(target=es5).errors.txt b/tests/baselines/reference/ES5For-of9(target=es5).errors.txt
new file mode 100644
index 0000000000000..c3876489848bf
--- /dev/null
+++ b/tests/baselines/reference/ES5For-of9(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-of9.ts (0 errors) ====
+ function foo() {
+ return { x: 0 };
+ }
+ for (foo().x of []) {
+ for (foo().x of []) {
+ var p = foo().x;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck1(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck1(target=es5).errors.txt
new file mode 100644
index 0000000000000..533c742673b15
--- /dev/null
+++ b/tests/baselines/reference/ES5For-ofTypeCheck1(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-ofTypeCheck1.ts (0 errors) ====
+ for (var v of "") { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck10(target=es5).errors.txt
index 5ec96d209aa3a..070cdaaae1208 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck10(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck10(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-ofTypeCheck10.ts(14,15): error TS2802: Type 'MyStringIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+!!! 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-ofTypeCheck10.ts (1 errors) ====
// In ES3/5, you cannot for...of over an arbitrary iterable.
class MyStringIterator {
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck11(target=es5).errors.txt
index 4ccd0dc727574..e46ce345fa0b8 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck11(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck11(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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-ofTypeCheck11.ts(3,6): error TS2322: Type 'string | number' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.
+!!! 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-ofTypeCheck11.ts (1 errors) ====
declare var union: string | number[];
var v: string;
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck12(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck12(target=es5).errors.txt
index da876badcdddb..2db78d44766f5 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck12(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck12(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-ofTypeCheck12.ts(1,17): error TS2495: Type '0' is not an array type or a string type.
+!!! 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-ofTypeCheck12.ts (1 errors) ====
for (const v of 0) { }
~
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck13(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck13(target=es5).errors.txt
index 84bbb524a371d..1c05c08ea5453 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck13(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck13(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-ofTypeCheck13.ts(4,19): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+!!! 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-ofTypeCheck13.ts (1 errors) ====
const strSet: Set = new Set()
strSet.add('Hello')
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck14(target=es5).errors.txt
index 71d2526927a70..815bd131f2e54 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck14(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck14(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-ofTypeCheck14.ts(2,17): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+!!! 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-ofTypeCheck14.ts (1 errors) ====
declare var union: string | Set
for (const e of union) { }
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck2(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck2(target=es5).errors.txt
new file mode 100644
index 0000000000000..fc01e2e741e99
--- /dev/null
+++ b/tests/baselines/reference/ES5For-ofTypeCheck2(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-ofTypeCheck2.ts (0 errors) ====
+ for (var v of [true]) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck3(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck3(target=es5).errors.txt
new file mode 100644
index 0000000000000..cf9cd9870ba06
--- /dev/null
+++ b/tests/baselines/reference/ES5For-ofTypeCheck3(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-ofTypeCheck3.ts (0 errors) ====
+ var tuple: [string, number] = ["", 0];
+ for (var v of tuple) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck4(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck4(target=es5).errors.txt
new file mode 100644
index 0000000000000..6193118ee4c0b
--- /dev/null
+++ b/tests/baselines/reference/ES5For-ofTypeCheck4(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-ofTypeCheck4.ts (0 errors) ====
+ var union: string | string[];
+ for (const v of union) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck5(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck5(target=es5).errors.txt
new file mode 100644
index 0000000000000..5103a55a99ede
--- /dev/null
+++ b/tests/baselines/reference/ES5For-ofTypeCheck5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-ofTypeCheck5.ts (0 errors) ====
+ var union: string | number[];
+ for (var v of union) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck6(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck6(target=es5).errors.txt
new file mode 100644
index 0000000000000..a052beb63f032
--- /dev/null
+++ b/tests/baselines/reference/ES5For-ofTypeCheck6(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5For-ofTypeCheck6.ts (0 errors) ====
+ var union: string[] | number[];
+ for (var v of union) { }
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck7(target=es5).errors.txt
index 653f2be91661e..bde3a6b70855b 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck7(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck7(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-ofTypeCheck7.ts(2,15): error TS2461: Type 'number' is not an array type.
+!!! 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-ofTypeCheck7.ts (1 errors) ====
declare var union: string | number;
for (var v of union) { }
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck8(target=es5).errors.txt
index 3f82df8f45f66..65451a9e20f13 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck8(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck8(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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-ofTypeCheck8.ts(3,6): error TS2322: Type 'string | number | symbol' is not assignable to type 'symbol'.
Type 'string' is not assignable to type 'symbol'.
+!!! 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-ofTypeCheck8.ts (1 errors) ====
declare var union: string | string[]| number[]| symbol[];
var v: symbol;
diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9(target=es5).errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck9(target=es5).errors.txt
index 47f971f9d6303..6f6b17cc976ed 100644
--- a/tests/baselines/reference/ES5For-ofTypeCheck9(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5For-ofTypeCheck9(target=es5).errors.txt
@@ -1,6 +1,8 @@
+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-ofTypeCheck9.ts(2,15): error TS2461: Type 'number | symbol | string[]' is not an array type.
+!!! 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-ofTypeCheck9.ts (1 errors) ====
declare var union: string | string[] | number | symbol;
for (let v of union) { }
diff --git a/tests/baselines/reference/ES5SymbolProperty1(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolProperty1(target=es5).errors.txt
new file mode 100644
index 0000000000000..ebab9ea2a1e8b
--- /dev/null
+++ b/tests/baselines/reference/ES5SymbolProperty1(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5SymbolProperty1.ts (0 errors) ====
+ interface SymbolConstructor {
+ foo: string;
+ }
+ var Symbol: SymbolConstructor;
+
+ var obj = {
+ [Symbol.foo]: 0
+ }
+
+ obj[Symbol.foo];
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5SymbolProperty2(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolProperty2(target=es5).errors.txt
new file mode 100644
index 0000000000000..a7508dd2492a8
--- /dev/null
+++ b/tests/baselines/reference/ES5SymbolProperty2(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5SymbolProperty2.ts (0 errors) ====
+ namespace M {
+ var Symbol: any;
+
+ export class C {
+ [Symbol.iterator]() { }
+ }
+ (new C)[Symbol.iterator];
+ }
+
+ (new M.C)[Symbol.iterator];
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5SymbolProperty2(target=es5).types b/tests/baselines/reference/ES5SymbolProperty2(target=es5).types
index 0fd0ed64949a9..1bf0ed45bbe05 100644
--- a/tests/baselines/reference/ES5SymbolProperty2(target=es5).types
+++ b/tests/baselines/reference/ES5SymbolProperty2(target=es5).types
@@ -7,6 +7,7 @@ namespace M {
var Symbol: any;
>Symbol : any
+> : ^^^
export class C {
>C : C
@@ -16,6 +17,7 @@ namespace M {
>[Symbol.iterator] : () => void
> : ^^^^^^^^^^
>Symbol.iterator : any
+> : ^^^
>Symbol : any
> : ^^^
>iterator : any
@@ -31,6 +33,7 @@ namespace M {
>C : typeof C
> : ^^^^^^^^
>Symbol.iterator : any
+> : ^^^
>Symbol : any
> : ^^^
>iterator : any
@@ -38,7 +41,8 @@ namespace M {
}
(new M.C)[Symbol.iterator];
->(new M.C)[Symbol.iterator] : error
+>(new M.C)[Symbol.iterator] : any
+> : ^^^
>(new M.C) : M.C
> : ^^^
>new M.C : M.C
diff --git a/tests/baselines/reference/ES5SymbolProperty3(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolProperty3(target=es5).errors.txt
index 09bb9fdb41853..6ac945981c772 100644
--- a/tests/baselines/reference/ES5SymbolProperty3(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5SymbolProperty3(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
ES5SymbolProperty3.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== ES5SymbolProperty3.ts (1 errors) ====
var Symbol: any;
~~~~~~
diff --git a/tests/baselines/reference/ES5SymbolProperty4(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolProperty4(target=es5).errors.txt
index 38a4b466e074a..a235d7d01ecf7 100644
--- a/tests/baselines/reference/ES5SymbolProperty4(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5SymbolProperty4(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
ES5SymbolProperty4.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: string; }'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== ES5SymbolProperty4.ts (1 errors) ====
var Symbol: { iterator: string };
~~~~~~
diff --git a/tests/baselines/reference/ES5SymbolProperty5(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolProperty5(target=es5).errors.txt
index 962069c9d2a70..d62c2afb72938 100644
--- a/tests/baselines/reference/ES5SymbolProperty5(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5SymbolProperty5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
ES5SymbolProperty5.ts(1,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: symbol; }'.
ES5SymbolProperty5.ts(7,26): error TS2554: Expected 0 arguments, but got 1.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== ES5SymbolProperty5.ts (2 errors) ====
declare var Symbol: { iterator: symbol };
~~~~~~
diff --git a/tests/baselines/reference/ES5SymbolProperty6(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolProperty6(target=es5).errors.txt
new file mode 100644
index 0000000000000..159903614e93d
--- /dev/null
+++ b/tests/baselines/reference/ES5SymbolProperty6(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5SymbolProperty6.ts (0 errors) ====
+ class C {
+ [Symbol.iterator]() { }
+ }
+
+ (new C)[Symbol.iterator]
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5SymbolProperty7(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolProperty7(target=es5).errors.txt
index 9c083f0824bd8..ad5504c922fd7 100644
--- a/tests/baselines/reference/ES5SymbolProperty7(target=es5).errors.txt
+++ b/tests/baselines/reference/ES5SymbolProperty7(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
ES5SymbolProperty7.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: any; }'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== ES5SymbolProperty7.ts (1 errors) ====
var Symbol: { iterator: any };
~~~~~~
diff --git a/tests/baselines/reference/ES5SymbolType1(target=es5).errors.txt b/tests/baselines/reference/ES5SymbolType1(target=es5).errors.txt
new file mode 100644
index 0000000000000..50844097eeca0
--- /dev/null
+++ b/tests/baselines/reference/ES5SymbolType1(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5SymbolType1.ts (0 errors) ====
+ var s: symbol;
+ s.toString();
\ No newline at end of file
diff --git a/tests/baselines/reference/ES5for-of32(target=es5).errors.txt b/tests/baselines/reference/ES5for-of32(target=es5).errors.txt
new file mode 100644
index 0000000000000..2a3d472871b6a
--- /dev/null
+++ b/tests/baselines/reference/ES5for-of32(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ES5for-of32.ts (0 errors) ====
+ var array = [1,2,3];
+ var sum = 0;
+
+ for (let num of array) {
+ if (sum === 0) {
+ array = [4,5,6]
+ }
+
+ sum += num;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/abstractPropertyBasics(target=es5).errors.txt b/tests/baselines/reference/abstractPropertyBasics(target=es5).errors.txt
new file mode 100644
index 0000000000000..e83f1c72c3054
--- /dev/null
+++ b/tests/baselines/reference/abstractPropertyBasics(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== abstractPropertyBasics.ts (0 errors) ====
+ interface A {
+ prop: string;
+ raw: string;
+ m(): void;
+ }
+ abstract class B implements A {
+ abstract prop: string;
+ abstract raw: string;
+ abstract readonly ro: string;
+ abstract get readonlyProp(): string;
+ abstract set readonlyProp(val: string);
+ abstract m(): void;
+ }
+ class C extends B {
+ get prop() { return "foo"; }
+ set prop(v) { }
+ raw = "edge";
+ readonly ro = "readonly please";
+ readonlyProp!: string;
+ m() { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/abstractPropertyNegative(target=es5).errors.txt b/tests/baselines/reference/abstractPropertyNegative(target=es5).errors.txt
index 34f7fd8e45361..da447b40a238b 100644
--- a/tests/baselines/reference/abstractPropertyNegative(target=es5).errors.txt
+++ b/tests/baselines/reference/abstractPropertyNegative(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
abstractPropertyNegative.ts(13,7): error TS2654: Non-abstract class 'C' is missing implementations for the following members of 'B': 'prop', 'readonlyProp', 'm', 'mismatch'.
abstractPropertyNegative.ts(15,5): error TS1253: Abstract properties can only appear within an abstract class.
abstractPropertyNegative.ts(16,37): error TS1005: '{' expected.
@@ -14,6 +15,7 @@ abstractPropertyNegative.ts(40,9): error TS2676: Accessors must both be abstract
abstractPropertyNegative.ts(41,18): error TS2676: Accessors must both be abstract or non-abstract.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== abstractPropertyNegative.ts (11 errors) ====
interface A {
prop: string;
diff --git a/tests/baselines/reference/accessibilityModifiers(target=es5).errors.txt b/tests/baselines/reference/accessibilityModifiers(target=es5).errors.txt
index 260ac25d0cfc0..7b94f030ee322 100644
--- a/tests/baselines/reference/accessibilityModifiers(target=es5).errors.txt
+++ b/tests/baselines/reference/accessibilityModifiers(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessibilityModifiers.ts(21,12): error TS1029: 'private' modifier must precede 'static' modifier.
accessibilityModifiers.ts(22,12): error TS1029: 'private' modifier must precede 'static' modifier.
accessibilityModifiers.ts(23,12): error TS1029: 'private' modifier must precede 'static' modifier.
@@ -16,6 +17,7 @@ accessibilityModifiers.ts(41,13): error TS1028: Accessibility modifier already s
accessibilityModifiers.ts(42,12): error TS1028: Accessibility modifier already seen.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessibilityModifiers.ts (16 errors) ====
// No errors
class C {
diff --git a/tests/baselines/reference/accessorAccidentalCallDiagnostic(target=es5).errors.txt b/tests/baselines/reference/accessorAccidentalCallDiagnostic(target=es5).errors.txt
index 5d51cd8be52ea..fcdc55dd96136 100644
--- a/tests/baselines/reference/accessorAccidentalCallDiagnostic(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorAccidentalCallDiagnostic(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorAccidentalCallDiagnostic.ts(6,14): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
Type 'Number' has no call signatures.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorAccidentalCallDiagnostic.ts (1 errors) ====
// https://github.com/microsoft/TypeScript/issues/24554
class Test24554 {
diff --git a/tests/baselines/reference/accessorInAmbientContextES5(target=es5).errors.txt b/tests/baselines/reference/accessorInAmbientContextES5(target=es5).errors.txt
index c9351f69f7213..01f4594204cd3 100644
--- a/tests/baselines/reference/accessorInAmbientContextES5(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorInAmbientContextES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorInAmbientContextES5.ts(25,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorInAmbientContextES5.ts (1 errors) ====
// Should allow accessor in ambient contexts even when targeting ES5
diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).errors.txt b/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).errors.txt
index 46de3d531dfb0..1a72c88b97f7e 100644
--- a/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorParameterAccessibilityModifier(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorParameterAccessibilityModifier.ts(2,11): error TS2369: A parameter property is only allowed in a constructor implementation.
accessorParameterAccessibilityModifier.ts(3,18): error TS2369: A parameter property is only allowed in a constructor implementation.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorParameterAccessibilityModifier.ts (2 errors) ====
class C {
set X(public v) { }
diff --git a/tests/baselines/reference/accessorWithES5(target=es5).errors.txt b/tests/baselines/reference/accessorWithES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..d2bbd983c3745
--- /dev/null
+++ b/tests/baselines/reference/accessorWithES5(target=es5).errors.txt
@@ -0,0 +1,23 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== accessorWithES5.ts (0 errors) ====
+ class C {
+ get x() {
+ return 1;
+ }
+ }
+
+ class D {
+ set x(v) {
+ }
+ }
+
+ var x = {
+ get a() { return 1 }
+ }
+
+ var y = {
+ set b(v) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/accessorWithES5(target=es5).types b/tests/baselines/reference/accessorWithES5(target=es5).types
index 9c1950168feb6..15093751f174f 100644
--- a/tests/baselines/reference/accessorWithES5(target=es5).types
+++ b/tests/baselines/reference/accessorWithES5(target=es5).types
@@ -21,7 +21,9 @@ class D {
set x(v) {
>x : any
+> : ^^^
>v : any
+> : ^^^
}
}
@@ -46,5 +48,7 @@ var y = {
set b(v) { }
>b : any
+> : ^^^
>v : any
+> : ^^^
}
diff --git a/tests/baselines/reference/accessorWithInitializer(target=es5).errors.txt b/tests/baselines/reference/accessorWithInitializer(target=es5).errors.txt
index 2a1b64da30ac4..d4f1696882769 100644
--- a/tests/baselines/reference/accessorWithInitializer(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorWithInitializer(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorWithInitializer.ts(2,9): error TS1052: A 'set' accessor parameter cannot have an initializer.
accessorWithInitializer.ts(3,16): error TS1052: A 'set' accessor parameter cannot have an initializer.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorWithInitializer.ts (2 errors) ====
class C {
set X(v = 0) { }
diff --git a/tests/baselines/reference/accessorWithLineTerminator(target=es5).errors.txt b/tests/baselines/reference/accessorWithLineTerminator(target=es5).errors.txt
new file mode 100644
index 0000000000000..c101298d45e93
--- /dev/null
+++ b/tests/baselines/reference/accessorWithLineTerminator(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== accessorWithLineTerminator.ts (0 errors) ====
+ class C {
+ get
+ x() { return 1 }
+
+ set
+ x(v) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers(target=es5).errors.txt b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers(target=es5).errors.txt
new file mode 100644
index 0000000000000..943db8cdb49f5
--- /dev/null
+++ b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers(target=es5).errors.txt
@@ -0,0 +1,36 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== accessorWithMismatchedAccessibilityModifiers.ts (0 errors) ====
+ class C {
+ get x() {
+ return 1;
+ }
+ private set x(v) {
+ }
+ }
+
+ class D {
+ protected get x() {
+ return 1;
+ }
+ private set x(v) {
+ }
+ }
+
+ class E {
+ protected set x(v) {
+ }
+ get x() {
+ return 1;
+ }
+ }
+
+ class F {
+ protected static set x(v) {
+ }
+ static get x() {
+ return 1;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/accessorWithRestParam(target=es5).errors.txt b/tests/baselines/reference/accessorWithRestParam(target=es5).errors.txt
index 8e94f0ee95af0..f1ebd8b8c676e 100644
--- a/tests/baselines/reference/accessorWithRestParam(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorWithRestParam(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorWithRestParam.ts(2,11): error TS1053: A 'set' accessor cannot have rest parameter.
accessorWithRestParam.ts(3,18): error TS1053: A 'set' accessor cannot have rest parameter.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorWithRestParam.ts (2 errors) ====
class C {
set X(...v) { }
diff --git a/tests/baselines/reference/accessorWithoutBody1(target=es5).errors.txt b/tests/baselines/reference/accessorWithoutBody1(target=es5).errors.txt
index da7b29fe6b64e..c4aa09fbab307 100644
--- a/tests/baselines/reference/accessorWithoutBody1(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorWithoutBody1(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorWithoutBody1.ts(1,19): error TS1005: '{' expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorWithoutBody1.ts (1 errors) ====
var v = { get foo() }
~
diff --git a/tests/baselines/reference/accessorWithoutBody2(target=es5).errors.txt b/tests/baselines/reference/accessorWithoutBody2(target=es5).errors.txt
index 596da62347794..2d2ee9dc25fd2 100644
--- a/tests/baselines/reference/accessorWithoutBody2(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorWithoutBody2(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorWithoutBody2.ts(1,20): error TS1005: '{' expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorWithoutBody2.ts (1 errors) ====
var v = { set foo(a) }
~
diff --git a/tests/baselines/reference/accessorsInAmbientContext(target=es5).errors.txt b/tests/baselines/reference/accessorsInAmbientContext(target=es5).errors.txt
index 9a3e5a8c3690a..7aad8f994f4ec 100644
--- a/tests/baselines/reference/accessorsInAmbientContext(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorsInAmbientContext(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorsInAmbientContext.ts(3,17): error TS1183: An implementation cannot be declared in ambient contexts.
accessorsInAmbientContext.ts(4,18): error TS1183: An implementation cannot be declared in ambient contexts.
accessorsInAmbientContext.ts(6,24): error TS1183: An implementation cannot be declared in ambient contexts.
@@ -8,6 +9,7 @@ accessorsInAmbientContext.ts(15,20): error TS1183: An implementation cannot be d
accessorsInAmbientContext.ts(16,21): error TS1183: An implementation cannot be declared in ambient contexts.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorsInAmbientContext.ts (8 errors) ====
declare namespace M {
class C {
diff --git a/tests/baselines/reference/accessorsOverrideProperty7(target=es5).errors.txt b/tests/baselines/reference/accessorsOverrideProperty7(target=es5).errors.txt
index 33a92cd351372..b86e16fbc8d26 100644
--- a/tests/baselines/reference/accessorsOverrideProperty7(target=es5).errors.txt
+++ b/tests/baselines/reference/accessorsOverrideProperty7(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
accessorsOverrideProperty7.ts(2,14): error TS1267: Property 'p' cannot have an initializer because it is marked abstract.
accessorsOverrideProperty7.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== accessorsOverrideProperty7.ts (2 errors) ====
abstract class A {
abstract p = 'yep'
diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass(target=es5).errors.txt b/tests/baselines/reference/aliasUsageInAccessorsOfClass(target=es5).errors.txt
new file mode 100644
index 0000000000000..89d33d97c1d39
--- /dev/null
+++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass(target=es5).errors.txt
@@ -0,0 +1,30 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== aliasUsage1_main.ts (0 errors) ====
+ import Backbone = require("./aliasUsage1_backbone");
+ import moduleA = require("./aliasUsage1_moduleA");
+ interface IHasVisualizationModel {
+ VisualizationModel: typeof Backbone.Model;
+ }
+ class C2 {
+ x: IHasVisualizationModel;
+ get A() {
+ return this.x;
+ }
+ set A(x) {
+ x = moduleA;
+ }
+ }
+==== aliasUsage1_backbone.ts (0 errors) ====
+ export class Model {
+ public someData: string;
+ }
+
+==== aliasUsage1_moduleA.ts (0 errors) ====
+ import Backbone = require("./aliasUsage1_backbone");
+ export class VisualizationModel extends Backbone.Model {
+ // interesting stuff here
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/alwaysStrictModule6(target=es5).errors.txt b/tests/baselines/reference/alwaysStrictModule6(target=es5).errors.txt
new file mode 100644
index 0000000000000..a7a850b0e95ef
--- /dev/null
+++ b/tests/baselines/reference/alwaysStrictModule6(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== alwaysStrictModule6.ts (0 errors) ====
+ // Targeting ES5
+ export const a = 1;
\ No newline at end of file
diff --git a/tests/baselines/reference/ambientAccessors(target=es5).errors.txt b/tests/baselines/reference/ambientAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..46f5a11f09bc0
--- /dev/null
+++ b/tests/baselines/reference/ambientAccessors(target=es5).errors.txt
@@ -0,0 +1,19 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== ambientAccessors.ts (0 errors) ====
+ // ok to use accessors in ambient class in ES3
+ declare class C {
+ static get a(): string;
+ static set a(value: string);
+
+ private static get b(): string;
+ private static set b(foo: string);
+
+ get x(): string;
+ set x(value: string);
+
+ private get y(): string;
+ private set y(foo: string);
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/ambientGetters(target=es5).errors.txt b/tests/baselines/reference/ambientGetters(target=es5).errors.txt
index f9b413134eb70..bff407ad9478d 100644
--- a/tests/baselines/reference/ambientGetters(target=es5).errors.txt
+++ b/tests/baselines/reference/ambientGetters(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
ambientGetters.ts(6,18): error TS1183: An implementation cannot be declared in ambient contexts.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== ambientGetters.ts (1 errors) ====
declare class A {
get length() : number;
diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts
index 6ca73b0b2fe8b..e676e4fa93443 100644
--- a/tests/baselines/reference/api/typescript.d.ts
+++ b/tests/baselines/reference/api/typescript.d.ts
@@ -2543,6 +2543,7 @@ declare namespace ts {
export enum ScriptTarget {
/** @deprecated */
ES3 = "es3",
+ /** @deprecated */
ES5 = "es5",
ES6 = "es6",
ES2015 = "es2015",
@@ -2558,6 +2559,7 @@ declare namespace ts {
ESNext = "esnext",
JSON = "json",
Latest = "esnext",
+ CurrentYear = "es2024",
}
}
namespace typingsInstaller {
@@ -7207,6 +7209,7 @@ declare namespace ts {
enum ScriptTarget {
/** @deprecated */
ES3 = 0,
+ /** @deprecated */
ES5 = 1,
ES2015 = 2,
ES2016 = 3,
@@ -7221,6 +7224,7 @@ declare namespace ts {
ESNext = 99,
JSON = 100,
Latest = 99,
+ CurrentYear = 11,
}
enum LanguageVariant {
Standard = 0,
diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES5(target=es5).errors.txt b/tests/baselines/reference/argumentsObjectIterator01_ES5(target=es5).errors.txt
index 57755f8c8a176..9e586f022b1c1 100644
--- a/tests/baselines/reference/argumentsObjectIterator01_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/argumentsObjectIterator01_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
argumentsObjectIterator01_ES5.ts(3,21): error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== argumentsObjectIterator01_ES5.ts (1 errors) ====
function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] {
let result = [];
diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES5(target=es5).errors.txt b/tests/baselines/reference/argumentsObjectIterator02_ES5(target=es5).errors.txt
index 273529d0e9396..de287e9a94959 100644
--- a/tests/baselines/reference/argumentsObjectIterator02_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/argumentsObjectIterator02_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
argumentsObjectIterator02_ES5.ts(5,21): error TS2802: Type 'ArrayIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== argumentsObjectIterator02_ES5.ts (1 errors) ====
function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] {
let blah = arguments[Symbol.iterator];
diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES5(target=es5).errors.txt b/tests/baselines/reference/argumentsObjectIterator03_ES5(target=es5).errors.txt
index ab4d1358c6f4b..a90ffff485590 100644
--- a/tests/baselines/reference/argumentsObjectIterator03_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/argumentsObjectIterator03_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
argumentsObjectIterator03_ES5.ts(2,9): error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== argumentsObjectIterator03_ES5.ts (1 errors) ====
function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] {
let [x, y, z] = arguments;
diff --git a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt
index 17972a3c2ece3..8223b761dc810 100644
--- a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt
+++ b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
argumentsSpreadRestIterables.tsx(3,28): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
argumentsSpreadRestIterables.tsx(4,35): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
argumentsSpreadRestIterables.tsx(5,41): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
@@ -11,6 +12,7 @@ argumentsSpreadRestIterables.tsx(17,25): error TS2802: Type '"hello"' can only b
argumentsSpreadRestIterables.tsx(18,25): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== argumentsSpreadRestIterables.tsx (11 errors) ====
declare const itNum: Iterable
diff --git a/tests/baselines/reference/arraySpreadImportHelpers(target=es5).errors.txt b/tests/baselines/reference/arraySpreadImportHelpers(target=es5).errors.txt
index 98b0b1cae757f..1815a762aedc2 100644
--- a/tests/baselines/reference/arraySpreadImportHelpers(target=es5).errors.txt
+++ b/tests/baselines/reference/arraySpreadImportHelpers(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
main.ts(3,15): error TS2807: This syntax requires an imported helper named '__spreadArray' with 3 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== main.ts (1 errors) ====
export {};
const k = [1, , 2];
diff --git a/tests/baselines/reference/arrayToLocaleStringES5(target=es5).errors.txt b/tests/baselines/reference/arrayToLocaleStringES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..42b68d4086d81
--- /dev/null
+++ b/tests/baselines/reference/arrayToLocaleStringES5(target=es5).errors.txt
@@ -0,0 +1,61 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== arrayToLocaleStringES5.ts (0 errors) ====
+ let str: string;
+ const arr = [1, 2, 3];
+ str = arr.toLocaleString(); // OK
+ str = arr.toLocaleString('en-US'); // should be error
+ str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const dates: readonly Date[] = [new Date(), new Date()];
+ str = dates.toLocaleString(); // OK
+ str = dates.toLocaleString('fr'); // should be error
+ str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error
+
+ const int8Array = new Int8Array(3);
+ str = int8Array.toLocaleString(); // OK
+ str = int8Array.toLocaleString('en-US'); // should be error
+ str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const uint8Array = new Uint8Array(3);
+ str = uint8Array.toLocaleString(); // OK
+ str = uint8Array.toLocaleString('en-US'); // should be error
+ str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const uint8ClampedArray = new Uint8ClampedArray(3);
+ str = uint8ClampedArray.toLocaleString(); // OK
+ str = uint8ClampedArray.toLocaleString('en-US'); // should be error
+ str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const int16Array = new Int16Array(3);
+ str = int16Array.toLocaleString(); // OK
+ str = int16Array.toLocaleString('en-US'); // should be error
+ str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const uint16Array = new Uint16Array(3);
+ str = uint16Array.toLocaleString(); // OK
+ str = uint16Array.toLocaleString('en-US'); // should be error
+ str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const int32Array = new Int32Array(3);
+ str = int32Array.toLocaleString(); // OK
+ str = int32Array.toLocaleString('en-US'); // should be error
+ str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const uint32Array = new Uint32Array(3);
+ str = uint32Array.toLocaleString(); // OK
+ str = uint32Array.toLocaleString('en-US'); // should be error
+ str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const float32Array = new Float32Array(3);
+ str = float32Array.toLocaleString(); // OK
+ str = float32Array.toLocaleString('en-US'); // should be error
+ str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
+ const float64Array = new Float64Array(3);
+ str = float64Array.toLocaleString(); // OK
+ str = float64Array.toLocaleString('en-US'); // should be error
+ str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+
\ No newline at end of file
diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).errors.txt b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).errors.txt
new file mode 100644
index 0000000000000..e71020d759d3d
--- /dev/null
+++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== arrowFunctionWithParameterNameAsync_es2017.ts (0 errors) ====
+ const x = async => async;
\ No newline at end of file
diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).types b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).types
index a9a7af90fd59b..576d379c59d7c 100644
--- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).types
+++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017(target=es5).types
@@ -7,5 +7,7 @@ const x = async => async;
>async => async : (async: any) => any
> : ^ ^^^^^^^^^^^^^
>async : any
+> : ^^^
>async : any
+> : ^^^
diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).errors.txt b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..68bd3e7dcc0d2
--- /dev/null
+++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== arrowFunctionWithParameterNameAsync_es5.ts (0 errors) ====
+ const x = async => async;
\ No newline at end of file
diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).types b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).types
index 689a6d058d413..10f349c975383 100644
--- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).types
+++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5(target=es5).types
@@ -7,5 +7,7 @@ const x = async => async;
>async => async : (async: any) => any
> : ^ ^^^^^^^^^^^^^
>async : any
+> : ^^^
>async : any
+> : ^^^
diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).errors.txt b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).errors.txt
new file mode 100644
index 0000000000000..3c8ff7d48b8ec
--- /dev/null
+++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== arrowFunctionWithParameterNameAsync_es6.ts (0 errors) ====
+ const x = async => async;
\ No newline at end of file
diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).types b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).types
index 83d46dba73a98..a50104b875e16 100644
--- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).types
+++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6(target=es5).types
@@ -7,5 +7,7 @@ const x = async => async;
>async => async : (async: any) => any
> : ^ ^^^^^^^^^^^^^
>async : any
+> : ^^^
>async : any
+> : ^^^
diff --git a/tests/baselines/reference/assignSharedArrayBufferToArrayBuffer(target=es5).errors.txt b/tests/baselines/reference/assignSharedArrayBufferToArrayBuffer(target=es5).errors.txt
index cc22119ec5064..c570a12120eab 100644
--- a/tests/baselines/reference/assignSharedArrayBufferToArrayBuffer(target=es5).errors.txt
+++ b/tests/baselines/reference/assignSharedArrayBufferToArrayBuffer(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
assignSharedArrayBufferToArrayBuffer.ts(1,5): error TS2322: Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.
Types of property '[Symbol.toStringTag]' are incompatible.
Type '"SharedArrayBuffer"' is not assignable to type '"ArrayBuffer"'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== assignSharedArrayBufferToArrayBuffer.ts (1 errors) ====
var foo: ArrayBuffer = new SharedArrayBuffer(1024); // should error
~~~
diff --git a/tests/baselines/reference/asyncAliasReturnType_es5(target=es5).errors.txt b/tests/baselines/reference/asyncAliasReturnType_es5(target=es5).errors.txt
index b0ad4b8920dbc..de7ea6721acf9 100644
--- a/tests/baselines/reference/asyncAliasReturnType_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncAliasReturnType_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncAliasReturnType_es5.ts(3,21): error TS1055: Type 'PromiseAlias' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncAliasReturnType_es5.ts (1 errors) ====
type PromiseAlias = Promise;
diff --git a/tests/baselines/reference/asyncArrowFunction10_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction10_es5(target=es5).errors.txt
index d6a9d124aa772..4575f2b28a6a6 100644
--- a/tests/baselines/reference/asyncArrowFunction10_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunction10_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunction10_es5.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'?
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunction10_es5.ts (1 errors) ====
var foo = async (): Promise => {
// Legal to use 'await' in a type context.
diff --git a/tests/baselines/reference/asyncArrowFunction11_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction11_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..e199d801eef1b
--- /dev/null
+++ b/tests/baselines/reference/asyncArrowFunction11_es5(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncArrowFunction11_es5.ts (0 errors) ====
+ // https://github.com/Microsoft/TypeScript/issues/24722
+ class A {
+ b = async (...args: any[]) => {
+ await Promise.resolve();
+ const obj = { ["a"]: () => this }; // computed property name after `await` triggers case
+ };
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncArrowFunction1_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction1_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..b6859c0070d89
--- /dev/null
+++ b/tests/baselines/reference/asyncArrowFunction1_es5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncArrowFunction1_es5.ts (0 errors) ====
+ var foo = async (): Promise => {
+ };
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..57cc1c989e6ce
--- /dev/null
+++ b/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncArrowFunction2_es5.ts (0 errors) ====
+ var f = (await) => {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).types b/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).types
index bf5374cccce47..15a614a7f26ce 100644
--- a/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).types
+++ b/tests/baselines/reference/asyncArrowFunction2_es5(target=es5).types
@@ -7,4 +7,5 @@ var f = (await) => {
>(await) => {} : (await: any) => void
> : ^ ^^^^^^^^^^^^^^
>await : any
+> : ^^^
}
diff --git a/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).errors.txt
index b78f02690776d..f74d3d9151d6f 100644
--- a/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunction3_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunction3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunction3_es5.ts (1 errors) ====
function f(await = await) {
~~~~~
diff --git a/tests/baselines/reference/asyncArrowFunction4_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction4_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..16a522d60a96e
--- /dev/null
+++ b/tests/baselines/reference/asyncArrowFunction4_es5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncArrowFunction4_es5.ts (0 errors) ====
+ var await = () => {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).errors.txt
index 9d5b679d53bbc..c1c6de89783a9 100644
--- a/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunction5_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunction5_es5.ts(1,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunction5_es5.ts (1 errors) ====
var foo = async (await): Promise => {
~~~~~
diff --git a/tests/baselines/reference/asyncArrowFunction6_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction6_es5(target=es5).errors.txt
index 1f4846d8df3c4..fe3b48e4eb4cd 100644
--- a/tests/baselines/reference/asyncArrowFunction6_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunction6_es5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunction6_es5.ts(1,22): error TS2524: 'await' expressions cannot be used in a parameter initializer.
asyncArrowFunction6_es5.ts(1,27): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunction6_es5.ts (2 errors) ====
var foo = async (a = await): Promise => {
~~~~~
diff --git a/tests/baselines/reference/asyncArrowFunction7_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction7_es5(target=es5).errors.txt
index 1a4faee91bd1d..044ad4e9c7e05 100644
--- a/tests/baselines/reference/asyncArrowFunction7_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunction7_es5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunction7_es5.ts(3,24): error TS2524: 'await' expressions cannot be used in a parameter initializer.
asyncArrowFunction7_es5.ts(3,29): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunction7_es5.ts (2 errors) ====
var bar = async (): Promise => {
// 'await' here is an identifier, and not an await expression.
diff --git a/tests/baselines/reference/asyncArrowFunction8_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction8_es5(target=es5).errors.txt
index 47109bea85ff8..28a859d217446 100644
--- a/tests/baselines/reference/asyncArrowFunction8_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunction8_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunction8_es5.ts(2,19): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunction8_es5.ts (1 errors) ====
var foo = async (): Promise => {
var v = { [await]: foo }
diff --git a/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).errors.txt
index a1a1c9691c9dd..2f30ca2b13c14 100644
--- a/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunction9_es5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunction9_es5.ts(1,11): error TS2304: Cannot find name 'async'.
asyncArrowFunction9_es5.ts(1,18): error TS2304: Cannot find name 'a'.
asyncArrowFunction9_es5.ts(1,37): error TS1005: ',' expected.
@@ -6,6 +7,7 @@ asyncArrowFunction9_es5.ts(1,46): error TS1005: ',' expected.
asyncArrowFunction9_es5.ts(1,53): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunction9_es5.ts (6 errors) ====
var foo = async (a = await => await): Promise => {
~~~~~
diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5(target=es5).errors.txt
index db54dddc46804..f83125a493853 100644
--- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncArrowFunctionCapturesArguments_es5.ts(4,52): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncArrowFunctionCapturesArguments_es5.ts (1 errors) ====
class C {
method() {
diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..a1c8071891cca
--- /dev/null
+++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncArrowFunctionCapturesThis_es5.ts (0 errors) ====
+ class C {
+ method() {
+ var fn = async () => await this;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncArrowInClassES5(target=es5).errors.txt b/tests/baselines/reference/asyncArrowInClassES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..587c123ff0142
--- /dev/null
+++ b/tests/baselines/reference/asyncArrowInClassES5(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncArrowInClassES5.ts (0 errors) ====
+ // https://github.com/Microsoft/TypeScript/issues/16924
+ // Should capture `this`
+
+ class Test {
+ static member = async (x: string) => { };
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5(target=es5).errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es5(target=es5).errors.txt
index 673f63cce76f6..0ee61ce8544fa 100644
--- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncAwaitIsolatedModules_es5.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncAwaitIsolatedModules_es5.ts (1 errors) ====
import { MyPromise } from "missing";
~~~~~~~~~
diff --git a/tests/baselines/reference/asyncAwaitNestedClasses_es5(target=es5).errors.txt b/tests/baselines/reference/asyncAwaitNestedClasses_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..82510e3d9f7b0
--- /dev/null
+++ b/tests/baselines/reference/asyncAwaitNestedClasses_es5(target=es5).errors.txt
@@ -0,0 +1,20 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncAwaitNestedClasses_es5.ts (0 errors) ====
+ // https://github.com/Microsoft/TypeScript/issues/20744
+ class A {
+ static B = class B {
+ static func2(): Promise {
+ return new Promise((resolve) => { resolve(null); });
+ }
+ static C = class C {
+ static async func() {
+ await B.func2();
+ }
+ }
+ }
+ }
+
+ A.B.C.func();
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar(target=es5).errors.txt b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar(target=es5).errors.txt
new file mode 100644
index 0000000000000..4b12e40312346
--- /dev/null
+++ b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar(target=es5).errors.txt
@@ -0,0 +1,40 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncAwaitWithCapturedBlockScopeVar.ts (0 errors) ====
+ async function fn1() {
+ let ar = [];
+ for (let i = 0; i < 1; i++) {
+ await 1;
+ ar.push(() => i);
+ }
+ }
+
+ async function fn2() {
+ let ar = [];
+ for (let i = 0; i < 1; i++) {
+ await 1;
+ ar.push(() => i);
+ break;
+ }
+ }
+
+ async function fn3() {
+ let ar = [];
+ for (let i = 0; i < 1; i++) {
+ await 1;
+ ar.push(() => i);
+ continue;
+ }
+ }
+
+ async function fn4(): Promise {
+ let ar = [];
+ for (let i = 0; i < 1; i++) {
+ await 1;
+ ar.push(() => i);
+ return 1;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncAwait_es5(target=es5).errors.txt b/tests/baselines/reference/asyncAwait_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..947a5290c6769
--- /dev/null
+++ b/tests/baselines/reference/asyncAwait_es5(target=es5).errors.txt
@@ -0,0 +1,51 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncAwait_es5.ts (0 errors) ====
+ type MyPromise = Promise;
+ declare var MyPromise: typeof Promise;
+ declare var p: Promise;
+ declare var mp: MyPromise;
+
+ async function f0() { }
+ async function f1(): Promise { }
+ async function f3(): MyPromise { }
+
+ let f4 = async function() { }
+ let f5 = async function(): Promise { }
+ let f6 = async function(): MyPromise { }
+
+ let f7 = async () => { };
+ let f8 = async (): Promise => { };
+ let f9 = async (): MyPromise => { };
+ let f10 = async () => p;
+ let f11 = async () => mp;
+ let f12 = async (): Promise => mp;
+ let f13 = async (): MyPromise => p;
+
+ let o = {
+ async m1() { },
+ async m2(): Promise { },
+ async m3(): MyPromise { }
+ };
+
+ class C {
+ async m1() { }
+ async m2(): Promise { }
+ async m3(): MyPromise { }
+ static async m4() { }
+ static async m5(): Promise { }
+ static async m6(): MyPromise { }
+ }
+
+ namespace M {
+ export async function f1() { }
+ }
+
+ async function f14() {
+ block: {
+ await 1;
+ break block;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncClass_es5(target=es5).errors.txt b/tests/baselines/reference/asyncClass_es5(target=es5).errors.txt
index 214f940474879..b7ef02b265a24 100644
--- a/tests/baselines/reference/asyncClass_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncClass_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncClass_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncClass_es5.ts (1 errors) ====
async class C {
~~~~~
diff --git a/tests/baselines/reference/asyncConstructor_es5(target=es5).errors.txt b/tests/baselines/reference/asyncConstructor_es5(target=es5).errors.txt
index 5b56f8c1d8892..4ae64540b099d 100644
--- a/tests/baselines/reference/asyncConstructor_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncConstructor_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncConstructor_es5.ts(2,3): error TS1089: 'async' modifier cannot appear on a constructor declaration.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncConstructor_es5.ts (1 errors) ====
class C {
async constructor() {
diff --git a/tests/baselines/reference/asyncDeclare_es5(target=es5).errors.txt b/tests/baselines/reference/asyncDeclare_es5(target=es5).errors.txt
index 3aeac405b6f78..95df12605c8e6 100644
--- a/tests/baselines/reference/asyncDeclare_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncDeclare_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncDeclare_es5.ts(1,9): error TS1040: 'async' modifier cannot be used in an ambient context.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncDeclare_es5.ts (1 errors) ====
declare async function foo(): Promise;
~~~~~
diff --git a/tests/baselines/reference/asyncEnum_es5(target=es5).errors.txt b/tests/baselines/reference/asyncEnum_es5(target=es5).errors.txt
index fb944a716d817..b8c1f9ea11a48 100644
--- a/tests/baselines/reference/asyncEnum_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncEnum_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncEnum_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncEnum_es5.ts (1 errors) ====
async enum E {
~~~~~
diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).errors.txt
index 6fc157649dd7c..8867474e22bde 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration10_es5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration10_es5.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer.
asyncFunctionDeclaration10_es5.ts(1,30): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration10_es5.ts (2 errors) ====
async function foo(a = await => await): Promise {
~~~~~
diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration11_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..ceb11bc06d8fe
--- /dev/null
+++ b/tests/baselines/reference/asyncFunctionDeclaration11_es5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncFunctionDeclaration11_es5.ts (0 errors) ====
+ async function await(): Promise {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration12_es5(target=es5).errors.txt
index f6866f5bcaf7b..f06d2b0635227 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration12_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration12_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration12_es5.ts(1,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration12_es5.ts (1 errors) ====
var v = async function await(): Promise { }
~~~~~
diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration13_es5(target=es5).errors.txt
index b3138f28704d1..9861f2eb984f6 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration13_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration13_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration13_es5.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'?
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration13_es5.ts (1 errors) ====
async function foo(): Promise {
// Legal to use 'await' in a type context.
diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration14_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..0568cb64bc811
--- /dev/null
+++ b/tests/baselines/reference/asyncFunctionDeclaration14_es5(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncFunctionDeclaration14_es5.ts (0 errors) ====
+ async function foo(): Promise {
+ return;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).errors.txt
index fb4cdc909c6bc..ab0c64e46f44f 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration15_es5.ts(6,23): error TS1055: Type '{}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value.
asyncFunctionDeclaration15_es5.ts(6,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.
asyncFunctionDeclaration15_es5.ts(7,23): error TS1055: Type 'any' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value.
@@ -12,6 +13,7 @@ asyncFunctionDeclaration15_es5.ts(17,16): error TS1058: The return type of an as
asyncFunctionDeclaration15_es5.ts(23,25): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration15_es5.ts (9 errors) ====
declare class Thenable { then(): void; }
declare let a: any;
diff --git a/tests/baselines/reference/asyncFunctionDeclaration16_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration16_es5(target=es5).errors.txt
index f6f88f047eb49..2341ccfc55e32 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration16_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration16_es5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
/a.js(21,14): error TS1055: Type 'string' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value.
/a.js(27,12): error TS1065: The return type of an async function or method must be the global Promise type.
/a.js(45,12): error TS1065: The return type of an async function or method must be the global Promise type.
@@ -7,6 +8,7 @@
Type 'void' is not assignable to type 'PromiseLike'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== /types.d.ts (0 errors) ====
declare class Thenable { then(): void; }
diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration1_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..374d813a9bfd8
--- /dev/null
+++ b/tests/baselines/reference/asyncFunctionDeclaration1_es5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncFunctionDeclaration1_es5.ts (0 errors) ====
+ async function foo(): Promise {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..6f933f9e18fe4
--- /dev/null
+++ b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncFunctionDeclaration2_es5.ts (0 errors) ====
+ function f(await) {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).types b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).types
index 26a780e93d7fc..137776509a04c 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).types
+++ b/tests/baselines/reference/asyncFunctionDeclaration2_es5(target=es5).types
@@ -5,4 +5,5 @@ function f(await) {
>f : (await: any) => void
> : ^ ^^^^^^^^^^^^^^
>await : any
+> : ^^^
}
diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).errors.txt
index 2b2507b88297c..388a9d829b262 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration3_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration3_es5.ts (1 errors) ====
function f(await = await) {
~~~~~
diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration4_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..92c797ebb4dc2
--- /dev/null
+++ b/tests/baselines/reference/asyncFunctionDeclaration4_es5(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncFunctionDeclaration4_es5.ts (0 errors) ====
+ function await() {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).errors.txt
index 175409258281f..76e4efbc48cd9 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration5_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration5_es5.ts(1,20): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration5_es5.ts (1 errors) ====
async function foo(await): Promise {
~~~~~
diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration6_es5(target=es5).errors.txt
index bfe5e9017af9f..932372cbecaef 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration6_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration6_es5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration6_es5.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer.
asyncFunctionDeclaration6_es5.ts(1,29): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration6_es5.ts (2 errors) ====
async function foo(a = await): Promise {
~~~~~
diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration7_es5(target=es5).errors.txt
index 6c51148ae758e..4e8d582c18300 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration7_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration7_es5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration7_es5.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer.
asyncFunctionDeclaration7_es5.ts(3,31): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration7_es5.ts (2 errors) ====
async function bar(): Promise {
// 'await' here is an identifier, and not a yield expression.
diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration8_es5(target=es5).errors.txt
index d050d9263b74e..60b4339abdaab 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration8_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration8_es5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'.
asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration8_es5.ts (2 errors) ====
var v = { [await]: foo }
~~~~~
diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclaration9_es5(target=es5).errors.txt
index 878d099702c18..e5121f3578639 100644
--- a/tests/baselines/reference/asyncFunctionDeclaration9_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclaration9_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclaration9_es5.ts(2,19): error TS1109: Expression expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclaration9_es5.ts (1 errors) ====
async function foo(): Promise {
var v = { [await]: foo }
diff --git a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5(target=es5).errors.txt
index e6c805127cbcd..6971bcff9a5de 100644
--- a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncFunctionDeclarationCapturesArguments_es5.ts(5,36): error TS2522: The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncFunctionDeclarationCapturesArguments_es5.ts (1 errors) ====
class C {
method() {
diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).errors.txt b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).errors.txt
new file mode 100644
index 0000000000000..576b09f9e19d7
--- /dev/null
+++ b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncFunctionTempVariableScoping.ts (0 errors) ====
+ // https://github.com/Microsoft/TypeScript/issues/19187
+
+ async ({ foo, bar, ...rest }) => bar(await foo);
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).types b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).types
index f419de00d7f96..4b9760d475a4d 100644
--- a/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).types
+++ b/tests/baselines/reference/asyncFunctionTempVariableScoping(target=es5).types
@@ -13,7 +13,11 @@ async ({ foo, bar, ...rest }) => bar(await foo);
>rest : { [x: string]: any; }
> : ^^^^^^^^^^^^^^^^^^^^^
>bar(await foo) : any
+> : ^^^
>bar : any
+> : ^^^
>await foo : any
+> : ^^^
>foo : any
+> : ^^^
diff --git a/tests/baselines/reference/asyncGetter_es5(target=es5).errors.txt b/tests/baselines/reference/asyncGetter_es5(target=es5).errors.txt
index 8d0d28e07f394..eb120245dbda1 100644
--- a/tests/baselines/reference/asyncGetter_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncGetter_es5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncGetter_es5.ts(2,3): error TS1042: 'async' modifier cannot be used here.
asyncGetter_es5.ts(2,13): error TS2378: A 'get' accessor must return a value.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncGetter_es5.ts (2 errors) ====
class C {
async get foo() {
diff --git a/tests/baselines/reference/asyncImportedPromise_es5(target=es5).errors.txt b/tests/baselines/reference/asyncImportedPromise_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..1c173ab403cf9
--- /dev/null
+++ b/tests/baselines/reference/asyncImportedPromise_es5(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== task.ts (0 errors) ====
+ export class Task extends Promise { }
+
+==== test.ts (0 errors) ====
+ import { Task } from "./task";
+ class Test {
+ async example(): Task { return; }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncInterface_es5(target=es5).errors.txt b/tests/baselines/reference/asyncInterface_es5(target=es5).errors.txt
index 931ebb1e21497..30e5782c9c51c 100644
--- a/tests/baselines/reference/asyncInterface_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncInterface_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncInterface_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncInterface_es5.ts (1 errors) ====
async interface I {
~~~~~
diff --git a/tests/baselines/reference/asyncMethodWithSuper_es5(target=es5).errors.txt b/tests/baselines/reference/asyncMethodWithSuper_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..9cbc9eac0ef57
--- /dev/null
+++ b/tests/baselines/reference/asyncMethodWithSuper_es5(target=es5).errors.txt
@@ -0,0 +1,60 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncMethodWithSuper_es5.ts (0 errors) ====
+ class A {
+ x() {
+ }
+ y() {
+ }
+ }
+
+ class B extends A {
+ // async method with only call/get on 'super' does not require a binding
+ async simple() {
+ // call with property access
+ super.x();
+ // call additional property.
+ super.y();
+
+ // call with element access
+ super["x"]();
+
+ // property access (read)
+ const a = super.x;
+
+ // element access (read)
+ const b = super["x"];
+ }
+
+ // async method with assignment/destructuring on 'super' requires a binding
+ async advanced() {
+ const f = () => {};
+
+ // call with property access
+ super.x();
+
+ // call with element access
+ super["x"]();
+
+ // property access (read)
+ const a = super.x;
+
+ // element access (read)
+ const b = super["x"];
+
+ // property access (assign)
+ super.x = f;
+
+ // element access (assign)
+ super["x"] = f;
+
+ // destructuring assign with property access
+ ({ f: super.x } = { f });
+
+ // destructuring assign with element access
+ ({ f: super["x"] } = { f });
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncModule_es5(target=es5).errors.txt b/tests/baselines/reference/asyncModule_es5(target=es5).errors.txt
index c381d2a74aca7..a9a4d03c43dcb 100644
--- a/tests/baselines/reference/asyncModule_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncModule_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncModule_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncModule_es5.ts (1 errors) ====
async namespace M {
~~~~~
diff --git a/tests/baselines/reference/asyncMultiFile_es5(target=es5).errors.txt b/tests/baselines/reference/asyncMultiFile_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..6d802b8fa2b29
--- /dev/null
+++ b/tests/baselines/reference/asyncMultiFile_es5(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== a.ts (0 errors) ====
+ async function f() {}
+==== b.ts (0 errors) ====
+ function g() { }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5(target=es5).errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..b3149e5ede58a
--- /dev/null
+++ b/tests/baselines/reference/asyncQualifiedReturnType_es5(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncQualifiedReturnType_es5.ts (0 errors) ====
+ namespace X {
+ export class MyPromise extends Promise {
+ }
+ }
+
+ async function f(): X.MyPromise {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncSetter_es5(target=es5).errors.txt b/tests/baselines/reference/asyncSetter_es5(target=es5).errors.txt
index d637655d34104..9a1b02c502933 100644
--- a/tests/baselines/reference/asyncSetter_es5(target=es5).errors.txt
+++ b/tests/baselines/reference/asyncSetter_es5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
asyncSetter_es5.ts(2,3): error TS1042: 'async' modifier cannot be used here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== asyncSetter_es5.ts (1 errors) ====
class C {
async set foo(value) {
diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).errors.txt b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..00f2c894b1b53
--- /dev/null
+++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncUnParenthesizedArrowFunction_es5.ts (0 errors) ====
+ declare function someOtherFunction(i: any): Promise;
+ const x = async i => await someOtherFunction(i)
+ const x1 = async (i) => await someOtherFunction(i);
\ No newline at end of file
diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).types b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).types
index 20fcabfe2922e..3c442332c0e59 100644
--- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).types
+++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5(target=es5).types
@@ -5,6 +5,7 @@ declare function someOtherFunction(i: any): Promise;
>someOtherFunction : (i: any) => Promise
> : ^ ^^ ^^^^^
>i : any
+> : ^^^
const x = async i => await someOtherFunction(i)
>x : (i: any) => Promise
@@ -12,6 +13,7 @@ const x = async i => await someOtherFunction(i)
>async i => await someOtherFunction(i) : (i: any) => Promise
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
>i : any
+> : ^^^
>await someOtherFunction(i) : void
> : ^^^^
>someOtherFunction(i) : Promise
@@ -19,6 +21,7 @@ const x = async i => await someOtherFunction(i)
>someOtherFunction : (i: any) => Promise
> : ^ ^^ ^^^^^
>i : any
+> : ^^^
const x1 = async (i) => await someOtherFunction(i);
>x1 : (i: any) => Promise
@@ -26,6 +29,7 @@ const x1 = async (i) => await someOtherFunction(i);
>async (i) => await someOtherFunction(i) : (i: any) => Promise
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
>i : any
+> : ^^^
>await someOtherFunction(i) : void
> : ^^^^
>someOtherFunction(i) : Promise
@@ -33,4 +37,5 @@ const x1 = async (i) => await someOtherFunction(i);
>someOtherFunction : (i: any) => Promise
> : ^ ^^ ^^^^^
>i : any
+> : ^^^
diff --git a/tests/baselines/reference/asyncUseStrict_es5(target=es5).errors.txt b/tests/baselines/reference/asyncUseStrict_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..6bbee548be735
--- /dev/null
+++ b/tests/baselines/reference/asyncUseStrict_es5(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== asyncUseStrict_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ async function func(): Promise {
+ "use strict";
+ var b = await p || a;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/autoAccessor1(target=es5).errors.txt b/tests/baselines/reference/autoAccessor1(target=es5).errors.txt
index d20d2bfecf11e..c32c3dec24277 100644
--- a/tests/baselines/reference/autoAccessor1(target=es5).errors.txt
+++ b/tests/baselines/reference/autoAccessor1(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
autoAccessor1.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor1.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor1.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor1.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== autoAccessor1.ts (4 errors) ====
class C1 {
accessor a: any;
diff --git a/tests/baselines/reference/autoAccessor1(target=es5).js b/tests/baselines/reference/autoAccessor1(target=es5).js
deleted file mode 100644
index 014f81f4c8993..0000000000000
--- a/tests/baselines/reference/autoAccessor1(target=es5).js
+++ /dev/null
@@ -1,61 +0,0 @@
-//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] ////
-
-//// [autoAccessor1.ts]
-class C1 {
- accessor a: any;
- accessor b = 1;
- static accessor c: any;
- static accessor d = 2;
-}
-
-
-
-
-!!!! File autoAccessor1.js missing from original emit, but present in noCheck emit
-//// [autoAccessor1.js]
-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");
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
-};
-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");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
-};
-var C1 = /** @class */ (function () {
- function C1() {
- _C1_a_accessor_storage.set(this, void 0);
- _C1_b_accessor_storage.set(this, 1);
- }
- Object.defineProperty(C1.prototype, "a", {
- get: function () { return __classPrivateFieldGet(this, _C1_a_accessor_storage, "f"); },
- set: function (value) { __classPrivateFieldSet(this, _C1_a_accessor_storage, value, "f"); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1.prototype, "b", {
- get: function () { return __classPrivateFieldGet(this, _C1_b_accessor_storage, "f"); },
- set: function (value) { __classPrivateFieldSet(this, _C1_b_accessor_storage, value, "f"); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1, "c", {
- get: function () { return __classPrivateFieldGet(_a, _a, "f", _C1_c_accessor_storage); },
- set: function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C1_c_accessor_storage); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1, "d", {
- get: function () { return __classPrivateFieldGet(_a, _a, "f", _C1_d_accessor_storage); },
- set: function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C1_d_accessor_storage); },
- enumerable: false,
- configurable: true
- });
- var _a, _C1_a_accessor_storage, _C1_b_accessor_storage, _C1_c_accessor_storage, _C1_d_accessor_storage;
- _a = C1, _C1_a_accessor_storage = new WeakMap(), _C1_b_accessor_storage = new WeakMap();
- _C1_c_accessor_storage = { value: void 0 };
- _C1_d_accessor_storage = { value: 2 };
- return C1;
-}());
diff --git a/tests/baselines/reference/autoAccessor3(target=es5).errors.txt b/tests/baselines/reference/autoAccessor3(target=es5).errors.txt
index 0637053416bfe..5e54b5ee09072 100644
--- a/tests/baselines/reference/autoAccessor3(target=es5).errors.txt
+++ b/tests/baselines/reference/autoAccessor3(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
autoAccessor3.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor3.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor3.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor3.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== autoAccessor3.ts (4 errors) ====
class C1 {
accessor "w": any;
diff --git a/tests/baselines/reference/autoAccessor3(target=es5).js b/tests/baselines/reference/autoAccessor3(target=es5).js
deleted file mode 100644
index aa624c216a8cc..0000000000000
--- a/tests/baselines/reference/autoAccessor3(target=es5).js
+++ /dev/null
@@ -1,61 +0,0 @@
-//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] ////
-
-//// [autoAccessor3.ts]
-class C1 {
- accessor "w": any;
- accessor "x" = 1;
- static accessor "y": any;
- static accessor "z" = 2;
-}
-
-
-
-
-!!!! File autoAccessor3.js missing from original emit, but present in noCheck emit
-//// [autoAccessor3.js]
-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");
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
-};
-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");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
-};
-var C1 = /** @class */ (function () {
- function C1() {
- _C1__a_accessor_storage.set(this, void 0);
- _C1__b_accessor_storage.set(this, 1);
- }
- Object.defineProperty(C1.prototype, "w", {
- get: function () { return __classPrivateFieldGet(this, _C1__a_accessor_storage, "f"); },
- set: function (value) { __classPrivateFieldSet(this, _C1__a_accessor_storage, value, "f"); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1.prototype, "x", {
- get: function () { return __classPrivateFieldGet(this, _C1__b_accessor_storage, "f"); },
- set: function (value) { __classPrivateFieldSet(this, _C1__b_accessor_storage, value, "f"); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1, "y", {
- get: function () { return __classPrivateFieldGet(_a, _a, "f", _C1__c_accessor_storage); },
- set: function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C1__c_accessor_storage); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1, "z", {
- get: function () { return __classPrivateFieldGet(_a, _a, "f", _C1__d_accessor_storage); },
- set: function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C1__d_accessor_storage); },
- enumerable: false,
- configurable: true
- });
- var _a, _C1__a_accessor_storage, _C1__b_accessor_storage, _C1__c_accessor_storage, _C1__d_accessor_storage;
- _a = C1, _C1__a_accessor_storage = new WeakMap(), _C1__b_accessor_storage = new WeakMap();
- _C1__c_accessor_storage = { value: void 0 };
- _C1__d_accessor_storage = { value: 2 };
- return C1;
-}());
diff --git a/tests/baselines/reference/autoAccessor4(target=es5).errors.txt b/tests/baselines/reference/autoAccessor4(target=es5).errors.txt
index 5c481a6438a95..6471b94271d08 100644
--- a/tests/baselines/reference/autoAccessor4(target=es5).errors.txt
+++ b/tests/baselines/reference/autoAccessor4(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
autoAccessor4.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor4.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor4.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor4.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== autoAccessor4.ts (4 errors) ====
class C1 {
accessor 0: any;
diff --git a/tests/baselines/reference/autoAccessor4(target=es5).js b/tests/baselines/reference/autoAccessor4(target=es5).js
deleted file mode 100644
index 889d9f36dc3f6..0000000000000
--- a/tests/baselines/reference/autoAccessor4(target=es5).js
+++ /dev/null
@@ -1,61 +0,0 @@
-//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] ////
-
-//// [autoAccessor4.ts]
-class C1 {
- accessor 0: any;
- accessor 1 = 1;
- static accessor 2: any;
- static accessor 3 = 2;
-}
-
-
-
-
-!!!! File autoAccessor4.js missing from original emit, but present in noCheck emit
-//// [autoAccessor4.js]
-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");
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
-};
-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");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
-};
-var C1 = /** @class */ (function () {
- function C1() {
- _C1__a_accessor_storage.set(this, void 0);
- _C1__b_accessor_storage.set(this, 1);
- }
- Object.defineProperty(C1.prototype, 0, {
- get: function () { return __classPrivateFieldGet(this, _C1__a_accessor_storage, "f"); },
- set: function (value) { __classPrivateFieldSet(this, _C1__a_accessor_storage, value, "f"); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1.prototype, 1, {
- get: function () { return __classPrivateFieldGet(this, _C1__b_accessor_storage, "f"); },
- set: function (value) { __classPrivateFieldSet(this, _C1__b_accessor_storage, value, "f"); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1, 2, {
- get: function () { return __classPrivateFieldGet(_a, _a, "f", _C1__c_accessor_storage); },
- set: function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C1__c_accessor_storage); },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(C1, 3, {
- get: function () { return __classPrivateFieldGet(_a, _a, "f", _C1__d_accessor_storage); },
- set: function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C1__d_accessor_storage); },
- enumerable: false,
- configurable: true
- });
- var _a, _C1__a_accessor_storage, _C1__b_accessor_storage, _C1__c_accessor_storage, _C1__d_accessor_storage;
- _a = C1, _C1__a_accessor_storage = new WeakMap(), _C1__b_accessor_storage = new WeakMap();
- _C1__c_accessor_storage = { value: void 0 };
- _C1__d_accessor_storage = { value: 2 };
- return C1;
-}());
diff --git a/tests/baselines/reference/autoAccessor5(target=es5).errors.txt b/tests/baselines/reference/autoAccessor5(target=es5).errors.txt
index 5800cd441ff26..3d1ed9efe7294 100644
--- a/tests/baselines/reference/autoAccessor5(target=es5).errors.txt
+++ b/tests/baselines/reference/autoAccessor5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
autoAccessor5.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor5.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
autoAccessor5.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
@@ -5,6 +6,7 @@ autoAccessor5.ts(5,21): error TS18045: Properties with the 'accessor' modifier a
autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== autoAccessor5.ts (5 errors) ====
class C1 {
accessor ["w"]: any;
diff --git a/tests/baselines/reference/awaitBinaryExpression1_es5(target=es5).errors.txt b/tests/baselines/reference/awaitBinaryExpression1_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..aad920c52c7aa
--- /dev/null
+++ b/tests/baselines/reference/awaitBinaryExpression1_es5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitBinaryExpression1_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = await p || a;
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitBinaryExpression2_es5(target=es5).errors.txt b/tests/baselines/reference/awaitBinaryExpression2_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..3afbaec00cecb
--- /dev/null
+++ b/tests/baselines/reference/awaitBinaryExpression2_es5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitBinaryExpression2_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = await p && a;
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitBinaryExpression3_es5(target=es5).errors.txt b/tests/baselines/reference/awaitBinaryExpression3_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..4c1236589bf01
--- /dev/null
+++ b/tests/baselines/reference/awaitBinaryExpression3_es5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitBinaryExpression3_es5.ts (0 errors) ====
+ declare var a: number;
+ declare var p: Promise;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = await p + a;
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitBinaryExpression4_es5(target=es5).errors.txt b/tests/baselines/reference/awaitBinaryExpression4_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..3b529df6ee23c
--- /dev/null
+++ b/tests/baselines/reference/awaitBinaryExpression4_es5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitBinaryExpression4_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = (await p, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitBinaryExpression5_es5(target=es5).errors.txt b/tests/baselines/reference/awaitBinaryExpression5_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..6537b9ffaf5cb
--- /dev/null
+++ b/tests/baselines/reference/awaitBinaryExpression5_es5(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitBinaryExpression5_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var o: { a: boolean; };
+ o.a = await p;
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression1_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression1_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..daf16521896dd
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression1_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression1_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = fn(a, a, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression2_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression2_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..c8300a2273a85
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression2_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression2_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = fn(await p, a, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression3_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression3_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..c0a41aeb6551d
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression3_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression3_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = fn(a, await p, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression4_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression4_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..ae063ce5f63fc
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression4_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression4_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = (await pfn)(a, a, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression5_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression5_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..f82a2983ec3f6
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression5_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression5_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = o.fn(a, a, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression6_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression6_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..ed3f06b18f851
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression6_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression6_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = o.fn(await p, a, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression7_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression7_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..04249a638f7c3
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression7_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression7_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = o.fn(a, await p, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitCallExpression8_es5(target=es5).errors.txt b/tests/baselines/reference/awaitCallExpression8_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..cad1b7e94c9a1
--- /dev/null
+++ b/tests/baselines/reference/awaitCallExpression8_es5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitCallExpression8_es5.ts (0 errors) ====
+ declare var a: boolean;
+ declare var p: Promise;
+ declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
+ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
+ declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
+ declare function before(): void;
+ declare function after(): void;
+ async function func(): Promise {
+ before();
+ var b = (await po).fn(a, a, a);
+ after();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitClassExpression_es5(target=es5).errors.txt b/tests/baselines/reference/awaitClassExpression_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..7726939f0fde4
--- /dev/null
+++ b/tests/baselines/reference/awaitClassExpression_es5(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitClassExpression_es5.ts (0 errors) ====
+ declare class C { }
+ declare var p: Promise;
+
+ async function func(): Promise {
+ class D extends (await p) {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitUnion_es5(target=es5).errors.txt b/tests/baselines/reference/awaitUnion_es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..5ac4ca6de3aaf
--- /dev/null
+++ b/tests/baselines/reference/awaitUnion_es5(target=es5).errors.txt
@@ -0,0 +1,17 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitUnion_es5.ts (0 errors) ====
+ declare let a: number | string;
+ declare let b: PromiseLike | PromiseLike;
+ declare let c: PromiseLike;
+ declare let d: number | PromiseLike;
+ declare let e: number | PromiseLike;
+ async function f() {
+ let await_a = await a;
+ let await_b = await b;
+ let await_c = await c;
+ let await_d = await d;
+ let await_e = await e;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).errors.txt
index 008722a48e7e6..a0bc13632f494 100644
--- a/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).errors.txt
+++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
awaitUsingDeclarations.1.ts(1,1): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(36,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(41,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
@@ -17,6 +18,7 @@ awaitUsingDeclarations.1.ts(101,5): error TS2854: Top-level 'await using' statem
awaitUsingDeclarations.1.ts(105,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== awaitUsingDeclarations.1.ts (17 errors) ====
await using d1 = { async [Symbol.asyncDispose]() {} };
~~~~~
diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).errors.txt
index 2966bcdfb74a4..f2fb2fe4bbbcc 100644
--- a/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).errors.txt
+++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
awaitUsingDeclarations.2.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== awaitUsingDeclarations.2.ts (1 errors) ====
{
await using d1 = { async [Symbol.asyncDispose]() {} },
diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).errors.txt
index 3987b59b7904b..1b6452f9f5655 100644
--- a/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).errors.txt
+++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
awaitUsingDeclarations.3.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== awaitUsingDeclarations.3.ts (1 errors) ====
{
await using d1 = { async [Symbol.asyncDispose]() {} },
diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).errors.txt
new file mode 100644
index 0000000000000..b2f5382d1e1ec
--- /dev/null
+++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitUsingDeclarationsInFor.ts (0 errors) ====
+ async function main() {
+ for (await using d1 = { [Symbol.dispose]() {} },
+ d2 = { async [Symbol.asyncDispose]() {} },
+ d3 = null,
+ d4 = undefined;;) {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).errors.txt
new file mode 100644
index 0000000000000..2f96c14338668
--- /dev/null
+++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).errors.txt
@@ -0,0 +1,9 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitUsingDeclarationsInForAwaitOf.ts (0 errors) ====
+ async function main() {
+ for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).errors.txt
index dff557f7c85b0..7ac8281610272 100644
--- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).errors.txt
+++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
awaitUsingDeclarationsInForAwaitOf.3.ts(5,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarationsInForAwaitOf.3.ts(5,23): error TS1123: Variable declaration list cannot be empty.
awaitUsingDeclarationsInForAwaitOf.3.ts(8,25): error TS1123: Variable declaration list cannot be empty.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== awaitUsingDeclarationsInForAwaitOf.3.ts (3 errors) ====
// https://github.com/microsoft/TypeScript/pull/55558#issuecomment-1817595357
diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).errors.txt
new file mode 100644
index 0000000000000..3530767862b58
--- /dev/null
+++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== awaitUsingDeclarationsInForOf.1.ts (0 errors) ====
+ async function main() {
+ for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) {
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).errors.txt
index 0cc4b1df6bc21..57d50732a94d7 100644
--- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).errors.txt
+++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
awaitUsingDeclarationsInForOf.5.ts(5,17): error TS1123: Variable declaration list cannot be empty.
awaitUsingDeclarationsInForOf.5.ts(8,19): error TS1123: Variable declaration list cannot be empty.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== awaitUsingDeclarationsInForOf.5.ts (2 errors) ====
// https://github.com/microsoft/TypeScript/pull/55558#issuecomment-1817595357
diff --git a/tests/baselines/reference/bigintAmbientMinimal(target=es5).errors.txt b/tests/baselines/reference/bigintAmbientMinimal(target=es5).errors.txt
index e95b511da01dd..a29874c687456 100644
--- a/tests/baselines/reference/bigintAmbientMinimal(target=es5).errors.txt
+++ b/tests/baselines/reference/bigintAmbientMinimal(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
/main.ts(5,17): error TS2737: BigInt literals are not available when targeting lower than ES2020.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== /ambient.d.ts (0 errors) ====
declare const fromDts = 789n;
declare namespace Lib {
diff --git a/tests/baselines/reference/bigintWithoutLib(target=es5).errors.txt b/tests/baselines/reference/bigintWithoutLib(target=es5).errors.txt
index cb1d1688127e9..a801d5a48825a 100644
--- a/tests/baselines/reference/bigintWithoutLib(target=es5).errors.txt
+++ b/tests/baselines/reference/bigintWithoutLib(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
bigintWithoutLib.ts(4,25): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
bigintWithoutLib.ts(5,13): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
bigintWithoutLib.ts(6,5): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
@@ -51,6 +52,7 @@ bigintWithoutLib.ts(55,36): error TS2737: BigInt literals are not available when
bigintWithoutLib.ts(56,36): error TS2345: Argument of type 'bigint' is not assignable to parameter of type 'number'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== bigintWithoutLib.ts (51 errors) ====
// Every line should error because these builtins are not declared
diff --git a/tests/baselines/reference/binaryIntegerLiteral(target=es5).errors.txt b/tests/baselines/reference/binaryIntegerLiteral(target=es5).errors.txt
new file mode 100644
index 0000000000000..63348f01a84e7
--- /dev/null
+++ b/tests/baselines/reference/binaryIntegerLiteral(target=es5).errors.txt
@@ -0,0 +1,47 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== binaryIntegerLiteral.ts (0 errors) ====
+ var bin1 = 0b11010;
+ var bin2 = 0B11010;
+ var bin3 = 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111;
+ var bin4 = 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111;
+
+ var obj1 = {
+ 0b11010: "Hello",
+ a: bin1,
+ bin1,
+ b: 0b11010,
+ 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true,
+ }
+
+ var obj2 = {
+ 0B11010: "World",
+ a: bin2,
+ bin2,
+ b: 0B11010,
+ 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,
+ }
+
+ obj1[0b11010]; // string
+ obj1[26]; // string
+ obj1["26"]; // string
+ obj1["0b11010"]; // any
+ obj1["a"]; // number
+ obj1["b"]; // number
+ obj1["bin1"]; // number
+ obj1["Infinity"]; // boolean
+
+ obj2[0B11010]; // string
+ obj2[26]; // string
+ obj2["26"]; // string
+ obj2["0B11010"]; // any
+ obj2["a"]; // number
+ obj2["b"]; // number
+ obj2["bin2"]; // number
+ obj2[9.671406556917009e+24]; // boolean
+ obj2["9.671406556917009e+24"]; // boolean
+ obj2["Infinity"]; // any
+
+
\ No newline at end of file
diff --git a/tests/baselines/reference/binaryIntegerLiteral(target=es5).types b/tests/baselines/reference/binaryIntegerLiteral(target=es5).types
index 9bb5101b0e371..50471191dcec4 100644
--- a/tests/baselines/reference/binaryIntegerLiteral(target=es5).types
+++ b/tests/baselines/reference/binaryIntegerLiteral(target=es5).types
@@ -120,7 +120,8 @@ obj1["26"]; // string
> : ^^^^
obj1["0b11010"]; // any
->obj1["0b11010"] : error
+>obj1["0b11010"] : any
+> : ^^^
>obj1 : { 26: string; a: number; bin1: number; b: number; Infinity: boolean; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"0b11010" : "0b11010"
@@ -183,7 +184,8 @@ obj2["26"]; // string
> : ^^^^
obj2["0B11010"]; // any
->obj2["0B11010"] : error
+>obj2["0B11010"] : any
+> : ^^^
>obj2 : { 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"0B11010" : "0B11010"
@@ -230,7 +232,8 @@ obj2["9.671406556917009e+24"]; // boolean
> : ^^^^^^^^^^^^^^^^^^^^^^^
obj2["Infinity"]; // any
->obj2["Infinity"] : error
+>obj2["Infinity"] : any
+> : ^^^
>obj2 : { 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"Infinity" : "Infinity"
diff --git a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator(target=es5).errors.txt b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator(target=es5).errors.txt
new file mode 100644
index 0000000000000..f34c1e623c972
--- /dev/null
+++ b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== blockScopedBindingsInDownlevelGenerator.ts (0 errors) ====
+ function* a() {
+ for (const i of [1,2,3]) {
+ (() => i)()
+ yield i
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator(target=es5).types b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator(target=es5).types
index 957f447f8e574..60f40d20f0646 100644
--- a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator(target=es5).types
+++ b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator(target=es5).types
@@ -29,6 +29,7 @@ function* a() {
yield i
>yield i : any
+> : ^^^
>i : number
> : ^^^^^^
}
diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef(target=es5).errors.txt b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef(target=es5).errors.txt
index 1b67e080e243f..7241c14ec4998 100644
--- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedEnumVariablesUseBeforeDef.ts(2,12): error TS2450: Enum 'E' used before its declaration.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedEnumVariablesUseBeforeDef.ts (1 errors) ====
function foo1() {
return E.A
diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_isolatedModules(target=es5).errors.txt b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_isolatedModules(target=es5).errors.txt
index 99a0a42f86099..0075269cad7cb 100644
--- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_isolatedModules(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_isolatedModules(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedEnumVariablesUseBeforeDef_isolatedModules.ts(2,12): error TS2450: Enum 'E' used before its declaration.
blockScopedEnumVariablesUseBeforeDef_isolatedModules.ts(7,12): error TS2450: Enum 'E' used before its declaration.
blockScopedEnumVariablesUseBeforeDef_isolatedModules.ts(12,8): error TS2450: Enum 'AfterObject' used before its declaration.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedEnumVariablesUseBeforeDef_isolatedModules.ts (3 errors) ====
function foo1() {
return E.A
diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve(target=es5).errors.txt b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve(target=es5).errors.txt
index f5d55337e5395..bd2dacf2e3ced 100644
--- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedEnumVariablesUseBeforeDef_preserve.ts(2,12): error TS2450: Enum 'E' used before its declaration.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedEnumVariablesUseBeforeDef_preserve.ts (1 errors) ====
function foo1() {
return E.A
diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax(target=es5).errors.txt b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax(target=es5).errors.txt
index d3059e8840ae4..17f57b10a22d3 100644
--- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts(2,12): error TS2450: Enum 'E' used before its declaration.
blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts(7,12): error TS2450: Enum 'E' used before its declaration.
blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts(12,8): error TS2450: Enum 'AfterObject' used before its declaration.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts (3 errors) ====
function foo1() {
return E.A
diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationES5(target=es5).errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..04023008c4cf9
--- /dev/null
+++ b/tests/baselines/reference/blockScopedFunctionDeclarationES5(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== blockScopedFunctionDeclarationES5.ts (0 errors) ====
+ if (true) {
+ function foo() { }
+ foo();
+ }
+ foo();
\ No newline at end of file
diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass(target=es5).errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass(target=es5).errors.txt
index f0e4c2cc061c6..ea7a2975b04f9 100644
--- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedFunctionDeclarationInStrictClass.ts(4,22): error TS1251: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode.
blockScopedFunctionDeclarationInStrictClass.ts(7,9): error TS2304: Cannot find name 'foo'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedFunctionDeclarationInStrictClass.ts (2 errors) ====
class c {
method() {
diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5(target=es5).errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5(target=es5).errors.txt
index 857941c464872..6e7fc8c8dd055 100644
--- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedFunctionDeclarationStrictES5.ts(3,14): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'.
blockScopedFunctionDeclarationStrictES5.ts(6,1): error TS2304: Cannot find name 'foo'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedFunctionDeclarationStrictES5.ts (2 errors) ====
"use strict";
if (true) {
diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).errors.txt b/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).errors.txt
index dc3f899b5a225..e06d7ce581e6f 100644
--- a/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile(target=es5).errors.txt
@@ -1,9 +1,11 @@
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
error TS5107: Option 'module=AMD' 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 TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
!!! error TS5107: Option 'module=AMD' 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.
==== test.ts (0 errors) ====
namespace C {
export class Name {
diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5(target=es5).errors.txt b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5(target=es5).errors.txt
index 47b4cf9a063cf..9c54d31e8e5e1 100644
--- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedSameNameFunctionDeclarationES5.ts(3,18): error TS2393: Duplicate function implementation.
blockScopedSameNameFunctionDeclarationES5.ts(5,13): error TS2554: Expected 0 arguments, but got 1.
blockScopedSameNameFunctionDeclarationES5.ts(8,18): error TS2393: Duplicate function implementation.
@@ -6,6 +7,7 @@ blockScopedSameNameFunctionDeclarationES5.ts(12,9): error TS2554: Expected 0 arg
blockScopedSameNameFunctionDeclarationES5.ts(16,1): error TS2554: Expected 1 arguments, but got 0.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedSameNameFunctionDeclarationES5.ts (6 errors) ====
function foo(a: number) {
if (a === 1) {
diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5(target=es5).errors.txt b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5(target=es5).errors.txt
index 2a0872026df8e..e76dc06bf8fb1 100644
--- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedSameNameFunctionDeclarationStrictES5.ts(4,18): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'.
blockScopedSameNameFunctionDeclarationStrictES5.ts(6,13): error TS2554: Expected 0 arguments, but got 1.
blockScopedSameNameFunctionDeclarationStrictES5.ts(9,18): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'.
@@ -6,6 +7,7 @@ blockScopedSameNameFunctionDeclarationStrictES5.ts(14,5): error TS2554: Expected
blockScopedSameNameFunctionDeclarationStrictES5.ts(17,1): error TS2554: Expected 1 arguments, but got 0.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedSameNameFunctionDeclarationStrictES5.ts (6 errors) ====
"use strict";
function foo(a: number) {
diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).errors.txt b/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).errors.txt
index 7beb2b37b9389..e8aa4623c45a5 100644
--- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).errors.txt
+++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
blockScopedVariablesUseBeforeDef.ts(2,13): error TS2448: Block-scoped variable 'x' used before its declaration.
blockScopedVariablesUseBeforeDef.ts(58,20): error TS2448: Block-scoped variable 'x' used before its declaration.
blockScopedVariablesUseBeforeDef.ts(65,20): error TS2448: Block-scoped variable 'x' used before its declaration.
@@ -10,6 +11,7 @@ blockScopedVariablesUseBeforeDef.ts(131,9): error TS2448: Block-scoped variable
blockScopedVariablesUseBeforeDef.ts(153,20): error TS2450: Enum 'Enum' used before its declaration.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== blockScopedVariablesUseBeforeDef.ts (10 errors) ====
function foo0() {
let a = x;
diff --git a/tests/baselines/reference/callChainWithSuper(target=es5).errors.txt b/tests/baselines/reference/callChainWithSuper(target=es5).errors.txt
new file mode 100644
index 0000000000000..f459aaacadb78
--- /dev/null
+++ b/tests/baselines/reference/callChainWithSuper(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== callChainWithSuper.ts (0 errors) ====
+ // GH#34952
+ class Base { method?() {} }
+ class Derived extends Base {
+ method1() { return super.method?.(); }
+ method2() { return super["method"]?.(); }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/capturedLetConstInLoop14(target=es5).errors.txt b/tests/baselines/reference/capturedLetConstInLoop14(target=es5).errors.txt
index ab5b98288acb1..04dc8679f17ef 100644
--- a/tests/baselines/reference/capturedLetConstInLoop14(target=es5).errors.txt
+++ b/tests/baselines/reference/capturedLetConstInLoop14(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
capturedLetConstInLoop14.ts(7,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'v' must be of type 'number', but here has type 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== capturedLetConstInLoop14.ts (1 errors) ====
function use(v: number) {}
diff --git a/tests/baselines/reference/capturedParametersInInitializers2(target=es5).errors.txt b/tests/baselines/reference/capturedParametersInInitializers2(target=es5).errors.txt
index 0576ba7b95af3..da5aecc225c95 100644
--- a/tests/baselines/reference/capturedParametersInInitializers2(target=es5).errors.txt
+++ b/tests/baselines/reference/capturedParametersInInitializers2(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
capturedParametersInInitializers2.ts(3,20): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
capturedParametersInInitializers2.ts(4,14): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
capturedParametersInInitializers2.ts(6,10): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it.
capturedParametersInInitializers2.ts(13,27): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== capturedParametersInInitializers2.ts (4 errors) ====
function foo(
y = class {
diff --git a/tests/baselines/reference/capturedShorthandPropertyAssignmentNoCheck(target=es5).errors.txt b/tests/baselines/reference/capturedShorthandPropertyAssignmentNoCheck(target=es5).errors.txt
new file mode 100644
index 0000000000000..8bb335d1b6cc9
--- /dev/null
+++ b/tests/baselines/reference/capturedShorthandPropertyAssignmentNoCheck(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== capturedShorthandPropertyAssignmentNoCheck.ts (0 errors) ====
+ const fns = [];
+ for (const value of [1, 2, 3]) {
+ fns.push(() => ({ value }));
+ }
+ const result = fns.map(fn => fn());
+ console.log(result)
+
\ No newline at end of file
diff --git a/tests/baselines/reference/capturedShorthandPropertyAssignmentNoCheck(target=es5).types b/tests/baselines/reference/capturedShorthandPropertyAssignmentNoCheck(target=es5).types
index ff153e104aa65..30fdc2aea7f58 100644
--- a/tests/baselines/reference/capturedShorthandPropertyAssignmentNoCheck(target=es5).types
+++ b/tests/baselines/reference/capturedShorthandPropertyAssignmentNoCheck(target=es5).types
@@ -51,8 +51,11 @@ const result = fns.map(fn => fn());
>fn => fn() : (fn: any) => any
> : ^ ^^^^^^^^^^^^^
>fn : any
+> : ^^^
>fn() : any
+> : ^^^
>fn : any
+> : ^^^
console.log(result)
>console.log(result) : void
diff --git a/tests/baselines/reference/capturedVarInLoop(target=es5).errors.txt b/tests/baselines/reference/capturedVarInLoop(target=es5).errors.txt
new file mode 100644
index 0000000000000..c1b283ed49d6d
--- /dev/null
+++ b/tests/baselines/reference/capturedVarInLoop(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== capturedVarInLoop.ts (0 errors) ====
+ for (var i = 0; i < 10; i++) {
+ var str = 'x', len = str.length;
+ let lambda1 = (y) => { };
+ let lambda2 = () => lambda1(len);
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/capturedVarInLoop(target=es5).types b/tests/baselines/reference/capturedVarInLoop(target=es5).types
index 5a19b847e7921..76c57c3d0e440 100644
--- a/tests/baselines/reference/capturedVarInLoop(target=es5).types
+++ b/tests/baselines/reference/capturedVarInLoop(target=es5).types
@@ -37,6 +37,7 @@ for (var i = 0; i < 10; i++) {
>(y) => { } : (y: any) => void
> : ^ ^^^^^^^^^^^^^^
>y : any
+> : ^^^
let lambda2 = () => lambda1(len);
>lambda2 : () => void
diff --git a/tests/baselines/reference/checkForObjectTooStrict(target=es5).errors.txt b/tests/baselines/reference/checkForObjectTooStrict(target=es5).errors.txt
index f917241422777..f6a4b385463fe 100644
--- a/tests/baselines/reference/checkForObjectTooStrict(target=es5).errors.txt
+++ b/tests/baselines/reference/checkForObjectTooStrict(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
checkForObjectTooStrict.ts(3,18): error TS2725: Class name cannot be 'Object' when targeting ES5 and above with module CommonJS.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== checkForObjectTooStrict.ts (1 errors) ====
namespace Foo {
diff --git a/tests/baselines/reference/circularObjectLiteralAccessors(target=es5).errors.txt b/tests/baselines/reference/circularObjectLiteralAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..844c18b2feeba
--- /dev/null
+++ b/tests/baselines/reference/circularObjectLiteralAccessors(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== circularObjectLiteralAccessors.ts (0 errors) ====
+ // Repro from #6000
+
+ const a = {
+ b: {
+ get foo(): string {
+ return a.foo;
+ },
+ set foo(value: string) {
+ a.foo = value;
+ }
+ },
+ foo: ''
+ };
\ No newline at end of file
diff --git a/tests/baselines/reference/classAbstractAccessor(target=es5).errors.txt b/tests/baselines/reference/classAbstractAccessor(target=es5).errors.txt
index 552193c4cd31f..e201e9929c7f5 100644
--- a/tests/baselines/reference/classAbstractAccessor(target=es5).errors.txt
+++ b/tests/baselines/reference/classAbstractAccessor(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classAbstractAccessor.ts(3,17): error TS1318: An abstract accessor cannot have an implementation.
classAbstractAccessor.ts(5,17): error TS1318: An abstract accessor cannot have an implementation.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classAbstractAccessor.ts (2 errors) ====
abstract class A {
abstract get a();
diff --git a/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).errors.txt b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).errors.txt
new file mode 100644
index 0000000000000..d93665a7b26d2
--- /dev/null
+++ b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classExpressionWithStaticProperties2.ts (0 errors) ====
+ var v = class C {
+ static a = 1;
+ static b
+ static c = {
+ x: "hi"
+ }
+ static d = C.c.x + " world";
+ };
\ No newline at end of file
diff --git a/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).types b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).types
index 8f0bbd78d5b4e..7e4f56dc7f192 100644
--- a/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).types
+++ b/tests/baselines/reference/classExpressionWithStaticProperties2(target=es5).types
@@ -17,6 +17,7 @@ var v = class C {
static b
>b : any
+> : ^^^
static c = {
>c : { x: string; }
diff --git a/tests/baselines/reference/classExpressionWithStaticProperties3(target=es5).errors.txt b/tests/baselines/reference/classExpressionWithStaticProperties3(target=es5).errors.txt
new file mode 100644
index 0000000000000..173aea57cfd5c
--- /dev/null
+++ b/tests/baselines/reference/classExpressionWithStaticProperties3(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classExpressionWithStaticProperties3.ts (0 errors) ====
+ declare var console: any;
+ const arr: {y(): number}[] = [];
+ for (let i = 0; i < 3; i++) {
+ arr.push(class C {
+ static x = i;
+ static y = () => C.x * 2;
+ });
+ }
+ arr.forEach(C => console.log(C.y()));
\ No newline at end of file
diff --git a/tests/baselines/reference/classExpressionWithStaticProperties3(target=es5).types b/tests/baselines/reference/classExpressionWithStaticProperties3(target=es5).types
index df8f6807c5362..c2e5edc1ae011 100644
--- a/tests/baselines/reference/classExpressionWithStaticProperties3(target=es5).types
+++ b/tests/baselines/reference/classExpressionWithStaticProperties3(target=es5).types
@@ -3,6 +3,7 @@
=== classExpressionWithStaticProperties3.ts ===
declare var console: any;
>console : any
+> : ^^^
const arr: {y(): number}[] = [];
>arr : { y(): number; }[]
@@ -80,7 +81,9 @@ arr.forEach(C => console.log(C.y()));
>C : { y(): number; }
> : ^^^^^^^ ^^^
>console.log(C.y()) : any
+> : ^^^
>console.log : any
+> : ^^^
>console : any
> : ^^^
>log : any
diff --git a/tests/baselines/reference/classExtendsAcrossFiles(target=es5).errors.txt b/tests/baselines/reference/classExtendsAcrossFiles(target=es5).errors.txt
new file mode 100644
index 0000000000000..a1c245f6b5544
--- /dev/null
+++ b/tests/baselines/reference/classExtendsAcrossFiles(target=es5).errors.txt
@@ -0,0 +1,22 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== a.ts (0 errors) ====
+ import { b } from './b';
+ export const a = {
+ f: () => {
+ class A { }
+ class B extends A { }
+ b.f();
+ }
+ };
+==== b.ts (0 errors) ====
+ import { a } from './a';
+ export const b = {
+ f: () => {
+ class A { }
+ class B extends A { }
+ a.f();
+ }
+ };
\ No newline at end of file
diff --git a/tests/baselines/reference/classInConvertedLoopES5(target=es5).errors.txt b/tests/baselines/reference/classInConvertedLoopES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..255af4d2e3521
--- /dev/null
+++ b/tests/baselines/reference/classInConvertedLoopES5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classInConvertedLoopES5.ts (0 errors) ====
+ const classesByRow: Record = {};
+ for (const row of ['1', '2', '3', '4', '5']) {
+ class RowClass {
+ row = row;
+ static factory = () => new RowClass();
+ }
+
+ classesByRow[row] = RowClass;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/classStaticBlock1(target=es5).errors.txt b/tests/baselines/reference/classStaticBlock1(target=es5).errors.txt
new file mode 100644
index 0000000000000..1fe460372d8bf
--- /dev/null
+++ b/tests/baselines/reference/classStaticBlock1(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classStaticBlock1.ts (0 errors) ====
+ const a = 2;
+
+ class C {
+ static {
+ const a = 1;
+
+ a;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/classStaticBlock10(target=es5).errors.txt b/tests/baselines/reference/classStaticBlock10(target=es5).errors.txt
new file mode 100644
index 0000000000000..7cacc739e1ba7
--- /dev/null
+++ b/tests/baselines/reference/classStaticBlock10(target=es5).errors.txt
@@ -0,0 +1,33 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classStaticBlock10.ts (0 errors) ====
+ var a1 = 1;
+ var a2 = 1;
+ const b1 = 2;
+ const b2 = 2;
+
+ function f () {
+ var a1 = 11;
+ const b1 = 22;
+
+ class C1 {
+ static {
+ var a1 = 111;
+ var a2 = 111;
+ const b1 = 222;
+ const b2 = 222;
+ }
+ }
+ }
+
+ class C2 {
+ static {
+ var a1 = 111;
+ var a2 = 111;
+ const b1 = 222;
+ const b2 = 222;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/classStaticBlock18(target=es5).errors.txt b/tests/baselines/reference/classStaticBlock18(target=es5).errors.txt
new file mode 100644
index 0000000000000..fc0ec43808720
--- /dev/null
+++ b/tests/baselines/reference/classStaticBlock18(target=es5).errors.txt
@@ -0,0 +1,19 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classStaticBlock18.ts (0 errors) ====
+ function foo () {
+ return class {
+ static foo = 1;
+ static {
+ const c = class {
+ static bar = 2;
+ static {
+ // do
+ }
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/classStaticBlock2(target=es5).errors.txt b/tests/baselines/reference/classStaticBlock2(target=es5).errors.txt
new file mode 100644
index 0000000000000..bcf0bbef8b2a3
--- /dev/null
+++ b/tests/baselines/reference/classStaticBlock2(target=es5).errors.txt
@@ -0,0 +1,24 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classStaticBlock2.ts (0 errors) ====
+ const a = 1;
+ const b = 2;
+
+ class C {
+ static {
+ const a = 11;
+
+ a;
+ b;
+ }
+
+ static {
+ const a = 11;
+
+ a;
+ b;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/classStaticBlock5(target=es5).errors.txt b/tests/baselines/reference/classStaticBlock5(target=es5).errors.txt
index e08815d9d420b..112cb004ed42f 100644
--- a/tests/baselines/reference/classStaticBlock5(target=es5).errors.txt
+++ b/tests/baselines/reference/classStaticBlock5(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classStaticBlock5.ts(8,22): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
classStaticBlock5.ts(12,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
classStaticBlock5.ts(13,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classStaticBlock5.ts (3 errors) ====
class B {
static a = 1;
diff --git a/tests/baselines/reference/classStaticBlock6(target=es5).errors.txt b/tests/baselines/reference/classStaticBlock6(target=es5).errors.txt
index 321325c296527..5d7e771381e53 100644
--- a/tests/baselines/reference/classStaticBlock6(target=es5).errors.txt
+++ b/tests/baselines/reference/classStaticBlock6(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classStaticBlock6.ts(8,13): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
classStaticBlock6.ts(9,13): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'eval'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
classStaticBlock6.ts(13,9): error TS18037: 'await' expression cannot be used inside a class static block.
@@ -17,6 +18,7 @@ classStaticBlock6.ts(66,14): error TS2729: Property 'b' is used before its initi
classStaticBlock6.ts(69,18): error TS2729: Property 'b' is used before its initialization.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classStaticBlock6.ts (17 errors) ====
class B {
static a = 1;
diff --git a/tests/baselines/reference/classStaticBlock9(target=es5).errors.txt b/tests/baselines/reference/classStaticBlock9(target=es5).errors.txt
index 185d702d41dfb..8a0747835a2ab 100644
--- a/tests/baselines/reference/classStaticBlock9(target=es5).errors.txt
+++ b/tests/baselines/reference/classStaticBlock9(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classStaticBlock9.ts(2,20): error TS2729: Property 'foo' is used before its initialization.
classStaticBlock9.ts(4,11): error TS2729: Property 'foo' is used before its initialization.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classStaticBlock9.ts (2 errors) ====
class A {
static bar = A.foo + 1
diff --git a/tests/baselines/reference/classStaticPropertyAccess(target=es5).errors.txt b/tests/baselines/reference/classStaticPropertyAccess(target=es5).errors.txt
index 135b46a14207d..63b008e284ec4 100644
--- a/tests/baselines/reference/classStaticPropertyAccess(target=es5).errors.txt
+++ b/tests/baselines/reference/classStaticPropertyAccess(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classStaticPropertyAccess.ts(10,1): error TS2576: Property '"' does not exist on type 'A'. Did you mean to access the static member 'A["\""]' instead?
classStaticPropertyAccess.ts(11,1): error TS2576: Property 'y' does not exist on type 'A'. Did you mean to access the static member 'A['y']' instead?
classStaticPropertyAccess.ts(12,3): error TS2576: Property 'y' does not exist on type 'A'. Did you mean to access the static member 'A.y' instead?
@@ -5,6 +6,7 @@ classStaticPropertyAccess.ts(13,3): error TS2341: Property '_b' is private and o
classStaticPropertyAccess.ts(14,3): error TS2339: Property 'a' does not exist on type 'typeof A'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classStaticPropertyAccess.ts (5 errors) ====
class A {
public static "\""() {}
diff --git a/tests/baselines/reference/classStaticPropertyTypeGuard(target=es5).errors.txt b/tests/baselines/reference/classStaticPropertyTypeGuard(target=es5).errors.txt
new file mode 100644
index 0000000000000..fa860f96fd42d
--- /dev/null
+++ b/tests/baselines/reference/classStaticPropertyTypeGuard(target=es5).errors.txt
@@ -0,0 +1,17 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classStaticPropertyTypeGuard.ts (0 errors) ====
+ // Repro from #8923
+
+ class A {
+ private static _a: string | undefined;
+
+ public get a(): string {
+ if (A._a) {
+ return A._a; // is possibly null or undefined.
+ }
+ return A._a = 'helloworld';
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/classUsedBeforeInitializedVariables(target=es5).errors.txt b/tests/baselines/reference/classUsedBeforeInitializedVariables(target=es5).errors.txt
index 5a9c7352042eb..e40d4a97ab74a 100644
--- a/tests/baselines/reference/classUsedBeforeInitializedVariables(target=es5).errors.txt
+++ b/tests/baselines/reference/classUsedBeforeInitializedVariables(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classUsedBeforeInitializedVariables.ts(4,15): error TS2729: Property 'p4' is used before its initialization.
classUsedBeforeInitializedVariables.ts(13,34): error TS2729: Property 'directlyAssigned' is used before its initialization.
classUsedBeforeInitializedVariables.ts(22,15): error TS2729: Property 'withinObjectLiteral' is used before its initialization.
@@ -6,6 +7,7 @@ classUsedBeforeInitializedVariables.ts(32,19): error TS2729: Property 'withinObj
classUsedBeforeInitializedVariables.ts(35,64): error TS2729: Property 'withinClassDeclarationExtension' is used before its initialization.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classUsedBeforeInitializedVariables.ts (6 errors) ====
class Test {
p1 = 0;
diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface(target=es5).errors.txt b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface(target=es5).errors.txt
new file mode 100644
index 0000000000000..b01fb7aa05dce
--- /dev/null
+++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface(target=es5).errors.txt
@@ -0,0 +1,30 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classWithOnlyPublicMembersEquivalentToInterface.ts (0 errors) ====
+ // no errors expected
+
+ class C {
+ public x: string;
+ public y(a: number): number { return null; }
+ public get z() { return 1; }
+ public set z(v) { }
+ [x: string]: Object;
+ [x: number]: Object;
+ 0: number;
+ }
+
+ interface I {
+ x: string;
+ y(b: number): number;
+ z: number;
+ [x: string]: Object;
+ [x: number]: Object;
+ 0: number;
+ }
+
+ var c: C;
+ var i: I;
+ c = i;
+ i = c;
\ No newline at end of file
diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2(target=es5).errors.txt b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2(target=es5).errors.txt
new file mode 100644
index 0000000000000..d233b01d7ba57
--- /dev/null
+++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2(target=es5).errors.txt
@@ -0,0 +1,32 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classWithOnlyPublicMembersEquivalentToInterface2.ts (0 errors) ====
+ // no errors expected
+
+ class C {
+ public x: string;
+ public y(a: number): number { return null; }
+ public get z() { return 1; }
+ public set z(v) { }
+ [x: string]: Object;
+ [x: number]: Object;
+ 0: number;
+
+ public static foo: string; // doesn't effect equivalence
+ }
+
+ interface I {
+ x: string;
+ y(b: number): number;
+ z: number;
+ [x: string]: Object;
+ [x: number]: Object;
+ 0: number;
+ }
+
+ var c: C;
+ var i: I;
+ c = i;
+ i = c;
\ No newline at end of file
diff --git a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es5).errors.txt b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es5).errors.txt
new file mode 100644
index 0000000000000..ef76ac46c9aa2
--- /dev/null
+++ b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classWithStaticFieldInParameterBindingPattern.ts (0 errors) ====
+ // https://github.com/microsoft/TypeScript/issues/36295
+ (({ [class { static x = 1 }.x]: b = "" }) => {})();
\ No newline at end of file
diff --git a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern.2(target=es5).errors.txt b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern.2(target=es5).errors.txt
index 28dfa8cb08d59..a12d8dd72f7bf 100644
--- a/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern.2(target=es5).errors.txt
+++ b/tests/baselines/reference/classWithStaticFieldInParameterBindingPattern.2(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classWithStaticFieldInParameterBindingPattern.2.ts(3,20): error TS2373: Parameter '{ [class extends C { static x = 1 }.x]: b = "" }' cannot reference identifier 'C' declared after it.
classWithStaticFieldInParameterBindingPattern.2.ts(6,57): error TS2373: Parameter 'd' cannot reference identifier 'x' declared after it.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classWithStaticFieldInParameterBindingPattern.2.ts (2 errors) ====
// https://github.com/microsoft/TypeScript/issues/36295
class C {}
diff --git a/tests/baselines/reference/classWithStaticFieldInParameterInitializer(target=es5).errors.txt b/tests/baselines/reference/classWithStaticFieldInParameterInitializer(target=es5).errors.txt
new file mode 100644
index 0000000000000..c6ebdd6ebfecd
--- /dev/null
+++ b/tests/baselines/reference/classWithStaticFieldInParameterInitializer(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classWithStaticFieldInParameterInitializer.ts (0 errors) ====
+ // https://github.com/microsoft/TypeScript/issues/36295
+ ((b = class { static x = 1 }) => {})();
\ No newline at end of file
diff --git a/tests/baselines/reference/classWithStaticFieldInParameterInitializer.2(target=es5).errors.txt b/tests/baselines/reference/classWithStaticFieldInParameterInitializer.2(target=es5).errors.txt
index caf000ff5f0ba..ee486e436e0e2 100644
--- a/tests/baselines/reference/classWithStaticFieldInParameterInitializer.2(target=es5).errors.txt
+++ b/tests/baselines/reference/classWithStaticFieldInParameterInitializer.2(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
classWithStaticFieldInParameterInitializer.2.ts(3,21): error TS2373: Parameter 'b' cannot reference identifier 'C' declared after it.
classWithStaticFieldInParameterInitializer.2.ts(6,45): error TS2373: Parameter 'd' cannot reference identifier 'x' declared after it.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== classWithStaticFieldInParameterInitializer.2.ts (2 errors) ====
// https://github.com/microsoft/TypeScript/issues/36295
class C {}
diff --git a/tests/baselines/reference/classdecl(target=es5).errors.txt b/tests/baselines/reference/classdecl(target=es5).errors.txt
new file mode 100644
index 0000000000000..edb86bcf34bc5
--- /dev/null
+++ b/tests/baselines/reference/classdecl(target=es5).errors.txt
@@ -0,0 +1,98 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== classdecl.ts (0 errors) ====
+ class a {
+ //constructor ();
+ constructor (n: number);
+ constructor (s: string);
+ constructor (ns: any) {
+
+ }
+
+ public pgF() { }
+
+ public pv;
+ public get d() {
+ return 30;
+ }
+ public set d(a: number) {
+ }
+
+ public static get p2() {
+ return { x: 30, y: 40 };
+ }
+
+ private static d2() {
+ }
+ private static get p3() {
+ return "string";
+ }
+ private pv3;
+
+ private foo(n: number): string;
+ private foo(s: string): string;
+ private foo(ns: any) {
+ return ns.toString();
+ }
+ }
+
+ class b extends a {
+ }
+
+ namespace m1 {
+ export class b {
+ }
+ class d {
+ }
+
+
+ export interface ib {
+ }
+ }
+
+ namespace m2 {
+
+ export namespace m3 {
+ export class c extends b {
+ }
+ export class ib2 implements m1.ib {
+ }
+ }
+ }
+
+ class c extends m1.b {
+ }
+
+ class ib2 implements m1.ib {
+ }
+
+ declare class aAmbient {
+ constructor (n: number);
+ constructor (s: string);
+ public pgF(): void;
+ public pv;
+ public d : number;
+ static p2 : { x: number; y: number; };
+ static d2();
+ static p3;
+ private pv3;
+ private foo(s);
+ }
+
+ class d {
+ private foo(n: number): string;
+ private foo(s: string): string;
+ private foo(ns: any) {
+ return ns.toString();
+ }
+ }
+
+ class e {
+ private foo(s: string): string;
+ private foo(n: number): string;
+ private foo(ns: any) {
+ return ns.toString();
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/classdecl(target=es5).types b/tests/baselines/reference/classdecl(target=es5).types
index bb98c4bdc433c..eb9d3e101326a 100644
--- a/tests/baselines/reference/classdecl(target=es5).types
+++ b/tests/baselines/reference/classdecl(target=es5).types
@@ -16,6 +16,7 @@ class a {
constructor (ns: any) {
>ns : any
+> : ^^^
}
@@ -25,6 +26,7 @@ class a {
public pv;
>pv : any
+> : ^^^
public get d() {
>d : number
@@ -72,6 +74,7 @@ class a {
}
private pv3;
>pv3 : any
+> : ^^^
private foo(n: number): string;
>foo : { (n: number): string; (s: string): string; }
@@ -89,10 +92,13 @@ class a {
>foo : { (n: number): string; (s: string): string; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>ns : any
+> : ^^^
return ns.toString();
>ns.toString() : any
+> : ^^^
>ns.toString : any
+> : ^^^
>ns : any
> : ^^^
>toString : any
@@ -184,6 +190,7 @@ declare class aAmbient {
public pv;
>pv : any
+> : ^^^
public d : number;
>d : number
@@ -203,14 +210,17 @@ declare class aAmbient {
static p3;
>p3 : any
+> : ^^^
private pv3;
>pv3 : any
+> : ^^^
private foo(s);
>foo : (s: any) => any
> : ^ ^^^^^^^^^^^^^
>s : any
+> : ^^^
}
class d {
@@ -233,10 +243,13 @@ class d {
>foo : { (n: number): string; (s: string): string; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>ns : any
+> : ^^^
return ns.toString();
>ns.toString() : any
+> : ^^^
>ns.toString : any
+> : ^^^
>ns : any
> : ^^^
>toString : any
@@ -264,10 +277,13 @@ class e {
>foo : { (s: string): string; (n: number): string; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>ns : any
+> : ^^^
return ns.toString();
>ns.toString() : any
+> : ^^^
>ns.toString : any
+> : ^^^
>ns : any
> : ^^^
>toString : any
diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt
index c3ed9abd5f8b7..cbde2985f06bd 100644
--- a/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt
+++ b/tests/baselines/reference/collisionArgumentsArrowFunctions(target=es5).errors.txt
@@ -1,7 +1,9 @@
+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 '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/collisionArgumentsClassConstructor(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsClassConstructor(target=es5).errors.txt
index 96f8c1fd3ae2d..9c741613813e2 100644
--- a/tests/baselines/reference/collisionArgumentsClassConstructor(target=es5).errors.txt
+++ b/tests/baselines/reference/collisionArgumentsClassConstructor(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionArgumentsClassConstructor.ts(3,28): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
collisionArgumentsClassConstructor.ts(3,31): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
collisionArgumentsClassConstructor.ts(4,13): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
@@ -29,6 +30,7 @@ collisionArgumentsClassConstructor.ts(69,17): error TS1210: Code contained in a
collisionArgumentsClassConstructor.ts(70,13): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionArgumentsClassConstructor.ts (29 errors) ====
// Constructors
class c1 {
diff --git a/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).errors.txt
index e242b2421ae00..9634623c1a732 100644
--- a/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).errors.txt
+++ b/tests/baselines/reference/collisionArgumentsClassMethod(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionArgumentsClassMethod.ts(2,27): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
collisionArgumentsClassMethod.ts(2,30): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
collisionArgumentsClassMethod.ts(3,13): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
@@ -24,6 +25,7 @@ collisionArgumentsClassMethod.ts(43,13): error TS1210: Code contained in a class
collisionArgumentsClassMethod.ts(46,13): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionArgumentsClassMethod.ts (24 errors) ====
class c1 {
public foo(i: number, ...arguments) { //arguments is error
diff --git a/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt
index 1d7d2b3c99b7f..bced0ca74e435 100644
--- a/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt
+++ b/tests/baselines/reference/collisionArgumentsFunction(target=es5).errors.txt
@@ -1,9 +1,11 @@
+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 '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
diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt
index f85bd42c754d8..4ff7bf7317155 100644
--- a/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt
+++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions(target=es5).errors.txt
@@ -1,9 +1,11 @@
+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 '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
diff --git a/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js b/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js
index 93f03c1eeb785..f702ecbe87880 100644
--- a/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js
+++ b/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js
@@ -14,11 +14,8 @@ var x = new 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكو
//// [collisionCodeGenModuleWithUnicodeNames.js]
var 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
(function (才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123_1) {
- var 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = /** @class */ (function () {
- function 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123() {
- }
- return 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
- }());
+ class 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 {
+ }
才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123_1.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
})(才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 || (才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = {}));
var x = new 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123();
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors(target=es5).errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..2f419a29f8e99
--- /dev/null
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors(target=es5).errors.txt
@@ -0,0 +1,44 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== collisionSuperAndLocalFunctionInAccessors.ts (0 errors) ====
+ function _super() { // No error
+ }
+ class Foo {
+ get prop1(): number {
+ function _super() { // No error
+ }
+ return 10;
+ }
+ set prop1(val: number) {
+ function _super() { // No error
+ }
+ }
+ }
+ class b extends Foo {
+ get prop2(): number {
+ function _super() { // Should be error
+ }
+ return 10;
+ }
+ set prop2(val: number) {
+ function _super() { // Should be error
+ }
+ }
+ }
+ class c extends Foo {
+ get prop2(): number {
+ var x = () => {
+ function _super() { // Should be error
+ }
+ }
+ return 10;
+ }
+ set prop2(val: number) {
+ var x = () => {
+ function _super() { // Should be error
+ }
+ }
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors(target=es5).errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..26867527487b8
--- /dev/null
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors(target=es5).errors.txt
@@ -0,0 +1,37 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== collisionSuperAndLocalVarInAccessors.ts (0 errors) ====
+ var _super = 10; // No Error
+ class Foo {
+ get prop1(): number {
+ var _super = 10; // No error
+ return 10;
+ }
+ set prop1(val: number) {
+ var _super = 10; // No error
+ }
+ }
+ class b extends Foo {
+ get prop2(): number {
+ var _super = 10; // Should be error
+ return 10;
+ }
+ set prop2(val: number) {
+ var _super = 10; // Should be error
+ }
+ }
+ class c extends Foo {
+ get prop2(): number {
+ var x = () => {
+ var _super = 10; // Should be error
+ }
+ return 10;
+ }
+ set prop2(val: number) {
+ var x = () => {
+ var _super = 10; // Should be error
+ }
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/collisionSuperAndParameter(target=es5).errors.txt b/tests/baselines/reference/collisionSuperAndParameter(target=es5).errors.txt
new file mode 100644
index 0000000000000..31fc5028bb0a0
--- /dev/null
+++ b/tests/baselines/reference/collisionSuperAndParameter(target=es5).errors.txt
@@ -0,0 +1,67 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== collisionSuperAndParameter.ts (0 errors) ====
+ class Foo {
+ a() {
+ var lamda = (_super: number) => { // No Error
+ return x => this; // New scope. So should inject new _this capture
+ }
+ }
+ b(_super: number) { // No Error
+ var lambda = () => {
+ return x => this; // New scope. So should inject new _this capture
+ }
+ }
+ set c(_super: number) { // No error
+ }
+ }
+ class Foo2 extends Foo {
+ x() {
+ var lamda = (_super: number) => { // Error
+ return x => this; // New scope. So should inject new _this capture
+ }
+ }
+ y(_super: number) { // Error
+ var lambda = () => {
+ return x => this; // New scope. So should inject new _this capture
+ }
+ }
+ set z(_super: number) { // Error
+ }
+ public prop3: {
+ doStuff: (_super: number) => void; // no error - no code gen
+ }
+ public prop4 = {
+ doStuff: (_super: number) => { // should be error
+ }
+ }
+ constructor(_super: number) { // should be error
+ super();
+ }
+ }
+ declare class Foo3 extends Foo {
+ x();
+ y(_super: number); // No error - no code gen
+ constructor(_super: number); // No error - no code gen
+ public prop2: {
+ doStuff: (_super: number) => void; // no error - no code gen
+ };
+ public _super: number; // No error
+ }
+
+ class Foo4 extends Foo {
+ constructor(_super: number); // no code gen - no error
+ constructor(_super: string);// no code gen - no error
+ constructor(_super: any) { // should be error
+ super();
+ }
+ y(_super: number); // no code gen - no error
+ y(_super: string); // no code gen - no error
+ y(_super: any) { // Error
+ var lambda = () => {
+ return x => this; // New scope. So should inject new _this capture
+ }
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/collisionSuperAndParameter(target=es5).types b/tests/baselines/reference/collisionSuperAndParameter(target=es5).types
index 5abe135cd301f..2b5ff9f636f95 100644
--- a/tests/baselines/reference/collisionSuperAndParameter(target=es5).types
+++ b/tests/baselines/reference/collisionSuperAndParameter(target=es5).types
@@ -21,6 +21,7 @@ class Foo {
>x => this : (x: any) => this
> : ^ ^^^^^^^^^^^^^^
>x : any
+> : ^^^
>this : this
> : ^^^^
}
@@ -41,6 +42,7 @@ class Foo {
>x => this : (x: any) => this
> : ^ ^^^^^^^^^^^^^^
>x : any
+> : ^^^
>this : this
> : ^^^^
}
@@ -74,6 +76,7 @@ class Foo2 extends Foo {
>x => this : (x: any) => this
> : ^ ^^^^^^^^^^^^^^
>x : any
+> : ^^^
>this : this
> : ^^^^
}
@@ -94,6 +97,7 @@ class Foo2 extends Foo {
>x => this : (x: any) => this
> : ^ ^^^^^^^^^^^^^^
>x : any
+> : ^^^
>this : this
> : ^^^^
}
@@ -192,6 +196,7 @@ class Foo4 extends Foo {
constructor(_super: any) { // should be error
>_super : any
+> : ^^^
super();
>super() : void
@@ -215,6 +220,7 @@ class Foo4 extends Foo {
>y : { (_super: number): any; (_super: string): any; }
> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^
>_super : any
+> : ^^^
var lambda = () => {
>lambda : () => (x: any) => this
@@ -226,6 +232,7 @@ class Foo4 extends Foo {
>x => this : (x: any) => this
> : ^ ^^^^^^^^^^^^^^
>x : any
+> : ^^^
>this : this
> : ^^^^
}
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..b8182a8984c77
--- /dev/null
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).errors.txt
@@ -0,0 +1,48 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== collisionThisExpressionAndLocalVarInAccessors.ts (0 errors) ====
+ class class1 {
+ get a(): number {
+ var x2 = {
+ doStuff: (callback) => () => {
+ var _this = 2;
+ return callback(this);
+ }
+ }
+
+ return 10;
+ }
+ set a(val: number) {
+ var x2 = {
+ doStuff: (callback) => () => {
+ var _this = 2;
+ return callback(this);
+ }
+ }
+
+ }
+ }
+
+ class class2 {
+ get a(): number {
+ var _this = 2;
+ var x2 = {
+ doStuff: (callback) => () => {
+ return callback(this);
+ }
+ }
+
+ return 10;
+ }
+ set a(val: number) {
+ var _this = 2;
+ var x2 = {
+ doStuff: (callback) => () => {
+ return callback(this);
+ }
+ }
+
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).types b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).types
index a0398800afcd0..6edbc1a837119 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).types
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors(target=es5).types
@@ -21,6 +21,7 @@ class class1 {
>(callback) => () => { var _this = 2; return callback(this); } : (callback: any) => () => any
> : ^ ^^^^^^^^^^^^^^^^^^^
>callback : any
+> : ^^^
>() => { var _this = 2; return callback(this); } : () => any
> : ^^^^^^^^^
@@ -32,7 +33,9 @@ class class1 {
return callback(this);
>callback(this) : any
+> : ^^^
>callback : any
+> : ^^^
>this : this
> : ^^^^
}
@@ -60,6 +63,7 @@ class class1 {
>(callback) => () => { var _this = 2; return callback(this); } : (callback: any) => () => any
> : ^ ^^^^^^^^^^^^^^^^^^^
>callback : any
+> : ^^^
>() => { var _this = 2; return callback(this); } : () => any
> : ^^^^^^^^^
@@ -71,7 +75,9 @@ class class1 {
return callback(this);
>callback(this) : any
+> : ^^^
>callback : any
+> : ^^^
>this : this
> : ^^^^
}
@@ -106,12 +112,15 @@ class class2 {
>(callback) => () => { return callback(this); } : (callback: any) => () => any
> : ^ ^^^^^^^^^^^^^^^^^^^
>callback : any
+> : ^^^
>() => { return callback(this); } : () => any
> : ^^^^^^^^^
return callback(this);
>callback(this) : any
+> : ^^^
>callback : any
+> : ^^^
>this : this
> : ^^^^
}
@@ -145,12 +154,15 @@ class class2 {
>(callback) => () => { return callback(this); } : (callback: any) => () => any
> : ^ ^^^^^^^^^^^^^^^^^^^
>callback : any
+> : ^^^
>() => { return callback(this); } : () => any
> : ^^^^^^^^^
return callback(this);
>callback(this) : any
+> : ^^^
>callback : any
+> : ^^^
>this : this
> : ^^^^
}
diff --git a/tests/baselines/reference/commentsClass(target=es5).errors.txt b/tests/baselines/reference/commentsClass(target=es5).errors.txt
new file mode 100644
index 0000000000000..5a9cbf24c91b0
--- /dev/null
+++ b/tests/baselines/reference/commentsClass(target=es5).errors.txt
@@ -0,0 +1,77 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsClass.ts (0 errors) ====
+ /** This is class c2 without constuctor*/
+ class c2 {
+ } // trailing comment1
+ var i2 = new c2();
+ var i2_c = c2;
+ class c3 {
+ /** Constructor comment*/
+ constructor() {
+ } // trailing comment of constructor
+ } /* trailing comment 2 */
+ var i3 = new c3();
+ var i3_c = c3;
+ /** Class comment*/
+ class c4 {
+ /** Constructor comment*/
+ constructor() {
+ } /* trailing comment of constructor 2*/
+ }
+ var i4 = new c4();
+ var i4_c = c4;
+ /** Class with statics*/
+ class c5 {
+ static s1: number;
+ }
+ var i5 = new c5();
+ var i5_c = c5;
+
+ /// class with statics and constructor
+ class c6 { /// class with statics and constructor2
+ /// s1 comment
+ static s1: number; /// s1 comment2
+ /// constructor comment
+ constructor() { /// constructor comment2
+ }
+ }
+ var i6 = new c6();
+ var i6_c = c6;
+
+ // class with statics and constructor
+ class c7 {
+ // s1 comment
+ static s1: number;
+ // constructor comment
+ constructor() {
+ }
+ }
+ var i7 = new c7();
+ var i7_c = c7;
+
+ /** class with statics and constructor
+ */
+ class c8 {
+ /** s1 comment */
+ static s1: number; /** s1 comment2 */
+ /** constructor comment
+ */
+ constructor() {
+ /** constructor comment2
+ */
+ }
+ }
+ var i8 = new c8();
+ var i8_c = c8;
+
+ class c9 {
+ constructor() {
+ /// This is some detached comment
+
+ // should emit this leading comment of } too
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsClassMembers(target=es5).errors.txt b/tests/baselines/reference/commentsClassMembers(target=es5).errors.txt
new file mode 100644
index 0000000000000..da3665cd12edf
--- /dev/null
+++ b/tests/baselines/reference/commentsClassMembers(target=es5).errors.txt
@@ -0,0 +1,222 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsClassMembers.ts (0 errors) ====
+ /** This is comment for c1*/
+ class c1 {
+ /** p1 is property of c1*/
+ public p1: number;
+ /** sum with property*/
+ public p2(/** number to add*/b: number) {
+ return this.p1 + b;
+ } /* trailing comment of method*/
+ /** getter property*/
+ public get p3() {
+ return this.p2(this.p1);
+ }// trailing comment Getter
+ /** setter property*/
+ public set p3(/** this is value*/value: number) {
+ this.p1 = this.p2(value);
+ }// trailing comment Setter
+ /** pp1 is property of c1*/
+ private pp1: number;
+ /** sum with property*/
+ private pp2(/** number to add*/b: number) {
+ return this.p1 + b;
+ } // trailing comment of method
+ /** getter property*/
+ private get pp3() {
+ return this.pp2(this.pp1);
+ }
+ /** setter property*/
+ private set pp3( /** this is value*/value: number) {
+ this.pp1 = this.pp2(value);
+ }
+ /** Constructor method*/
+ constructor() {
+ }
+ /** s1 is static property of c1*/
+ static s1: number;
+ /** static sum with property*/
+ static s2(/** number to add*/b: number) {
+ return c1.s1 + b;
+ }
+ /** static getter property*/
+ static get s3() {
+ return c1.s2(c1.s1);
+ } /*trailing comment 1 getter*/
+ /** setter property*/
+ static set s3( /** this is value*/value: number) {
+ c1.s1 = c1.s2(value);
+ }/*trailing comment 2 */ /*setter*/
+ public nc_p1: number;
+ public nc_p2(b: number) {
+ return this.nc_p1 + b;
+ }
+ public get nc_p3() {
+ return this.nc_p2(this.nc_p1);
+ }
+ public set nc_p3(value: number) {
+ this.nc_p1 = this.nc_p2(value);
+ }
+ private nc_pp1: number;
+ private nc_pp2(b: number) {
+ return this.nc_pp1 + b;
+ }
+ private get nc_pp3() {
+ return this.nc_pp2(this.nc_pp1);
+ }
+ private set nc_pp3(value: number) {
+ this.nc_pp1 = this.nc_pp2(value);
+ }
+ static nc_s1: number;
+ static nc_s2(b: number) {
+ return c1.nc_s1 + b;
+ }
+ static get nc_s3() {
+ return c1.nc_s2(c1.nc_s1);
+ }
+ static set nc_s3(value: number) {
+ c1.nc_s1 = c1.nc_s2(value);
+ }
+
+ // p1 is property of c1
+ public a_p1: number;
+ // sum with property
+ public a_p2(b: number) {
+ return this.a_p1 + b;
+ }
+ // getter property
+ public get a_p3() {
+ return this.a_p2(this.a_p1);
+ }
+ // setter property
+ public set a_p3(value: number) {
+ this.a_p1 = this.a_p2(value);
+ }
+ // pp1 is property of c1
+ private a_pp1: number;
+ // sum with property
+ private a_pp2(b: number) {
+ return this.a_p1 + b;
+ }
+ // getter property
+ private get a_pp3() {
+ return this.a_pp2(this.a_pp1);
+ }
+ // setter property
+ private set a_pp3(value: number) {
+ this.a_pp1 = this.a_pp2(value);
+ }
+
+ // s1 is static property of c1
+ static a_s1: number;
+ // static sum with property
+ static a_s2(b: number) {
+ return c1.a_s1 + b;
+ }
+ // static getter property
+ static get a_s3() {
+ return c1.s2(c1.s1);
+ }
+
+ // setter property
+ static set a_s3(value: number) {
+ c1.a_s1 = c1.a_s2(value);
+ }
+
+ /** p1 is property of c1 */
+ public b_p1: number;
+ /** sum with property */
+ public b_p2(b: number) {
+ return this.b_p1 + b;
+ }
+ /** getter property */
+ public get b_p3() {
+ return this.b_p2(this.b_p1);
+ }
+ /** setter property */
+ public set b_p3(value: number) {
+ this.b_p1 = this.b_p2(value);
+ }
+ /** pp1 is property of c1 */
+ private b_pp1: number;
+ /** sum with property */
+ private b_pp2(b: number) {
+ return this.b_p1 + b;
+ }
+ /** getter property */
+ private get b_pp3() {
+ return this.b_pp2(this.b_pp1);
+ }
+ /** setter property */
+ private set b_pp3(value: number) {
+ this.b_pp1 = this.b_pp2(value);
+ }
+
+ /** s1 is static property of c1 */
+ static b_s1: number;
+ /** static sum with property */
+ static b_s2(b: number) {
+ return c1.b_s1 + b;
+ }
+ /** static getter property
+ */
+ static get b_s3() {
+ return c1.s2(c1.s1);
+ }
+
+ /** setter property
+ */
+ static set b_s3(value: number) {
+ /** setter */
+ c1.b_s1 = c1.b_s2(value);
+ }
+ }
+ var i1 = new c1();
+ var i1_p = i1.p1;
+ var i1_f = i1.p2;
+ var i1_r = i1.p2(20);
+ var i1_prop = i1.p3;
+ i1.p3 = i1_prop;
+ var i1_nc_p = i1.nc_p1;
+ var i1_ncf = i1.nc_p2;
+ var i1_ncr = i1.nc_p2(20);
+ var i1_ncprop = i1.nc_p3;
+ i1.nc_p3 = i1_ncprop;
+ var i1_s_p = c1.s1;
+ var i1_s_f = c1.s2;
+ var i1_s_r = c1.s2(20);
+ var i1_s_prop = c1.s3;
+ c1.s3 = i1_s_prop;
+ var i1_s_nc_p = c1.nc_s1;
+ var i1_s_ncf = c1.nc_s2;
+ var i1_s_ncr = c1.nc_s2(20);
+ var i1_s_ncprop = c1.nc_s3;
+ c1.nc_s3 = i1_s_ncprop;
+ var i1_c = c1;
+ class cProperties {
+ private val: number;
+ /** getter only property*/
+ public get p1() {
+ return this.val;
+ } // trailing comment of only getter
+ public get nc_p1() {
+ return this.val;
+ }
+ /**setter only property*/
+ public set p2(value: number) {
+ this.val = value;
+ }
+ public set nc_p2(value: number) {
+ this.val = value;
+ } /* trailing comment of setter only*/
+
+ public x = 10; /*trailing comment for property*/
+ private y = 10; // trailing comment of // style
+ }
+ var cProperties_i = new cProperties();
+ cProperties_i.p2 = cProperties_i.p1;
+ cProperties_i.nc_p2 = cProperties_i.nc_p1;
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsCommentParsing(target=es5).errors.txt b/tests/baselines/reference/commentsCommentParsing(target=es5).errors.txt
new file mode 100644
index 0000000000000..734a6cb8102d8
--- /dev/null
+++ b/tests/baselines/reference/commentsCommentParsing(target=es5).errors.txt
@@ -0,0 +1,158 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsCommentParsing.ts (0 errors) ====
+ /// This is simple /// comments
+ function simple() {
+ }
+
+ simple();
+
+ /// multiLine /// Comments
+ /// This is example of multiline /// comments
+ /// Another multiLine
+ function multiLine() {
+ }
+ multiLine();
+
+ /** this is eg of single line jsdoc style comment */
+ function jsDocSingleLine() {
+ }
+ jsDocSingleLine();
+
+
+ /** this is multiple line jsdoc stule comment
+ *New line1
+ *New Line2*/
+ function jsDocMultiLine() {
+ }
+ jsDocMultiLine();
+
+ /** this is multiple line jsdoc stule comment
+ *New line1
+ *New Line2*/
+ /** Shoul mege this line as well
+ * and this too*/ /** Another this one too*/
+ function jsDocMultiLineMerge() {
+ }
+ jsDocMultiLineMerge();
+
+
+ /// Triple slash comment
+ /** jsdoc comment */
+ function jsDocMixedComments1() {
+ }
+ jsDocMixedComments1();
+
+ /// Triple slash comment
+ /** jsdoc comment */ /*** another jsDocComment*/
+ function jsDocMixedComments2() {
+ }
+ jsDocMixedComments2();
+
+ /** jsdoc comment */ /*** another jsDocComment*/
+ /// Triple slash comment
+ function jsDocMixedComments3() {
+ }
+ jsDocMixedComments3();
+
+ /** jsdoc comment */ /*** another jsDocComment*/
+ /// Triple slash comment
+ /// Triple slash comment 2
+ function jsDocMixedComments4() {
+ }
+ jsDocMixedComments4();
+
+ /// Triple slash comment 1
+ /** jsdoc comment */ /*** another jsDocComment*/
+ /// Triple slash comment
+ /// Triple slash comment 2
+ function jsDocMixedComments5() {
+ }
+ jsDocMixedComments5();
+
+ /*** another jsDocComment*/
+ /// Triple slash comment 1
+ /// Triple slash comment
+ /// Triple slash comment 2
+ /** jsdoc comment */
+ function jsDocMixedComments6() {
+ }
+ jsDocMixedComments6();
+
+ // This shoulnot be help comment
+ function noHelpComment1() {
+ }
+ noHelpComment1();
+
+ /* This shoulnot be help comment */
+ function noHelpComment2() {
+ }
+ noHelpComment2();
+
+ function noHelpComment3() {
+ }
+ noHelpComment3();
+ /** Adds two integers and returns the result
+ * @param {number} a first number
+ * @param b second number
+ */
+ function sum(a: number, b: number) {
+ return a + b;
+ }
+ sum(10, 20);
+ /** This is multiplication function*/
+ /** @param */
+ /** @param a first number*/
+ /** @param b */
+ /** @param c {
+ @param d @anotherTag*/
+ /** @param e LastParam @anotherTag*/
+ function multiply(a: number, b: number, c?: number, d?, e?) {
+ }
+ /** fn f1 with number
+ * @param { string} b about b
+ */
+ function f1(a: number);
+ function f1(b: string);
+ /**@param opt optional parameter*/
+ function f1(aOrb, opt?) {
+ return aOrb;
+ }
+ /** This is subtract function
+ @param { a
+ *@param { number | } b this is about b
+ @param { { () => string; } } c this is optional param c
+ @param { { () => string; } d this is optional param d
+ @param { { () => string; } } e this is optional param e
+ @param { { { () => string; } } f this is optional param f
+ */
+ function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) {
+ }
+ /** this is square function
+ @paramTag { number } a this is input number of paramTag
+ @param { number } a this is input number
+ @returnType { number } it is return type
+ */
+ function square(a: number) {
+ return a * a;
+ }
+ /** this is divide function
+ @param { number} a this is a
+ @paramTag { number } g this is optional param g
+ @param { number} b this is b
+ */
+ function divide(a: number, b: number) {
+ }
+ /** this is jsdoc style function with param tag as well as inline parameter help
+ *@param a it is first parameter
+ *@param c it is third parameter
+ */
+ function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) {
+ return a + b + c + d;
+ }
+
+ /**/
+ class NoQuickInfoClass {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsCommentParsing(target=es5).types b/tests/baselines/reference/commentsCommentParsing(target=es5).types
index 38ec3cb4e8d91..3780bfb75b1fb 100644
--- a/tests/baselines/reference/commentsCommentParsing(target=es5).types
+++ b/tests/baselines/reference/commentsCommentParsing(target=es5).types
@@ -224,7 +224,9 @@ function multiply(a: number, b: number, c?: number, d?, e?) {
>c : number
> : ^^^^^^
>d : any
+> : ^^^
>e : any
+> : ^^^
}
/** fn f1 with number
* @param { string} b about b
@@ -246,10 +248,13 @@ function f1(aOrb, opt?) {
>f1 : { (a: number): any; (b: string): any; }
> : ^^^ ^^ ^^^^^^^^^ ^^ ^^^^^^^^^
>aOrb : any
+> : ^^^
>opt : any
+> : ^^^
return aOrb;
>aOrb : any
+> : ^^^
}
/** This is subtract function
@param { a
diff --git a/tests/baselines/reference/commentsDottedModuleName(target=es5).errors.txt b/tests/baselines/reference/commentsDottedModuleName(target=es5).errors.txt
index 4893cf17c42f3..93e8d86130a60 100644
--- a/tests/baselines/reference/commentsDottedModuleName(target=es5).errors.txt
+++ b/tests/baselines/reference/commentsDottedModuleName(target=es5).errors.txt
@@ -1,7 +1,9 @@
error TS5107: Option 'module=AMD' 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 'module=AMD' 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.
==== commentsDottedModuleName.ts (0 errors) ====
/** this is multi declare module*/
export namespace outerModule.InnerModule {
diff --git a/tests/baselines/reference/commentsEnums(target=es5).errors.txt b/tests/baselines/reference/commentsEnums(target=es5).errors.txt
new file mode 100644
index 0000000000000..8be38377f0545
--- /dev/null
+++ b/tests/baselines/reference/commentsEnums(target=es5).errors.txt
@@ -0,0 +1,16 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsEnums.ts (0 errors) ====
+ /** Enum of colors*/
+ enum Colors {
+ /** Fancy name for 'blue'*/
+ Cornflower /* blue */,
+ /** Fancy name for 'pink'*/
+ FancyPink
+ } // trailing comment
+ var x = Colors.Cornflower;
+ x = Colors.FancyPink;
+
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsExternalModules(target=es5).errors.txt b/tests/baselines/reference/commentsExternalModules(target=es5).errors.txt
index 1e2d583d84131..5aebad0777d36 100644
--- a/tests/baselines/reference/commentsExternalModules(target=es5).errors.txt
+++ b/tests/baselines/reference/commentsExternalModules(target=es5).errors.txt
@@ -1,7 +1,9 @@
error TS5107: Option 'module=AMD' 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 'module=AMD' 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.
==== commentsExternalModules_1.ts (0 errors) ====
/**This is on import declaration*/
import extMod = require("commentsExternalModules_0"); // trailing comment1
diff --git a/tests/baselines/reference/commentsExternalModules2(target=es5).errors.txt b/tests/baselines/reference/commentsExternalModules2(target=es5).errors.txt
index 859f2c1134ec3..8f3cfba6aae26 100644
--- a/tests/baselines/reference/commentsExternalModules2(target=es5).errors.txt
+++ b/tests/baselines/reference/commentsExternalModules2(target=es5).errors.txt
@@ -1,7 +1,9 @@
error TS5107: Option 'module=AMD' 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 'module=AMD' 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.
==== commentsExternalModules_1.ts (0 errors) ====
/**This is on import declaration*/
import extMod = require("commentsExternalModules2_0"); // trailing comment 1
diff --git a/tests/baselines/reference/commentsExternalModules3(target=es5).errors.txt b/tests/baselines/reference/commentsExternalModules3(target=es5).errors.txt
new file mode 100644
index 0000000000000..b372c2c6904ba
--- /dev/null
+++ b/tests/baselines/reference/commentsExternalModules3(target=es5).errors.txt
@@ -0,0 +1,63 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsExternalModules_1.ts (0 errors) ====
+ /**This is on import declaration*/
+ import extMod = require("./commentsExternalModules2_0"); // trailing comment 1
+ extMod.m1.fooExport();
+ export var newVar = new extMod.m1.m2.c();
+ extMod.m4.fooExport();
+ export var newVar2 = new extMod.m4.m2.c();
+
+==== commentsExternalModules2_0.ts (0 errors) ====
+ /** Module comment*/
+ export namespace m1 {
+ /** b's comment*/
+ export var b: number;
+ /** foo's comment*/
+ function foo() {
+ return b;
+ }
+ /** m2 comments*/
+ export namespace m2 {
+ /** class comment;*/
+ export class c {
+ };
+ /** i*/
+ export var i = new c();
+ }
+ /** exported function*/
+ export function fooExport() {
+ return foo();
+ }
+ }
+ m1.fooExport();
+ var myvar = new m1.m2.c();
+
+ /** Module comment */
+ export namespace m4 {
+ /** b's comment */
+ export var b: number;
+ /** foo's comment
+ */
+ function foo() {
+ return b;
+ }
+ /** m2 comments
+ */
+ export namespace m2 {
+ /** class comment; */
+ export class c {
+ };
+ /** i */
+ export var i = new c();
+ }
+ /** exported function */
+ export function fooExport() {
+ return foo();
+ }
+ }
+ m4.fooExport();
+ var myvar2 = new m4.m2.c();
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsFormatting(target=es5).errors.txt b/tests/baselines/reference/commentsFormatting(target=es5).errors.txt
new file mode 100644
index 0000000000000..50beb470b2238
--- /dev/null
+++ b/tests/baselines/reference/commentsFormatting(target=es5).errors.txt
@@ -0,0 +1,90 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsFormatting.ts (0 errors) ====
+ namespace m {
+ /** this is first line - aligned to class declaration
+ * this is 4 spaces left aligned
+ * this is 3 spaces left aligned
+ * this is 2 spaces left aligned
+ * this is 1 spaces left aligned
+ * this is at same level as first line
+ * this is 1 spaces right aligned
+ * this is 2 spaces right aligned
+ * this is 3 spaces right aligned
+ * this is 4 spaces right aligned
+ * this is 5 spaces right aligned
+ * this is 6 spaces right aligned
+ * this is 7 spaces right aligned
+ * this is 8 spaces right aligned */
+ export class c {
+ }
+
+ /** this is first line - 4 spaces right aligned to class but in js file should be aligned to class declaration
+ * this is 8 spaces left aligned
+ * this is 7 spaces left aligned
+ * this is 6 spaces left aligned
+ * this is 5 spaces left aligned
+ * this is 4 spaces left aligned
+ * this is 3 spaces left aligned
+ * this is 2 spaces left aligned
+ * this is 1 spaces left aligned
+ * this is at same level as first line
+ * this is 1 spaces right aligned
+ * this is 2 spaces right aligned
+ * this is 3 spaces right aligned
+ * this is 4 spaces right aligned
+ * this is 5 spaces right aligned
+ * this is 6 spaces right aligned
+ * this is 7 spaces right aligned
+ * this is 8 spaces right aligned */
+ export class c2 {
+ }
+
+ /** this is comment with new lines in between
+
+ this is 4 spaces left aligned but above line is empty
+
+ this is 3 spaces left aligned but above line is empty
+
+ this is 2 spaces left aligned but above line is empty
+
+ this is 1 spaces left aligned but above line is empty
+
+ this is at same level as first line but above line is empty
+
+ this is 1 spaces right aligned but above line is empty
+
+ this is 2 spaces right aligned but above line is empty
+
+ this is 3 spaces right aligned but above line is empty
+
+ this is 4 spaces right aligned but above line is empty
+
+
+ Above 2 lines are empty
+
+
+
+ above 3 lines are empty*/
+ export class c3 {
+ }
+
+ /** this is first line - aligned to class declaration
+ * this is 0 space + tab
+ * this is 1 space + tab
+ * this is 2 spaces + tab
+ * this is 3 spaces + tab
+ * this is 4 spaces + tab
+ * this is 5 spaces + tab
+ * this is 6 spaces + tab
+ * this is 7 spaces + tab
+ * this is 8 spaces + tab
+ * this is 9 spaces + tab
+ * this is 10 spaces + tab
+ * this is 11 spaces + tab
+ * this is 12 spaces + tab */
+ export class c4 {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsFunction(target=es5).errors.txt b/tests/baselines/reference/commentsFunction(target=es5).errors.txt
new file mode 100644
index 0000000000000..227a2394e0e41
--- /dev/null
+++ b/tests/baselines/reference/commentsFunction(target=es5).errors.txt
@@ -0,0 +1,59 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsFunction.ts (0 errors) ====
+ /** This comment should appear for foo*/
+ function foo() {
+ } /* trailing comment of function */
+ foo();
+ /** This is comment for function signature*/
+ function fooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ } // trailing comment of function
+ fooWithParameters("a", 10);
+ /** fooFunc
+ * comment
+ */
+ var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b: string) {
+ return b;
+ }
+
+ /// lamdaFoo var comment
+ var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b;
+ var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b;
+ lambdaFoo(10, 20);
+ lambddaNoVarComment(10, 20);
+
+ function blah(a: string /* multiline trailing comment
+ multiline */) {
+ }
+
+ function blah2(a: string /* single line multiple trailing comments */ /* second */) {
+ }
+
+ function blah3(a: string // trailing commen single line
+ ) {
+ }
+
+ lambdaFoo = (a, b) => a * b; // This is trailing comment
+
+ /*leading comment*/() => 0; // Needs to be wrapped in parens to be a valid expression (not declaration)
+ /*leading comment*/(() => 0); //trailing comment
+
+ function blah4(/*1*/a: string/*2*/,/*3*/b: string/*4*/) {
+ }
+
+ function foo1() {
+
+ // should emit this
+ }
+
+ function foo2() {
+ /// This is some detached comment
+
+ // should emit this leading comment of } too
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsInheritance(target=es5).errors.txt b/tests/baselines/reference/commentsInheritance(target=es5).errors.txt
new file mode 100644
index 0000000000000..d57ceb905754f
--- /dev/null
+++ b/tests/baselines/reference/commentsInheritance(target=es5).errors.txt
@@ -0,0 +1,155 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsInheritance.ts (0 errors) ====
+ /** i1 is interface with properties*/
+ interface i1 {
+ /** i1_p1*/
+ i1_p1: number;
+ /** i1_f1*/
+ i1_f1(): void;
+ /** i1_l1*/
+ i1_l1: () => void;
+ // il_nc_p1
+ i1_nc_p1: number;
+ i1_nc_f1(): void;
+ i1_nc_l1: () => void;
+ p1: number;
+ f1(): void;
+ l1: () => void;
+ nc_p1: number;
+ nc_f1(): void;
+ nc_l1: () => void;
+ }
+ class c1 implements i1 {
+ public i1_p1: number;
+ // i1_f1
+ public i1_f1() {
+ }
+ public i1_l1: () => void;
+ public i1_nc_p1: number;
+ public i1_nc_f1() {
+ }
+ public i1_nc_l1: () => void;
+ /** c1_p1*/
+ public p1: number;
+ /** c1_f1*/
+ public f1() {
+ }
+ /** c1_l1*/
+ public l1: () => void;
+ /** c1_nc_p1*/
+ public nc_p1: number;
+ /** c1_nc_f1*/
+ public nc_f1() {
+ }
+ /** c1_nc_l1*/
+ public nc_l1: () => void;
+ }
+ var i1_i: i1;
+ var c1_i = new c1();
+ // assign to interface
+ i1_i = c1_i;
+ class c2 {
+ /** c2 c2_p1*/
+ public c2_p1: number;
+ /** c2 c2_f1*/
+ public c2_f1() {
+ }
+ /** c2 c2_prop*/
+ public get c2_prop() {
+ return 10;
+ }
+ public c2_nc_p1: number;
+ public c2_nc_f1() {
+ }
+ public get c2_nc_prop() {
+ return 10;
+ }
+ /** c2 p1*/
+ public p1: number;
+ /** c2 f1*/
+ public f1() {
+ }
+ /** c2 prop*/
+ public get prop() {
+ return 10;
+ }
+ public nc_p1: number;
+ public nc_f1() {
+ }
+ public get nc_prop() {
+ return 10;
+ }
+ /** c2 constructor*/
+ constructor(a: number) {
+ this.c2_p1 = a;
+ }
+ }
+ class c3 extends c2 {
+ constructor() {
+ super(10);
+ }
+ /** c3 p1*/
+ public p1: number;
+ /** c3 f1*/
+ public f1() {
+ }
+ /** c3 prop*/
+ public get prop() {
+ return 10;
+ }
+ public nc_p1: number;
+ public nc_f1() {
+ }
+ public get nc_prop() {
+ return 10;
+ }
+ }
+ var c2_i = new c2(10);
+ var c3_i = new c3();
+ // assign
+ c2_i = c3_i;
+ class c4 extends c2 {
+ }
+ var c4_i = new c4(10);
+ interface i2 {
+ /** i2_p1*/
+ i2_p1: number;
+ /** i2_f1*/
+ i2_f1(): void;
+ /** i2_l1*/
+ i2_l1: () => void;
+ // i2_nc_p1
+ i2_nc_p1: number;
+ i2_nc_f1(): void;
+ i2_nc_l1: () => void;
+ /** i2 p1*/
+ p1: number;
+ /** i2 f1*/
+ f1(): void;
+ /** i2 l1*/
+ l1: () => void;
+ nc_p1: number;
+ nc_f1(): void;
+ nc_l1: () => void;
+ }
+ interface i3 extends i2 {
+ /** i3 p1 */
+ p1: number;
+ /**
+ * i3 f1
+ */
+ f1(): void;
+ /** i3 l1*/
+ l1: () => void;
+ nc_p1: number;
+ nc_f1(): void;
+ nc_l1: () => void;
+ }
+ var i2_i: i2;
+ var i3_i: i3;
+ // assign to interface
+ i2_i = i3_i;
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsInterface(target=es5).errors.txt b/tests/baselines/reference/commentsInterface(target=es5).errors.txt
new file mode 100644
index 0000000000000..4fdaf66dc6850
--- /dev/null
+++ b/tests/baselines/reference/commentsInterface(target=es5).errors.txt
@@ -0,0 +1,74 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsInterface.ts (0 errors) ====
+ /** this is interface 1*/
+ interface i1 {
+ }
+ var i1_i: i1;
+ interface nc_i1 {
+ }
+ var nc_i1_i: nc_i1;
+ /** this is interface 2 with memebers*/
+ interface i2 {
+ /** this is x*/
+ x: number;
+ /** this is foo*/
+ foo: (/**param help*/b: number) => string;
+ /** this is indexer*/
+ [/**string param*/i: string]: any;
+ /**new method*/
+ new (/** param*/i: i1);
+ nc_x: number;
+ nc_foo: (b: number) => string;
+ [i: number]: number;
+ /** this is call signature*/
+ (/**paramhelp a*/a: number,/**paramhelp b*/ b: number) : number;
+ /** this is fnfoo*/
+ fnfoo(/**param help*/b: number): string;
+ nc_fnfoo(b: number): string;
+ // nc_y
+ nc_y: number;
+ }
+ var i2_i: i2;
+ var i2_i_x = i2_i.x;
+ var i2_i_foo = i2_i.foo;
+ var i2_i_foo_r = i2_i.foo(30);
+ var i2_i_i2_si = i2_i["hello"];
+ var i2_i_i2_ii = i2_i[30];
+ var i2_i_n = new i2_i(i1_i);
+ var i2_i_nc_x = i2_i.nc_x;
+ var i2_i_nc_foo = i2_i.nc_foo;
+ var i2_i_nc_foo_r = i2_i.nc_foo(30);
+ var i2_i_r = i2_i(10, 20);
+ var i2_i_fnfoo = i2_i.fnfoo;
+ var i2_i_fnfoo_r = i2_i.fnfoo(10);
+ var i2_i_nc_fnfoo = i2_i.nc_fnfoo;
+ var i2_i_nc_fnfoo_r = i2_i.nc_fnfoo(10);
+ interface i3 {
+ /** Comment i3 x*/
+ x: number;
+ /** Function i3 f*/
+ f(/**number parameter*/a: number): string;
+ /** i3 l*/
+ l: (/**comment i3 l b*/b: number) => string;
+ nc_x: number;
+ nc_f(a: number): string;
+ nc_l: (b: number) => string;
+ }
+ var i3_i: i3;
+ i3_i = {
+ f: /**own f*/ (/**i3_i a*/a: number) => "Hello" + a,
+ l: this.f,
+ /** own x*/
+ x: this.f(10),
+ nc_x: this.l(this.x),
+ nc_f: this.f,
+ nc_l: this.l
+ };
+ i3_i.f(10);
+ i3_i.l(10);
+ i3_i.nc_f(10);
+ i3_i.nc_l(10);
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsInterface(target=es5).types b/tests/baselines/reference/commentsInterface(target=es5).types
index 740c812054b8b..d669596b01f59 100644
--- a/tests/baselines/reference/commentsInterface(target=es5).types
+++ b/tests/baselines/reference/commentsInterface(target=es5).types
@@ -117,7 +117,9 @@ var i2_i_foo_r = i2_i.foo(30);
var i2_i_i2_si = i2_i["hello"];
>i2_i_i2_si : any
+> : ^^^
>i2_i["hello"] : any
+> : ^^^
>i2_i : i2
> : ^^
>"hello" : "hello"
@@ -135,7 +137,9 @@ var i2_i_i2_ii = i2_i[30];
var i2_i_n = new i2_i(i1_i);
>i2_i_n : any
+> : ^^^
>new i2_i(i1_i) : any
+> : ^^^
>i2_i : i2
> : ^^
>i1_i : i1
@@ -299,7 +303,9 @@ i3_i = {
l: this.f,
>l : any
+> : ^^^
>this.f : any
+> : ^^^
>this : typeof globalThis
> : ^^^^^^^^^^^^^^^^^
>f : any
@@ -308,8 +314,11 @@ i3_i = {
/** own x*/
x: this.f(10),
>x : any
+> : ^^^
>this.f(10) : any
+> : ^^^
>this.f : any
+> : ^^^
>this : typeof globalThis
> : ^^^^^^^^^^^^^^^^^
>f : any
@@ -319,13 +328,17 @@ i3_i = {
nc_x: this.l(this.x),
>nc_x : any
+> : ^^^
>this.l(this.x) : any
+> : ^^^
>this.l : any
+> : ^^^
>this : typeof globalThis
> : ^^^^^^^^^^^^^^^^^
>l : any
> : ^^^
>this.x : any
+> : ^^^
>this : typeof globalThis
> : ^^^^^^^^^^^^^^^^^
>x : any
@@ -333,7 +346,9 @@ i3_i = {
nc_f: this.f,
>nc_f : any
+> : ^^^
>this.f : any
+> : ^^^
>this : typeof globalThis
> : ^^^^^^^^^^^^^^^^^
>f : any
@@ -341,7 +356,9 @@ i3_i = {
nc_l: this.l
>nc_l : any
+> : ^^^
>this.l : any
+> : ^^^
>this : typeof globalThis
> : ^^^^^^^^^^^^^^^^^
>l : any
diff --git a/tests/baselines/reference/commentsModules(target=es5).errors.txt b/tests/baselines/reference/commentsModules(target=es5).errors.txt
new file mode 100644
index 0000000000000..c44ba3c8a303b
--- /dev/null
+++ b/tests/baselines/reference/commentsModules(target=es5).errors.txt
@@ -0,0 +1,102 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsModules.ts (0 errors) ====
+ /** Module comment*/
+ namespace m1 {
+ /** b's comment*/
+ export var b: number;
+ /** foo's comment*/
+ function foo() {
+ return b;
+ }
+ /** m2 comments*/
+ export namespace m2 {
+ /** class comment;*/
+ export class c {
+ };
+ /** i*/
+ export var i = new c();
+ }
+ /** exported function*/
+ export function fooExport() {
+ return foo();
+ }
+
+ // shouldn't appear
+ export function foo2Export(/**hm*/ a: string) {
+ }
+
+ /** foo3Export
+ * comment
+ */
+ export function foo3Export() {
+ }
+
+ /** foo4Export
+ * comment
+ */
+ function foo4Export() {
+ }
+ } // trailing comment module
+ m1.fooExport();
+ var myvar = new m1.m2.c();
+ /** module comment of m2.m3*/
+ namespace m2.m3 {
+ /** Exported class comment*/
+ export class c {
+ }
+ } /* trailing dotted module comment*/
+ new m2.m3.c();
+ /** module comment of m3.m4.m5*/
+ namespace m3.m4.m5 {
+ /** Exported class comment*/
+ export class c {
+ }
+ } // trailing dotted module 2
+ new m3.m4.m5.c();
+ /** module comment of m4.m5.m6*/
+ namespace m4.m5.m6 {
+ export namespace m7 {
+ /** Exported class comment*/
+ export class c {
+ }
+ } /* trailing inner module */ /* multiple comments*/
+ }
+ new m4.m5.m6.m7.c();
+ /** module comment of m5.m6.m7*/
+ namespace m5.m6.m7 {
+ /** module m8 comment*/
+ export namespace m8 {
+ /** Exported class comment*/
+ export class c {
+ }
+ }
+ }
+ new m5.m6.m7.m8.c();
+ namespace m6.m7 {
+ export namespace m8 {
+ /** Exported class comment*/
+ export class c {
+ }
+ }
+ }
+ new m6.m7.m8.c();
+ namespace m7.m8 {
+ /** module m9 comment*/
+ export namespace m9 {
+ /** Exported class comment*/
+ export class c {
+ }
+
+ /** class d */
+ class d {
+ }
+
+ // class e
+ export class e {
+ }
+ }
+ }
+ new m7.m8.m9.c();
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsMultiModuleMultiFile(target=es5).errors.txt b/tests/baselines/reference/commentsMultiModuleMultiFile(target=es5).errors.txt
index 7bba5d1ad20e3..84584fd2a3c5d 100644
--- a/tests/baselines/reference/commentsMultiModuleMultiFile(target=es5).errors.txt
+++ b/tests/baselines/reference/commentsMultiModuleMultiFile(target=es5).errors.txt
@@ -1,7 +1,9 @@
error TS5107: Option 'module=AMD' 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 'module=AMD' 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.
==== commentsMultiModuleMultiFile_1.ts (0 errors) ====
import m = require('commentsMultiModuleMultiFile_0');
/** this is multi module 3 comment*/
diff --git a/tests/baselines/reference/commentsMultiModuleSingleFile(target=es5).errors.txt b/tests/baselines/reference/commentsMultiModuleSingleFile(target=es5).errors.txt
new file mode 100644
index 0000000000000..5c1afef9f71d8
--- /dev/null
+++ b/tests/baselines/reference/commentsMultiModuleSingleFile(target=es5).errors.txt
@@ -0,0 +1,28 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsMultiModuleSingleFile.ts (0 errors) ====
+ /** this is multi declare module*/
+ namespace multiM {
+ /** class b*/
+ export class b {
+ }
+
+ // class d
+ export class d {
+ }
+ }
+
+ /// this is multi module 2
+ namespace multiM {
+ /** class c comment*/
+ export class c {
+ }
+
+ /// class e
+ export class e {
+ }
+ }
+ new multiM.b();
+ new multiM.c();
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOnObjectLiteral3(target=es5).errors.txt b/tests/baselines/reference/commentsOnObjectLiteral3(target=es5).errors.txt
new file mode 100644
index 0000000000000..955cebc316799
--- /dev/null
+++ b/tests/baselines/reference/commentsOnObjectLiteral3(target=es5).errors.txt
@@ -0,0 +1,23 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsOnObjectLiteral3.ts (0 errors) ====
+ var v = {
+ //property
+ prop: 1 /* multiple trailing comments */ /*trailing comments*/,
+ //property
+ func: function () {
+ },
+ //PropertyName + CallSignature
+ func1() { },
+ //getter
+ get a() {
+ return this.prop;
+ } /*trailing 1*/,
+ //setter
+ set a(value) {
+ this.prop = value;
+ } // trailing 2
+ };
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOnObjectLiteral3(target=es5).types b/tests/baselines/reference/commentsOnObjectLiteral3(target=es5).types
index abdf46a8f723f..db56ce9f48621 100644
--- a/tests/baselines/reference/commentsOnObjectLiteral3(target=es5).types
+++ b/tests/baselines/reference/commentsOnObjectLiteral3(target=es5).types
@@ -30,9 +30,11 @@ var v = {
//getter
get a() {
>a : any
+> : ^^^
return this.prop;
>this.prop : any
+> : ^^^
>this : any
> : ^^^
>prop : any
@@ -42,16 +44,21 @@ var v = {
//setter
set a(value) {
>a : any
+> : ^^^
>value : any
+> : ^^^
this.prop = value;
>this.prop = value : any
+> : ^^^
>this.prop : any
+> : ^^^
>this : any
> : ^^^
>prop : any
> : ^^^
>value : any
+> : ^^^
} // trailing 2
};
diff --git a/tests/baselines/reference/commentsOnObjectLiteral4(target=es5).errors.txt b/tests/baselines/reference/commentsOnObjectLiteral4(target=es5).errors.txt
new file mode 100644
index 0000000000000..7c4596e33d884
--- /dev/null
+++ b/tests/baselines/reference/commentsOnObjectLiteral4(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsOnObjectLiteral4.ts (0 errors) ====
+ var v = {
+ /**
+ * @type {number}
+ */
+ get bar(): number {
+ return 12;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOnObjectLiteral5(target=es5).errors.txt b/tests/baselines/reference/commentsOnObjectLiteral5(target=es5).errors.txt
new file mode 100644
index 0000000000000..391b4635decf2
--- /dev/null
+++ b/tests/baselines/reference/commentsOnObjectLiteral5(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsOnObjectLiteral5.ts (0 errors) ====
+ const a = {
+ p0: 0, // Comment 0
+ p1: 0, /* Comment 1
+ A multiline comment. */
+ p2: 0, // Comment 2
+ };
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOnRequireStatement(target=es5).errors.txt b/tests/baselines/reference/commentsOnRequireStatement(target=es5).errors.txt
new file mode 100644
index 0000000000000..36c1ba02f2530
--- /dev/null
+++ b/tests/baselines/reference/commentsOnRequireStatement(target=es5).errors.txt
@@ -0,0 +1,19 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== 0.ts (0 errors) ====
+ export var subject = 10;
+
+==== 1.ts (0 errors) ====
+ export var subject1 = 10;
+
+==== 2.ts (0 errors) ====
+ /* blah0 */
+ // blah
+ // blah
+ // blah
+ export {subject} from './0';
+ /* blah1 */
+ export {subject1} from './1';
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOverloads(target=es5).errors.txt b/tests/baselines/reference/commentsOverloads(target=es5).errors.txt
new file mode 100644
index 0000000000000..aa04357c6a9af
--- /dev/null
+++ b/tests/baselines/reference/commentsOverloads(target=es5).errors.txt
@@ -0,0 +1,179 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsOverloads.ts (0 errors) ====
+ /** this is signature 1*/
+ function f1(/**param a*/a: number): number;
+ function f1(b: string): number;
+ function f1(aOrb: any) {
+ return 10;
+ }
+ f1("hello");
+ f1(10);
+ function f2(a: number): number;
+ /** this is signature 2*/
+ function f2(b: string): number;
+ /** this is f2 var comment*/
+ function f2(aOrb: any) {
+ return 10;
+ }
+ f2("hello");
+ f2(10);
+ function f3(a: number): number;
+ function f3(b: string): number;
+ function f3(aOrb: any) {
+ return 10;
+ }
+ f3("hello");
+ f3(10);
+ /** this is signature 4 - with number parameter*/
+ function f4(/**param a*/a: number): number;
+ /** this is signature 4 - with string parameter*/
+ function f4(b: string): number;
+ function f4(aOrb: any) {
+ return 10;
+ }
+ f4("hello");
+ f4(10);
+ interface i1 {
+ /**this signature 1*/
+ (/**param a*/ a: number): number;
+ /**this is signature 2*/
+ (b: string): number;
+ /** foo 1*/
+ foo(a: number): number;
+ /** foo 2*/
+ foo(b: string): number;
+ // foo 3
+ foo(arr: number[]): number;
+ /** foo 4 */
+ foo(arr: string[]): number;
+
+ foo2(a: number): number;
+ /** foo2 2*/
+ foo2(b: string): number;
+ foo3(a: number): number;
+ foo3(b: string): number;
+ /** foo4 1*/
+ foo4(a: number): number;
+ foo4(b: string): number;
+ /** foo4 any */
+ foo4(c: any): any;
+ /// new 1
+ new (a: string);
+ /** new 1*/
+ new (b: number);
+ }
+ var i1_i: i1;
+ interface i2 {
+ new (a: string);
+ /** new 2*/
+ new (b: number);
+ (a: number): number;
+ /**this is signature 2*/
+ (b: string): number;
+ }
+ var i2_i: i2;
+ interface i3 {
+ /** new 1*/
+ new (a: string);
+ /** new 2*/
+ new (b: number);
+ /**this is signature 1*/
+ (a: number): number;
+ (b: string): number;
+ }
+ var i3_i: i3;
+ interface i4 {
+ new (a: string);
+ new (b: number);
+ (a: number): number;
+ (b: string): number;
+ }
+ class c {
+ public prop1(a: number): number;
+ public prop1(b: string): number;
+ public prop1(aorb: any) {
+ return 10;
+ }
+ /** prop2 1*/
+ public prop2(a: number): number;
+ public prop2(b: string): number;
+ public prop2(aorb: any) {
+ return 10;
+ }
+ public prop3(a: number): number;
+ /** prop3 2*/
+ public prop3(b: string): number;
+ public prop3(aorb: any) {
+ return 10;
+ }
+ /** prop4 1*/
+ public prop4(a: number): number;
+ /** prop4 2*/
+ public prop4(b: string): number;
+ public prop4(aorb: any) {
+ return 10;
+ }
+ /** prop5 1*/
+ public prop5(a: number): number;
+ /** prop5 2*/
+ public prop5(b: string): number;
+ /** Prop5 implementaion*/
+ public prop5(aorb: any) {
+ return 10;
+ }
+ }
+ class c1 {
+ constructor(a: number);
+ constructor(b: string);
+ constructor(aorb: any) {
+ }
+ }
+ class c2 {
+ /** c2 1*/
+ constructor(a: number);
+ // c2 2
+ constructor(b: string);
+ constructor(aorb: any) {
+ }
+ }
+ class c3 {
+ constructor(a: number);
+ /** c3 2*/
+ constructor(b: string);
+ constructor(aorb: any) {
+ }
+ }
+ class c4 {
+ /** c4 1*/
+ constructor(a: number);
+ /** c4 2*/
+ constructor(b: string);
+ /** c4 3 */
+ constructor(aorb: any) {
+ }
+ }
+ class c5 {
+ /** c5 1*/
+ constructor(a: number);
+ /** c5 2*/
+ constructor(b: string);
+ /** c5 implementation*/
+ constructor(aorb: any) {
+ }
+ }
+ var c_i = new c();
+
+ var c1_i_1 = new c1(10);
+ var c1_i_2 = new c1("hello");
+ var c2_i_1 = new c2(10);
+ var c2_i_2 = new c2("hello");
+ var c3_i_1 = new c3(10);
+ var c3_i_2 = new c3("hello");
+ var c4_i_1 = new c4(10);
+ var c4_i_2 = new c4("hello");
+ var c5_i_1 = new c5(10);
+ var c5_i_2 = new c5("hello");
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOverloads(target=es5).types b/tests/baselines/reference/commentsOverloads(target=es5).types
index 2ab32c9fb47df..de9a87e6279c1 100644
--- a/tests/baselines/reference/commentsOverloads(target=es5).types
+++ b/tests/baselines/reference/commentsOverloads(target=es5).types
@@ -18,6 +18,7 @@ function f1(aOrb: any) {
>f1 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aOrb : any
+> : ^^^
return 10;
>10 : 10
@@ -57,6 +58,7 @@ function f2(aOrb: any) {
>f2 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aOrb : any
+> : ^^^
return 10;
>10 : 10
@@ -94,6 +96,7 @@ function f3(aOrb: any) {
>f3 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aOrb : any
+> : ^^^
return 10;
>10 : 10
@@ -133,6 +136,7 @@ function f4(aOrb: any) {
>f4 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aOrb : any
+> : ^^^
return 10;
>10 : 10
@@ -236,6 +240,7 @@ interface i1 {
>foo4 : { (a: number): number; (b: string): number; (c: any): any; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>c : any
+> : ^^^
/// new 1
new (a: string);
@@ -335,6 +340,7 @@ class c {
>prop1 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aorb : any
+> : ^^^
return 10;
>10 : 10
@@ -357,6 +363,7 @@ class c {
>prop2 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aorb : any
+> : ^^^
return 10;
>10 : 10
@@ -379,6 +386,7 @@ class c {
>prop3 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aorb : any
+> : ^^^
return 10;
>10 : 10
@@ -402,6 +410,7 @@ class c {
>prop4 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aorb : any
+> : ^^^
return 10;
>10 : 10
@@ -426,6 +435,7 @@ class c {
>prop5 : { (a: number): number; (b: string): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aorb : any
+> : ^^^
return 10;
>10 : 10
@@ -446,6 +456,7 @@ class c1 {
constructor(aorb: any) {
>aorb : any
+> : ^^^
}
}
class c2 {
@@ -464,6 +475,7 @@ class c2 {
constructor(aorb: any) {
>aorb : any
+> : ^^^
}
}
class c3 {
@@ -481,6 +493,7 @@ class c3 {
constructor(aorb: any) {
>aorb : any
+> : ^^^
}
}
class c4 {
@@ -500,6 +513,7 @@ class c4 {
/** c4 3 */
constructor(aorb: any) {
>aorb : any
+> : ^^^
}
}
class c5 {
@@ -519,6 +533,7 @@ class c5 {
/** c5 implementation*/
constructor(aorb: any) {
>aorb : any
+> : ^^^
}
}
var c_i = new c();
diff --git a/tests/baselines/reference/commentsVarDecl(target=es5).errors.txt b/tests/baselines/reference/commentsVarDecl(target=es5).errors.txt
new file mode 100644
index 0000000000000..c02d105ab3066
--- /dev/null
+++ b/tests/baselines/reference/commentsVarDecl(target=es5).errors.txt
@@ -0,0 +1,47 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsVarDecl.ts (0 errors) ====
+ /** Variable comments*/
+ var myVariable = 10; // This trailing Comment1
+
+ /** This is another variable comment*/
+ var anotherVariable = 30;
+
+ // shouldn't appear
+ var aVar = "";
+
+ /** this is multiline comment
+ * All these variables are of number type */
+ var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* multiple trailing comments */
+
+ /** Triple slash multiline comment*/
+ /** another line in the comment*/
+ /** comment line 2*/
+ var x = 70; /* multiline trailing comment
+ this is multiline trailing comment */
+ /** Triple slash comment on the assignment shouldnt be in .d.ts file*/
+ x = myVariable;
+
+ /** triple slash comment1*/
+ /** jsdocstyle comment - only this comment should be in .d.ts file*/
+ var n = 30;
+
+ /** var deckaration with comment on type as well*/
+ var y = /** value comment */ 20;
+
+ /// var deckaration with comment on type as well
+ var yy =
+ /// value comment
+ 20;
+
+ /** comment2 */
+ var z = /** lambda comment */ (x: number, y: number) => x + y;
+
+ var z2: /** type comment*/ (x: number) => string;
+
+ var x2 = z2;
+
+ var n4: (x: number) => string;
+ n4 = z2;
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsdoNotEmitComments(target=es5).errors.txt b/tests/baselines/reference/commentsdoNotEmitComments(target=es5).errors.txt
new file mode 100644
index 0000000000000..95d2faeee1ad2
--- /dev/null
+++ b/tests/baselines/reference/commentsdoNotEmitComments(target=es5).errors.txt
@@ -0,0 +1,97 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsdoNotEmitComments.ts (0 errors) ====
+ /** Variable comments*/
+ var myVariable = 10;
+
+ /** function comments*/
+ function foo(/** parameter comment*/p: number) {
+ }
+
+ /** variable with function type comment*/
+ var fooVar: () => void;
+ foo(50);
+ fooVar();
+
+ /**class comment*/
+ class c {
+ /** constructor comment*/
+ constructor() {
+ }
+
+ /** property comment */
+ public b = 10;
+
+ /** function comment */
+ public myFoo() {
+ return this.b;
+ }
+
+ /** getter comment*/
+ public get prop1() {
+ return this.b;
+ }
+
+ /** setter comment*/
+ public set prop1(val: number) {
+ this.b = val;
+ }
+
+ /** overload signature1*/
+ public foo1(a: number): string;
+ /** Overload signature 2*/
+ public foo1(b: string): string;
+ /** overload implementation signature*/
+ public foo1(aOrb) {
+ return aOrb.toString();
+ }
+ }
+
+ /**instance comment*/
+ var i = new c();
+
+ /** interface comments*/
+ interface i1 {
+ /** caller comments*/
+ (a: number): number;
+
+ /** new comments*/
+ new (b: string);
+
+ /**indexer property*/
+ [a: number]: string;
+
+ /** function property;*/
+ myFoo(/*param prop*/a: number): string;
+
+ /** prop*/
+ prop: string;
+ }
+
+ /**interface instance comments*/
+ var i1_i: i1;
+
+ /** this is module comment*/
+ namespace m1 {
+ /** class b */
+ export class b {
+ constructor(public x: number) {
+
+ }
+ }
+
+ /// module m2
+ export namespace m2 {
+ }
+ }
+
+ /// this is x
+ declare var x;
+
+
+ /** const enum member value comment (generated by TS) */
+ const enum color { red, green, blue }
+ var shade: color = color.green;
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsdoNotEmitComments(target=es5).types b/tests/baselines/reference/commentsdoNotEmitComments(target=es5).types
index 1a306143d6e38..170a69f664a6f 100644
--- a/tests/baselines/reference/commentsdoNotEmitComments(target=es5).types
+++ b/tests/baselines/reference/commentsdoNotEmitComments(target=es5).types
@@ -118,10 +118,13 @@ class c {
>foo1 : { (a: number): string; (b: string): string; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aOrb : any
+> : ^^^
return aOrb.toString();
>aOrb.toString() : any
+> : ^^^
>aOrb.toString : any
+> : ^^^
>aOrb : any
> : ^^^
>toString : any
@@ -198,6 +201,7 @@ namespace m1 {
/// this is x
declare var x;
>x : any
+> : ^^^
/** const enum member value comment (generated by TS) */
diff --git a/tests/baselines/reference/commentsemitComments(target=es5).errors.txt b/tests/baselines/reference/commentsemitComments(target=es5).errors.txt
new file mode 100644
index 0000000000000..6e190739c830f
--- /dev/null
+++ b/tests/baselines/reference/commentsemitComments(target=es5).errors.txt
@@ -0,0 +1,92 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== commentsemitComments.ts (0 errors) ====
+ /** Variable comments*/
+ var myVariable = 10;
+
+ /** function comments*/
+ function foo(/** parameter comment*/p: number) {
+ }
+
+ /** variable with function type comment*/
+ var fooVar: () => void;
+ foo(50);
+ fooVar();
+
+ /**class comment*/
+ class c {
+ /** constructor comment*/
+ constructor() {
+ }
+
+ /** property comment */
+ public b = 10;
+
+ /** function comment */
+ public myFoo() {
+ return this.b;
+ }
+
+ /** getter comment*/
+ public get prop1() {
+ return this.b;
+ }
+
+ /** setter comment*/
+ public set prop1(val: number) {
+ this.b = val;
+ }
+
+ /** overload signature1*/
+ public foo1(a: number): string;
+ /** Overload signature 2*/
+ public foo1(b: string): string;
+ /** overload implementation signature*/
+ public foo1(aOrb) {
+ return aOrb.toString();
+ }
+ }
+
+ /**instance comment*/
+ var i = new c();
+
+ /** interface comments*/
+ interface i1 {
+ /** caller comments*/
+ (a: number): number;
+
+ /** new comments*/
+ new (b: string);
+
+ /**indexer property*/
+ [a: number]: string;
+
+ /** function property;*/
+ myFoo(/*param prop*/a: number): string;
+
+ /** prop*/
+ prop: string;
+ }
+
+ /**interface instance comments*/
+ var i1_i: i1;
+
+ /** this is module comment*/
+ namespace m1 {
+ /** class b */
+ export class b {
+ constructor(public x: number) {
+
+ }
+ }
+
+ /// module m2
+ export namespace m2 {
+ }
+ }
+
+ /// this is x
+ declare var x;
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsemitComments(target=es5).types b/tests/baselines/reference/commentsemitComments(target=es5).types
index caa9f3b50153e..4996500969966 100644
--- a/tests/baselines/reference/commentsemitComments(target=es5).types
+++ b/tests/baselines/reference/commentsemitComments(target=es5).types
@@ -118,10 +118,13 @@ class c {
>foo1 : { (a: number): string; (b: string): string; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>aOrb : any
+> : ^^^
return aOrb.toString();
>aOrb.toString() : any
+> : ^^^
>aOrb.toString : any
+> : ^^^
>aOrb : any
> : ^^^
>toString : any
@@ -198,4 +201,5 @@ namespace m1 {
/// this is x
declare var x;
>x : any
+> : ^^^
diff --git a/tests/baselines/reference/commonJsExportTypeDeclarationError(target=es5).errors.txt b/tests/baselines/reference/commonJsExportTypeDeclarationError(target=es5).errors.txt
index 193a7a1bcda42..a0a4316b8eba3 100644
--- a/tests/baselines/reference/commonJsExportTypeDeclarationError(target=es5).errors.txt
+++ b/tests/baselines/reference/commonJsExportTypeDeclarationError(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
types1.ts(2,17): error TS1110: Type expected.
types1.ts(3,1): error TS1005: '=' expected.
types2.ts(2,19): error TS1110: Type expected.
types3.ts(2,13): error TS2456: Type alias 'test' circularly references itself.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== ./test.js (0 errors) ====
module.exports = {
message: ""
diff --git a/tests/baselines/reference/commonjsSafeImport(target=es5).errors.txt b/tests/baselines/reference/commonjsSafeImport(target=es5).errors.txt
new file mode 100644
index 0000000000000..c1befacf613c5
--- /dev/null
+++ b/tests/baselines/reference/commonjsSafeImport(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== 10_lib.ts (0 errors) ====
+ export function Foo() {}
+
+==== main.ts (0 errors) ====
+ import { Foo } from './10_lib';
+
+ Foo();
+
\ No newline at end of file
diff --git a/tests/baselines/reference/complexClassRelationships(target=es5).errors.txt b/tests/baselines/reference/complexClassRelationships(target=es5).errors.txt
index ac14126b2e90e..1350a55b49669 100644
--- a/tests/baselines/reference/complexClassRelationships(target=es5).errors.txt
+++ b/tests/baselines/reference/complexClassRelationships(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
complexClassRelationships.ts(2,23): error TS2449: Class 'Base' used before its declaration.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== complexClassRelationships.ts (1 errors) ====
// There should be no errors in this file
class Derived extends Base {
diff --git a/tests/baselines/reference/complicatedPrivacy(target=es5).errors.txt b/tests/baselines/reference/complicatedPrivacy(target=es5).errors.txt
index 10fbd465c68bc..27f291da4ff5a 100644
--- a/tests/baselines/reference/complicatedPrivacy(target=es5).errors.txt
+++ b/tests/baselines/reference/complicatedPrivacy(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters.
complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here.
complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== complicatedPrivacy.ts (3 errors) ====
namespace m1 {
export namespace m2 {
diff --git a/tests/baselines/reference/computedPropertyNames10_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames10_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..b94bb3ca0f401
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames10_ES5(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames10_ES5.ts (0 errors) ====
+ var s: string;
+ var n: number;
+ var a: any;
+ var v = {
+ [s]() { },
+ [n]() { },
+ [s + s]() { },
+ [s + n]() { },
+ [+s]() { },
+ [""]() { },
+ [0]() { },
+ [a]() { },
+ [true]() { },
+ [`hello bye`]() { },
+ [`hello ${a} bye`]() { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames10_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames10_ES5(target=es5).types
index 20052a34138ab..f6a81e58b919f 100644
--- a/tests/baselines/reference/computedPropertyNames10_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames10_ES5(target=es5).types
@@ -11,6 +11,7 @@ var n: number;
var a: any;
>a : any
+> : ^^^
var v = {
>v : { [x: string]: () => void; [x: number]: () => void; ""(): void; 0(): void; "hello bye"(): void; }
@@ -74,11 +75,13 @@ var v = {
>[a] : () => void
> : ^^^^^^^^^^
>a : any
+> : ^^^
[true]() { },
>[true] : () => void
> : ^^^^^^^^^^
>true : any
+> : ^^^
>true : true
> : ^^^^
@@ -94,4 +97,5 @@ var v = {
>`hello ${a} bye` : string
> : ^^^^^^
>a : any
+> : ^^^
}
diff --git a/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..fe1b9b533bbfb
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames11_ES5.ts (0 errors) ====
+ var s: string;
+ var n: number;
+ var a: any;
+ var v = {
+ get [s]() { return 0; },
+ set [n](v) { },
+ get [s + s]() { return 0; },
+ set [s + n](v) { },
+ get [+s]() { return 0; },
+ set [""](v) { },
+ get [0]() { return 0; },
+ set [a](v) { },
+ get [true]() { return 0; },
+ set [`hello bye`](v) { },
+ get [`hello ${a} bye`]() { return 0; }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).types
index 58cc22264ed2c..0516ad6ada530 100644
--- a/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames11_ES5(target=es5).types
@@ -11,6 +11,7 @@ var n: number;
var a: any;
>a : any
+> : ^^^
var v = {
>v : { [x: string]: any; [x: number]: any; "": any; readonly 0: number; "hello bye": any; }
@@ -28,9 +29,11 @@ var v = {
set [n](v) { },
>[n] : any
+> : ^^^
>n : number
> : ^^^^^^
>v : any
+> : ^^^
get [s + s]() { return 0; },
>[s + s] : number
@@ -46,6 +49,7 @@ var v = {
set [s + n](v) { },
>[s + n] : any
+> : ^^^
>s + n : string
> : ^^^^^^
>s : string
@@ -53,6 +57,7 @@ var v = {
>n : number
> : ^^^^^^
>v : any
+> : ^^^
get [+s]() { return 0; },
>[+s] : number
@@ -66,9 +71,11 @@ var v = {
set [""](v) { },
>[""] : any
+> : ^^^
>"" : ""
> : ^^
>v : any
+> : ^^^
get [0]() { return 0; },
>[0] : number
@@ -80,13 +87,17 @@ var v = {
set [a](v) { },
>[a] : any
+> : ^^^
>a : any
+> : ^^^
>v : any
+> : ^^^
get [true]() { return 0; },
>[true] : number
> : ^^^^^^
>true : any
+> : ^^^
>true : true
> : ^^^^
>0 : 0
@@ -94,9 +105,11 @@ var v = {
set [`hello bye`](v) { },
>[`hello bye`] : any
+> : ^^^
>`hello bye` : "hello bye"
> : ^^^^^^^^^^^
>v : any
+> : ^^^
get [`hello ${a} bye`]() { return 0; }
>[`hello ${a} bye`] : number
@@ -104,6 +117,7 @@ var v = {
>`hello ${a} bye` : string
> : ^^^^^^
>a : any
+> : ^^^
>0 : 0
> : ^
}
diff --git a/tests/baselines/reference/computedPropertyNames12_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames12_ES5(target=es5).errors.txt
index 7803fd8078d63..7c292e4d6519c 100644
--- a/tests/baselines/reference/computedPropertyNames12_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames12_ES5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
@@ -7,6 +8,7 @@ computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in
computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames12_ES5.ts (7 errors) ====
var s: string;
var n: number;
diff --git a/tests/baselines/reference/computedPropertyNames13_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames13_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..c650959e8d45e
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames13_ES5(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames13_ES5.ts (0 errors) ====
+ var s: string;
+ var n: number;
+ var a: any;
+ class C {
+ [s]() {}
+ [n]() { }
+ static [s + s]() { }
+ [s + n]() { }
+ [+s]() { }
+ static [""]() { }
+ [0]() { }
+ [a]() { }
+ static [true]() { }
+ [`hello bye`]() { }
+ static [`hello ${a} bye`]() { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames13_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames13_ES5(target=es5).types
index d152acabf40e8..89a3ff5391f6b 100644
--- a/tests/baselines/reference/computedPropertyNames13_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames13_ES5(target=es5).types
@@ -11,6 +11,7 @@ var n: number;
var a: any;
>a : any
+> : ^^^
class C {
>C : C
@@ -72,11 +73,13 @@ class C {
>[a] : () => void
> : ^^^^^^^^^^
>a : any
+> : ^^^
static [true]() { }
>[true] : () => void
> : ^^^^^^^^^^
>true : any
+> : ^^^
>true : true
> : ^^^^
@@ -92,4 +95,5 @@ class C {
>`hello ${a} bye` : string
> : ^^^^^^
>a : any
+> : ^^^
}
diff --git a/tests/baselines/reference/computedPropertyNames14_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames14_ES5(target=es5).errors.txt
index b27347755a22c..a704e70a3fe58 100644
--- a/tests/baselines/reference/computedPropertyNames14_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames14_ES5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
@@ -6,6 +7,7 @@ computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must
computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames14_ES5.ts (6 errors) ====
var b: boolean;
class C {
diff --git a/tests/baselines/reference/computedPropertyNames15_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames15_ES5(target=es5).errors.txt
index 7e3e168ec7a57..c4c63bf0ee4bd 100644
--- a/tests/baselines/reference/computedPropertyNames15_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames15_ES5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames15_ES5.ts (2 errors) ====
var p1: number | string;
var p2: number | number[];
diff --git a/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..9f0a00e4f3c97
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames16_ES5.ts (0 errors) ====
+ var s: string;
+ var n: number;
+ var a: any;
+ class C {
+ get [s]() { return 0;}
+ set [n](v) { }
+ static get [s + s]() { return 0; }
+ set [s + n](v) { }
+ get [+s]() { return 0; }
+ static set [""](v) { }
+ get [0]() { return 0; }
+ set [a](v) { }
+ static get [true]() { return 0; }
+ set [`hello bye`](v) { }
+ get [`hello ${a} bye`]() { return 0; }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).types
index 3dbfae37b4da8..57e069773daaa 100644
--- a/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames16_ES5(target=es5).types
@@ -11,6 +11,7 @@ var n: number;
var a: any;
>a : any
+> : ^^^
class C {
>C : C
@@ -26,9 +27,11 @@ class C {
set [n](v) { }
>[n] : any
+> : ^^^
>n : number
> : ^^^^^^
>v : any
+> : ^^^
static get [s + s]() { return 0; }
>[s + s] : number
@@ -44,6 +47,7 @@ class C {
set [s + n](v) { }
>[s + n] : any
+> : ^^^
>s + n : string
> : ^^^^^^
>s : string
@@ -51,6 +55,7 @@ class C {
>n : number
> : ^^^^^^
>v : any
+> : ^^^
get [+s]() { return 0; }
>[+s] : number
@@ -64,9 +69,11 @@ class C {
static set [""](v) { }
>[""] : any
+> : ^^^
>"" : ""
> : ^^
>v : any
+> : ^^^
get [0]() { return 0; }
>[0] : number
@@ -78,13 +85,17 @@ class C {
set [a](v) { }
>[a] : any
+> : ^^^
>a : any
+> : ^^^
>v : any
+> : ^^^
static get [true]() { return 0; }
>[true] : number
> : ^^^^^^
>true : any
+> : ^^^
>true : true
> : ^^^^
>0 : 0
@@ -92,9 +103,11 @@ class C {
set [`hello bye`](v) { }
>[`hello bye`] : any
+> : ^^^
>`hello bye` : "hello bye"
> : ^^^^^^^^^^^
>v : any
+> : ^^^
get [`hello ${a} bye`]() { return 0; }
>[`hello ${a} bye`] : number
@@ -102,6 +115,7 @@ class C {
>`hello ${a} bye` : string
> : ^^^^^^
>a : any
+> : ^^^
>0 : 0
> : ^
}
diff --git a/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).errors.txt
index 946678732946e..8726c8eb62a9c 100644
--- a/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames17_ES5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
@@ -6,6 +7,7 @@ computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name mus
computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames17_ES5.ts (6 errors) ====
var b: boolean;
class C {
diff --git a/tests/baselines/reference/computedPropertyNames18_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames18_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..ba02cfe5b5285
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames18_ES5(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames18_ES5.ts (0 errors) ====
+ function foo() {
+ var obj = {
+ [this.bar]: 0
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames18_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames18_ES5(target=es5).types
index fba7ca0fa899c..31b06d5eea6ab 100644
--- a/tests/baselines/reference/computedPropertyNames18_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames18_ES5(target=es5).types
@@ -15,6 +15,7 @@ function foo() {
>[this.bar] : number
> : ^^^^^^
>this.bar : any
+> : ^^^
>this : any
> : ^^^
>bar : any
diff --git a/tests/baselines/reference/computedPropertyNames19_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames19_ES5(target=es5).errors.txt
index b5b9ae897a980..b0022f3985cbc 100644
--- a/tests/baselines/reference/computedPropertyNames19_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames19_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames19_ES5.ts(3,10): error TS2331: 'this' cannot be referenced in a module or namespace body.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames19_ES5.ts (1 errors) ====
namespace M {
var obj = {
diff --git a/tests/baselines/reference/computedPropertyNames1_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames1_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..a441bf797930c
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames1_ES5(target=es5).errors.txt
@@ -0,0 +1,9 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames1_ES5.ts (0 errors) ====
+ var v = {
+ get [0 + 1]() { return 0 },
+ set [0 + 1](v: string) { } //No error
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..d0cc4e544eb55
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).errors.txt
@@ -0,0 +1,8 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames20_ES5.ts (0 errors) ====
+ var obj = {
+ [this.bar]: 0
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).types
index ff06fb0e5401b..c1450783ff471 100644
--- a/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames20_ES5(target=es5).types
@@ -11,6 +11,7 @@ var obj = {
>[this.bar] : number
> : ^^^^^^
>this.bar : any
+> : ^^^
>this : typeof globalThis
> : ^^^^^^^^^^^^^^^^^
>bar : any
diff --git a/tests/baselines/reference/computedPropertyNames21_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames21_ES5(target=es5).errors.txt
index 694f824436812..49fa5dcb4a9c1 100644
--- a/tests/baselines/reference/computedPropertyNames21_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames21_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames21_ES5.ts(5,6): error TS2465: 'this' cannot be referenced in a computed property name.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames21_ES5.ts (1 errors) ====
class C {
bar() {
diff --git a/tests/baselines/reference/computedPropertyNames22_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames22_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..68d7d9f41c5fa
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames22_ES5(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames22_ES5.ts (0 errors) ====
+ class C {
+ bar() {
+ var obj = {
+ [this.bar()]() { }
+ };
+ return 0;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames23_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames23_ES5(target=es5).errors.txt
index 8344c69e99867..65d731172c5fb 100644
--- a/tests/baselines/reference/computedPropertyNames23_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames23_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames23_ES5.ts(6,12): error TS2465: 'this' cannot be referenced in a computed property name.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames23_ES5.ts (1 errors) ====
class C {
bar() {
diff --git a/tests/baselines/reference/computedPropertyNames24_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames24_ES5(target=es5).errors.txt
index 9d8b1c8d30a8b..1320472df36f7 100644
--- a/tests/baselines/reference/computedPropertyNames24_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames24_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames24_ES5.ts(7,6): error TS2466: 'super' cannot be referenced in a computed property name.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames24_ES5.ts (1 errors) ====
class Base {
bar() {
diff --git a/tests/baselines/reference/computedPropertyNames25_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames25_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..a350b78c2ca2e
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames25_ES5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames25_ES5.ts (0 errors) ====
+ class Base {
+ bar() {
+ return 0;
+ }
+ }
+ class C extends Base {
+ foo() {
+ var obj = {
+ [super.bar()]() { }
+ };
+ return 0;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames26_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames26_ES5(target=es5).errors.txt
index b2357e21e1862..bf6514ce47aa6 100644
--- a/tests/baselines/reference/computedPropertyNames26_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames26_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames26_ES5.ts(8,12): error TS2466: 'super' cannot be referenced in a computed property name.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames26_ES5.ts (1 errors) ====
class Base {
bar() {
diff --git a/tests/baselines/reference/computedPropertyNames27_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames27_ES5(target=es5).errors.txt
index de9f7d9f1f18b..1305154adb3db 100644
--- a/tests/baselines/reference/computedPropertyNames27_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames27_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames27_ES5.ts(4,7): error TS2466: 'super' cannot be referenced in a computed property name.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames27_ES5.ts (1 errors) ====
class Base {
}
diff --git a/tests/baselines/reference/computedPropertyNames28_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames28_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..7a9e42d57395b
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames28_ES5(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames28_ES5.ts (0 errors) ====
+ class Base {
+ }
+ class C extends Base {
+ constructor() {
+ super();
+ var obj = {
+ [(super(), "prop")]() { }
+ };
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames29_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames29_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..5e282ec614291
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames29_ES5(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames29_ES5.ts (0 errors) ====
+ class C {
+ bar() {
+ () => {
+ var obj = {
+ [this.bar()]() { } // needs capture
+ };
+ }
+ return 0;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).errors.txt
index 2d1b4f1abc814..357f44ede4c3f 100644
--- a/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames2_ES5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value.
computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames2_ES5.ts (2 errors) ====
var methodName = "method";
var accessorName = "accessor";
diff --git a/tests/baselines/reference/computedPropertyNames30_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames30_ES5(target=es5).errors.txt
index 4c5ccb37f84e9..32766a45b9e92 100644
--- a/tests/baselines/reference/computedPropertyNames30_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames30_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames30_ES5.ts(11,19): error TS2466: 'super' cannot be referenced in a computed property name.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames30_ES5.ts (1 errors) ====
class Base {
}
diff --git a/tests/baselines/reference/computedPropertyNames31_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames31_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..8d30f28e33d21
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames31_ES5(target=es5).errors.txt
@@ -0,0 +1,20 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames31_ES5.ts (0 errors) ====
+ class Base {
+ bar() {
+ return 0;
+ }
+ }
+ class C extends Base {
+ foo() {
+ () => {
+ var obj = {
+ [super.bar()]() { } // needs capture
+ };
+ }
+ return 0;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames32_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames32_ES5(target=es5).errors.txt
index a55302245291a..212797184d0c7 100644
--- a/tests/baselines/reference/computedPropertyNames32_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames32_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames32_ES5.ts(6,10): error TS2467: A computed property name cannot reference a type parameter from its containing type.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames32_ES5.ts (1 errors) ====
function foo() { return '' }
class C {
diff --git a/tests/baselines/reference/computedPropertyNames33_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames33_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..1b8c01b10dce1
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames33_ES5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames33_ES5.ts (0 errors) ====
+ function foo() { return '' }
+ class C {
+ bar() {
+ var obj = {
+ [foo()]() { }
+ };
+ return 0;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames34_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames34_ES5(target=es5).errors.txt
index cbf2b19ba3336..a2f177adefd77 100644
--- a/tests/baselines/reference/computedPropertyNames34_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames34_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames34_ES5.ts(5,18): error TS2302: Static members cannot reference class type parameters.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames34_ES5.ts (1 errors) ====
function foo() { return '' }
class C {
diff --git a/tests/baselines/reference/computedPropertyNames35_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames35_ES5(target=es5).errors.txt
index 7feea07160252..6b41af41d9e64 100644
--- a/tests/baselines/reference/computedPropertyNames35_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames35_ES5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames35_ES5.ts(4,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
computedPropertyNames35_ES5.ts(4,10): error TS2467: A computed property name cannot reference a type parameter from its containing type.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames35_ES5.ts (2 errors) ====
function foo() { return '' }
interface I {
diff --git a/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).errors.txt
index fb42b6cfce47a..29caba9e2056a 100644
--- a/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames36_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames36_ES5.ts(8,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames36_ES5.ts (1 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..28758d8346bf6
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames37_ES5.ts (0 errors) ====
+ class Foo { x }
+ class Foo2 { x; y }
+
+ class C {
+ [s: number]: Foo2;
+
+ // Computed properties
+ get ["get1"]() { return new Foo }
+ set ["set1"](p: Foo2) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).types
index f45f1f38fe99e..348d6d7e0d862 100644
--- a/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames37_ES5(target=es5).types
@@ -5,12 +5,15 @@ class Foo { x }
>Foo : Foo
> : ^^^
>x : any
+> : ^^^
class Foo2 { x; y }
>Foo2 : Foo2
> : ^^^^
>x : any
+> : ^^^
>y : any
+> : ^^^
class C {
>C : C
diff --git a/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).errors.txt
index 80eb9e2c5a334..a84e7c4b38bcd 100644
--- a/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames38_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames38_ES5.ts(8,9): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames38_ES5.ts (1 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).errors.txt
index 5b77d679ddf94..bcf51889d2c10 100644
--- a/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames39_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames39_ES5.ts(8,9): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to 'number' index type 'Foo2'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames39_ES5.ts (1 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).errors.txt
index b60dc88534f75..6c5df2fd7f125 100644
--- a/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames3_ES5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames3_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames3_ES5.ts(5,9): error TS2378: A 'get' accessor must return a value.
computedPropertyNames3_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
@@ -8,6 +9,7 @@ computedPropertyNames3_ES5.ts(7,16): error TS2378: A 'get' accessor must return
computedPropertyNames3_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames3_ES5.ts (8 errors) ====
var id;
class C {
diff --git a/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).errors.txt
index 666806b614e96..89f930a34e8cd 100644
--- a/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames40_ES5(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames40_ES5.ts(8,5): error TS2393: Duplicate function implementation.
computedPropertyNames40_ES5.ts(8,5): error TS2411: Property '[""]' of type '() => Foo' is not assignable to 'string' index type '() => Foo2'.
computedPropertyNames40_ES5.ts(9,5): error TS2393: Duplicate function implementation.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames40_ES5.ts (3 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..44e0ef2ecd42c
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames41_ES5.ts (0 errors) ====
+ class Foo { x }
+ class Foo2 { x; y }
+
+ class C {
+ [s: string]: () => Foo2;
+
+ // Computed properties
+ static [""]() { return new Foo }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).types
index 06aabb404b656..5086af168c7cd 100644
--- a/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames41_ES5(target=es5).types
@@ -5,12 +5,15 @@ class Foo { x }
>Foo : Foo
> : ^^^
>x : any
+> : ^^^
class Foo2 { x; y }
>Foo2 : Foo2
> : ^^^^
>x : any
+> : ^^^
>y : any
+> : ^^^
class C {
>C : C
diff --git a/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).errors.txt
index ef05ceac83034..0ace73ad4e4bb 100644
--- a/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames42_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames42_ES5.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames42_ES5.ts (1 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).errors.txt
index 48a99cd358237..258be30739710 100644
--- a/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames43_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames43_ES5.ts(10,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames43_ES5.ts (1 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).errors.txt
index 3651df6f9a373..47a5a2582889f 100644
--- a/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames44_ES5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames44_ES5.ts(6,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
computedPropertyNames44_ES5.ts(10,9): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames44_ES5.ts (2 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).errors.txt
index ca699225fe35f..c372e8913f2e2 100644
--- a/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames45_ES5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames45_ES5.ts(10,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
computedPropertyNames45_ES5.ts(11,9): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to 'string' index type 'Foo2'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames45_ES5.ts (2 errors) ====
class Foo { x }
class Foo2 { x; y }
diff --git a/tests/baselines/reference/computedPropertyNames46_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames46_ES5(target=es5).errors.txt
index 8b574a3610e6f..933915e45fed3 100644
--- a/tests/baselines/reference/computedPropertyNames46_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames46_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames46_ES5.ts(2,6): error TS2873: This kind of expression is always falsy.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames46_ES5.ts (1 errors) ====
var o = {
["" || 0]: 0
diff --git a/tests/baselines/reference/computedPropertyNames47_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames47_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..436f27f6fd42a
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames47_ES5(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames47_ES5.ts (0 errors) ====
+ enum E1 { x }
+ enum E2 { x }
+ var o = {
+ [E1.x || E2.x]: 0
+ };
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames48_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames48_ES5(target=es5).errors.txt
index 4cbb21c322842..d89c2067eeef1 100644
--- a/tests/baselines/reference/computedPropertyNames48_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames48_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames48_ES5.ts(16,6): error TS2873: This kind of expression is always falsy.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames48_ES5.ts (1 errors) ====
declare function extractIndexer(p: { [n: number]: T }): T;
diff --git a/tests/baselines/reference/computedPropertyNames4_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames4_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..9d3fed09ce3ac
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames4_ES5(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames4_ES5.ts (0 errors) ====
+ var s: string;
+ var n: number;
+ var a: any;
+ var v = {
+ [s]: 0,
+ [n]: n,
+ [s + s]: 1,
+ [s + n]: 2,
+ [+s]: s,
+ [""]: 0,
+ [0]: 0,
+ [a]: 1,
+ [true]: 0,
+ [`hello bye`]: 0,
+ [`hello ${a} bye`]: 0
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames4_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNames4_ES5(target=es5).types
index 809126b9fcb45..2728dfb0c33b2 100644
--- a/tests/baselines/reference/computedPropertyNames4_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNames4_ES5(target=es5).types
@@ -11,6 +11,7 @@ var n: number;
var a: any;
>a : any
+> : ^^^
var v = {
>v : { [x: string]: string | number; [x: number]: string | number; "": number; 0: number; "hello bye": number; }
@@ -88,6 +89,7 @@ var v = {
>[a] : number
> : ^^^^^^
>a : any
+> : ^^^
>1 : 1
> : ^
@@ -95,6 +97,7 @@ var v = {
>[true] : number
> : ^^^^^^
>true : any
+> : ^^^
>true : true
> : ^^^^
>0 : 0
@@ -114,6 +117,7 @@ var v = {
>`hello ${a} bye` : string
> : ^^^^^^
>a : any
+> : ^^^
>0 : 0
> : ^
}
diff --git a/tests/baselines/reference/computedPropertyNames52(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames52(target=es5).errors.txt
index 1e229b0db8f79..a5473e281bf3f 100644
--- a/tests/baselines/reference/computedPropertyNames52(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames52(target=es5).errors.txt
@@ -1,7 +1,9 @@
error TS5101: Option 'outFile' 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 TS5101: Option 'outFile' 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.
==== computedPropertyNames52.js (0 errors) ====
const array = [];
for (let i = 0; i < 10; ++i) {
diff --git a/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).errors.txt
index ea3d175e86770..ac791bc2f9633 100644
--- a/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames5_ES5(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
@@ -6,6 +7,7 @@ computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must
computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames5_ES5.ts (6 errors) ====
declare var b: boolean;
var v = {
diff --git a/tests/baselines/reference/computedPropertyNames6_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames6_ES5(target=es5).errors.txt
index 3cea957bee81d..1b0d8c20f3cbb 100644
--- a/tests/baselines/reference/computedPropertyNames6_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames6_ES5(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames6_ES5.ts (2 errors) ====
declare var p1: number | string;
declare var p2: number | number[];
diff --git a/tests/baselines/reference/computedPropertyNames7_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames7_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..4342ea2e0477a
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNames7_ES5(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNames7_ES5.ts (0 errors) ====
+ enum E {
+ member
+ }
+ var v = {
+ [E.member]: 0
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNames8_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames8_ES5(target=es5).errors.txt
index a0e2cb036051a..426bad9c4d12c 100644
--- a/tests/baselines/reference/computedPropertyNames8_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames8_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames8_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames8_ES5.ts (1 errors) ====
function f() {
var t!: T;
diff --git a/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).errors.txt
index e820861413655..8e997f5386293 100644
--- a/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNames9_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNames9_ES5.ts(9,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNames9_ES5.ts (1 errors) ====
function f(s: string): string;
function f(n: number): number;
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5(target=es5).errors.txt
index 9ba99607f12f9..46838fcdceb15 100644
--- a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNamesContextualType10_ES5.ts(5,5): error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type 'I'.
'number' index signatures are incompatible.
Type 'string | number' is not assignable to type 'boolean'.
Type 'string' is not assignable to type 'boolean'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNamesContextualType10_ES5.ts (1 errors) ====
interface I {
[s: number]: boolean;
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..1ee3b2a304b23
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesContextualType1_ES5.ts (0 errors) ====
+ interface I {
+ [s: string]: (x: string) => number;
+ [s: number]: (x: any) => number; // Doesn't get hit
+ }
+
+ var o: I = {
+ ["" + 0](y) { return y.length; },
+ ["" + 1]: y => y.length
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5(target=es5).types
index 8cc985710adb9..2d89ef430cda7 100644
--- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5(target=es5).types
@@ -12,6 +12,7 @@ interface I {
>s : number
> : ^^^^^^
>x : any
+> : ^^^
}
var o: I = {
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..e5a696e99691d
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesContextualType2_ES5.ts (0 errors) ====
+ interface I {
+ [s: string]: (x: any) => number; // Doesn't get hit
+ [s: number]: (x: string) => number;
+ }
+
+ var o: I = {
+ [+"foo"](y) { return y.length; },
+ [+"bar"]: y => y.length
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5(target=es5).types
index 9dcee1facb3ed..01b3045997788 100644
--- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5(target=es5).types
@@ -6,6 +6,7 @@ interface I {
>s : string
> : ^^^^^^
>x : any
+> : ^^^
[s: number]: (x: string) => number;
>s : number
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..ba833f17d66d2
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesContextualType3_ES5.ts (0 errors) ====
+ interface I {
+ [s: string]: (x: string) => number;
+ }
+
+ var o: I = {
+ [+"foo"](y) { return y.length; },
+ [+"bar"]: y => y.length
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType4_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..f72322ec1b1a9
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesContextualType4_ES5.ts (0 errors) ====
+ interface I {
+ [s: string]: any;
+ [s: number]: any;
+ }
+
+ var o: I = {
+ [""+"foo"]: "",
+ [""+"bar"]: 0
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType5_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..98a4f31b12e81
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5(target=es5).errors.txt
@@ -0,0 +1,14 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesContextualType5_ES5.ts (0 errors) ====
+ interface I {
+ [s: string]: any;
+ [s: number]: any;
+ }
+
+ var o: I = {
+ [+"foo"]: "",
+ [+"bar"]: 0
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..531c83a7c86b9
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesContextualType6_ES5.ts (0 errors) ====
+ interface I {
+ [s: string]: T;
+ }
+
+ declare function foo(obj: I): T
+
+ foo({
+ p: "",
+ 0: () => { },
+ ["hi" + "bye"]: true,
+ [0 + 1]: 0,
+ [+"hi"]: [0]
+ });
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..84105ae1ab6a8
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5(target=es5).errors.txt
@@ -0,0 +1,24 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesContextualType7_ES5.ts (0 errors) ====
+ interface I {
+ [n: number]: T;
+ }
+ interface J {
+ [s: string]: T;
+ }
+
+ declare function foo(obj: I): T;
+ declare function g(obj: J): T;
+
+ foo({
+ 0: () => { },
+ ["hi" + "bye"]: true,
+ [0 + 1]: 0,
+ [+"hi"]: [0]
+ });
+
+ g({ p: "" });
+
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5(target=es5).errors.txt
index b6bab33df600f..ee6df00c49b16 100644
--- a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNamesContextualType8_ES5.ts(6,5): error TS2322: Type '{ [x: string]: string | number; }' is not assignable to type 'I'.
'string' index signatures are incompatible.
Type 'string | number' is not assignable to type 'boolean'.
Type 'string' is not assignable to type 'boolean'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNamesContextualType8_ES5.ts (1 errors) ====
interface I {
[s: string]: boolean;
diff --git a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5(target=es5).errors.txt
index bee561e2e2cd8..5446fdee504b8 100644
--- a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5(target=es5).errors.txt
@@ -1,9 +1,11 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNamesContextualType9_ES5.ts(6,5): error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type 'I'.
'number' and 'string' index signatures are incompatible.
Type 'string | number' is not assignable to type 'boolean'.
Type 'string' is not assignable to type 'boolean'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNamesContextualType9_ES5.ts (1 errors) ====
interface I {
[s: string]: boolean;
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..76255f5e408b1
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesDeclarationEmit1_ES5.ts (0 errors) ====
+ class C {
+ ["" + ""]() { }
+ get ["" + ""]() { return 0; }
+ set ["" + ""](x) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).types
index fb1e92e98156e..c995134b9d23f 100644
--- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5(target=es5).types
@@ -29,6 +29,7 @@ class C {
set ["" + ""](x) { }
>["" + ""] : any
+> : ^^^
>"" + "" : string
> : ^^^^^^
>"" : ""
@@ -36,4 +37,5 @@ class C {
>"" : ""
> : ^^
>x : any
+> : ^^^
}
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..a24d052a3baba
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesDeclarationEmit2_ES5.ts (0 errors) ====
+ class C {
+ static ["" + ""]() { }
+ static get ["" + ""]() { return 0; }
+ static set ["" + ""](x) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).types
index 21ef7eeb6f552..700401103388e 100644
--- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5(target=es5).types
@@ -29,6 +29,7 @@ class C {
static set ["" + ""](x) { }
>["" + ""] : any
+> : ^^^
>"" + "" : string
> : ^^^^^^
>"" : ""
@@ -36,4 +37,5 @@ class C {
>"" : ""
> : ^^
>x : any
+> : ^^^
}
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5(target=es5).errors.txt
index 6d1a0d5205556..9ad922d08d783 100644
--- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNamesDeclarationEmit3_ES5.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNamesDeclarationEmit3_ES5.ts (1 errors) ====
interface I {
["" + ""](): void;
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5(target=es5).errors.txt
index 340c951c4ba22..e8774a6d66261 100644
--- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNamesDeclarationEmit4_ES5.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNamesDeclarationEmit4_ES5.ts (1 errors) ====
var v: {
["" + ""](): void;
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..f62a2746eae11
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesDeclarationEmit5_ES5.ts (0 errors) ====
+ var v = {
+ ["" + ""]: 0,
+ ["" + ""]() { },
+ get ["" + ""]() { return 0; },
+ set ["" + ""](x) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).types b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).types
index 90710630222ef..95d7407b7bff8 100644
--- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).types
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5(target=es5).types
@@ -43,6 +43,7 @@ var v = {
set ["" + ""](x) { }
>["" + ""] : any
+> : ^^^
>"" + "" : string
> : ^^^^^^
>"" : ""
@@ -50,4 +51,5 @@ var v = {
>"" : ""
> : ^^
>x : any
+> : ^^^
}
diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit6_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesDeclarationEmit6_ES5(target=es5).errors.txt
index 1abf280f1b818..b4f877cd62c5f 100644
--- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit6_ES5(target=es5).errors.txt
+++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit6_ES5(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
computedPropertyNamesDeclarationEmit6_ES5.ts(5,3): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== computedPropertyNamesDeclarationEmit6_ES5.ts (1 errors) ====
var v = {
[-1]: {},
diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..72fb87b5e56ab
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesOnOverloads_ES5.ts (0 errors) ====
+ var methodName = "method";
+ var accessorName = "accessor";
+ class C {
+ [methodName](v: string);
+ [methodName]();
+ [methodName](v?: string) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..e8dd822ec7e3a
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesSourceMap1_ES5(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesSourceMap1_ES5.ts (0 errors) ====
+ class C {
+ ["hello"]() {
+ debugger;
+ }
+ get ["goodbye"]() {
+ return 0;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5(target=es5).errors.txt b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5(target=es5).errors.txt
new file mode 100644
index 0000000000000..09d8b1b5a1fd0
--- /dev/null
+++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computedPropertyNamesSourceMap2_ES5.ts (0 errors) ====
+ var v = {
+ ["hello"]() {
+ debugger;
+ },
+ get ["goodbye"]() {
+ return 0;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).errors.txt b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).errors.txt
new file mode 100644
index 0000000000000..3454d526e0af5
--- /dev/null
+++ b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).errors.txt
@@ -0,0 +1,6 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== computerPropertiesInES5ShouldBeTransformed.ts (0 errors) ====
+ const b = ({ [`key`]: renamed }) => renamed;
\ No newline at end of file
diff --git a/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).types b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).types
index 6f14599491ebf..9937115f9bf6f 100644
--- a/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).types
+++ b/tests/baselines/reference/computerPropertiesInES5ShouldBeTransformed(target=es5).types
@@ -11,4 +11,5 @@ const b = ({ [`key`]: renamed }) => renamed;
>renamed : any
> : ^^^
>renamed : any
+> : ^^^
diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --target.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --target.js
index 6c8e2c7f578eb..843d50eee9035 100644
--- a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --target.js
+++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --target.js
@@ -7,4 +7,4 @@ FileNames::
0.ts
Errors::
error TS6044: Compiler option 'target' expects an argument.
-error TS6046: Argument for '--target' option must be: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
+error TS6046: Argument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with json api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with json api.js
index b6a032226b147..a240700e9903f 100644
--- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with json api.js
+++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with json api.js
@@ -23,5 +23,5 @@ CompilerOptions::
"configFilePath": "/apath/tsconfig.json"
}
Errors::
-[91merror[0m[90m TS6046: [0mArgument for '--target' option must be: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
+[91merror[0m[90m TS6046: [0mArgument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with jsonSourceFile api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with jsonSourceFile api.js
index 84a12546e9ba4..2f09a917176f5 100644
--- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with jsonSourceFile api.js
+++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of target to compiler-options with jsonSourceFile api.js
@@ -23,7 +23,7 @@ CompilerOptions::
"configFilePath": "/apath/tsconfig.json"
}
Errors::
-[96mtsconfig.json[0m:[93m3[0m:[93m15[0m - [91merror[0m[90m TS6046: [0mArgument for '--target' option must be: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
+[96mtsconfig.json[0m:[93m3[0m:[93m15[0m - [91merror[0m[90m TS6046: [0mArgument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
[7m3[0m "target": "",
[7m [0m [91m ~~[0m
diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert tsconfig options when there are multiple invalid strings with jsonSourceFile api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert tsconfig options when there are multiple invalid strings with jsonSourceFile api.js
index 5f7b31f5d8a6d..0a0c455515810 100644
--- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert tsconfig options when there are multiple invalid strings with jsonSourceFile api.js
+++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert tsconfig options when there are multiple invalid strings with jsonSourceFile api.js
@@ -47,7 +47,7 @@ Errors::
[7m [0m [91m~~~[0m
[7m 19[0m }
[7m [0m [91m~[0m
-[96mtsconfig.json[0m:[93m3[0m:[93m15[0m - [91merror[0m[90m TS6046: [0mArgument for '--target' option must be: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
+[96mtsconfig.json[0m:[93m3[0m:[93m15[0m - [91merror[0m[90m TS6046: [0mArgument for '--target' option must be: 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
[7m3[0m "target": "<%- options.useTsWithBabel ? 'esnext' : 'es5' %>",
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
diff --git a/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json
index 18a7babc76d29..5ce76adf7bce8 100644
--- a/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json
+++ b/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json
@@ -4,6 +4,7 @@
"target": "es5",
"module": "commonjs",
"strict": true,
+ "useDefineForClassFields": false,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
diff --git a/tests/baselines/reference/config/showConfig/Show TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with enum value compiler options/tsconfig.json
index 0052b1327f123..bdab1e076a2bc 100644
--- a/tests/baselines/reference/config/showConfig/Show TSConfig with enum value compiler options/tsconfig.json
+++ b/tests/baselines/reference/config/showConfig/Show TSConfig with enum value compiler options/tsconfig.json
@@ -1,6 +1,8 @@
{
"compilerOptions": {
"target": "es5",
- "jsx": "react"
+ "jsx": "react",
+ "module": "commonjs",
+ "useDefineForClassFields": false
}
}
diff --git a/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json
index 598b92b5eb8a9..39dbce441227c 100644
--- a/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json
+++ b/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json
@@ -27,7 +27,8 @@
"emitDecoratorMetadata": true,
"resolveJsonModule": true,
"resolvePackageJsonExports": false,
- "resolvePackageJsonImports": false
+ "resolvePackageJsonImports": false,
+ "useDefineForClassFields": false
},
"include": [
"./src/**/*"
diff --git a/tests/baselines/reference/config/showConfig/Show TSConfig with transitively implied options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with transitively implied options/tsconfig.json
index 0c16b16a784bb..2ed31560e1a31 100644
--- a/tests/baselines/reference/config/showConfig/Show TSConfig with transitively implied options/tsconfig.json
+++ b/tests/baselines/reference/config/showConfig/Show TSConfig with transitively implied options/tsconfig.json
@@ -1,9 +1,7 @@
{
"compilerOptions": {
"module": "nodenext",
- "target": "esnext",
"moduleResolution": "nodenext",
- "moduleDetection": "force",
- "useDefineForClassFields": true
+ "moduleDetection": "force"
}
}
diff --git a/tests/baselines/reference/constDeclarations-es5(target=es5).errors.txt b/tests/baselines/reference/constDeclarations-es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..e052a07471a10
--- /dev/null
+++ b/tests/baselines/reference/constDeclarations-es5(target=es5).errors.txt
@@ -0,0 +1,9 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== constDeclarations-es5.ts (0 errors) ====
+ const z7 = false;
+ const z8: number = 23;
+ const z9 = 0, z10 :string = "", z11 = null;
+
\ No newline at end of file
diff --git a/tests/baselines/reference/constDeclarations-es5(target=es5).types b/tests/baselines/reference/constDeclarations-es5(target=es5).types
index cb068af0ec587..503363696a2f1 100644
--- a/tests/baselines/reference/constDeclarations-es5(target=es5).types
+++ b/tests/baselines/reference/constDeclarations-es5(target=es5).types
@@ -23,4 +23,5 @@ const z9 = 0, z10 :string = "", z11 = null;
>"" : ""
> : ^^
>z11 : any
+> : ^^^
diff --git a/tests/baselines/reference/constructorWithSuperAndPrologue.es5(target=es5).errors.txt b/tests/baselines/reference/constructorWithSuperAndPrologue.es5(target=es5).errors.txt
new file mode 100644
index 0000000000000..5d8d96934635e
--- /dev/null
+++ b/tests/baselines/reference/constructorWithSuperAndPrologue.es5(target=es5).errors.txt
@@ -0,0 +1,22 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== constructorWithSuperAndPrologue.es5.ts (0 errors) ====
+ // https://github.com/microsoft/TypeScript/issues/48761
+ "use strict";
+
+ class A {
+ public constructor() {
+ console.log("A")
+ }
+ }
+
+ class B extends A {
+ constructor() {
+ "ngInject";
+ console.log("B")
+ super();
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack(target=es5).errors.txt b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack(target=es5).errors.txt
new file mode 100644
index 0000000000000..9585fd552203e
--- /dev/null
+++ b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack(target=es5).errors.txt
@@ -0,0 +1,27 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== contextualExpressionTypecheckingDoesntBlowStack.ts (0 errors) ====
+ // repro for: https://github.com/Microsoft/TypeScript/issues/23661
+ export interface IValidationError {
+ message: string;
+ }
+
+ export default class Operation {
+ validateParameters(parameterValues: any) : IValidationError[] | null {
+ let result: IValidationError[] | null = null;
+ for(const parameterLocation of Object.keys(parameterValues)) {
+ const parameter: any = (this as any).getParameter();;
+ const values = (this as any).getValues();
+
+ const innerResult = parameter.validate(values[parameter.oaParameter.name]);
+ if(innerResult && innerResult.length > 0) {
+ // Commenting out this line will fix the problem.
+ result = (result || []).concat(innerResult);
+ }
+ }
+
+ return result;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack(target=es5).types b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack(target=es5).types
index f9a158fc781e3..1e275f4566c02 100644
--- a/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack(target=es5).types
+++ b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack(target=es5).types
@@ -16,6 +16,7 @@ export default class Operation {
>validateParameters : (parameterValues: any) => IValidationError[] | null
> : ^ ^^ ^^^^^
>parameterValues : any
+> : ^^^
let result: IValidationError[] | null = null;
>result : IValidationError[] | null
@@ -33,14 +34,19 @@ export default class Operation {
>keys : { (o: object): string[]; (o: {}): string[]; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>parameterValues : any
+> : ^^^
const parameter: any = (this as any).getParameter();;
>parameter : any
+> : ^^^
>(this as any).getParameter() : any
+> : ^^^
>(this as any).getParameter : any
+> : ^^^
>(this as any) : any
> : ^^^
>this as any : any
+> : ^^^
>this : this
> : ^^^^
>getParameter : any
@@ -48,11 +54,15 @@ export default class Operation {
const values = (this as any).getValues();
>values : any
+> : ^^^
>(this as any).getValues() : any
+> : ^^^
>(this as any).getValues : any
+> : ^^^
>(this as any) : any
> : ^^^
>this as any : any
+> : ^^^
>this : this
> : ^^^^
>getValues : any
@@ -60,15 +70,21 @@ export default class Operation {
const innerResult = parameter.validate(values[parameter.oaParameter.name]);
>innerResult : any
+> : ^^^
>parameter.validate(values[parameter.oaParameter.name]) : any
+> : ^^^
>parameter.validate : any
+> : ^^^
>parameter : any
> : ^^^
>validate : any
> : ^^^
>values[parameter.oaParameter.name] : any
+> : ^^^
>values : any
+> : ^^^
>parameter.oaParameter.name : any
+> : ^^^
>parameter.oaParameter : any
> : ^^^
>parameter : any
@@ -80,10 +96,13 @@ export default class Operation {
if(innerResult && innerResult.length > 0) {
>innerResult && innerResult.length > 0 : any
+> : ^^^
>innerResult : any
+> : ^^^
>innerResult.length > 0 : boolean
> : ^^^^^^^
>innerResult.length : any
+> : ^^^
>innerResult : any
> : ^^^
>length : any
@@ -112,6 +131,7 @@ export default class Operation {
>concat : { (...items: ConcatArray[]): IValidationError[]; (...items: (IValidationError | ConcatArray)[]): IValidationError[]; }
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>innerResult : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/continueInLoopsWithCapturedBlockScopedBindings1(target=es5).errors.txt b/tests/baselines/reference/continueInLoopsWithCapturedBlockScopedBindings1(target=es5).errors.txt
new file mode 100644
index 0000000000000..1b2eea4c8dca8
--- /dev/null
+++ b/tests/baselines/reference/continueInLoopsWithCapturedBlockScopedBindings1(target=es5).errors.txt
@@ -0,0 +1,17 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== continueInLoopsWithCapturedBlockScopedBindings1.ts (0 errors) ====
+ function foo() {
+ for (const i of [0, 1]) {
+ if (i === 0) {
+ continue;
+ }
+
+ // Trigger non-simple-loop emit
+ (() => {
+ return i;
+ })();
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1(target=es5).errors.txt b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1(target=es5).errors.txt
new file mode 100644
index 0000000000000..560e69333e6e4
--- /dev/null
+++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1(target=es5).errors.txt
@@ -0,0 +1,245 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== convertClassExpressionToFunctionFromObjectProperty1.ts (0 errors) ====
+ const foo: any = {};
+
+ // properties
+ foo.x = class {
+ constructor () {}
+ }
+ foo.y = class {
+ constructor () {}
+ }
+
+ // keywords
+ foo.break = class {
+ constructor () {}
+ }
+ foo.case = class {
+ constructor () {}
+ }
+ foo.catch = class {
+ constructor () {}
+ }
+ foo.class = class {
+ constructor () {}
+ }
+ foo.const = class {
+ constructor () {}
+ }
+ foo.continue = class {
+ constructor () {}
+ }
+ foo.debugger = class {
+ constructor () {}
+ }
+ foo.default = class {
+ constructor () {}
+ }
+ foo.delete = class {
+ constructor () {}
+ }
+ foo.do = class {
+ constructor () {}
+ }
+ foo.else = class {
+ constructor () {}
+ }
+ foo.enum = class {
+ constructor () {}
+ }
+ foo.export = class {
+ constructor () {}
+ }
+ foo.extends = class {
+ constructor () {}
+ }
+ foo.false = class {
+ constructor () {}
+ }
+ foo.finally = class {
+ constructor () {}
+ }
+ foo.for = class {
+ constructor () {}
+ }
+ foo.function = class {
+ constructor () {}
+ }
+ foo.if = class {
+ constructor () {}
+ }
+ foo.import = class {
+ constructor () {}
+ }
+ foo.in = class {
+ constructor () {}
+ }
+ foo.instanceof = class {
+ constructor () {}
+ }
+ foo.new = class {
+ constructor () {}
+ }
+ foo.null = class {
+ constructor () {}
+ }
+ foo.return = class {
+ constructor () {}
+ }
+ foo.super = class {
+ constructor () {}
+ }
+ foo.switch = class {
+ constructor () {}
+ }
+ foo.this = class {
+ constructor () {}
+ }
+ foo.throw = class {
+ constructor () {}
+ }
+ foo.true = class {
+ constructor () {}
+ }
+ foo.try = class {
+ constructor () {}
+ }
+ foo.typeof = class {
+ constructor () {}
+ }
+ foo.var = class {
+ constructor () {}
+ }
+ foo.void = class {
+ constructor () {}
+ }
+ foo.while = class {
+ constructor () {}
+ }
+ foo.with = class {
+ constructor () {}
+ }
+ foo.implements = class {
+ constructor () {}
+ }
+ foo.interface = class {
+ constructor () {}
+ }
+ foo.let = class {
+ constructor () {}
+ }
+ foo.package = class {
+ constructor () {}
+ }
+ foo.private = class {
+ constructor () {}
+ }
+ foo.protected = class {
+ constructor () {}
+ }
+ foo.public = class {
+ constructor () {}
+ }
+ foo.static = class {
+ constructor () {}
+ }
+ foo.yield = class {
+ constructor () {}
+ }
+ foo.abstract = class {
+ constructor () {}
+ }
+ foo.as = class {
+ constructor () {}
+ }
+ foo.asserts = class {
+ constructor () {}
+ }
+ foo.any = class {
+ constructor () {}
+ }
+ foo.async = class {
+ constructor () {}
+ }
+ foo.await = class {
+ constructor () {}
+ }
+ foo.boolean = class {
+ constructor () {}
+ }
+ foo.constructor = class {
+ constructor () {}
+ }
+ foo.declare = class {
+ constructor () {}
+ }
+ foo.get = class {
+ constructor () {}
+ }
+ foo.infer = class {
+ constructor () {}
+ }
+ foo.is = class {
+ constructor () {}
+ }
+ foo.keyof = class {
+ constructor () {}
+ }
+ foo.module = class {
+ constructor () {}
+ }
+ foo.namespace = class {
+ constructor () {}
+ }
+ foo.never = class {
+ constructor () {}
+ }
+ foo.readonly = class {
+ constructor () {}
+ }
+ foo.require = class {
+ constructor () {}
+ }
+ foo.number = class {
+ constructor () {}
+ }
+ foo.object = class {
+ constructor () {}
+ }
+ foo.set = class {
+ constructor () {}
+ }
+ foo.string = class {
+ constructor () {}
+ }
+ foo.symbol = class {
+ constructor () {}
+ }
+ foo.type = class {
+ constructor () {}
+ }
+ foo.undefined = class {
+ constructor () {}
+ }
+ foo.unique = class {
+ constructor () {}
+ }
+ foo.unknown = class {
+ constructor () {}
+ }
+ foo.from = class {
+ constructor () {}
+ }
+ foo.global = class {
+ constructor () {}
+ }
+ foo.bigint = class {
+ constructor () {}
+ }
+ foo.of = class {
+ constructor () {}
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1(target=es5).types b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1(target=es5).types
index 808da6a78a79c..3132a987a6e35 100644
--- a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1(target=es5).types
+++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1(target=es5).types
@@ -3,6 +3,7 @@
=== convertClassExpressionToFunctionFromObjectProperty1.ts ===
const foo: any = {};
>foo : any
+> : ^^^
>{} : {}
> : ^^
@@ -11,6 +12,7 @@ foo.x = class {
>foo.x = class { constructor () {}} : typeof x
> : ^^^^^^^^
>foo.x : any
+> : ^^^
>foo : any
> : ^^^
>x : any
@@ -24,6 +26,7 @@ foo.y = class {
>foo.y = class { constructor () {}} : typeof y
> : ^^^^^^^^
>foo.y : any
+> : ^^^
>foo : any
> : ^^^
>y : any
@@ -39,6 +42,7 @@ foo.break = class {
>foo.break = class { constructor () {}} : typeof break
> : ^^^^^^^^^^^^
>foo.break : any
+> : ^^^
>foo : any
> : ^^^
>break : any
@@ -52,6 +56,7 @@ foo.case = class {
>foo.case = class { constructor () {}} : typeof case
> : ^^^^^^^^^^^
>foo.case : any
+> : ^^^
>foo : any
> : ^^^
>case : any
@@ -65,6 +70,7 @@ foo.catch = class {
>foo.catch = class { constructor () {}} : typeof catch
> : ^^^^^^^^^^^^
>foo.catch : any
+> : ^^^
>foo : any
> : ^^^
>catch : any
@@ -78,6 +84,7 @@ foo.class = class {
>foo.class = class { constructor () {}} : typeof class
> : ^^^^^^^^^^^^
>foo.class : any
+> : ^^^
>foo : any
> : ^^^
>class : any
@@ -91,6 +98,7 @@ foo.const = class {
>foo.const = class { constructor () {}} : typeof const
> : ^^^^^^^^^^^^
>foo.const : any
+> : ^^^
>foo : any
> : ^^^
>const : any
@@ -104,6 +112,7 @@ foo.continue = class {
>foo.continue = class { constructor () {}} : typeof continue
> : ^^^^^^^^^^^^^^^
>foo.continue : any
+> : ^^^
>foo : any
> : ^^^
>continue : any
@@ -117,6 +126,7 @@ foo.debugger = class {
>foo.debugger = class { constructor () {}} : typeof debugger
> : ^^^^^^^^^^^^^^^
>foo.debugger : any
+> : ^^^
>foo : any
> : ^^^
>debugger : any
@@ -130,6 +140,7 @@ foo.default = class {
>foo.default = class { constructor () {}} : typeof default
> : ^^^^^^^^^^^^^^
>foo.default : any
+> : ^^^
>foo : any
> : ^^^
>default : any
@@ -143,6 +154,7 @@ foo.delete = class {
>foo.delete = class { constructor () {}} : typeof delete
> : ^^^^^^^^^^^^^
>foo.delete : any
+> : ^^^
>foo : any
> : ^^^
>delete : any
@@ -156,6 +168,7 @@ foo.do = class {
>foo.do = class { constructor () {}} : typeof do
> : ^^^^^^^^^
>foo.do : any
+> : ^^^
>foo : any
> : ^^^
>do : any
@@ -169,6 +182,7 @@ foo.else = class {
>foo.else = class { constructor () {}} : typeof else
> : ^^^^^^^^^^^
>foo.else : any
+> : ^^^
>foo : any
> : ^^^
>else : any
@@ -182,6 +196,7 @@ foo.enum = class {
>foo.enum = class { constructor () {}} : typeof enum
> : ^^^^^^^^^^^
>foo.enum : any
+> : ^^^
>foo : any
> : ^^^
>enum : any
@@ -195,6 +210,7 @@ foo.export = class {
>foo.export = class { constructor () {}} : typeof export
> : ^^^^^^^^^^^^^
>foo.export : any
+> : ^^^
>foo : any
> : ^^^
>export : any
@@ -208,6 +224,7 @@ foo.extends = class {
>foo.extends = class { constructor () {}} : typeof extends
> : ^^^^^^^^^^^^^^
>foo.extends : any
+> : ^^^
>foo : any
> : ^^^
>extends : any
@@ -221,6 +238,7 @@ foo.false = class {
>foo.false = class { constructor () {}} : typeof false
> : ^^^^^^^^^^^^
>foo.false : any
+> : ^^^
>foo : any
> : ^^^
>false : any
@@ -234,6 +252,7 @@ foo.finally = class {
>foo.finally = class { constructor () {}} : typeof finally
> : ^^^^^^^^^^^^^^
>foo.finally : any
+> : ^^^
>foo : any
> : ^^^
>finally : any
@@ -247,6 +266,7 @@ foo.for = class {
>foo.for = class { constructor () {}} : typeof for
> : ^^^^^^^^^^
>foo.for : any
+> : ^^^
>foo : any
> : ^^^
>for : any
@@ -260,6 +280,7 @@ foo.function = class {
>foo.function = class { constructor () {}} : typeof function
> : ^^^^^^^^^^^^^^^
>foo.function : any
+> : ^^^
>foo : any
> : ^^^
>function : any
@@ -273,6 +294,7 @@ foo.if = class {
>foo.if = class { constructor () {}} : typeof if
> : ^^^^^^^^^
>foo.if : any
+> : ^^^
>foo : any
> : ^^^
>if : any
@@ -286,6 +308,7 @@ foo.import = class {
>foo.import = class { constructor () {}} : typeof import
> : ^^^^^^^^^^^^^
>foo.import : any
+> : ^^^
>foo : any
> : ^^^
>import : any
@@ -299,6 +322,7 @@ foo.in = class {
>foo.in = class { constructor () {}} : typeof in
> : ^^^^^^^^^
>foo.in : any
+> : ^^^
>foo : any
> : ^^^
>in : any
@@ -312,6 +336,7 @@ foo.instanceof = class {
>foo.instanceof = class { constructor () {}} : typeof instanceof
> : ^^^^^^^^^^^^^^^^^
>foo.instanceof : any
+> : ^^^
>foo : any
> : ^^^
>instanceof : any
@@ -325,6 +350,7 @@ foo.new = class {
>foo.new = class { constructor () {}} : typeof new
> : ^^^^^^^^^^
>foo.new : any
+> : ^^^
>foo : any
> : ^^^
>new : any
@@ -338,6 +364,7 @@ foo.null = class {
>foo.null = class { constructor () {}} : typeof null
> : ^^^^^^^^^^^
>foo.null : any
+> : ^^^
>foo : any
> : ^^^
>null : any
@@ -351,6 +378,7 @@ foo.return = class {
>foo.return = class { constructor () {}} : typeof return
> : ^^^^^^^^^^^^^
>foo.return : any
+> : ^^^
>foo : any
> : ^^^
>return : any
@@ -364,6 +392,7 @@ foo.super = class {
>foo.super = class { constructor () {}} : typeof super
> : ^^^^^^^^^^^^
>foo.super : any
+> : ^^^
>foo : any
> : ^^^
>super : any
@@ -377,6 +406,7 @@ foo.switch = class {
>foo.switch = class { constructor () {}} : typeof switch
> : ^^^^^^^^^^^^^
>foo.switch : any
+> : ^^^
>foo : any
> : ^^^
>switch : any
@@ -390,6 +420,7 @@ foo.this = class {
>foo.this = class { constructor () {}} : typeof this
> : ^^^^^^^^^^^
>foo.this : any
+> : ^^^
>foo : any
> : ^^^
>this : any
@@ -403,6 +434,7 @@ foo.throw = class {
>foo.throw = class { constructor () {}} : typeof throw
> : ^^^^^^^^^^^^
>foo.throw : any
+> : ^^^
>foo : any
> : ^^^
>throw : any
@@ -416,6 +448,7 @@ foo.true = class {
>foo.true = class { constructor () {}} : typeof true
> : ^^^^^^^^^^^
>foo.true : any
+> : ^^^
>foo : any
> : ^^^
>true : any
@@ -429,6 +462,7 @@ foo.try = class {
>foo.try = class { constructor () {}} : typeof try
> : ^^^^^^^^^^
>foo.try : any
+> : ^^^
>foo : any
> : ^^^
>try : any
@@ -442,6 +476,7 @@ foo.typeof = class {
>foo.typeof = class { constructor () {}} : typeof typeof
> : ^^^^^^^^^^^^^
>foo.typeof : any
+> : ^^^
>foo : any
> : ^^^
>typeof : any
@@ -455,6 +490,7 @@ foo.var = class {
>foo.var = class { constructor () {}} : typeof var
> : ^^^^^^^^^^
>foo.var : any
+> : ^^^
>foo : any
> : ^^^
>var : any
@@ -468,6 +504,7 @@ foo.void = class {
>foo.void = class { constructor () {}} : typeof void
> : ^^^^^^^^^^^
>foo.void : any
+> : ^^^
>foo : any
> : ^^^
>void : any
@@ -481,6 +518,7 @@ foo.while = class {
>foo.while = class { constructor () {}} : typeof while
> : ^^^^^^^^^^^^
>foo.while : any
+> : ^^^
>foo : any
> : ^^^
>while : any
@@ -494,6 +532,7 @@ foo.with = class {
>foo.with = class { constructor () {}} : typeof with
> : ^^^^^^^^^^^
>foo.with : any
+> : ^^^
>foo : any
> : ^^^
>with : any
@@ -507,6 +546,7 @@ foo.implements = class {
>foo.implements = class { constructor () {}} : typeof implements
> : ^^^^^^^^^^^^^^^^^
>foo.implements : any
+> : ^^^
>foo : any
> : ^^^
>implements : any
@@ -520,6 +560,7 @@ foo.interface = class {
>foo.interface = class { constructor () {}} : typeof interface
> : ^^^^^^^^^^^^^^^^
>foo.interface : any
+> : ^^^
>foo : any
> : ^^^
>interface : any
@@ -533,6 +574,7 @@ foo.let = class {
>foo.let = class { constructor () {}} : typeof let
> : ^^^^^^^^^^
>foo.let : any
+> : ^^^
>foo : any
> : ^^^
>let : any
@@ -546,6 +588,7 @@ foo.package = class {
>foo.package = class { constructor () {}} : typeof package
> : ^^^^^^^^^^^^^^
>foo.package : any
+> : ^^^
>foo : any
> : ^^^
>package : any
@@ -559,6 +602,7 @@ foo.private = class {
>foo.private = class { constructor () {}} : typeof private
> : ^^^^^^^^^^^^^^
>foo.private : any
+> : ^^^
>foo : any
> : ^^^
>private : any
@@ -572,6 +616,7 @@ foo.protected = class {
>foo.protected = class { constructor () {}} : typeof protected
> : ^^^^^^^^^^^^^^^^
>foo.protected : any
+> : ^^^
>foo : any
> : ^^^
>protected : any
@@ -585,6 +630,7 @@ foo.public = class {
>foo.public = class { constructor () {}} : typeof public
> : ^^^^^^^^^^^^^
>foo.public : any
+> : ^^^
>foo : any
> : ^^^
>public : any
@@ -598,6 +644,7 @@ foo.static = class {
>foo.static = class { constructor () {}} : typeof static
> : ^^^^^^^^^^^^^
>foo.static : any
+> : ^^^
>foo : any
> : ^^^
>static : any
@@ -611,6 +658,7 @@ foo.yield = class {
>foo.yield = class { constructor () {}} : typeof yield
> : ^^^^^^^^^^^^
>foo.yield : any
+> : ^^^
>foo : any
> : ^^^
>yield : any
@@ -624,6 +672,7 @@ foo.abstract = class {
>foo.abstract = class { constructor () {}} : typeof abstract
> : ^^^^^^^^^^^^^^^
>foo.abstract : any
+> : ^^^
>foo : any
> : ^^^
>abstract : any
@@ -637,6 +686,7 @@ foo.as = class {
>foo.as = class { constructor () {}} : typeof as
> : ^^^^^^^^^
>foo.as : any
+> : ^^^
>foo : any
> : ^^^
>as : any
@@ -650,6 +700,7 @@ foo.asserts = class {
>foo.asserts = class { constructor () {}} : typeof asserts
> : ^^^^^^^^^^^^^^
>foo.asserts : any
+> : ^^^
>foo : any
> : ^^^
>asserts : any
@@ -663,6 +714,7 @@ foo.any = class {
>foo.any = class { constructor () {}} : typeof any
> : ^^^^^^^^^^
>foo.any : any
+> : ^^^
>foo : any
> : ^^^
>any : any
@@ -676,6 +728,7 @@ foo.async = class {
>foo.async = class { constructor () {}} : typeof async
> : ^^^^^^^^^^^^
>foo.async : any
+> : ^^^
>foo : any
> : ^^^
>async : any
@@ -689,6 +742,7 @@ foo.await = class {
>foo.await = class { constructor () {}} : typeof await
> : ^^^^^^^^^^^^
>foo.await : any
+> : ^^^
>foo : any
> : ^^^
>await : any
@@ -702,6 +756,7 @@ foo.boolean = class {
>foo.boolean = class { constructor () {}} : typeof boolean
> : ^^^^^^^^^^^^^^
>foo.boolean : any
+> : ^^^
>foo : any
> : ^^^
>boolean : any
@@ -715,6 +770,7 @@ foo.constructor = class {
>foo.constructor = class { constructor () {}} : typeof constructor
> : ^^^^^^^^^^^^^^^^^^
>foo.constructor : any
+> : ^^^
>foo : any
> : ^^^
>constructor : any
@@ -728,6 +784,7 @@ foo.declare = class {
>foo.declare = class { constructor () {}} : typeof declare
> : ^^^^^^^^^^^^^^
>foo.declare : any
+> : ^^^
>foo : any
> : ^^^
>declare : any
@@ -741,6 +798,7 @@ foo.get = class {
>foo.get = class { constructor () {}} : typeof get
> : ^^^^^^^^^^
>foo.get : any
+> : ^^^
>foo : any
> : ^^^
>get : any
@@ -754,6 +812,7 @@ foo.infer = class {
>foo.infer = class { constructor () {}} : typeof infer
> : ^^^^^^^^^^^^
>foo.infer : any
+> : ^^^
>foo : any
> : ^^^
>infer : any
@@ -767,6 +826,7 @@ foo.is = class {
>foo.is = class { constructor () {}} : typeof is
> : ^^^^^^^^^
>foo.is : any
+> : ^^^
>foo : any
> : ^^^
>is : any
@@ -780,6 +840,7 @@ foo.keyof = class {
>foo.keyof = class { constructor () {}} : typeof keyof
> : ^^^^^^^^^^^^
>foo.keyof : any
+> : ^^^
>foo : any
> : ^^^
>keyof : any
@@ -793,6 +854,7 @@ foo.module = class {
>foo.module = class { constructor () {}} : typeof module
> : ^^^^^^^^^^^^^
>foo.module : any
+> : ^^^
>foo : any
> : ^^^
>module : any
@@ -806,6 +868,7 @@ foo.namespace = class {
>foo.namespace = class { constructor () {}} : typeof namespace
> : ^^^^^^^^^^^^^^^^
>foo.namespace : any
+> : ^^^
>foo : any
> : ^^^
>namespace : any
@@ -819,6 +882,7 @@ foo.never = class {
>foo.never = class { constructor () {}} : typeof never
> : ^^^^^^^^^^^^
>foo.never : any
+> : ^^^
>foo : any
> : ^^^
>never : any
@@ -832,6 +896,7 @@ foo.readonly = class {
>foo.readonly = class { constructor () {}} : typeof readonly
> : ^^^^^^^^^^^^^^^
>foo.readonly : any
+> : ^^^
>foo : any
> : ^^^
>readonly : any
@@ -845,6 +910,7 @@ foo.require = class {
>foo.require = class { constructor () {}} : typeof require
> : ^^^^^^^^^^^^^^
>foo.require : any
+> : ^^^
>foo : any
> : ^^^
>require : any
@@ -858,6 +924,7 @@ foo.number = class {
>foo.number = class { constructor () {}} : typeof number
> : ^^^^^^^^^^^^^
>foo.number : any
+> : ^^^
>foo : any
> : ^^^
>number : any
@@ -871,6 +938,7 @@ foo.object = class {
>foo.object = class { constructor () {}} : typeof object
> : ^^^^^^^^^^^^^
>foo.object : any
+> : ^^^
>foo : any
> : ^^^
>object : any
@@ -884,6 +952,7 @@ foo.set = class {
>foo.set = class { constructor () {}} : typeof set
> : ^^^^^^^^^^
>foo.set : any
+> : ^^^
>foo : any
> : ^^^
>set : any
@@ -897,6 +966,7 @@ foo.string = class {
>foo.string = class { constructor () {}} : typeof string
> : ^^^^^^^^^^^^^
>foo.string : any
+> : ^^^
>foo : any
> : ^^^
>string : any
@@ -910,6 +980,7 @@ foo.symbol = class {
>foo.symbol = class { constructor () {}} : typeof symbol
> : ^^^^^^^^^^^^^
>foo.symbol : any
+> : ^^^
>foo : any
> : ^^^
>symbol : any
@@ -923,6 +994,7 @@ foo.type = class {
>foo.type = class { constructor () {}} : typeof type
> : ^^^^^^^^^^^
>foo.type : any
+> : ^^^
>foo : any
> : ^^^
>type : any
@@ -936,6 +1008,7 @@ foo.undefined = class {
>foo.undefined = class { constructor () {}} : typeof undefined
> : ^^^^^^^^^^^^^^^^
>foo.undefined : any
+> : ^^^
>foo : any
> : ^^^
>undefined : any
@@ -949,6 +1022,7 @@ foo.unique = class {
>foo.unique = class { constructor () {}} : typeof unique
> : ^^^^^^^^^^^^^
>foo.unique : any
+> : ^^^
>foo : any
> : ^^^
>unique : any
@@ -962,6 +1036,7 @@ foo.unknown = class {
>foo.unknown = class { constructor () {}} : typeof unknown
> : ^^^^^^^^^^^^^^
>foo.unknown : any
+> : ^^^
>foo : any
> : ^^^
>unknown : any
@@ -975,6 +1050,7 @@ foo.from = class {
>foo.from = class { constructor () {}} : typeof from
> : ^^^^^^^^^^^
>foo.from : any
+> : ^^^
>foo : any
> : ^^^
>from : any
@@ -988,6 +1064,7 @@ foo.global = class {
>foo.global = class { constructor () {}} : typeof global
> : ^^^^^^^^^^^^^
>foo.global : any
+> : ^^^
>foo : any
> : ^^^
>global : any
@@ -1001,6 +1078,7 @@ foo.bigint = class {
>foo.bigint = class { constructor () {}} : typeof bigint
> : ^^^^^^^^^^^^^
>foo.bigint : any
+> : ^^^
>foo : any
> : ^^^
>bigint : any
@@ -1014,6 +1092,7 @@ foo.of = class {
>foo.of = class { constructor () {}} : typeof of
> : ^^^^^^^^^
>foo.of : any
+> : ^^^
>foo : any
> : ^^^
>of : any
diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2(target=es5).errors.txt b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2(target=es5).errors.txt
new file mode 100644
index 0000000000000..2e3ca25739d64
--- /dev/null
+++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2(target=es5).errors.txt
@@ -0,0 +1,244 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== convertClassExpressionToFunctionFromObjectProperty2.ts (0 errors) ====
+ ({
+ x: class {
+ constructor() { }
+ },
+ y: class {
+ constructor() { }
+ },
+
+ // keywords
+ break: class {
+ constructor() { }
+ },
+ case: class {
+ constructor() { }
+ },
+ catch: class {
+ constructor() { }
+ },
+ class: class {
+ constructor() { }
+ },
+ const: class {
+ constructor() { }
+ },
+ continue: class {
+ constructor() { }
+ },
+ debugger: class {
+ constructor() { }
+ },
+ default: class {
+ constructor() { }
+ },
+ delete: class {
+ constructor() { }
+ },
+ do: class {
+ constructor() { }
+ },
+ else: class {
+ constructor() { }
+ },
+ enum: class {
+ constructor() { }
+ },
+ export: class {
+ constructor() { }
+ },
+ extends: class {
+ constructor() { }
+ },
+ false: class {
+ constructor() { }
+ },
+ finally: class {
+ constructor() { }
+ },
+ for: class {
+ constructor() { }
+ },
+ function: class {
+ constructor() { }
+ },
+ if: class {
+ constructor() { }
+ },
+ import: class {
+ constructor() { }
+ },
+ in: class {
+ constructor() { }
+ },
+ instanceof: class {
+ constructor() { }
+ },
+ new: class {
+ constructor() { }
+ },
+ null: class {
+ constructor() { }
+ },
+ return: class {
+ constructor() { }
+ },
+ super: class {
+ constructor() { }
+ },
+ switch: class {
+ constructor() { }
+ },
+ this: class {
+ constructor() { }
+ },
+ throw: class {
+ constructor() { }
+ },
+ true: class {
+ constructor() { }
+ },
+ try: class {
+ constructor() { }
+ },
+ typeof: class {
+ constructor() { }
+ },
+ var: class {
+ constructor() { }
+ },
+ void: class {
+ constructor() { }
+ },
+ while: class {
+ constructor() { }
+ },
+ with: class {
+ constructor() { }
+ },
+ implements: class {
+ constructor() { }
+ },
+ interface: class {
+ constructor() { }
+ },
+ let: class {
+ constructor() { }
+ },
+ package: class {
+ constructor() { }
+ },
+ private: class {
+ constructor() { }
+ },
+ protected: class {
+ constructor() { }
+ },
+ public: class {
+ constructor() { }
+ },
+ static: class {
+ constructor() { }
+ },
+ yield: class {
+ constructor() { }
+ },
+ abstract: class {
+ constructor() { }
+ },
+ as: class {
+ constructor() { }
+ },
+ asserts: class {
+ constructor() { }
+ },
+ any: class {
+ constructor() { }
+ },
+ async: class {
+ constructor() { }
+ },
+ await: class {
+ constructor() { }
+ },
+ boolean: class {
+ constructor() { }
+ },
+ constructor: class {
+ constructor() { }
+ },
+ declare: class {
+ constructor() { }
+ },
+ get: class {
+ constructor() { }
+ },
+ infer: class {
+ constructor() { }
+ },
+ is: class {
+ constructor() { }
+ },
+ keyof: class {
+ constructor() { }
+ },
+ module: class {
+ constructor() { }
+ },
+ namespace: class {
+ constructor() { }
+ },
+ never: class {
+ constructor() { }
+ },
+ readonly: class {
+ constructor() { }
+ },
+ require: class {
+ constructor() { }
+ },
+ number: class {
+ constructor() { }
+ },
+ object: class {
+ constructor() { }
+ },
+ set: class {
+ constructor() { }
+ },
+ string: class {
+ constructor() { }
+ },
+ symbol: class {
+ constructor() { }
+ },
+ type: class {
+ constructor() { }
+ },
+ undefined: class {
+ constructor() { }
+ },
+ unique: class {
+ constructor() { }
+ },
+ unknown: class {
+ constructor() { }
+ },
+ from: class {
+ constructor() { }
+ },
+ global: class {
+ constructor() { }
+ },
+ bigint: class {
+ constructor() { }
+ },
+ of: class {
+ constructor() { }
+ }
+ })
+
\ No newline at end of file
diff --git a/tests/baselines/reference/customTransforms/after.js b/tests/baselines/reference/customTransforms/after.js
index 8bda237545f4c..e0a0e724b92c6 100644
--- a/tests/baselines/reference/customTransforms/after.js
+++ b/tests/baselines/reference/customTransforms/after.js
@@ -1,12 +1,8 @@
// [source.js]
function f1() { }
-//@after
-var c = /** @class */ (function () {
- function c() {
- }
- return c;
-}());
-(function () { });
+class c {
+}
+() => { };
//@after
var e;
(function (e) {
diff --git a/tests/baselines/reference/customTransforms/before.js b/tests/baselines/reference/customTransforms/before.js
index a2729fc4529f4..234fd967e2f51 100644
--- a/tests/baselines/reference/customTransforms/before.js
+++ b/tests/baselines/reference/customTransforms/before.js
@@ -1,12 +1,9 @@
// [source.js]
/*@before*/
function f1() { }
-var c = /** @class */ (function () {
- function c() {
- }
- return c;
-}());
-(function () { });
+class c {
+}
+() => { };
var e;
(function (e) {
})(e || (e = {}));
diff --git a/tests/baselines/reference/customTransforms/both.js b/tests/baselines/reference/customTransforms/both.js
index b759c76ce3816..fc91c4aeb55a0 100644
--- a/tests/baselines/reference/customTransforms/both.js
+++ b/tests/baselines/reference/customTransforms/both.js
@@ -1,13 +1,9 @@
// [source.js]
/*@before*/
function f1() { }
-//@after
-var c = /** @class */ (function () {
- function c() {
- }
- return c;
-}());
-(function () { });
+class c {
+}
+() => { };
//@after
var e;
(function (e) {
diff --git a/tests/baselines/reference/customTransforms/sourceMapExternalSourceFiles.js b/tests/baselines/reference/customTransforms/sourceMapExternalSourceFiles.js
index 7191d615fc65b..f29a8198cc13f 100644
--- a/tests/baselines/reference/customTransforms/sourceMapExternalSourceFiles.js
+++ b/tests/baselines/reference/customTransforms/sourceMapExternalSourceFiles.js
@@ -1,7 +1,8 @@
// [source.js.map]
-{"version":3,"file":"source.js","sourceRoot":"","sources":["source.ts","another.html"],"names":[],"mappings":"AAAA,iCACyB,CAAA;ACDzB,QAAS,CDED"}
+{"version":3,"file":"source.js","sourceRoot":"","sources":["source.ts","another.html"],"names":[],"mappings":"AAAA;yBACyB,CAAA;ACDzB,QAAS,CDED"}
// [source.js]
-"multi\n line";
+`multi
+ line`;
'change';
//# sourceMappingURL=source.js.map
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileAccessors(target=es5).errors.txt b/tests/baselines/reference/declFileAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..620638ee26104
--- /dev/null
+++ b/tests/baselines/reference/declFileAccessors(target=es5).errors.txt
@@ -0,0 +1,103 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileAccessors_0.ts (0 errors) ====
+ /** This is comment for c1*/
+ export class c1 {
+ /** getter property*/
+ public get p3() {
+ return 10;
+ }
+ /** setter property*/
+ public set p3(/** this is value*/value: number) {
+ }
+ /** private getter property*/
+ private get pp3() {
+ return 10;
+ }
+ /** private setter property*/
+ private set pp3(/** this is value*/value: number) {
+ }
+ /** static getter property*/
+ static get s3() {
+ return 10;
+ }
+ /** setter property*/
+ static set s3( /** this is value*/value: number) {
+ }
+ public get nc_p3() {
+ return 10;
+ }
+ public set nc_p3(value: number) {
+ }
+ private get nc_pp3() {
+ return 10;
+ }
+ private set nc_pp3(value: number) {
+ }
+ static get nc_s3() {
+ return "";
+ }
+ static set nc_s3(value: string) {
+ }
+
+ // Only getter property
+ public get onlyGetter() {
+ return 10;
+ }
+
+ // Only setter property
+ public set onlySetter(value: number) {
+ }
+ }
+
+==== declFileAccessors_1.ts (0 errors) ====
+ /** This is comment for c2 - the global class*/
+ class c2 {
+ /** getter property*/
+ public get p3() {
+ return 10;
+ }
+ /** setter property*/
+ public set p3(/** this is value*/value: number) {
+ }
+ /** private getter property*/
+ private get pp3() {
+ return 10;
+ }
+ /** private setter property*/
+ private set pp3(/** this is value*/value: number) {
+ }
+ /** static getter property*/
+ static get s3() {
+ return 10;
+ }
+ /** setter property*/
+ static set s3( /** this is value*/value: number) {
+ }
+ public get nc_p3() {
+ return 10;
+ }
+ public set nc_p3(value: number) {
+ }
+ private get nc_pp3() {
+ return 10;
+ }
+ private set nc_pp3(value: number) {
+ }
+ static get nc_s3() {
+ return "";
+ }
+ static set nc_s3(value: string) {
+ }
+
+ // Only getter property
+ public get onlyGetter() {
+ return 10;
+ }
+
+ // Only setter property
+ public set onlySetter(value: number) {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileCallSignatures(target=es5).errors.txt b/tests/baselines/reference/declFileCallSignatures(target=es5).errors.txt
new file mode 100644
index 0000000000000..25f3bded4342d
--- /dev/null
+++ b/tests/baselines/reference/declFileCallSignatures(target=es5).errors.txt
@@ -0,0 +1,67 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileCallSignatures_0.ts (0 errors) ====
+ export interface ICallSignature {
+ /** This comment should appear for foo*/
+ (): string;
+ }
+
+ export interface ICallSignatureWithParameters {
+ /** This is comment for function signature*/
+ (/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number): void;
+ }
+
+ export interface ICallSignatureWithRestParameters {
+ (a: string, ...rests: string[]): string;
+ }
+
+ export interface ICallSignatureWithOverloads {
+ (a: string): string;
+ (a: number): number;
+ }
+
+ export interface ICallSignatureWithTypeParameters {
+ /** This comment should appear for foo*/
+ (a: T): string;
+ }
+
+ export interface ICallSignatureWithOwnTypeParametes {
+ (a: T): string;
+ }
+
+==== declFileCallSignatures_1.ts (0 errors) ====
+ interface IGlobalCallSignature {
+ /** This comment should appear for foo*/
+ (): string;
+ }
+
+ interface IGlobalCallSignatureWithParameters {
+ /** This is comment for function signature*/
+ (/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number): void;
+ }
+
+ interface IGlobalCallSignatureWithRestParameters {
+
+ (a: string, ...rests: string[]): string;
+
+ }
+
+ interface IGlobalCallSignatureWithOverloads {
+ (a: string): string;
+ (a: number): number;
+ }
+
+ interface IGlobalCallSignatureWithTypeParameters {
+ /** This comment should appear for foo*/
+ (a: T): string;
+ }
+
+ interface IGlobalCallSignatureWithOwnTypeParametes {
+ (a: T): string;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileClassExtendsNull(target=es5).errors.txt b/tests/baselines/reference/declFileClassExtendsNull(target=es5).errors.txt
new file mode 100644
index 0000000000000..ce23f632acfeb
--- /dev/null
+++ b/tests/baselines/reference/declFileClassExtendsNull(target=es5).errors.txt
@@ -0,0 +1,7 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileClassExtendsNull.ts (0 errors) ====
+ class ExtendsNull extends null {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileConstructSignatures(target=es5).errors.txt b/tests/baselines/reference/declFileConstructSignatures(target=es5).errors.txt
new file mode 100644
index 0000000000000..79b9964596180
--- /dev/null
+++ b/tests/baselines/reference/declFileConstructSignatures(target=es5).errors.txt
@@ -0,0 +1,67 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileConstructSignatures_0.ts (0 errors) ====
+ export interface IConstructSignature {
+ /** This comment should appear for foo*/
+ new (): string;
+ }
+
+ export interface IConstructSignatureWithParameters {
+ /** This is comment for function signature*/
+ new (/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number);
+ }
+
+ export interface IConstructSignatureWithRestParameters {
+ new (a: string, ...rests: string[]): string;
+ }
+
+ export interface IConstructSignatureWithOverloads {
+ new (a: string): string;
+ new (a: number): number;
+ }
+
+ export interface IConstructSignatureWithTypeParameters {
+ /** This comment should appear for foo*/
+ new (a: T): T;
+ }
+
+ export interface IConstructSignatureWithOwnTypeParametes {
+ new (a: T): T;
+ }
+
+==== declFileConstructSignatures_1.ts (0 errors) ====
+ interface IGlobalConstructSignature {
+ /** This comment should appear for foo*/
+ new (): string;
+ }
+
+ interface IGlobalConstructSignatureWithParameters {
+ /** This is comment for function signature*/
+ new (/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number);
+ }
+
+ interface IGlobalConstructSignatureWithRestParameters {
+
+ new (a: string, ...rests: string[]): string;
+
+ }
+
+ interface IGlobalConstructSignatureWithOverloads {
+ new (a: string): string;
+ new (a: number): number;
+ }
+
+ interface IGlobalConstructSignatureWithTypeParameters {
+ /** This comment should appear for foo*/
+ new (a: T): T;
+ }
+
+ interface IGlobalConstructSignatureWithOwnTypeParametes {
+ new (a: T): T;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileConstructors(target=es5).errors.txt b/tests/baselines/reference/declFileConstructors(target=es5).errors.txt
new file mode 100644
index 0000000000000..b432d4ab28f65
--- /dev/null
+++ b/tests/baselines/reference/declFileConstructors(target=es5).errors.txt
@@ -0,0 +1,99 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileConstructors_0.ts (0 errors) ====
+ export class SimpleConstructor {
+ /** This comment should appear for foo*/
+ constructor() {
+ }
+ }
+ export class ConstructorWithParameters {
+ /** This is comment for function signature*/
+ constructor(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ }
+
+ export class ConstructorWithRestParamters {
+ constructor(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ }
+
+ export class ConstructorWithOverloads {
+ constructor(a: string);
+ constructor(a: number);
+ constructor(a: any) {
+ }
+ }
+
+ export class ConstructorWithPublicParameterProperty {
+ constructor(public x: string) {
+ }
+ }
+
+ export class ConstructorWithPrivateParameterProperty {
+ constructor(private x: string) {
+ }
+ }
+
+ export class ConstructorWithOptionalParameterProperty {
+ constructor(public x?: string) {
+ }
+ }
+
+ export class ConstructorWithParameterInitializer {
+ constructor(public x = "hello") {
+ }
+ }
+
+==== declFileConstructors_1.ts (0 errors) ====
+ class GlobalSimpleConstructor {
+ /** This comment should appear for foo*/
+ constructor() {
+ }
+ }
+ class GlobalConstructorWithParameters {
+ /** This is comment for function signature*/
+ constructor(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ }
+
+ class GlobalConstructorWithRestParamters {
+ constructor(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ }
+
+ class GlobalConstructorWithOverloads {
+ constructor(a: string);
+ constructor(a: number);
+ constructor(a: any) {
+ }
+ }
+
+ class GlobalConstructorWithPublicParameterProperty {
+ constructor(public x: string) {
+ }
+ }
+
+ class GlobalConstructorWithPrivateParameterProperty {
+ constructor(private x: string) {
+ }
+ }
+
+ class GlobalConstructorWithOptionalParameterProperty {
+ constructor(public x?: string) {
+ }
+ }
+
+ class GlobalConstructorWithParameterInitializer {
+ constructor(public x = "hello") {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileConstructors(target=es5).types b/tests/baselines/reference/declFileConstructors(target=es5).types
index 87c70f851a3b7..9a37bc18a4163 100644
--- a/tests/baselines/reference/declFileConstructors(target=es5).types
+++ b/tests/baselines/reference/declFileConstructors(target=es5).types
@@ -73,6 +73,7 @@ export class ConstructorWithOverloads {
constructor(a: any) {
>a : any
+> : ^^^
}
}
@@ -191,6 +192,7 @@ class GlobalConstructorWithOverloads {
constructor(a: any) {
>a : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/declFileFunctions(target=es5).errors.txt b/tests/baselines/reference/declFileFunctions(target=es5).errors.txt
new file mode 100644
index 0000000000000..666af90feee15
--- /dev/null
+++ b/tests/baselines/reference/declFileFunctions(target=es5).errors.txt
@@ -0,0 +1,79 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileFunctions_0.ts (0 errors) ====
+ /** This comment should appear for foo*/
+ export function foo() {
+ }
+ /** This is comment for function signature*/
+ export function fooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ export function fooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+
+ export function fooWithOverloads(a: string): string;
+ export function fooWithOverloads(a: number): number;
+ export function fooWithOverloads(a: any): any {
+ return a;
+ }
+
+ export function fooWithSingleOverload(a: string): string;
+ export function fooWithSingleOverload(a: any) {
+ return a;
+ }
+
+ export function fooWithTypePredicate(a: any): a is number {
+ return true;
+ }
+ export function fooWithTypePredicateAndMulitpleParams(a: any, b: any, c: any): a is number {
+ return true;
+ }
+ export function fooWithTypeTypePredicateAndGeneric(a: any): a is T {
+ return true;
+ }
+ export function fooWithTypeTypePredicateAndRestParam(a: any, ...rest): a is number {
+ return true;
+ }
+
+ /** This comment should appear for nonExportedFoo*/
+ function nonExportedFoo() {
+ }
+ /** This is comment for function signature*/
+ function nonExportedFooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ function nonExportedFooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+
+ function nonExportedFooWithOverloads(a: string): string;
+ function nonExportedFooWithOverloads(a: number): number;
+ function nonExportedFooWithOverloads(a: any): any {
+ return a;
+ }
+
+==== declFileFunctions_1.ts (0 errors) ====
+ /** This comment should appear for foo*/
+ function globalfoo() {
+ }
+ /** This is comment for function signature*/
+ function globalfooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ function globalfooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ function globalfooWithOverloads(a: string): string;
+ function globalfooWithOverloads(a: number): number;
+ function globalfooWithOverloads(a: any): any {
+ return a;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileFunctions(target=es5).types b/tests/baselines/reference/declFileFunctions(target=es5).types
index e9e108d197fc4..8b4f18a920a01 100644
--- a/tests/baselines/reference/declFileFunctions(target=es5).types
+++ b/tests/baselines/reference/declFileFunctions(target=es5).types
@@ -65,9 +65,11 @@ export function fooWithOverloads(a: any): any {
>fooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
export function fooWithSingleOverload(a: string): string;
@@ -80,15 +82,18 @@ export function fooWithSingleOverload(a: any) {
>fooWithSingleOverload : (a: string) => string
> : ^ ^^ ^^^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
export function fooWithTypePredicate(a: any): a is number {
>fooWithTypePredicate : (a: any) => a is number
> : ^ ^^ ^^^^^
>a : any
+> : ^^^
return true;
>true : true
@@ -98,8 +103,11 @@ export function fooWithTypePredicateAndMulitpleParams(a: any, b: any, c: any): a
>fooWithTypePredicateAndMulitpleParams : (a: any, b: any, c: any) => a is number
> : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>a : any
+> : ^^^
>b : any
+> : ^^^
>c : any
+> : ^^^
return true;
>true : true
@@ -109,6 +117,7 @@ export function fooWithTypeTypePredicateAndGeneric(a: any): a is T {
>fooWithTypeTypePredicateAndGeneric : (a: any) => a is T
> : ^ ^^ ^^ ^^^^^
>a : any
+> : ^^^
return true;
>true : true
@@ -118,6 +127,7 @@ export function fooWithTypeTypePredicateAndRestParam(a: any, ...rest): a is numb
>fooWithTypeTypePredicateAndRestParam : (a: any, ...rest: any[]) => a is number
> : ^ ^^ ^^^^^ ^^^^^^^^^^^^
>a : any
+> : ^^^
>rest : any[]
> : ^^^^^
@@ -190,9 +200,11 @@ function nonExportedFooWithOverloads(a: any): any {
>nonExportedFooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
=== declFileFunctions_1.ts ===
@@ -259,7 +271,9 @@ function globalfooWithOverloads(a: any): any {
>globalfooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
diff --git a/tests/baselines/reference/declFileIndexSignatures(target=es5).errors.txt b/tests/baselines/reference/declFileIndexSignatures(target=es5).errors.txt
new file mode 100644
index 0000000000000..9d9e478df94f2
--- /dev/null
+++ b/tests/baselines/reference/declFileIndexSignatures(target=es5).errors.txt
@@ -0,0 +1,37 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileIndexSignatures_0.ts (0 errors) ====
+ export interface IStringIndexSignature {
+ [s: string]: string;
+ }
+ export interface INumberIndexSignature {
+ [n: number]: number;
+ }
+
+ export interface IBothIndexSignature {
+ [s: string]: any;
+ [n: number]: number;
+ }
+
+ export interface IIndexSignatureWithTypeParameter {
+ [a: string]: T;
+ }
+
+==== declFileIndexSignatures_1.ts (0 errors) ====
+ interface IGlobalStringIndexSignature {
+ [s: string]: string;
+ }
+ interface IGlobalNumberIndexSignature {
+ [n: number]: number;
+ }
+
+ interface IGlobalBothIndexSignature {
+ [s: string]: any;
+ [n: number]: number;
+ }
+
+ interface IGlobalIndexSignatureWithTypeParameter {
+ [a: string]: T;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileMethods(target=es5).errors.txt b/tests/baselines/reference/declFileMethods(target=es5).errors.txt
new file mode 100644
index 0000000000000..3c3934c916459
--- /dev/null
+++ b/tests/baselines/reference/declFileMethods(target=es5).errors.txt
@@ -0,0 +1,192 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileMethods_0.ts (0 errors) ====
+ export class c1 {
+ /** This comment should appear for foo*/
+ public foo() {
+ }
+ /** This is comment for function signature*/
+ public fooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ public fooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+
+ public fooWithOverloads(a: string): string;
+ public fooWithOverloads(a: number): number;
+ public fooWithOverloads(a: any): any {
+ return a;
+ }
+
+
+ /** This comment should appear for privateFoo*/
+ private privateFoo() {
+ }
+ /** This is comment for function signature*/
+ private privateFooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ private privateFooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ private privateFooWithOverloads(a: string): string;
+ private privateFooWithOverloads(a: number): number;
+ private privateFooWithOverloads(a: any): any {
+ return a;
+ }
+
+
+ /** This comment should appear for static foo*/
+ static staticFoo() {
+ }
+ /** This is comment for function signature*/
+ static staticFooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ static staticFooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ static staticFooWithOverloads(a: string): string;
+ static staticFooWithOverloads(a: number): number;
+ static staticFooWithOverloads(a: any): any {
+ return a;
+ }
+
+
+ /** This comment should appear for privateStaticFoo*/
+ private static privateStaticFoo() {
+ }
+ /** This is comment for function signature*/
+ private static privateStaticFooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ private static privateStaticFooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ private static privateStaticFooWithOverloads(a: string): string;
+ private static privateStaticFooWithOverloads(a: number): number;
+ private static privateStaticFooWithOverloads(a: any): any {
+ return a;
+ }
+ }
+
+ export interface I1 {
+ /** This comment should appear for foo*/
+ foo(): string;
+
+ /** This is comment for function signature*/
+ fooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number): void;
+
+ fooWithRestParameters(a: string, ...rests: string[]): string;
+
+ fooWithOverloads(a: string): string;
+ fooWithOverloads(a: number): number;
+ }
+
+==== declFileMethods_1.ts (0 errors) ====
+ class c2 {
+ /** This comment should appear for foo*/
+ public foo() {
+ }
+ /** This is comment for function signature*/
+ public fooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ public fooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+
+ public fooWithOverloads(a: string): string;
+ public fooWithOverloads(a: number): number;
+ public fooWithOverloads(a: any): any {
+ return a;
+ }
+
+
+ /** This comment should appear for privateFoo*/
+ private privateFoo() {
+ }
+ /** This is comment for function signature*/
+ private privateFooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ private privateFooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ private privateFooWithOverloads(a: string): string;
+ private privateFooWithOverloads(a: number): number;
+ private privateFooWithOverloads(a: any): any {
+ return a;
+ }
+
+
+ /** This comment should appear for static foo*/
+ static staticFoo() {
+ }
+ /** This is comment for function signature*/
+ static staticFooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ static staticFooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ static staticFooWithOverloads(a: string): string;
+ static staticFooWithOverloads(a: number): number;
+ static staticFooWithOverloads(a: any): any {
+ return a;
+ }
+
+
+ /** This comment should appear for privateStaticFoo*/
+ private static privateStaticFoo() {
+ }
+ /** This is comment for function signature*/
+ private static privateStaticFooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number) {
+ var d = a;
+ }
+ private static privateStaticFooWithRestParameters(a: string, ...rests: string[]) {
+ return a + rests.join("");
+ }
+ private static privateStaticFooWithOverloads(a: string): string;
+ private static privateStaticFooWithOverloads(a: number): number;
+ private static privateStaticFooWithOverloads(a: any): any {
+ return a;
+ }
+ }
+
+ interface I2 {
+ /** This comment should appear for foo*/
+ foo(): string;
+
+ /** This is comment for function signature*/
+ fooWithParameters(/** this is comment about a*/a: string,
+ /** this is comment for b*/
+ b: number): void;
+
+ fooWithRestParameters(a: string, ...rests: string[]): string;
+
+ fooWithOverloads(a: string): string;
+ fooWithOverloads(a: number): number;
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileMethods(target=es5).types b/tests/baselines/reference/declFileMethods(target=es5).types
index a99cfdc9e4c58..fe8f094fa2c63 100644
--- a/tests/baselines/reference/declFileMethods(target=es5).types
+++ b/tests/baselines/reference/declFileMethods(target=es5).types
@@ -69,9 +69,11 @@ export class c1 {
>fooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
@@ -138,9 +140,11 @@ export class c1 {
>privateFooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
@@ -207,9 +211,11 @@ export class c1 {
>staticFooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
@@ -276,9 +282,11 @@ export class c1 {
>privateStaticFooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
}
@@ -390,9 +398,11 @@ class c2 {
>fooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
@@ -459,9 +469,11 @@ class c2 {
>privateFooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
@@ -528,9 +540,11 @@ class c2 {
>staticFooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
@@ -597,9 +611,11 @@ class c2 {
>privateStaticFooWithOverloads : { (a: string): string; (a: number): number; }
> : ^^^ ^^ ^^^ ^^^ ^^ ^^^ ^^^
>a : any
+> : ^^^
return a;
>a : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors(target=es5).errors.txt b/tests/baselines/reference/declFileObjectLiteralWithAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..33577ecf76ee5
--- /dev/null
+++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileObjectLiteralWithAccessors.ts (0 errors) ====
+ function /*1*/makePoint(x: number) {
+ return {
+ b: 10,
+ get x() { return x; },
+ set x(a: number) { this.b = a; }
+ };
+ };
+ var /*4*/point = makePoint(2);
+ var /*2*/x = point.x;
+ point./*3*/x = 30;
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors(target=es5).types b/tests/baselines/reference/declFileObjectLiteralWithAccessors(target=es5).types
index 5419544595676..b8daac4f8a25d 100644
--- a/tests/baselines/reference/declFileObjectLiteralWithAccessors(target=es5).types
+++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors(target=es5).types
@@ -31,6 +31,7 @@ function /*1*/makePoint(x: number) {
>this.b = a : number
> : ^^^^^^
>this.b : any
+> : ^^^
>this : any
> : ^^^
>b : any
diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter(target=es5).errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter(target=es5).errors.txt
new file mode 100644
index 0000000000000..090a5382a5eb7
--- /dev/null
+++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileObjectLiteralWithOnlyGetter.ts (0 errors) ====
+ function /*1*/makePoint(x: number) {
+ return {
+ get x() { return x; },
+ };
+ };
+ var /*4*/point = makePoint(2);
+ var /*2*/x = point./*3*/x;
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter(target=es5).errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter(target=es5).errors.txt
new file mode 100644
index 0000000000000..e3034d819d8c9
--- /dev/null
+++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter(target=es5).errors.txt
@@ -0,0 +1,13 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileObjectLiteralWithOnlySetter.ts (0 errors) ====
+ function /*1*/makePoint(x: number) {
+ return {
+ b: 10,
+ set x(a: number) { this.b = a; }
+ };
+ };
+ var /*3*/point = makePoint(2);
+ point./*2*/x = 30;
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter(target=es5).types b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter(target=es5).types
index f61fd90251cb2..0e99b6fcce9c7 100644
--- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter(target=es5).types
+++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter(target=es5).types
@@ -25,6 +25,7 @@ function /*1*/makePoint(x: number) {
>this.b = a : number
> : ^^^^^^
>this.b : any
+> : ^^^
>this : any
> : ^^^
>b : any
diff --git a/tests/baselines/reference/declFilePrivateStatic(target=es5).errors.txt b/tests/baselines/reference/declFilePrivateStatic(target=es5).errors.txt
new file mode 100644
index 0000000000000..3df59b6048dc8
--- /dev/null
+++ b/tests/baselines/reference/declFilePrivateStatic(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFilePrivateStatic.ts (0 errors) ====
+ class C {
+ private static x = 1;
+ static y = 1;
+
+ private static a() { }
+ static b() { }
+
+ private static get c() { return 1; }
+ static get d() { return 1; }
+
+ private static set e(v) { }
+ static set f(v) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFilePrivateStatic(target=es5).types b/tests/baselines/reference/declFilePrivateStatic(target=es5).types
index c8c1fce918863..f7226abf769cb 100644
--- a/tests/baselines/reference/declFilePrivateStatic(target=es5).types
+++ b/tests/baselines/reference/declFilePrivateStatic(target=es5).types
@@ -39,9 +39,13 @@ class C {
private static set e(v) { }
>e : any
+> : ^^^
>v : any
+> : ^^^
static set f(v) { }
>f : any
+> : ^^^
>v : any
+> : ^^^
}
diff --git a/tests/baselines/reference/declFileTypeAnnotationArrayType(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationArrayType(target=es5).errors.txt
new file mode 100644
index 0000000000000..4b2f4c4165593
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationArrayType(target=es5).errors.txt
@@ -0,0 +1,55 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationArrayType.ts (0 errors) ====
+ class c {
+ }
+ namespace m {
+ export class c {
+ }
+ export class g {
+ }
+ }
+ class g {
+ }
+
+ // Just the name
+ function foo(): c[] {
+ return [new c()];
+ }
+ function foo2() {
+ return [new c()];
+ }
+
+ // Qualified name
+ function foo3(): m.c[] {
+ return [new m.c()];
+ }
+ function foo4() {
+ return m.c;
+ }
+
+ // Just the name with type arguments
+ function foo5(): g[] {
+ return [new g()];
+ }
+ function foo6() {
+ return [new g()];
+ }
+
+ // Qualified name with type arguments
+ function foo7(): m.g[] {
+ return [new m.g()];
+ }
+ function foo8() {
+ return [new m.g()];
+ }
+
+ // Array of function types
+ function foo9(): (()=>c)[] {
+ return [() => new c()];
+ }
+ function foo10() {
+ return [() => new c()];
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es5).errors.txt
new file mode 100644
index 0000000000000..769f79c3691a9
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationBuiltInType(target=es5).errors.txt
@@ -0,0 +1,44 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationBuiltInType.ts (0 errors) ====
+ // string
+ function foo(): string {
+ return "";
+ }
+ function foo2() {
+ return "";
+ }
+
+ // number
+ function foo3(): number {
+ return 10;
+ }
+ function foo4() {
+ return 10;
+ }
+
+ // boolean
+ function foo5(): boolean {
+ return true;
+ }
+ function foo6() {
+ return false;
+ }
+
+ // void
+ function foo7(): void {
+ return;
+ }
+ function foo8() {
+ return;
+ }
+
+ // any
+ function foo9(): any {
+ return undefined;
+ }
+ function foo10() {
+ return undefined;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationParenType(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationParenType(target=es5).errors.txt
index 662ed01ca8883..cfdce47491ec5 100644
--- a/tests/baselines/reference/declFileTypeAnnotationParenType(target=es5).errors.txt
+++ b/tests/baselines/reference/declFileTypeAnnotationParenType(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
declFileTypeAnnotationParenType.ts(8,29): error TS2872: This kind of expression is always truthy.
declFileTypeAnnotationParenType.ts(9,9): error TS2872: This kind of expression is always truthy.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== declFileTypeAnnotationParenType.ts (2 errors) ====
class c {
private p: string;
diff --git a/tests/baselines/reference/declFileTypeAnnotationStringLiteral(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationStringLiteral(target=es5).errors.txt
new file mode 100644
index 0000000000000..b70ef2cf8fee1
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationStringLiteral(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationStringLiteral.ts (0 errors) ====
+ function foo(a: "hello"): number;
+ function foo(a: "name"): string;
+ function foo(a: string): string | number;
+ function foo(a: string): string | number {
+ if (a === "hello") {
+ return a.length;
+ }
+
+ return a;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationTupleType(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationTupleType(target=es5).errors.txt
new file mode 100644
index 0000000000000..94f9eb222c705
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationTupleType(target=es5).errors.txt
@@ -0,0 +1,22 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationTupleType.ts (0 errors) ====
+ class c {
+ }
+ namespace m {
+ export class c {
+ }
+ export class g {
+ }
+ }
+ class g {
+ }
+
+ // Just the name
+ var k: [c, m.c] = [new c(), new m.c()];
+ var l = k;
+
+ var x: [g, m.g, () => c] = [new g(), new m.g(), () => new c()];
+ var y = x;
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es5).errors.txt
new file mode 100644
index 0000000000000..92d0f92c5bcd7
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationTypeAlias(target=es5).errors.txt
@@ -0,0 +1,35 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationTypeAlias.ts (0 errors) ====
+ namespace M {
+ export type Value = string | number | boolean;
+ export var x: Value;
+
+ export class c {
+ }
+
+ export type C = c;
+
+ export namespace m {
+ export class c {
+ }
+ }
+
+ export type MC = m.c;
+
+ export type fc = () => c;
+ }
+
+ interface Window {
+ someMethod();
+ }
+
+ namespace M {
+ export type W = Window | string;
+ export namespace N {
+ export class Window { }
+ export var p: W;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationTypeLiteral(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationTypeLiteral(target=es5).errors.txt
new file mode 100644
index 0000000000000..23c79537ee8b1
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationTypeLiteral(target=es5).errors.txt
@@ -0,0 +1,43 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationTypeLiteral.ts (0 errors) ====
+ class c {
+ }
+ class g {
+ }
+ namespace m {
+ export class c {
+ }
+ }
+
+ // Object literal with everything
+ var x: {
+ // Call signatures
+ (a: number): c;
+ (a: string): g;
+
+ // Construct signatures
+ new (a: number): c;
+ new (a: string): m.c;
+
+ // Indexers
+ [n: number]: c;
+ [n: string]: c;
+
+ // Properties
+ a: c;
+ b: g;
+
+ // methods
+ m1(): g;
+ m2(a: string, b?: number, ...c: c[]): string;
+ };
+
+
+ // Function type
+ var y: (a: string) => string;
+
+ // constructor type
+ var z: new (a: string) => m.c;
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationTypeQuery(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationTypeQuery(target=es5).errors.txt
new file mode 100644
index 0000000000000..032b128ed4ca9
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationTypeQuery(target=es5).errors.txt
@@ -0,0 +1,47 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationTypeQuery.ts (0 errors) ====
+ class c {
+ }
+ namespace m {
+ export class c {
+ }
+ export class g {
+ }
+ }
+ class g {
+ }
+
+ // Just the name
+ function foo(): typeof c {
+ return c;
+ }
+ function foo2() {
+ return c;
+ }
+
+ // Qualified name
+ function foo3(): typeof m.c {
+ return m.c;
+ }
+ function foo4() {
+ return m.c;
+ }
+
+ // Just the name with type arguments
+ function foo5(): typeof g {
+ return g;
+ }
+ function foo6() {
+ return g;
+ }
+
+ // Qualified name with type arguments
+ function foo7(): typeof m.g {
+ return m.g
+ }
+ function foo8() {
+ return m.g
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationTypeReference(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationTypeReference(target=es5).errors.txt
new file mode 100644
index 0000000000000..1ec6f6e92d552
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationTypeReference(target=es5).errors.txt
@@ -0,0 +1,47 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationTypeReference.ts (0 errors) ====
+ class c {
+ }
+ namespace m {
+ export class c {
+ }
+ export class g {
+ }
+ }
+ class g {
+ }
+
+ // Just the name
+ function foo(): c {
+ return new c();
+ }
+ function foo2() {
+ return new c();
+ }
+
+ // Qualified name
+ function foo3(): m.c {
+ return new m.c();
+ }
+ function foo4() {
+ return new m.c();
+ }
+
+ // Just the name with type arguments
+ function foo5(): g {
+ return new g();
+ }
+ function foo6() {
+ return new g();
+ }
+
+ // Qualified name with type arguments
+ function foo7(): m.g {
+ return new m.g();
+ }
+ function foo8() {
+ return new m.g();
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationUnionType(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationUnionType(target=es5).errors.txt
new file mode 100644
index 0000000000000..5c514b379ec63
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationUnionType(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationUnionType.ts (0 errors) ====
+ class c {
+ private p: string;
+ }
+ namespace m {
+ export class c {
+ private q: string;
+ }
+ export class g {
+ private r: string;
+ }
+ }
+ class g {
+ private s: string;
+ }
+
+ // Just the name
+ var k: c | m.c = new c() || new m.c();
+ var l = new c() || new m.c();
+
+ var x: g | m.g | (() => c) = new g() || new m.g() || (() => new c());
+ var y = new g() || new m.g() || (() => new c());
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors(target=es5).errors.txt
new file mode 100644
index 0000000000000..df3a659b33404
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors(target=es5).errors.txt
@@ -0,0 +1,104 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationVisibilityErrorAccessors.ts (0 errors) ====
+ namespace m {
+ class private1 {
+ }
+
+ export class public1 {
+ }
+
+ namespace m2 {
+ export class public2 {
+ }
+ }
+
+ export class c {
+ // getter with annotation
+ get foo1(): private1 {
+ return;
+ }
+
+ // getter without annotation
+ get foo2() {
+ return new private1();
+ }
+
+ // setter with annotation
+ set foo3(param: private1) {
+ }
+
+ // Both - getter without annotation, setter with annotation
+ get foo4() {
+ return new private1();
+ }
+ set foo4(param: private1) {
+ }
+
+ // Both - with annotation
+ get foo5(): private1 {
+ return;
+ }
+ set foo5(param: private1) {
+ }
+
+ // getter with annotation
+ get foo11(): public1 {
+ return;
+ }
+
+ // getter without annotation
+ get foo12() {
+ return new public1();
+ }
+
+ // setter with annotation
+ set foo13(param: public1) {
+ }
+
+ // Both - getter without annotation, setter with annotation
+ get foo14() {
+ return new public1();
+ }
+ set foo14(param: public1) {
+ }
+
+ // Both - with annotation
+ get foo15(): public1 {
+ return;
+ }
+ set foo15(param: public1) {
+ }
+
+ // getter with annotation
+ get foo111(): m2.public2 {
+ return;
+ }
+
+ // getter without annotation
+ get foo112() {
+ return new m2.public2();
+ }
+
+ // setter with annotation
+ set foo113(param: m2.public2) {
+ }
+
+ // Both - getter without annotation, setter with annotation
+ get foo114() {
+ return new m2.public2();
+ }
+ set foo114(param: m2.public2) {
+ }
+
+ // Both - with annotation
+ get foo115(): m2.public2 {
+ return;
+ }
+ set foo115(param: m2.public2) {
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorParameterOfFunction(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorParameterOfFunction(target=es5).errors.txt
new file mode 100644
index 0000000000000..7239012348def
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorParameterOfFunction(target=es5).errors.txt
@@ -0,0 +1,49 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts (0 errors) ====
+ namespace m {
+ class private1 {
+ }
+
+ export class public1 {
+ }
+
+ // Directly using names from this module
+ function foo1(param: private1) {
+ }
+ function foo2(param = new private1()) {
+ }
+
+ export function foo3(param : private1) {
+ }
+ export function foo4(param = new private1()) {
+ }
+
+ function foo11(param: public1) {
+ }
+ function foo12(param = new public1()) {
+ }
+
+ export function foo13(param: public1) {
+ }
+ export function foo14(param = new public1()) {
+ }
+
+ namespace m2 {
+ export class public2 {
+ }
+ }
+
+ function foo111(param: m2.public2) {
+ }
+ function foo112(param = new m2.public2()) {
+ }
+
+ export function foo113(param: m2.public2) {
+ }
+ export function foo114(param = new m2.public2()) {
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction(target=es5).errors.txt
new file mode 100644
index 0000000000000..9fa994d71d365
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction(target=es5).errors.txt
@@ -0,0 +1,61 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts (0 errors) ====
+ namespace m {
+ class private1 {
+ }
+
+ export class public1 {
+ }
+
+ // Directly using names from this module
+ function foo1(): private1 {
+ return;
+ }
+ function foo2() {
+ return new private1();
+ }
+
+ export function foo3(): private1 {
+ return;
+ }
+ export function foo4() {
+ return new private1();
+ }
+
+ function foo11(): public1 {
+ return;
+ }
+ function foo12() {
+ return new public1();
+ }
+
+ export function foo13(): public1 {
+ return;
+ }
+ export function foo14() {
+ return new public1();
+ }
+
+ namespace m2 {
+ export class public2 {
+ }
+ }
+
+ function foo111(): m2.public2 {
+ return;
+ }
+ function foo112() {
+ return new m2.public2();
+ }
+
+ export function foo113(): m2.public2 {
+ return;
+ }
+ export function foo114() {
+ return new m2.public2();
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es5).errors.txt
new file mode 100644
index 0000000000000..74e777efbea3d
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeAlias(target=es5).errors.txt
@@ -0,0 +1,45 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationVisibilityErrorTypeAlias.ts (0 errors) ====
+ interface Window {
+ someMethod();
+ }
+
+ namespace M {
+ type W = Window | string;
+ export namespace N {
+ export class Window { }
+ export var p: W; // Should report error that W is private
+ }
+ }
+
+ namespace M1 {
+ export type W = Window | string;
+ export namespace N {
+ export class Window { }
+ export var p: W; // No error
+ }
+ }
+
+ namespace M2 {
+ class private1 {
+ }
+ class public1 {
+ }
+ namespace m3 {
+ export class public1 {
+ }
+ }
+
+ type t1 = private1;
+ export type t2 = private1; // error
+
+ type t11 = public1;
+ export type t12 = public1;
+
+ type t111 = m3.public1;
+ export type t112 = m3.public1; // error
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeLiteral(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeLiteral(target=es5).errors.txt
new file mode 100644
index 0000000000000..0a9e4e656e0f3
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorTypeLiteral(target=es5).errors.txt
@@ -0,0 +1,38 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationVisibilityErrorTypeLiteral.ts (0 errors) ====
+ namespace m {
+ class private1 {
+ }
+ namespace m2 {
+ export class public1 {
+ }
+ }
+
+ export var x: {
+ x: private1;
+ y: m2.public1;
+ (): m2.public1[];
+ method(): private1;
+ [n: number]: private1;
+ [s: string]: m2.public1;
+ };
+ export var x2 = {
+ x: new private1(),
+ y: new m2.public1(),
+ method() {
+ return new private1();
+ }
+ };
+ export var x3 = x;
+
+ // Function type
+ export var y: (a: private1) => m2.public1;
+ export var y2 = y;
+
+ // constructor type
+ export var z: new (a: private1) => m2.public1;
+ export var z2 = z;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorVariableDeclaration(target=es5).errors.txt b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorVariableDeclaration(target=es5).errors.txt
new file mode 100644
index 0000000000000..f80c0470a6ed9
--- /dev/null
+++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorVariableDeclaration(target=es5).errors.txt
@@ -0,0 +1,37 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts (0 errors) ====
+ namespace m {
+ class private1 {
+ }
+
+ export class public1 {
+ }
+
+ // Directly using names from this module
+ var x: private1;
+ var y = new private1();
+
+ export var k: private1;
+ export var l = new private1();
+
+ var x2: public1;
+ var y2 = new public1();
+
+ export var k2: public1;
+ export var l2 = new public1();
+
+ namespace m2 {
+ export class public2 {
+ }
+ }
+
+ var x3: m2.public2;
+ var y3 = new m2.public2();
+
+ export var k3: m2.public2;
+ export var l3 = new m2.public2();
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict(target=es5).errors.txt b/tests/baselines/reference/declarationEmitClassMemberNameConflict(target=es5).errors.txt
new file mode 100644
index 0000000000000..9c47d8797aa71
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict(target=es5).errors.txt
@@ -0,0 +1,40 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declarationEmitClassMemberNameConflict.ts (0 errors) ====
+ export class C1 {
+ C1() { } // has to be the same as the class name
+
+ bar() {
+ return function (t: typeof C1) {
+ };
+ }
+ }
+
+ export class C2 {
+ C2: any // has to be the same as the class name
+
+ bar() {
+ return function (t: typeof C2) {
+ };
+ }
+ }
+
+ export class C3 {
+ get C3() { return 0; } // has to be the same as the class name
+
+ bar() {
+ return function (t: typeof C3) {
+ };
+ }
+ }
+
+ export class C4 {
+ set C4(v) { } // has to be the same as the class name
+
+ bar() {
+ return function (t: typeof C4) {
+ };
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict(target=es5).types b/tests/baselines/reference/declarationEmitClassMemberNameConflict(target=es5).types
index 5547bba484afb..68c0d9569e417 100644
--- a/tests/baselines/reference/declarationEmitClassMemberNameConflict(target=es5).types
+++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict(target=es5).types
@@ -31,6 +31,7 @@ export class C2 {
C2: any // has to be the same as the class name
>C2 : any
+> : ^^^
bar() {
>bar : () => (t: typeof C2) => void
@@ -80,7 +81,9 @@ export class C4 {
set C4(v) { } // has to be the same as the class name
>C4 : any
+> : ^^^
>v : any
+> : ^^^
bar() {
>bar : () => (t: typeof C4) => void
diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es5).errors.txt b/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es5).errors.txt
new file mode 100644
index 0000000000000..ec440e948380e
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict2(target=es5).errors.txt
@@ -0,0 +1,25 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declarationEmitClassMemberNameConflict2.ts (0 errors) ====
+ const Bar = 'bar';
+
+ enum Hello {
+ World
+ }
+
+ enum Hello1 {
+ World1
+ }
+
+ class Foo {
+ // Same names + string => OK
+ Bar = Bar;
+
+ // Same names + enum => OK
+ Hello = Hello;
+
+ // Different names + enum => OK
+ Hello2 = Hello1;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitClassPrivateConstructor(target=es5).errors.txt b/tests/baselines/reference/declarationEmitClassPrivateConstructor(target=es5).errors.txt
new file mode 100644
index 0000000000000..511babfaf8898
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitClassPrivateConstructor(target=es5).errors.txt
@@ -0,0 +1,23 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declarationEmitClassPrivateConstructor.ts (0 errors) ====
+ interface PrivateInterface {
+ }
+
+ export class ExportedClass1 {
+ private constructor(data: PrivateInterface) { }
+ }
+
+ export class ExportedClass2 {
+ private constructor(private data: PrivateInterface) { }
+ }
+
+ export class ExportedClass3 {
+ private constructor(private data: PrivateInterface, private n: number) { }
+ }
+
+ export class ExportedClass4 {
+ private constructor(private data: PrivateInterface, public n:number) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitClassPrivateConstructor2(target=es5).errors.txt b/tests/baselines/reference/declarationEmitClassPrivateConstructor2(target=es5).errors.txt
new file mode 100644
index 0000000000000..e2135755d9be4
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitClassPrivateConstructor2(target=es5).errors.txt
@@ -0,0 +1,16 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declarationEmitClassPrivateConstructor2.ts (0 errors) ====
+ interface PrivateInterface {
+ }
+
+ export class ExportedClass1 {
+ private constructor(public data: PrivateInterface) { }
+ }
+
+
+ export class ExportedClass2 {
+ protected constructor(data: PrivateInterface) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitDetachedComment1(target=es5).errors.txt b/tests/baselines/reference/declarationEmitDetachedComment1(target=es5).errors.txt
new file mode 100644
index 0000000000000..a7dc45a2c0ace
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitDetachedComment1(target=es5).errors.txt
@@ -0,0 +1,34 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== test1.ts (0 errors) ====
+ /*! Copyright 2015 MyCompany Inc. */
+
+ /**
+ * Hello class
+ */
+ class Hello {
+
+ }
+
+==== test2.ts (0 errors) ====
+ /* A comment at the top of the file. */
+
+ /**
+ * Hi class
+ */
+ class Hi {
+
+ }
+
+==== test3.ts (0 errors) ====
+ // A one-line comment at the top of the file.
+
+ /**
+ * Hola class
+ */
+ class Hola {
+
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitDetachedComment2(target=es5).errors.txt b/tests/baselines/reference/declarationEmitDetachedComment2(target=es5).errors.txt
new file mode 100644
index 0000000000000..a7dc45a2c0ace
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitDetachedComment2(target=es5).errors.txt
@@ -0,0 +1,34 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== test1.ts (0 errors) ====
+ /*! Copyright 2015 MyCompany Inc. */
+
+ /**
+ * Hello class
+ */
+ class Hello {
+
+ }
+
+==== test2.ts (0 errors) ====
+ /* A comment at the top of the file. */
+
+ /**
+ * Hi class
+ */
+ class Hi {
+
+ }
+
+==== test3.ts (0 errors) ====
+ // A one-line comment at the top of the file.
+
+ /**
+ * Hola class
+ */
+ class Hola {
+
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitExportAssignment(target=es5).errors.txt b/tests/baselines/reference/declarationEmitExportAssignment(target=es5).errors.txt
new file mode 100644
index 0000000000000..6aa318f24d8ca
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitExportAssignment(target=es5).errors.txt
@@ -0,0 +1,12 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== utils.ts (0 errors) ====
+ export function foo() { }
+ export function bar() { }
+ export interface Buzz { }
+
+==== index.ts (0 errors) ====
+ import {foo} from "./utils";
+ export = foo;
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitExportDeclaration(target=es5).errors.txt b/tests/baselines/reference/declarationEmitExportDeclaration(target=es5).errors.txt
new file mode 100644
index 0000000000000..6dfdd468bed51
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitExportDeclaration(target=es5).errors.txt
@@ -0,0 +1,15 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== utils.ts (0 errors) ====
+ export function foo() { }
+ export function bar() { }
+ export interface Buzz { }
+
+==== index.ts (0 errors) ====
+ import {foo, bar, Buzz} from "./utils";
+
+ foo();
+ let obj: Buzz;
+ export {bar};
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitModuleWithScopeMarker(target=es5).errors.txt b/tests/baselines/reference/declarationEmitModuleWithScopeMarker(target=es5).errors.txt
new file mode 100644
index 0000000000000..05fa14373c72f
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitModuleWithScopeMarker(target=es5).errors.txt
@@ -0,0 +1,17 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declarationEmitModuleWithScopeMarker.ts (0 errors) ====
+ declare module "bar" {
+ var before: typeof func;
+
+ export function normal(): void;
+
+ export default function func(): typeof func;
+
+ var after: typeof func;
+
+ export {}
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling(target=es5).errors.txt b/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling(target=es5).errors.txt
index b973b452e13b5..f3f5de60adbdb 100644
--- a/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling(target=es5).errors.txt
+++ b/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling(target=es5).errors.txt
@@ -1,9 +1,11 @@
error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Visit https://aka.ms/ts6 for migration information.
+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 TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
!!! error TS5101: Visit https://aka.ms/ts6 for migration information.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== src/lib/operators/scalar.ts (0 errors) ====
export interface Scalar {
(): string;
diff --git a/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling2(target=es5).errors.txt b/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling2(target=es5).errors.txt
index ffd31d2848ed2..c19ed8abcb824 100644
--- a/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling2(target=es5).errors.txt
+++ b/tests/baselines/reference/declarationEmitPrefersPathKindBasedOnBundling2(target=es5).errors.txt
@@ -2,12 +2,14 @@ error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeSc
Visit https://aka.ms/ts6 for migration information.
error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
error TS5107: Option 'module=AMD' 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 TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
!!! error TS5101: Visit https://aka.ms/ts6 for migration information.
!!! error TS5101: Option 'outFile' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
!!! error TS5107: Option 'module=AMD' 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.
==== src/lib/operators/scalar.ts (0 errors) ====
export interface Scalar {
(): string;
diff --git a/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).errors.txt b/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).errors.txt
new file mode 100644
index 0000000000000..060e57e2155ea
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).errors.txt
@@ -0,0 +1,54 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== declarationEmitProtectedMembers.ts (0 errors) ====
+ // Class with protected members
+ class C1 {
+ protected x: number;
+
+ protected f() {
+ return this.x;
+ }
+
+ protected set accessor(a: number) { }
+ protected get accessor() { return 0; }
+
+ protected static sx: number;
+
+ protected static sf() {
+ return this.sx;
+ }
+
+ protected static set staticSetter(a: number) { }
+ protected static get staticGetter() { return 0; }
+ }
+
+ // Derived class overriding protected members
+ class C2 extends C1 {
+ protected f() {
+ return super.f() + this.x;
+ }
+ protected static sf() {
+ return super.sf() + this.sx;
+ }
+ }
+
+ // Derived class making protected members public
+ class C3 extends C2 {
+ x: number;
+ static sx: number;
+ f() {
+ return super.f();
+ }
+ static sf() {
+ return super.sf();
+ }
+
+ static get staticGetter() { return 1; }
+ }
+
+ // Protected properties in constructors
+ class C4 {
+ constructor(protected a: number, protected b) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).types b/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).types
index 8d5f29fb516b1..5b56cd88c0e44 100644
--- a/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).types
+++ b/tests/baselines/reference/declarationEmitProtectedMembers(target=es5).types
@@ -178,4 +178,5 @@ class C4 {
>a : number
> : ^^^^^^
>b : any
+> : ^^^
}
diff --git a/tests/baselines/reference/declarationEmitSymlinkPaths(target=es5).errors.txt b/tests/baselines/reference/declarationEmitSymlinkPaths(target=es5).errors.txt
new file mode 100644
index 0000000000000..61e571420ab3d
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitSymlinkPaths(target=es5).errors.txt
@@ -0,0 +1,27 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== /packages/search/package.json (0 errors) ====
+ {
+ "name": "search",
+ "version": "0.0.1",
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts",
+ "sideEffects": false
+ }
+==== /packages/search/lib/index.d.ts (0 errors) ====
+ export declare function test (a: () => T): () => T;
+==== /packages/search-prefix/src/API/NotificationAPIUtils.ts (0 errors) ====
+ export type NotificationRequest = {};
+ export type NotificationResponse = {};
+ export function getNotification(): NotificationResponse {
+ return {};
+ }
+==== /packages/search-prefix/src/Store/NotificationStore.ts (0 errors) ====
+ import { test } from "search/lib/index";
+ import { getNotification } from "../API/NotificationAPIUtils";
+
+ export const NotificationScenario = test(
+ getNotification
+ );
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitUnknownImport(target=es5).errors.txt b/tests/baselines/reference/declarationEmitUnknownImport(target=es5).errors.txt
index ffde8f5e80f21..a0036344145a3 100644
--- a/tests/baselines/reference/declarationEmitUnknownImport(target=es5).errors.txt
+++ b/tests/baselines/reference/declarationEmitUnknownImport(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
declarationEmitUnknownImport.ts(1,1): error TS2303: Circular definition of import alias 'Foo'.
declarationEmitUnknownImport.ts(1,14): error TS2304: Cannot find name 'SomeNonExistingName'.
declarationEmitUnknownImport.ts(1,14): error TS2503: Cannot find namespace 'SomeNonExistingName'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== declarationEmitUnknownImport.ts (3 errors) ====
import Foo = SomeNonExistingName
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/tests/baselines/reference/declarationEmitUnknownImport2(target=es5).errors.txt b/tests/baselines/reference/declarationEmitUnknownImport2(target=es5).errors.txt
index 37d7841f4b6b3..5f4aa0ab23ce1 100644
--- a/tests/baselines/reference/declarationEmitUnknownImport2(target=es5).errors.txt
+++ b/tests/baselines/reference/declarationEmitUnknownImport2(target=es5).errors.txt
@@ -1,3 +1,4 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
declarationEmitUnknownImport2.ts(1,1): error TS2303: Circular definition of import alias 'Foo'.
declarationEmitUnknownImport2.ts(1,12): error TS1005: '=' expected.
declarationEmitUnknownImport2.ts(1,12): error TS2304: Cannot find name 'From'.
@@ -5,6 +6,7 @@ declarationEmitUnknownImport2.ts(1,12): error TS2503: Cannot find namespace 'Fro
declarationEmitUnknownImport2.ts(1,17): error TS1005: ';' expected.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== declarationEmitUnknownImport2.ts (5 errors) ====
import Foo From './Foo'; // Syntax error
~~~~~~~~~~~~~~~
diff --git a/tests/baselines/reference/declarationEmitUnnessesaryTypeReferenceNotAdded(target=es5).errors.txt b/tests/baselines/reference/declarationEmitUnnessesaryTypeReferenceNotAdded(target=es5).errors.txt
new file mode 100644
index 0000000000000..1da0bd4ad0239
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitUnnessesaryTypeReferenceNotAdded(target=es5).errors.txt
@@ -0,0 +1,33 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== /index.ts (0 errors) ====
+ import minimist = require('minimist');
+ import process = require('process');
+
+ export default function parseArgs(): minimist.ParsedArgs {
+ return minimist(process.argv.slice(2));
+ }
+
+==== /node_modules/@types/minimist/minimist.d.ts (0 errors) ====
+ declare namespace thing {
+ interface ParsedArgs {}
+ }
+ declare function thing(x: any): thing.ParsedArgs;
+ export = thing;
+==== /node_modules/@types/minimist/package.json (0 errors) ====
+ {
+ "name": "minimist",
+ "version": "0.0.1",
+ "types": "./minimist.d.ts"
+ }
+==== /node_modules/@types/process/process.d.ts (0 errors) ====
+ declare const thing: any;
+ export = thing;
+==== /node_modules/@types/process/package.json (0 errors) ====
+ {
+ "name": "process",
+ "version": "0.0.1",
+ "types": "./process.d.ts"
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitUnnessesaryTypeReferenceNotAdded(target=es5).types b/tests/baselines/reference/declarationEmitUnnessesaryTypeReferenceNotAdded(target=es5).types
index fe008688925eb..553f273732ed5 100644
--- a/tests/baselines/reference/declarationEmitUnnessesaryTypeReferenceNotAdded(target=es5).types
+++ b/tests/baselines/reference/declarationEmitUnnessesaryTypeReferenceNotAdded(target=es5).types
@@ -21,7 +21,9 @@ export default function parseArgs(): minimist.ParsedArgs {
>minimist : (x: any) => minimist.ParsedArgs
> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^
>process.argv.slice(2) : any
+> : ^^^
>process.argv.slice : any
+> : ^^^
>process.argv : any
> : ^^^
>process : any
@@ -42,6 +44,7 @@ declare function thing(x: any): thing.ParsedArgs;
>thing : (x: any) => thing.ParsedArgs
> : ^ ^^ ^^^^^
>x : any
+> : ^^^
>thing : any
> : ^^^
@@ -52,6 +55,7 @@ export = thing;
=== /node_modules/@types/process/process.d.ts ===
declare const thing: any;
>thing : any
+> : ^^^
export = thing;
>thing : any
diff --git a/tests/baselines/reference/declarationEmitWithDefaultAsComputedName(target=es5).errors.txt b/tests/baselines/reference/declarationEmitWithDefaultAsComputedName(target=es5).errors.txt
new file mode 100644
index 0000000000000..7fd57295ceead
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitWithDefaultAsComputedName(target=es5).errors.txt
@@ -0,0 +1,20 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== other.ts (0 errors) ====
+ type Experiment = {
+ name: Name;
+ };
+ declare const createExperiment: (
+ options: Experiment
+ ) => Experiment;
+ export default createExperiment({
+ name: "foo"
+ });
+
+==== main.ts (0 errors) ====
+ import other from "./other";
+ export const obj = {
+ [other.name]: 1,
+ };
\ No newline at end of file
diff --git a/tests/baselines/reference/declarationEmitWithDefaultAsComputedName2(target=es5).errors.txt b/tests/baselines/reference/declarationEmitWithDefaultAsComputedName2(target=es5).errors.txt
new file mode 100644
index 0000000000000..767d84350ad74
--- /dev/null
+++ b/tests/baselines/reference/declarationEmitWithDefaultAsComputedName2(target=es5).errors.txt
@@ -0,0 +1,20 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== other.ts (0 errors) ====
+ type Experiment = {
+ name: Name;
+ };
+ declare const createExperiment: (
+ options: Experiment
+ ) => Experiment;
+ export default createExperiment({
+ name: "foo"
+ });
+
+==== main.ts (0 errors) ====
+ import * as other2 from "./other";
+ export const obj = {
+ [other2.default.name]: 1
+ };
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratedBlockScopedClass1(target=es5).errors.txt b/tests/baselines/reference/decoratedBlockScopedClass1(target=es5).errors.txt
new file mode 100644
index 0000000000000..15ab9152d2c87
--- /dev/null
+++ b/tests/baselines/reference/decoratedBlockScopedClass1(target=es5).errors.txt
@@ -0,0 +1,17 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== a.ts (0 errors) ====
+ function decorator() {
+ return (target: new (...args: any[]) => any) => {}
+ }
+
+ @decorator()
+ class Foo {
+ public static func(): Foo {
+ return new Foo();
+ }
+ }
+ Foo.func();
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratedBlockScopedClass2(target=es5).errors.txt b/tests/baselines/reference/decoratedBlockScopedClass2(target=es5).errors.txt
new file mode 100644
index 0000000000000..039ece1c40e7f
--- /dev/null
+++ b/tests/baselines/reference/decoratedBlockScopedClass2(target=es5).errors.txt
@@ -0,0 +1,20 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== a.ts (0 errors) ====
+ function decorator() {
+ return (target: new (...args: any[]) => any) => {}
+ }
+
+ try {
+ @decorator()
+ class Foo {
+ public static func(): Foo {
+ return new Foo();
+ }
+ }
+ Foo.func();
+ }
+ catch (e) {}
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratedBlockScopedClass2(target=es5).types b/tests/baselines/reference/decoratedBlockScopedClass2(target=es5).types
index 271242a6fa09e..1dbb0964ed781 100644
--- a/tests/baselines/reference/decoratedBlockScopedClass2(target=es5).types
+++ b/tests/baselines/reference/decoratedBlockScopedClass2(target=es5).types
@@ -48,4 +48,5 @@ try {
}
catch (e) {}
>e : any
+> : ^^^
diff --git a/tests/baselines/reference/decoratedBlockScopedClass3(target=es5).errors.txt b/tests/baselines/reference/decoratedBlockScopedClass3(target=es5).errors.txt
new file mode 100644
index 0000000000000..67e4a7242984e
--- /dev/null
+++ b/tests/baselines/reference/decoratedBlockScopedClass3(target=es5).errors.txt
@@ -0,0 +1,28 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== a.ts (0 errors) ====
+ function decorator() {
+ return (target: new (...args: any[]) => any) => {}
+ }
+
+ @decorator()
+ class Foo {
+ public static func(): Foo {
+ return new Foo();
+ }
+ }
+ Foo.func();
+
+ try {
+ @decorator()
+ class Foo {
+ public static func(): Foo {
+ return new Foo();
+ }
+ }
+ Foo.func();
+ }
+ catch (e) {}
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratedBlockScopedClass3(target=es5).types b/tests/baselines/reference/decoratedBlockScopedClass3(target=es5).types
index 5018dcd3677aa..a0cb0852b3b2b 100644
--- a/tests/baselines/reference/decoratedBlockScopedClass3(target=es5).types
+++ b/tests/baselines/reference/decoratedBlockScopedClass3(target=es5).types
@@ -79,4 +79,5 @@ try {
}
catch (e) {}
>e : any
+> : ^^^
diff --git a/tests/baselines/reference/decoratorChecksFunctionBodies(target=es5).errors.txt b/tests/baselines/reference/decoratorChecksFunctionBodies(target=es5).errors.txt
index 50ab24953dc69..86fedc56bd151 100644
--- a/tests/baselines/reference/decoratorChecksFunctionBodies(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorChecksFunctionBodies(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
decoratorChecksFunctionBodies.ts(8,14): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== decoratorChecksFunctionBodies.ts (1 errors) ====
// from #2971
function func(s: string): void {
diff --git a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies(target=es5).errors.txt b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies(target=es5).errors.txt
new file mode 100644
index 0000000000000..d58c5a5ad3d8f
--- /dev/null
+++ b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies(target=es5).errors.txt
@@ -0,0 +1,23 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== a.ts (0 errors) ====
+ // from #3108
+ export var test = 'abc';
+
+==== b.ts (0 errors) ====
+ import { test } from './a';
+
+ function filter(handler: any) {
+ return function (target: any, propertyKey: string) {
+ // ...
+ };
+ }
+
+ class Wat {
+ @filter(() => test == 'abc')
+ static whatever() {
+ // ...
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies(target=es5).types b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies(target=es5).types
index a060963cd35b3..6a5858d1e8015 100644
--- a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies(target=es5).types
+++ b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies(target=es5).types
@@ -17,11 +17,13 @@ function filter(handler: any) {
>filter : (handler: any) => (target: any, propertyKey: string) => void
> : ^ ^^ ^^^^^^ ^^ ^^^^^^^^^
>handler : any
+> : ^^^
return function (target: any, propertyKey: string) {
>function (target: any, propertyKey: string) { // ... } : (target: any, propertyKey: string) => void
> : ^ ^^ ^^ ^^ ^^^^^^^^^
>target : any
+> : ^^^
>propertyKey : string
> : ^^^^^^
diff --git a/tests/baselines/reference/decoratorMetadata(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadata(target=es5).errors.txt
new file mode 100644
index 0000000000000..5f0f8422b1907
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadata(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== service.ts (0 errors) ====
+ export default class Service {
+ }
+==== component.ts (0 errors) ====
+ import Service from "./service";
+
+ declare var decorator: any;
+
+ @decorator
+ class MyComponent {
+ constructor(public Service: Service) {
+ }
+
+ @decorator
+ method(x: this) {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadata(target=es5).types b/tests/baselines/reference/decoratorMetadata(target=es5).types
index a7e9a49536863..fd77ba3a9f3d3 100644
--- a/tests/baselines/reference/decoratorMetadata(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadata(target=es5).types
@@ -12,9 +12,11 @@ import Service from "./service";
declare var decorator: any;
>decorator : any
+> : ^^^
@decorator
>decorator : any
+> : ^^^
class MyComponent {
>MyComponent : MyComponent
@@ -27,6 +29,7 @@ class MyComponent {
@decorator
>decorator : any
+> : ^^^
method(x: this) {
>method : (x: this) => void
diff --git a/tests/baselines/reference/decoratorMetadata-jsdoc(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadata-jsdoc(target=es5).errors.txt
index b38d8ebf6e86e..a37c3540825d2 100644
--- a/tests/baselines/reference/decoratorMetadata-jsdoc(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorMetadata-jsdoc(target=es5).errors.txt
@@ -1,8 +1,10 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
decoratorMetadata-jsdoc.ts(5,9): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'?
decoratorMetadata-jsdoc.ts(7,9): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'?
decoratorMetadata-jsdoc.ts(9,9): error TS8020: JSDoc types can only be used inside documentation comments.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== decoratorMetadata-jsdoc.ts (3 errors) ====
declare var decorator: any;
diff --git a/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01(target=es5).errors.txt
new file mode 100644
index 0000000000000..4e068cca65fe5
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts (0 errors) ====
+ declare var decorator: any;
+
+ class MyClass {
+ constructor(test: string, test2: number) {
+
+ }
+
+ @decorator
+ doSomething() {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01(target=es5).types b/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01(target=es5).types
index 6ff8c81acd589..448e6949ffa4e 100644
--- a/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01(target=es5).types
@@ -3,6 +3,7 @@
=== decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts ===
declare var decorator: any;
>decorator : any
+> : ^^^
class MyClass {
>MyClass : MyClass
@@ -18,6 +19,7 @@ class MyClass {
@decorator
>decorator : any
+> : ^^^
doSomething() {
>doSomething : () => void
diff --git a/tests/baselines/reference/decoratorMetadataOnInferredType(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataOnInferredType(target=es5).errors.txt
new file mode 100644
index 0000000000000..82f2bd502c6de
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataOnInferredType(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorMetadataOnInferredType.ts (0 errors) ====
+ declare var console: {
+ log(msg: string): void;
+ };
+
+ class A {
+ constructor() { console.log('new A'); }
+ }
+
+ function decorator(target: Object, propertyKey: string) {
+ }
+
+ export class B {
+ @decorator
+ x = new A();
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType(target=es5).errors.txt
new file mode 100644
index 0000000000000..ee82a874d3f94
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType(target=es5).errors.txt
@@ -0,0 +1,42 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== aux.ts (0 errors) ====
+ export class SomeClass {
+ field: string;
+ }
+
+==== aux1.ts (0 errors) ====
+ export class SomeClass1 {
+ field: string;
+ }
+
+==== aux2.ts (0 errors) ====
+ export class SomeClass2 {
+ field: string;
+ }
+==== main.ts (0 errors) ====
+ import { SomeClass } from './aux';
+ import { SomeClass1 } from './aux1';
+
+ function annotation(): ClassDecorator {
+ return (target: any): void => { };
+ }
+
+ function annotation1(): MethodDecorator {
+ return (target: any): void => { };
+ }
+
+ @annotation()
+ export class ClassA {
+ array: SomeClass[];
+
+ constructor(...init: SomeClass[]) {
+ this.array = init;
+ }
+
+ @annotation1()
+ foo(... args: SomeClass1[]) {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType(target=es5).types b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType(target=es5).types
index 039c11ddb3b9d..38aadf5a73fab 100644
--- a/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataRestParameterWithImportedType(target=es5).types
@@ -46,6 +46,7 @@ function annotation(): ClassDecorator {
>(target: any): void => { } : (target: any) => void
> : ^ ^^ ^^^^^
>target : any
+> : ^^^
}
function annotation1(): MethodDecorator {
@@ -56,6 +57,7 @@ function annotation1(): MethodDecorator {
>(target: any): void => { } : (target: any) => void
> : ^ ^^ ^^^^^
>target : any
+> : ^^^
}
@annotation()
diff --git a/tests/baselines/reference/decoratorMetadataWithConstructorType(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithConstructorType(target=es5).errors.txt
new file mode 100644
index 0000000000000..14131aa1c31ee
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithConstructorType(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorMetadataWithConstructorType.ts (0 errors) ====
+ declare var console: {
+ log(msg: string): void;
+ };
+
+ class A {
+ constructor() { console.log('new A'); }
+ }
+
+ function decorator(target: Object, propertyKey: string) {
+ }
+
+ export class B {
+ @decorator
+ x: A = new A();
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision(target=es5).errors.txt
new file mode 100644
index 0000000000000..5fcfabf5d70df
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== db.ts (0 errors) ====
+ export class db {
+ public doSomething() {
+ }
+ }
+
+==== service.ts (0 errors) ====
+ import {db} from './db';
+ function someDecorator(target) {
+ return target;
+ }
+ @someDecorator
+ class MyClass {
+ db: db;
+
+ constructor(db: db) {
+ this.db = db;
+ this.db.doSomething();
+ }
+ }
+ export {MyClass};
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision(target=es5).types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision(target=es5).types
index 42cbbe0667ed2..a5bbe62e6a1c2 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision(target=es5).types
@@ -20,9 +20,11 @@ function someDecorator(target) {
>someDecorator : (target: any) => any
> : ^ ^^^^^^^^^^^^^
>target : any
+> : ^^^
return target;
>target : any
+> : ^^^
}
@someDecorator
>someDecorator : (target: any) => any
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2(target=es5).errors.txt
new file mode 100644
index 0000000000000..e582c9d95d17e
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== db.ts (0 errors) ====
+ export class db {
+ public doSomething() {
+ }
+ }
+
+==== service.ts (0 errors) ====
+ import {db as Database} from './db';
+ function someDecorator(target) {
+ return target;
+ }
+ @someDecorator
+ class MyClass {
+ db: Database;
+
+ constructor(db: Database) { // no collision
+ this.db = db;
+ this.db.doSomething();
+ }
+ }
+ export {MyClass};
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2(target=es5).types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2(target=es5).types
index 95c9a2e1754e7..ffd742e116f2a 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2(target=es5).types
@@ -22,9 +22,11 @@ function someDecorator(target) {
>someDecorator : (target: any) => any
> : ^ ^^^^^^^^^^^^^
>target : any
+> : ^^^
return target;
>target : any
+> : ^^^
}
@someDecorator
>someDecorator : (target: any) => any
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3(target=es5).errors.txt
new file mode 100644
index 0000000000000..5346b6561fe7c
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== service.ts (0 errors) ====
+ import db = require('./db');
+ function someDecorator(target) {
+ return target;
+ }
+ @someDecorator
+ class MyClass {
+ db: db.db;
+
+ constructor(db: db.db) { // collision with namespace of external module db
+ this.db = db;
+ this.db.doSomething();
+ }
+ }
+ export {MyClass};
+
+==== db.ts (0 errors) ====
+ export class db {
+ public doSomething() {
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3(target=es5).types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3(target=es5).types
index 3689995d560e6..63e3f87bf16a0 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3(target=es5).types
@@ -9,9 +9,11 @@ function someDecorator(target) {
>someDecorator : (target: any) => any
> : ^ ^^^^^^^^^^^^^
>target : any
+> : ^^^
return target;
>target : any
+> : ^^^
}
@someDecorator
>someDecorator : (target: any) => any
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4(target=es5).errors.txt
index 2a76c2fb070e0..877703c3fecff 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
service.ts(1,8): error TS2613: Module '"db"' has no default export. Did you mean to use 'import { db } from "db"' instead?
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== db.ts (0 errors) ====
export class db {
public doSomething() {
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5(target=es5).errors.txt
new file mode 100644
index 0000000000000..65e04d564f71d
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== db.ts (0 errors) ====
+ export default class db {
+ public doSomething() {
+ }
+ }
+
+==== service.ts (0 errors) ====
+ import db from './db';
+ function someDecorator(target) {
+ return target;
+ }
+ @someDecorator
+ class MyClass {
+ db: db;
+
+ constructor(db: db) { // collision
+ this.db = db;
+ this.db.doSomething();
+ }
+ }
+ export {MyClass};
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5(target=es5).types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5(target=es5).types
index 904662ff2c65a..7f313b9b11b35 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5(target=es5).types
@@ -20,9 +20,11 @@ function someDecorator(target) {
>someDecorator : (target: any) => any
> : ^ ^^^^^^^^^^^^^
>target : any
+> : ^^^
return target;
>target : any
+> : ^^^
}
@someDecorator
>someDecorator : (target: any) => any
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6(target=es5).errors.txt
new file mode 100644
index 0000000000000..c8ecb4ad0ed75
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== db.ts (0 errors) ====
+ export default class db {
+ public doSomething() {
+ }
+ }
+
+==== service.ts (0 errors) ====
+ import database from './db';
+ function someDecorator(target) {
+ return target;
+ }
+ @someDecorator
+ class MyClass {
+ db: database;
+
+ constructor(db: database) { // no collision
+ this.db = db;
+ this.db.doSomething();
+ }
+ }
+ export {MyClass};
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6(target=es5).types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6(target=es5).types
index 558cf75322dab..ab0849e4b70a6 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6(target=es5).types
@@ -20,9 +20,11 @@ function someDecorator(target) {
>someDecorator : (target: any) => any
> : ^ ^^^^^^^^^^^^^
>target : any
+> : ^^^
return target;
>target : any
+> : ^^^
}
@someDecorator
>someDecorator : (target: any) => any
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7(target=es5).errors.txt
index cce125d2fb0f9..929684b8c414a 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here.
service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== db.ts (0 errors) ====
export default class db {
public doSomething() {
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8(target=es5).errors.txt
new file mode 100644
index 0000000000000..52f78029a760f
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8(target=es5).errors.txt
@@ -0,0 +1,26 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== service.ts (0 errors) ====
+ import database = require('./db');
+ function someDecorator(target) {
+ return target;
+ }
+ @someDecorator
+ class MyClass {
+ db: database.db;
+
+ constructor(db: database.db) { // no collision
+ this.db = db;
+ this.db.doSomething();
+ }
+ }
+ export {MyClass};
+
+==== db.ts (0 errors) ====
+ export class db {
+ public doSomething() {
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8(target=es5).types b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8(target=es5).types
index 01ec7d466daff..9c6b5f021c92f 100644
--- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8(target=es5).types
@@ -9,9 +9,11 @@ function someDecorator(target) {
>someDecorator : (target: any) => any
> : ^ ^^^^^^^^^^^^^
>target : any
+> : ^^^
return target;
>target : any
+> : ^^^
}
@someDecorator
>someDecorator : (target: any) => any
diff --git a/tests/baselines/reference/decoratorMetadataWithTypeOnlyImport(target=es5).errors.txt b/tests/baselines/reference/decoratorMetadataWithTypeOnlyImport(target=es5).errors.txt
new file mode 100644
index 0000000000000..5984bb899005e
--- /dev/null
+++ b/tests/baselines/reference/decoratorMetadataWithTypeOnlyImport(target=es5).errors.txt
@@ -0,0 +1,21 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== service.ts (0 errors) ====
+ export class Service {
+ }
+==== component.ts (0 errors) ====
+ import type { Service } from "./service";
+
+ declare var decorator: any;
+
+ @decorator
+ class MyComponent {
+ constructor(public Service: Service) {
+ }
+
+ @decorator
+ method(x: this) {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorMetadataWithTypeOnlyImport(target=es5).types b/tests/baselines/reference/decoratorMetadataWithTypeOnlyImport(target=es5).types
index 9500d17427675..56d001a4ca5ec 100644
--- a/tests/baselines/reference/decoratorMetadataWithTypeOnlyImport(target=es5).types
+++ b/tests/baselines/reference/decoratorMetadataWithTypeOnlyImport(target=es5).types
@@ -12,9 +12,11 @@ import type { Service } from "./service";
declare var decorator: any;
>decorator : any
+> : ^^^
@decorator
>decorator : any
+> : ^^^
class MyComponent {
>MyComponent : MyComponent
@@ -27,6 +29,7 @@ class MyComponent {
@decorator
>decorator : any
+> : ^^^
method(x: this) {
>method : (x: this) => void
diff --git a/tests/baselines/reference/decoratorOnClass1(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClass1(target=es5).errors.txt
new file mode 100644
index 0000000000000..b50e7f79326df
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClass1(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClass1.ts (0 errors) ====
+ declare function dec(target: T): T;
+
+ @dec
+ class C {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClass2(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClass2(target=es5).errors.txt
new file mode 100644
index 0000000000000..9539fc68fd7e4
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClass2(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClass2.ts (0 errors) ====
+ declare function dec(target: T): T;
+
+ @dec
+ export class C {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClass3(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClass3(target=es5).errors.txt
new file mode 100644
index 0000000000000..c7e9d8ebf8b01
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClass3(target=es5).errors.txt
@@ -0,0 +1,11 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClass3.ts (0 errors) ====
+ declare function dec(target: T): T;
+
+ export
+ @dec
+ class C {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClass4(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClass4(target=es5).errors.txt
new file mode 100644
index 0000000000000..bb25f677cb8e7
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClass4(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClass4.ts (0 errors) ====
+ declare function dec(): (target: T) => T;
+
+ @dec()
+ class C {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClass5(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClass5(target=es5).errors.txt
new file mode 100644
index 0000000000000..841d83c1f5bbc
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClass5(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClass5.ts (0 errors) ====
+ declare function dec(): (target: T) => T;
+
+ @dec()
+ class C {
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClass8(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClass8(target=es5).errors.txt
index bac1886c5d472..cba86a1080a14 100644
--- a/tests/baselines/reference/decoratorOnClass8(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorOnClass8(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
decoratorOnClass8.ts(3,1): error TS1238: Unable to resolve signature of class decorator when called as an expression.
The runtime will invoke the decorator with 1 arguments, but the decorator expects 2.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== decoratorOnClass8.ts (1 errors) ====
declare function dec(): (target: Function, paramIndex: number) => void;
diff --git a/tests/baselines/reference/decoratorOnClass9(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClass9(target=es5).errors.txt
new file mode 100644
index 0000000000000..111cbf1ef6223
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClass9(target=es5).errors.txt
@@ -0,0 +1,18 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClass9.ts (0 errors) ====
+ declare var dec: any;
+
+ class A {}
+
+ // https://github.com/Microsoft/TypeScript/issues/16417
+ @dec
+ class B extends A {
+ static x = 1;
+ static y = B.x;
+ m() {
+ return B.x;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClass9(target=es5).types b/tests/baselines/reference/decoratorOnClass9(target=es5).types
index 4046ae2c002bf..836ec661a28a1 100644
--- a/tests/baselines/reference/decoratorOnClass9(target=es5).types
+++ b/tests/baselines/reference/decoratorOnClass9(target=es5).types
@@ -3,6 +3,7 @@
=== decoratorOnClass9.ts ===
declare var dec: any;
>dec : any
+> : ^^^
class A {}
>A : A
@@ -11,6 +12,7 @@ class A {}
// https://github.com/Microsoft/TypeScript/issues/16417
@dec
>dec : any
+> : ^^^
class B extends A {
>B : B
diff --git a/tests/baselines/reference/decoratorOnClassAccessor1(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClassAccessor1(target=es5).errors.txt
new file mode 100644
index 0000000000000..cddf949c91ec9
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClassAccessor1(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClassAccessor1.ts (0 errors) ====
+ declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
+
+ class C {
+ @dec get accessor() { return 1; }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassAccessor1(target=es5).types b/tests/baselines/reference/decoratorOnClassAccessor1(target=es5).types
index b146bc412a043..efb3228b4b579 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor1(target=es5).types
+++ b/tests/baselines/reference/decoratorOnClassAccessor1(target=es5).types
@@ -5,6 +5,7 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope
>dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>target : any
+> : ^^^
>propertyKey : string
> : ^^^^^^
>descriptor : TypedPropertyDescriptor
diff --git a/tests/baselines/reference/decoratorOnClassAccessor2(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClassAccessor2(target=es5).errors.txt
new file mode 100644
index 0000000000000..4e69923715f94
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClassAccessor2(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClassAccessor2.ts (0 errors) ====
+ declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
+
+ class C {
+ @dec public get accessor() { return 1; }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassAccessor2(target=es5).types b/tests/baselines/reference/decoratorOnClassAccessor2(target=es5).types
index 7d55b72ce0e7b..13deeaa29cb28 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor2(target=es5).types
+++ b/tests/baselines/reference/decoratorOnClassAccessor2(target=es5).types
@@ -5,6 +5,7 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope
>dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>target : any
+> : ^^^
>propertyKey : string
> : ^^^^^^
>descriptor : TypedPropertyDescriptor
diff --git a/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).errors.txt
index 74101534f6dd2..44e63bcb6b2d6 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorOnClassAccessor3(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
decoratorOnClassAccessor3.ts(4,12): error TS1436: Decorators must precede the name and all keywords of property declarations.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== decoratorOnClassAccessor3.ts (1 errors) ====
declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
diff --git a/tests/baselines/reference/decoratorOnClassAccessor4(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClassAccessor4(target=es5).errors.txt
new file mode 100644
index 0000000000000..808cbdae72c46
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClassAccessor4(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClassAccessor4.ts (0 errors) ====
+ declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
+
+ class C {
+ @dec set accessor(value: number) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassAccessor4(target=es5).types b/tests/baselines/reference/decoratorOnClassAccessor4(target=es5).types
index daa22e15d5f5d..0445f7d81b265 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor4(target=es5).types
+++ b/tests/baselines/reference/decoratorOnClassAccessor4(target=es5).types
@@ -5,6 +5,7 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope
>dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>target : any
+> : ^^^
>propertyKey : string
> : ^^^^^^
>descriptor : TypedPropertyDescriptor
diff --git a/tests/baselines/reference/decoratorOnClassAccessor5(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClassAccessor5(target=es5).errors.txt
new file mode 100644
index 0000000000000..af90f0e7afe46
--- /dev/null
+++ b/tests/baselines/reference/decoratorOnClassAccessor5(target=es5).errors.txt
@@ -0,0 +1,10 @@
+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 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== decoratorOnClassAccessor5.ts (0 errors) ====
+ declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
+
+ class C {
+ @dec public set accessor(value: number) { }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassAccessor5(target=es5).types b/tests/baselines/reference/decoratorOnClassAccessor5(target=es5).types
index a107b6e668e3b..8347ca46a33af 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor5(target=es5).types
+++ b/tests/baselines/reference/decoratorOnClassAccessor5(target=es5).types
@@ -5,6 +5,7 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope
>dec : (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>target : any
+> : ^^^
>propertyKey : string
> : ^^^^^^
>descriptor : TypedPropertyDescriptor
diff --git a/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).errors.txt
index 52f8c3efceaeb..b716c94977099 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorOnClassAccessor6(target=es5).errors.txt
@@ -1,6 +1,8 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
decoratorOnClassAccessor6.ts(4,12): error TS1436: Decorators must precede the name and all keywords of property declarations.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== decoratorOnClassAccessor6.ts (1 errors) ====
declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
diff --git a/tests/baselines/reference/decoratorOnClassAccessor7(target=es5).errors.txt b/tests/baselines/reference/decoratorOnClassAccessor7(target=es5).errors.txt
index 119918052cd8d..480da7b1764c6 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor7(target=es5).errors.txt
+++ b/tests/baselines/reference/decoratorOnClassAccessor7(target=es5).errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
decoratorOnClassAccessor7.ts(26,5): error TS1207: Decorators cannot be applied to multiple get/set accessors of the same name.
decoratorOnClassAccessor7.ts(31,5): error TS1207: Decorators cannot be applied to multiple get/set accessors of the same name.
+!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== decoratorOnClassAccessor7.ts (2 errors) ====
declare function dec1(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
declare function dec2(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor