From 79b609b6323755426ff07dd2d90f31d26fb700aa Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Thu, 26 Feb 2015 10:27:16 -0800 Subject: [PATCH] Update comment --- src/compiler/checker.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2e5d61f860a..be59b41fbee 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5454,8 +5454,9 @@ module ts { } // In an array literal contextually typed by a type T, the contextual type of an element expression at index N is - // the type of the property with the numeric name N in T, if one exists. Otherwise, it is the type of the numeric - // index signature in T, if one exists. + // the type of the property with the numeric name N in T, if one exists. Otherwise, if T has a numeric index signature, + // it is the type of the numeric index signature in T. Otherwise, in ES6 and higher, the contextual type is the iterated + // type of T. function getContextualTypeForElementExpression(node: Expression): Type { var arrayLiteral = node.parent; var type = getContextualType(arrayLiteral);