From e9a578c53c677223278ea49b077eda20da5383a7 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Thu, 9 Feb 2017 12:40:15 -0800 Subject: [PATCH] Update comment --- src/compiler/checker.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d01ccbf8546..9f005b93fee 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14179,6 +14179,7 @@ namespace ts { * otherwise return undefined if tag-name of the opening-like element doesn't have call signatures */ function resolveStatelessJsxOpeningLikeElement(openingLikeElement: JsxOpeningLikeElement, elementType: Type, candidatesOutArray: Signature[]): Signature { + // If this function is called from language service, elementType can be a union type. This is not possible if the function is called from compiler (see: resolveCustomJsxElementAttributesType) if (elementType.flags & TypeFlags.Union) { const types = (elementType as UnionType).types; let result: Signature;