Merge pull request #9621 from zhengbli/fixJSDocPropertyTag

fix the issue that @property types are not recoganized
This commit is contained in:
Zhengbo Li
2016-07-13 11:32:36 -07:00
committed by GitHub
2 changed files with 32 additions and 5 deletions

View File

@@ -3160,6 +3160,9 @@ namespace ts {
if (declaration.kind === SyntaxKind.ExportAssignment) {
return links.type = checkExpression((<ExportAssignment>declaration).expression);
}
if (declaration.flags & NodeFlags.JavaScriptFile && declaration.kind === SyntaxKind.JSDocPropertyTag && (<JSDocPropertyTag>declaration).typeExpression) {
return links.type = getTypeFromTypeNode((<JSDocPropertyTag>declaration).typeExpression.type);
}
// Handle variable, parameter or property
if (!pushTypeResolution(symbol, TypeSystemPropertyName.Type)) {
return unknownType;