Skip to content

Commit f40b25c

Browse files
committed
Deprecate ES5
1 parent 9a0396c commit f40b25c

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ export const targetOptionDeclaration: CommandLineOptionOfCustomType = {
579579
affectsModuleResolution: true,
580580
affectsEmit: true,
581581
affectsBuildInfo: true,
582-
deprecatedKeys: new Set(["es3"]),
582+
deprecatedKeys: new Set(["es3", "es5"]),
583583
paramType: Diagnostics.VERSION,
584584
showInSimplifiedHelpView: true,
585585
category: Diagnostics.Language_and_Environment,

src/compiler/program.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4526,6 +4526,9 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
45264526
});
45274527

45284528
checkDeprecations("6.0", "7.0", createDiagnostic, createDeprecatedDiagnostic => {
4529+
if (options.target === ScriptTarget.ES5) {
4530+
createDeprecatedDiagnostic("target", "ES5");
4531+
}
45294532
if (options.moduleResolution === ModuleResolutionKind.Node10) {
45304533
createDeprecatedDiagnostic("moduleResolution", "node10", /*useInstead*/ undefined, Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information);
45314534
}

src/compiler/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7659,6 +7659,7 @@ export const enum ScriptKind {
76597659
export const enum ScriptTarget {
76607660
/** @deprecated */
76617661
ES3 = 0,
7662+
/** @deprecated */
76627663
ES5 = 1,
76637664
ES2015 = 2,
76647665
ES2016 = 3,

src/server/protocol.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,6 +3284,7 @@ export const enum NewLineKind {
32843284
export const enum ScriptTarget {
32853285
/** @deprecated */
32863286
ES3 = "es3",
3287+
/** @deprecated */
32873288
ES5 = "es5",
32883289
ES6 = "es6",
32893290
ES2015 = "es2015",

0 commit comments

Comments
 (0)