Merge pull request #6709 from RyanCavanaugh/fix6662

Don't crash when return type jsdoc tag is malformed
This commit is contained in:
Ryan Cavanaugh committed 2016-02-02 13:40:13 -08:00
commit bd3e9f262a
2 files changed
+23 -1

No files matched your search

+3 -1
View File
@@ -10380,9 +10380,11 @@ namespace ts {
function getReturnTypeFromJSDocComment(func: SignatureDeclaration | FunctionDeclaration): Type {
const returnTag = getJSDocReturnTag(func);
if (returnTag) {
if (returnTag && returnTag.typeExpression) {
return getTypeFromTypeNode(returnTag.typeExpression.type);
}
return undefined;
}
function createPromiseType(promisedType: Type): Type {