Comment syntax for JSDoc #120
jaredcwhite
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
My first thoughts is that instead of trying to find a way to essentially escape JSDoc comments in a ruby syntax, perhaps it would be better to create a yard filter that transpiles yard documentation into jsdoc syntax. |
Beta Was this translation helpful? Give feedback.
1 reply
-
@rubys I could be wrong, but I think comments don't end up in the AST handled by filters. Seems to be done at the parser level in |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've started playing around with JSDoc comments in a library I've built with Ruby2JS and it's nice that they're similar to YARD, and what's cool is I can easily generate TypeScript definitions without actually writing TS.
The only thing that's a little iffy is the syntax you have to use. Essentially my code has to look like this:
In order to get this:
I'm thankful that kind of multiline commenting does work in the Ruby > JS transpilation, but I'm wondering if there's anything else we can do to make it more seamless. Maybe something like this where it's just JS comment syntax embedded within?
Any thoughts @rubys ?
Beta Was this translation helpful? Give feedback.
All reactions