diff --git a/src/parser.ts b/src/parser.ts index 3ed851c1..59088709 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -229,7 +229,10 @@ export class Parser { isBlockComment(comment) && /^\*/.test(comment.value) ) .forEach(comment => { - const { tags } = doctrine.parse(`/*${comment.value}*/`, { unwrap: true }); + const { tags } = doctrine.parse(`/*${comment.value}*/`, { + unwrap: true, + recoverable: true, + }); tags .filter(tag => tagsHavingType.has(tag.title) && tag.type) .map(tag => this.extractType(tag.type!)) diff --git a/test/fixtures/parse/@extends.js b/test/fixtures/parse/@extends.js index 4720c350..bd1bdf15 100644 --- a/test/fixtures/parse/@extends.js +++ b/test/fixtures/parse/@extends.js @@ -1,6 +1,7 @@ /** * @interface * @extends {goog.Foo} + * I am a comment */ var Foo = function() { };