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 {{ * z: number * }} x */functionfoo(x){}
The type of x is any. It seems multiline types are not recognized in jsdocs
There seems to be some debate about whether this is supported or not: jscs-dev/node-jscs#245 but it seems closure and some other tools support the multiline syntax
Sean Flanigan (@seanf) did not seem to help in my use-cases; would be great if this were built in without needing an explicit linter (since jsdoc technically already accepts multiline params)
rob2d can you post an example of the code you couldn't get to work? I tried Matt Bierner (@mjbvz)'s example, and after deleting the leading asterisks, the type works:
/** * @param {{ z: number }} x */functionfoo(x){x.z}
Not skipping leading asterisk is a known bug #23667. You may have found a different bug.
I found an issue with the multi-line JSDoc but I don't know if this will be here or I need to create another issue because it's related with multi-line JSDoc Types.
The bug is that if you use multi-line the type is not inferred but if I put all in one line the type is inferred.
Nathan Shively-Sanders (@sandersn) I don't understand your remark, the question is about to support multiline declaration of types and it just doesn't work... So current issue is just not 'done' 🤔
Activity
seanf commentedon Jan 19, 2018
As a workaround, it may help to delete the leading
*characters on the lines in between{{and}}. Assuming your linter will let you.rob2d commentedon Jun 15, 2018
Sean Flanigan (@seanf) did not seem to help in my use-cases; would be great if this were built in without needing an explicit linter (since jsdoc technically already accepts multiline params)
sandersn commentedon Jun 15, 2018
rob2d can you post an example of the code you couldn't get to work? I tried Matt Bierner (@mjbvz)'s example, and after deleting the leading asterisks, the type works:
Not skipping leading asterisk is a known bug #23667. You may have found a different bug.
weswigham commentedon Nov 6, 2018
AFAIK this is fixed now.
nomaed commentedon Jan 4, 2019
Wesley Wigham (@weswigham) is it?
With VSCode Version 1.30.1:
weswigham commentedon Jan 4, 2019
AFAIK the syntax highlighting is still waiting on atom/language-javascript#515
nomaed commentedon Jan 4, 2019
Yes, I found this link a bit after asking about it. Thanks!
RodrigoTomeES commentedon Jan 8, 2024
hi
I found an issue with the multi-line JSDoc but I don't know if this will be here or I need to create another issue because it's related with multi-line JSDoc Types.
The bug is that if you use multi-line the type is not inferred but if I put all in one line the type is inferred.
Screen.Recording.2024-01-08.at.09.17.20.mov
sandersn commentedon Jan 9, 2024
Please do file a new bug. This one tracked the addition of the feature, not bugs with it.
When you do, can you provide the text of your program or a link to the typescript playground with your program included?
loganmzz commentedon Oct 29, 2025
Nathan Shively-Sanders (@sandersn) I don't understand your remark, the question is about to support multiline declaration of types and it just doesn't work... So current issue is just not 'done' 🤔
RyanCavanaugh commentedon Oct 29, 2025
Please do file a new bug