8000 Move comment and refer to tuple type literal syntax rather than Tuple… · DINKIN/TypeScript@0d06729 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d06729

Browse files
committed
Move comment and refer to tuple type literal syntax rather than TupleType interface
1 parent 7acb410 commit 0d06729

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4338,9 +4338,11 @@ module ts {
43384338
return !!getPropertyOfType(type, "0");
43394339
}
43404340

4341+
/**
4342+
* Check if a Type was written as a tuple type literal.
4343+
* Prefer using isTupleLikeType() unless the use of `elementTypes` is required.
4344+
*/
43414345
function isTupleType(type: Type) : boolean {
4342-
// Check if a Type exactly implements interface TupleType. Typical typechecking code should rely on
4343-
// isTupleLikeType() instead.
43444346
return (type.flags & TypeFlags.Tuple) && !!(<TupleType>type).elementTypes;
43454347
}
43464348

0 commit comments

Comments
 (0)
0