mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-04 14:56:16 -05:00
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:
@@ -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",
|
||||
`/**
|
||||
|
||||
Reference in New Issue
Block a user