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