Skip to content

Commit fe18527

Browse files
authored
feat(51000) - Flag Deprecation Plan (#51424)
* feat(51000): add ignoreDeprecations option * use constants of versions * change the ignoreDeprecations type to allow only one value - '5.0' * add tests * update baseline * add typeScriptVersion to CreateProgramOptions * update baseline * change diagnostic message
1 parent e0bfac5 commit fe18527

File tree

518 files changed

+6322
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

518 files changed

+6322
-95
lines changed

src/compiler/commandLineParser.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,12 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
15101510
description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
15111511
category: Diagnostics.Language_and_Environment,
15121512
defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules,
1513-
}
1513+
},
1514+
{
1515+
name: "ignoreDeprecations",
1516+
type: "string",
1517+
defaultValueDescription: undefined,
1518+
},
15141519
];
15151520

15161521
/** @internal */

src/compiler/diagnosticMessages.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4245,6 +4245,18 @@
42454245
"category": "Error",
42464246
"code": 5100
42474247
},
4248+
"Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify 'ignoreDeprecations: \"{2}\"' to silence this error.": {
4249+
"category": "Error",
4250+
"code": 5101
4251+
},
4252+
"Flag '{0}' is deprecated. Please remove it from your configuration.": {
4253+
"category": "Error",
4254+
"code": 5102
4255+
},
4256+
"Invalid value for '--ignoreDeprecations'.": {
4257+
"category": "Error",
4258+
"code": 5103
4259+
},
42484260

42494261
"Generates a sourcemap for each corresponding '.d.ts' file.": {
42504262
"category": "Message",

src/compiler/program.ts

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import {
5353
CustomTransformers,
5454
Debug,
5555
DeclarationWithTypeParameterChildren,
56+
DeprecationVersion,
5657
Diagnostic,
5758
DiagnosticCategory,
5859
diagnosticCategoryName,
@@ -308,6 +309,7 @@ import {
308309
UnparsedSource,
309310
VariableDeclaration,
310311
VariableStatement,
312+
versionMajorMinor,
311313
walkUpParenthesizedExpressions,
312314
WriteFileCallback,
313315
WriteFileCallbackData,
@@ -1392,13 +1394,14 @@ function shouldProgramCreateNewSourceFiles(program: Program | undefined, newOpti
13921394
return optionsHaveChanges(program.getCompilerOptions(), newOptions, sourceFileAffectingCompilerOptions);
13931395
}
13941396

1395-
function createCreateProgramOptions(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): CreateProgramOptions {
1397+
function createCreateProgramOptions(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[], typeScriptVersion?: string): CreateProgramOptions {
13961398
return {
13971399
rootNames,
13981400
options,
13991401
host,
14001402
oldProgram,
1401-
configFileParsingDiagnostics
1403+
configFileParsingDiagnostics,
1404+
typeScriptVersion,
14021405
};
14031406
}
14041407

@@ -1430,7 +1433,7 @@ export function createProgram(createProgramOptions: CreateProgramOptions): Progr
14301433
export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program;
14311434
export function createProgram(rootNamesOrOptions: readonly string[] | CreateProgramOptions, _options?: CompilerOptions, _host?: CompilerHost, _oldProgram?: Program, _configFileParsingDiagnostics?: readonly Diagnostic[]): Program {
14321435
const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options!, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; // TODO: GH#18217
1433-
const { rootNames, options, configFileParsingDiagnostics, projectReferences } = createProgramOptions;
1436+
const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion } = createProgramOptions;
14341437
let { oldProgram } = createProgramOptions;
14351438

14361439
let processingDefaultLibFiles: SourceFile[] | undefined;
@@ -3989,6 +3992,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
39893992
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
39903993
}
39913994

3995+
verifyDeprecatedCompilerOptions();
39923996
verifyProjectReferences();
39933997

39943998
// List of collected files is complete; validate exhautiveness if this is a project with a file list
@@ -4264,6 +4268,53 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
42644268
}
42654269
}
42664270

4271+
function verifyDeprecatedCompilerOptions() {
4272+
const version = typeScriptVersion || versionMajorMinor;
4273+
const ignoreDeprecations = options.ignoreDeprecations;
4274+
if (ignoreDeprecations) {
4275+
if (ignoreDeprecations === DeprecationVersion.v5_0 && (version === DeprecationVersion.v5_0 || version === DeprecationVersion.v5_5)) {
4276+
return;
4277+
}
4278+
else {
4279+
createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations);
4280+
}
4281+
}
4282+
if (options.target === ScriptTarget.ES3) {
4283+
createDeprecatedDiagnosticForOption(version, "target", "ES3");
4284+
}
4285+
if (options.noImplicitUseStrict) {
4286+
createDeprecatedDiagnosticForOption(version, "noImplicitUseStrict");
4287+
}
4288+
if (options.keyofStringsOnly) {
4289+
createDeprecatedDiagnosticForOption(version, "keyofStringsOnly");
4290+
}
4291+
if (options.suppressExcessPropertyErrors) {
4292+
createDeprecatedDiagnosticForOption(version, "suppressExcessPropertyErrors");
4293+
}
4294+
if (options.suppressImplicitAnyIndexErrors) {
4295+
createDeprecatedDiagnosticForOption(version, "suppressImplicitAnyIndexErrors");
4296+
}
4297+
if (options.noStrictGenericChecks) {
4298+
createDeprecatedDiagnosticForOption(version, "noStrictGenericChecks");
4299+
}
4300+
if (options.charset) {
4301+
createDeprecatedDiagnosticForOption(version, "charset");
4302+
}
4303+
if (options.out) {
4304+
createDeprecatedDiagnosticForOption(version, "out");
4305+
}
4306+
}
4307+
4308+
function createDeprecatedDiagnosticForOption(version: string, name: string, value?: string) {
4309+
if (version === DeprecationVersion.v6_0) {
4310+
createDiagnosticForOption(/*onKey*/ !value, name, /*option2*/ undefined, Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name);
4311+
}
4312+
else {
4313+
createDiagnosticForOption(/*onKey*/ !value, name, /*option2*/ undefined,
4314+
Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_silence_this_error, value || name, DeprecationVersion.v5_5, DeprecationVersion.v5_0);
4315+
}
4316+
}
4317+
42674318
function createDiagnosticExplainingFile(file: SourceFile | undefined, fileProcessingReason: FileIncludeReason | undefined, diagnostic: DiagnosticMessage, args: (string | number | undefined)[] | undefined): Diagnostic {
42684319
let fileIncludeReasons: DiagnosticMessageChain[] | undefined;
42694320
let relatedInfo: Diagnostic[] | undefined;

src/compiler/types.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7015,6 +7015,7 @@ export interface CompilerOptions {
70157015
/** @internal */generateCpuProfile?: string;
70167016
/** @internal */generateTrace?: string;
70177017
/** @internal */help?: boolean;
7018+
ignoreDeprecations?: string;
70187019
importHelpers?: boolean;
70197020
importsNotUsedAsValues?: ImportsNotUsedAsValues;
70207021
/** @internal */init?: boolean;
@@ -7272,6 +7273,8 @@ export interface CreateProgramOptions {
72727273
host?: CompilerHost;
72737274
oldProgram?: Program;
72747275
configFileParsingDiagnostics?: readonly Diagnostic[];
7276+
/** @internal */
7277+
typeScriptVersion?: string;
72757278
}
72767279

72777280
/** @internal */
@@ -9782,3 +9785,12 @@ export interface Queue<T> {
97829785
dequeue(): T;
97839786
isEmpty(): boolean;
97849787
}
9788+
9789+
/** @internal */
9790+
export const enum DeprecationVersion {
9791+
/* eslint-disable @typescript-eslint/naming-convention */
9792+
v5_0 = "5.0",
9793+
v5_5 = "5.5",
9794+
v6_0 = "6.0",
9795+
/* eslint-enable @typescript-eslint/naming-convention */
9796+
}

src/harness/compilerImpl.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export class CompilationResult {
241241
}
242242
}
243243

244-
export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions): CompilationResult {
244+
export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions, typeScriptVersion?: string): CompilationResult {
245245
if (compilerOptions.project || !rootFiles || rootFiles.length === 0) {
246246
const project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions);
247247
if (project) {
@@ -265,11 +265,10 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und
265265
// pre-emit/post-emit error comparison requires declaration emit twice, which can be slow. If it's unlikely to flag any error consistency issues
266266
// and if the test is running `skipLibCheck` - an indicator that we want the tets to run quickly - skip the before/after error comparison, too
267267
const skipErrorComparison = ts.length(rootFiles) >= 100 || (!!compilerOptions.skipLibCheck && !!compilerOptions.declaration);
268-
269-
const preProgram = !skipErrorComparison ? ts.createProgram(rootFiles || [], { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host) : undefined;
268+
const preProgram = !skipErrorComparison ? ts.createProgram({ rootNames: rootFiles || [], options: { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host, typeScriptVersion }) : undefined;
270269
const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram);
271270

272-
const program = ts.createProgram(rootFiles || [], compilerOptions, host);
271+
const program = ts.createProgram({ rootNames: rootFiles || [], options: compilerOptions, host, typeScriptVersion });
273272
const emitResult = program.emit();
274273
const postErrors = ts.getPreEmitDiagnostics(program);
275274
const longerErrors = ts.length(preErrors) > postErrors.length ? preErrors : postErrors;

src/harness/harnessIO.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ export namespace Compiler {
350350
if (value === undefined) {
351351
throw new Error(`Cannot have undefined value for compiler option '${name}'.`);
352352
}
353+
if (name === "typeScriptVersion") {
354+
continue;
355+
}
353356
const option = getCommandLineOption(name);
354357
if (option) {
355358
const errors: ts.Diagnostic[] = [];
@@ -412,9 +415,14 @@ export namespace Compiler {
412415
currentDirectory = vfs.srcFolder;
413416
}
414417

418+
let typeScriptVersion: string | undefined;
419+
415420
// Parse settings
416421
if (harnessSettings) {
417422
setCompilerOptionsFromHarnessSetting(harnessSettings, options);
423+
if (ts.isString(harnessSettings.typeScriptVersion) && harnessSettings.typeScriptVersion) {
424+
typeScriptVersion = harnessSettings.typeScriptVersion;
425+
}
418426
}
419427
if (options.rootDirs) {
420428
options.rootDirs = ts.map(options.rootDirs, d => ts.getNormalizedAbsolutePath(d, currentDirectory));
@@ -442,7 +450,7 @@ export namespace Compiler {
442450
fs.apply(symlinks);
443451
}
444452
const host = new fakes.CompilerHost(fs, options);
445-
const result = compiler.compileFiles(host, programFileNames, options);
453+
const result = compiler.compileFiles(host, programFileNames, options, typeScriptVersion);
446454
result.symlinks = symlinks;
447455
return result;
448456
}

tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
12
tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts(1,15): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.
23

34

5+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
46
==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts (1 errors) ====
57
for (var v of "") { }
68
~~
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
2+
3+
4+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
5+
==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts (0 errors) ====
6+
for (var v of [true]) { }

tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
12
tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts(2,17): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.
23

34

5+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
46
==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts (1 errors) ====
57
var union: string | string[];
68
for (const v of union) { }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
2+
3+
4+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
5+
==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts (0 errors) ====
6+
var union: string[] | number[];
7+
for (var v of union) { }

tests/baselines/reference/accessorWithES3.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
12
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
23
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
34
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
45
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
56

67

8+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
79
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts (4 errors) ====
810
// error to use accessors in ES3 mode
911

tests/baselines/reference/accessorsNotAllowedInES3.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
12
tests/cases/compiler/accessorsNotAllowedInES3.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
23
tests/cases/compiler/accessorsNotAllowedInES3.ts(4,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
34

45

6+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
57
==== tests/cases/compiler/accessorsNotAllowedInES3.ts (2 errors) ====
68
class C {
79
get x(): number { return 1; }

tests/baselines/reference/alwaysStrictNoImplicitUseStrict.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error TS5053: Option 'noImplicitUseStrict' cannot be specified with option 'alwaysStrict'.
2+
error TS5101: Flag 'noImplicitUseStrict' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
23
tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode.
34

45

56
!!! error TS5053: Option 'noImplicitUseStrict' cannot be specified with option 'alwaysStrict'.
7+
!!! error TS5101: Flag 'noImplicitUseStrict' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
68
==== tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts (1 errors) ====
79
module M {
810
export function f() {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
2+
3+
4+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
5+
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts (0 errors) ====
6+
// ok to use accessors in ambient class in ES3
7+
declare class C {
8+
static get a(): string;
9+
static set a(value: string);
10+
11+
private static get b(): string;
12+
private static set b(foo: string);
13+
14+
get x(): string;
15+
set x(value: string);
16+
17+
private get y(): string;
18+
private set y(foo: string);
19+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
error TS5101: Flag 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
2+
3+
4+
!!! error TS5101: Flag 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
5+
==== tests/cases/compiler/Class.ts (0 errors) ====
6+
import { Configurable } from "./Configurable"
7+
8+
export class HiddenClass {}
9+
10+
export class ActualClass extends Configurable(HiddenClass) {}
11+
==== tests/cases/compiler/Configurable.ts (0 errors) ====
12+
export type Constructor<T> = {
13+
new(...args: any[]): T;
14+
}
15+
export function Configurable<T extends Constructor<{}>>(base: T): T {
16+
return class extends base {
17+
18+
constructor(...args: any[]) {
19+
super(...args);
20+
}
21+
22+
};
23+
}
24+

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7056,6 +7056,7 @@ declare namespace ts {
70567056
exactOptionalPropertyTypes?: boolean;
70577057
experimentalDecorators?: boolean;
70587058
forceConsistentCasingInFileNames?: boolean;
7059+
ignoreDeprecations?: string;
70597060
importHelpers?: boolean;
70607061
importsNotUsedAsValues?: ImportsNotUsedAsValues;
70617062
inlineSourceMap?: boolean;

tests/baselines/reference/api/typescript.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,6 +3121,7 @@ declare namespace ts {
31213121
exactOptionalPropertyTypes?: boolean;
31223122
experimentalDecorators?: boolean;
31233123
forceConsistentCasingInFileNames?: boolean;
3124+
ignoreDeprecations?: string;
31243125
importHelpers?: boolean;
31253126
importsNotUsedAsValues?: ImportsNotUsedAsValues;
31263127
inlineSourceMap?: boolean;

tests/baselines/reference/bigIntWithTargetES3.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
12
tests/cases/compiler/bigIntWithTargetES3.ts(5,22): error TS2737: BigInt literals are not available when targeting lower than ES2020.
23
tests/cases/compiler/bigIntWithTargetES3.ts(5,29): error TS2737: BigInt literals are not available when targeting lower than ES2020.
34
tests/cases/compiler/bigIntWithTargetES3.ts(5,39): error TS2737: BigInt literals are not available when targeting lower than ES2020.
45
tests/cases/compiler/bigIntWithTargetES3.ts(5,48): error TS2737: BigInt literals are not available when targeting lower than ES2020.
56

67

8+
!!! error TS5101: Flag 'ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
79
==== tests/cases/compiler/bigIntWithTargetES3.ts (4 errors) ====
810
const normalNumber = 123; // should not error
911
let bigintType: bigint; // should not error

0 commit comments

Comments
 (0)