Skip to content

Commit d34bbe5

Browse files
committed
Add explanatory comment to resolveTupleTypeMembers
1 parent 7e115bb commit d34bbe5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4107,6 +4107,7 @@ namespace ts {
41074107
function resolveTupleTypeMembers(type: TupleType, thisArgument?: Type) {
41084108
const arrayElementType = getUnionType(type.elementTypes);
41094109
// Make the tuple type itself the 'this' type by including an extra type argument
4110+
// (Unless it's provided in the case that the tuple is a type parameter constraint)
41104111
const arrayType = resolveStructuredTypeMembers(createTypeFromGenericGlobalType(globalArrayType, [arrayElementType, thisArgument || type]));
41114112
const members = createTupleTypeMemberSymbols(type.elementTypes);
41124113
addInheritedMembers(members, arrayType.properties);

0 commit comments

Comments
 (0)