Skip to content

Commit 8cfabca

Browse files
committed
Remove strictTuple flag and Tuple.length readonly
1 parent defd32f commit 8cfabca

File tree

5 files changed

+4
-20
lines changed

5 files changed

+4
-20
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ namespace ts {
6767
const allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ModuleKind.System;
6868
const strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks");
6969
const strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes");
70-
const strictTuples = getStrictOptionValue(compilerOptions, "strictTuples");
7170
const noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny");
7271
const noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
7372

@@ -7303,12 +7302,9 @@ namespace ts {
73037302
property.type = typeParameter;
73047303
properties.push(property);
73057304
}
7306-
if (strictTuples) {
7307-
const lengthSymbol = createSymbol(SymbolFlags.Property, "length" as __String);
7308-
lengthSymbol.type = getLiteralType(arity);
7309-
lengthSymbol.checkFlags = CheckFlags.Readonly;
7310-
properties.push(lengthSymbol);
7311-
}
7305+
const lengthSymbol = createSymbol(SymbolFlags.Property, "length" as __String);
7306+
lengthSymbol.type = getLiteralType(arity);
7307+
properties.push(lengthSymbol);
73127308
const type = <GenericType & InterfaceTypeWithDeclaredMembers>createObjectType(ObjectFlags.Tuple | ObjectFlags.Reference);
73137309
type.typeParameters = typeParameters;
73147310
type.outerTypeParameters = undefined;

src/compiler/commandLineParser.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,6 @@ namespace ts {
276276
category: Diagnostics.Strict_Type_Checking_Options,
277277
description: Diagnostics.Enable_strict_checking_of_function_types
278278
},
279-
{
280-
name: "strictTuples",
281-
type: "boolean",
282-
showInSimplifiedHelpView: true,
283-
category: Diagnostics.Strict_Type_Checking_Options,
284-
description: Diagnostics.Enable_strict_tuple_checks
285-
},
286279
{
287280
name: "noImplicitThis",
288281
type: "boolean",

src/compiler/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ namespace ts {
16841684
return moduleResolution;
16851685
}
16861686

1687-
export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictTuples" | "alwaysStrict";
1687+
export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "alwaysStrict";
16881688

16891689
export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean {
16901690
return compilerOptions[flag] === undefined ? compilerOptions.strict : compilerOptions[flag];

src/compiler/diagnosticMessages.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,10 +3326,6 @@
33263326
"category": "Message",
33273327
"code": 6186
33283328
},
3329-
"Enable strict tuple checks.": {
3330-
"category": "Message",
3331-
"code": 6187
3332-
},
33333329
"Variable '{0}' implicitly has an '{1}' type.": {
33343330
"category": "Error",
33353331
"code": 7005

src/compiler/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3785,7 +3785,6 @@ namespace ts {
37853785
strict?: boolean;
37863786
strictFunctionTypes?: boolean; // Always combine with strict property
37873787
strictNullChecks?: boolean; // Always combine with strict property
3788-
strictTuples?: boolean;
37893788
/* @internal */ stripInternal?: boolean;
37903789
suppressExcessPropertyErrors?: boolean;
37913790
suppressImplicitAnyIndexErrors?: boolean;

0 commit comments

Comments
 (0)