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

fix(ts): action can be an async function #1157

Merged
merged 1 commit into from
Feb 2, 2020

Conversation

prokopsimek
Copy link
Contributor

Since we can use parseAsync for async functions so the action can be asynchronous.

related to #806

Pull Request

Problem

Promise returned in function argument where a void return was expected.eslint(@typescript-eslint/no-misused-promises)

Solution

add Promise<void> to the action argument

  • TypeScript typings

ChangeLog

@shadowspawn
Copy link
Collaborator

Thanks.

Would you like to add an example usage to typings/commander-tests.ts? (This file is compiled to check for errors, but not run.)

@prokopsimek
Copy link
Contributor Author

@shadowspawn Hi, I'll add the test tomorrow :)

Since we can use `parseAsync` for async functions so the action can be asynchronous.

related to tj#806
@shadowspawn
Copy link
Collaborator

shadowspawn commented Jan 30, 2020

Thanks @prokopsimek
We have changes for a v5 underway, but I am thinking we will release this in a v4 patch too as was not as intended ( I missed the TypeScript changes to the action handler when adding .parseAsync()).

@shadowspawn

This comment has been minimized.

Copy link
Collaborator

@shadowspawn shadowspawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced by running eslint on command line (warnings within editor somewhat confused).

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@shadowspawn shadowspawn merged commit cb54d5f into tj:develop Feb 2, 2020
@prokopsimek prokopsimek deleted the patch-2 branch February 2, 2020 08:59
@shadowspawn
Copy link
Collaborator

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

Successfully merging this pull request may close these issues.

3 participants