Skip to content

Commit d03d489

Browse files
committed
Merge branch '6229-known-length-tuples' of https://github.com/tycho01/TypeScript into 6229-known-length-tuples
2 parents 75882db + 8cfabca commit d03d489

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
@@ -1683,7 +1683,7 @@ namespace ts {
16831683
return moduleResolution;
16841684
}
16851685

1686-
export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictTuples" | "alwaysStrict";
1686+
export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "alwaysStrict";
16871687

16881688
export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean {
16891689
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
@@ -3788,7 +3788,6 @@ namespace ts {
37883788
strict?: boolean;
37893789
strictFunctionTypes?: boolean; // Always combine with strict property
37903790
strictNullChecks?: boolean; // Always combine with strict property
3791-
strictTuples?: boolean;
37923791
/* @internal */ stripInternal?: boolean;
37933792
suppressExcessPropertyErrors?: boolean;
37943793
suppressImplicitAnyIndexErrors?: boolean;

0 commit comments

Comments
 (0)