docascode / type2docfx

A tool to convert json format output from TypeDoc to universal reference model for DocFx to consume.
Apache License 2.0
17 stars 10 forks source link

Exception type is not required for @throws tag, description is enough. #5

Closed fvoronin closed 4 years ago

fvoronin commented 6 years ago

By the JSDoc Spec @throws has syntax:

Type2docfx (v0.9.79) works only with last of them, and the first two cause an error. 😞

> type2docfx api.json .\out

...\type2docfx\dist\jsonTraverse.js:347
    if (tokens.length >= 3) {
               ^

TypeError: Cannot read property 'length' of null
    at extractException (...\type2docfx\dist\jsonTraverse.js:347:16)
    at ...\type2docfx\dist\jsonTraverse.js:231:66
    at Array.map (<anonymous>)
    at extractInformationFromSignature (...\type2docfx\dist\jsonTraverse.js:231:40)
    at traverse (...\type2docfx\dist\jsonTraverse.js:94:9)
    at ...\type2docfx\dist\jsonTraverse.js:207:17
    at Array.forEach (<anonymous>)
    at traverse (...\type2docfx\dist\jsonTraverse.js:205:23)
    at ...\type2docfx\dist\jsonTraverse.js:210:17
    at Array.forEach (<anonymous>)
fvoronin commented 6 years ago

Please, look at the example gist

qinezh commented 4 years ago

Closed as the issue no longer exist in latest version.