From 0d06729b188efd7fa2fa91b1cd04bb3dad33ee49 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Tue, 10 Mar 2015 15:58:39 -0400 Subject: [PATCH] Move comment and refer to tuple type literal syntax rather than TupleType interface --- src/compiler/checker.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 831f2258db0..2c0ae191320 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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) && !!(type).elementTypes; }