feat(49323): Render JSDoc @throws {type} as a link (#49891)

* feat(49323): add support throws jsdoc tag

* change "name" to "typeExpression". parse "exception" as a synonym for "throws"

* include typeExpression from the throws tag in the quick info

* add JSDocThrowsTag to ForEachChildNodes
This commit is contained in:
Oleksandr T
2022-12-13 00:44:38 +02:00
committed by GitHub
parent f1288c33a1
commit 355991c806
30 changed files with 752 additions and 29 deletions

View File

@@ -294,6 +294,35 @@ describe("unittests:: JSDocParsing", () => {
parsesCorrectly("paramWithoutType",
`/**
* @param foo
*/`);
parsesCorrectly("throwsTag1",
`/**
* @throws {Error}
*/`);
parsesCorrectly("throwsTag2",
`/**
* @throws free-form description
*/`);
parsesCorrectly("throwsTag3",
`/**
* @throws {Error} description
*/`);
parsesCorrectly("exceptionTag1",
`/**
* @exception {Error}
*/`);
parsesCorrectly("exceptionTag2",
`/**
* @exception free-form description
*/`);
parsesCorrectly("exceptionTag3",
`/**
* @exception {Error} description
*/`);
parsesCorrectly("typedefTagWithChildrenTags",
`/**