From c19512edb564d5502d0de86e23e4b108941d0174 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 11 Jul 2016 14:57:54 -0700 Subject: [PATCH] Add node flag check --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index abba2692865..e842f008bbe 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3160,7 +3160,7 @@ namespace ts { if (declaration.kind === SyntaxKind.ExportAssignment) { return links.type = checkExpression((declaration).expression); } - if (declaration.kind === SyntaxKind.JSDocPropertyTag && (declaration).typeExpression) { + if (declaration.flags & NodeFlags.JavaScriptFile && declaration.kind === SyntaxKind.JSDocPropertyTag && (declaration).typeExpression) { return links.type = getTypeFromTypeNode((declaration).typeExpression.type); } // Handle variable, parameter or property