-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline JSDoc tags don't work in comments that start with plain text #41463
Comments
@NoelAbrahams you were interested in seeing this work, I believe. I marked it Awaiting More Feedback because I don't remember this usage being widespread in the earlier survey I did. However, the fix is likely quite contained to the central JSDoc parsing state machine, so it might be easy to fix even if it's not widely used. |
Thanks for following up on this. I certainly see the fact of The C# We have a common use case for this where there are constructor option objects that create a certain type, eg interface Foo {
}
/** Creates an instance of @see Foo */
type FooOptions = { bar: string; }; There is no easy way to break up the comment into a newline in a meaningful way. |
Yep, JSDoc is subtly different from C#, and the spec tag for that is |
TS mostly supports inline tags, even though they're not standard, but the implementation is quirky since it's best-effort, not really a committed feature. Specifically, an inline tag works if the line starts with a non-inline tag, or is a line following such a line:
or
This is all down to the state machine we use for parsing, so it could be improved to also support
Based on discussion in #5802
The text was updated successfully, but these errors were encountered: