-
Notifications
You must be signed in to change notification settings - Fork 700
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
The right way to document param of a param function #2683
Comments
I have no idea how that used to work in 0.23... In your first example, the /**
* ... irrelevant ...
*/
export function action (
/**
* A function to produce a side effect...
* @param data - Data object...
* @param i - Position...
*/
f: (data: Data, i: number) => void
): void; With this, the This unfortunately doesn't quite work correctly in 0.26.6 because I forgot to check for Personally, I try to write code which doesn't need comments on parameters of callbacks... TypeDoc's "everything is documented" validation option actually explicitly excludes documenting parameters & properties of types on parameters of functions. If the type is complicated enough to need documentation there, it probably ought to be extracted to a type alias... |
Is this work in progress? |
4295105 fixed it, will be included in the next release as shown in the milestone. I plan to release that this weekend |
Search terms
argument description, parameter description, parameter of an arrow function, lambda
Question
Previously (with version 0.23.x) I was using the following doc comment:
Now (with 0.26.x) I noticed that
data
andi
are left undescribed.Looks like I have to change how I document them:
Was this a conscious change or an omission?
I don't quite like how this looks in my code - harder to grasp.
So, I wonder whether it is the idiomatic way to document args of the arg function.
Support in VSCode:
@param
s show up when I hover overf
in the implementation;The second example might be preferential for the client code, but the support is not ideal, so I don't see significant advantage there.
The text was updated successfully, but these errors were encountered: