You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like it's trying to parse TypeScript as if it was Javascript. (since as I go about changing the file replacing the typescript syntax by js syntax, it complains about the next typescript specific token).
TSDOC v0.0.4
TSDoc Generating doc...
TSDoc Done.
exec error: Error: Command failed:
/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3872
throw e;
^
Error: Line 3: Unexpected reserved word
at throwError (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1156:21)
at throwUnexpected (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1204:17)
at parsePrimaryExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1567:16)
at /usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3609:38
at trackLeftHandSideExpressionAllowCall (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3504:61)
at parsePostfixExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1703:20)
at /usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3609:38
at parseUnaryExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1784:16)
at /usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3609:38
at parseMultiplicativeExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1790:20)
The text was updated successfully, but these errors were encountered:
After I looked at the dependencies from your tsdoc's package.json and discovered it asks for jsdoc >= 3.2.0, I checked my jsdoc (globally installed) version, it was 3.3.0-alpha1. I removed it and installed version 3.2.0.
It still gives me an error which indicates that it is trying to parse TS as if it was JS. But the output is quite differente and can be seen on this gist
Me again, long time no see, huh? I think I found the issue. It's here. The problem is: when using commentsOnly: true, if there is no comment in a file, it leaves the source as is. I think, in this case, the source should be set to an empty string.
svallory
pushed a commit
to tscontrib/TSDoc
that referenced
this issue
Nov 18, 2013
Looks like it's trying to parse TypeScript as if it was Javascript. (since as I go about changing the file replacing the typescript syntax by js syntax, it complains about the next typescript specific token).
tsdoc.json
docs.ts
output
The text was updated successfully, but these errors were encountered: