-
Notifications
You must be signed in to change notification settings - Fork 710
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
Nested parameter descriptions #497
Comments
@jonchardy The best way to document a parameter object like that would be to define an interface. That also allows you to to reuse the interface. Is there a particular reason why you wouldn't define the interface externally? |
Yea, that's probably a better option. Definitely more TypeScript-y. |
@jonchardy I was just looking at one of the tests and it appears that you may be able document these as well. /**
* Test method with object param
* @param options Describing the options param
* @param options.first A description of the first property of the options param
*/
public foo(options: { first: string, second: number, third: (a: number) => number }) {
} This matches how JSDoc handles |
I'm a bit confused. This issue is closed, but it's in a project with status "to do" and what I get today is even less than the screenshot in the opening post. What do I do? |
Ah, thanks! With the information in those issues I got it working indeed :-) |
TypeDoc doesn't seem to have a way to provide comments for nested parameters. Consider the following TypeScript method:
TypeDoc generates something like this:
Ideally there would be a way to provide descriptions for all parts of the parameter (first, second, third, a, returned number) using some sort of syntax within the comment. As it stands, I suppose it's possible to provide some sort of long description for the options param which describes each component of it, but then it becomes messy having the descriptions separated from the type information.
The text was updated successfully, but these errors were encountered: