mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Merge pull request #17765 from tycho01/6229-known-length-tuples
add `strictTuples` flag giving tuples known length
This commit is contained in:
@@ -7310,6 +7310,9 @@ namespace ts {
|
||||
property.type = typeParameter;
|
||||
properties.push(property);
|
||||
}
|
||||
const lengthSymbol = createSymbol(SymbolFlags.Property, "length" as __String);
|
||||
lengthSymbol.type = getLiteralType(arity);
|
||||
properties.push(lengthSymbol);
|
||||
const type = <GenericType & InterfaceTypeWithDeclaredMembers>createObjectType(ObjectFlags.Tuple | ObjectFlags.Reference);
|
||||
type.typeParameters = typeParameters;
|
||||
type.outerTypeParameters = undefined;
|
||||
|
||||
Reference in New Issue
Block a user