Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for TypeScript types inside JsDoc? #282

Open
timonson opened this issue Jun 21, 2022 · 5 comments
Open

Support for TypeScript types inside JsDoc? #282

timonson opened this issue Jun 21, 2022 · 5 comments

Comments

@timonson
Copy link

Is it somehow possible to convert JSDoc including the supported types by TypeScript?

For example:

/**
 * appendChild.
 * @param {Element} el
 * @return {(...nodesOrStrings: (Node|string)[]) => void}
 */
export function append(el) {
  return (...nodesOrStrings) => el.append(...nodesOrStrings);
}

I am getting the following error here:

JSDOC_ERROR: ERROR: Unable to parse a tag's type expression...

Thanks!

@nicolas-tesla-x
Copy link

Did you find a solution?

@timonson
Copy link
Author

No

@gaurav-ingalkar
Copy link

is typescript even supported ? I dont see anything that enables generating docs for typescript files in the documentation. can you show how you are running it ? for me it says "JSDOC_ERROR: There are no input files to process" when I run it for typescript files

@75lb
Copy link
Member

75lb commented Aug 26, 2024

Personally, I don't use Typescript (nor intend to) so I don't have a quick solution but as a general rule, if you see JSDOC_ERROR then the problem is within jsdoc:

JSDOC_ERROR: ERROR: Unable to parse a tag's type expression...

jsdoc2md sits downstream of jsdoc output, so first you need to get your code working in jsdoc.. once you're happy with what jsdoc generates, give it another go in jsdoc2md.. I've added some labels to try and attract more feedback..

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

No branches or pull requests

5 participants