-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: set @returns description for void async methods automatically #17751
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
build: set @returns description for void async methods automatically #17751
Conversation
85ca004
to
80b9745
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it; I think "action" is a broad enough term to work for everything
} | ||
const typeString = getTypeOfFunctionLikeDoc(doc); | ||
if (!doc.returns && typeString === 'Promise<void>') { | ||
doc.returns = {description: 'Promise that resolves when the action is complete.'}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do
Promise that resolves when the action completes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds better.
Automatically sets the `@returns` tag description for asynchronous methods which do not return any value. This is a proposal based on the commit in: angular#17723 (comment)
80b9745
to
6093089
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Automatically sets the
@returns
tag description for asynchronousmethods which do not return any value.
This is a proposal based on the commit in:
#17723 (comment)
This processor added a
@returns
to, so it seems like it can be useful. Though I'm afraid we need a more generic return description? i.e. is it always an action? @jelbourn