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
@param and @returns should ignore up to two characters of leading whitespace between a * beginning a comment line and an @ beginning a javadoc annotation.
(Or, at the bare minimum, there should be a boldface warning in the docs and some kind of lint so such a subtle typo can't slip in unnoticed.)
Actual Behavior
When I tried to use @param and @returns to document function signatures in interface declarations, I kept getting them passing through as literals.
I wound up utterly convinced that there was a bug in the aspect of the parser which dealt with what subset of javadoc comments were supported and it was only while minimizing the testcase to report it here that I realized it wasn't actually a case of "@param and @returns are broken inside interface definitions" but rather the leading space I'd added so they visually lined up with the text on the /** line.
Steps to reproduce the bug
Install TypeDoc on top of Using TypeScript 3.7.4 (what I got when I asked npm for the latest versions)
Put the following in test.ts in an empty folder:
interfaceTestInterface{/** Function description * * @param scope Test description. * @returns Test description. */testFunc(scope: string): boolean;}
Run rm -rf docs; typedoc --out docs test.ts with the working directory set to the folder containing test.ts.
Backspacing away one character of whitespace before each @ will result in it working, but you have to know to do that and it's easy for it to slip back in if something like Vim is handling indentation and line-wrapping within comments.
Environment
Typedoc version: 0.16.1
Node.js version: v8.16.0
OS: Kbuntu 16.04.6 LTS
The text was updated successfully, but these errors were encountered:
Expected Behavior
@param
and@returns
should ignore up to two characters of leading whitespace between a*
beginning a comment line and an@
beginning a javadoc annotation.(Or, at the bare minimum, there should be a boldface warning in the docs and some kind of lint so such a subtle typo can't slip in unnoticed.)
Actual Behavior
When I tried to use
@param
and@returns
to document function signatures ininterface
declarations, I kept getting them passing through as literals.I wound up utterly convinced that there was a bug in the aspect of the parser which dealt with what subset of javadoc comments were supported and it was only while minimizing the testcase to report it here that I realized it wasn't actually a case of "
@param
and@returns
are broken insideinterface
definitions" but rather the leading space I'd added so they visually lined up with the text on the/**
line.Steps to reproduce the bug
test.ts
in an empty folder:rm -rf docs; typedoc --out docs test.ts
with the working directory set to the folder containingtest.ts
.Backspacing away one character of whitespace before each
@
will result in it working, but you have to know to do that and it's easy for it to slip back in if something like Vim is handling indentation and line-wrapping within comments.Environment
The text was updated successfully, but these errors were encountered: