mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Move comment and refer to tuple type literal syntax rather than TupleType interface
This commit is contained in:
@@ -4338,9 +4338,11 @@ module ts {
|
||||
return !!getPropertyOfType(type, "0");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a Type was written as a tuple type literal.
|
||||
* Prefer using isTupleLikeType() unless the use of `elementTypes` is required.
|
||||
*/
|
||||
function isTupleType(type: Type) : boolean {
|
||||
// Check if a Type exactly implements interface TupleType. Typical typechecking code should rely on
|
||||
// isTupleLikeType() instead.
|
||||
return (type.flags & TypeFlags.Tuple) && !!(<TupleType>type).elementTypes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user