Skip to content
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

Support for @throws #1045

Closed
1 task done
alexewerlof opened this issue Jun 5, 2019 · 8 comments
Closed
1 task done

Support for @throws #1045

alexewerlof opened this issue Jun 5, 2019 · 8 comments
Milestone

Comments

@alexewerlof
Copy link

Problem

jsdocs has a @throws tag that is very useful since any function can @return or @throw. I don't see any reference to this tag in supported tags or the tsdocs declaration reference. Is this a feature that is intentionally avoided? In that case what is the preferred way to document the exceptions that a function throws? If not, is it on the roadmap?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 6, 2019

TypeDoc will render any tag you pass by default, even if we don't explicitly support it. #952 (comment)

@alexewerlof
Copy link
Author

Yes, I saw that in the rendered page (smart strategy) but I would really like how JSDocs gives them a special place in the output. To me, the @throws is as vital as @returns because they both specify what is the outcome of calling a function.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 7, 2019

Fair enough, that should be a fairly simple change to make in the theme, I don't think it would even require any changes to TypeDoc proper.

@aciccarello
Copy link
Collaborator

I think we should hold off until microsoft/tsdoc#171 is resolved since it can already be handled as a generic tag. My initial inclination is that it is not necessary.

@aciccarello
Copy link
Collaborator

Update: tsdoc is adding @throws as a standard block text tag.

@officialpiyush
Copy link

Waiting 👍

@Gerrit0 Gerrit0 added this to the TSDoc milestone Jun 18, 2021
@MithileshHinge
Copy link

Need this 👍🏽

@sebsonjura
Copy link

waiting as well ;) can we haz it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants