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 "promise-function-async" will cause an error #1923

Open
yang4515 opened this issue Jul 17, 2023 · 0 comments
Open

Fix "promise-function-async" will cause an error #1923

yang4515 opened this issue Jul 17, 2023 · 0 comments

Comments

@yang4515
Copy link

class MyPromise extends Promise {}

// src
const fn = (): MyPromise => {
  return new MyPromise(...)
}

// after fixing
const fn = async (): MyPromise => {
  return await new MyPromise(...)
}

After fixing, the return type is changed from MyPromise to Promise.

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

No branches or pull requests

1 participant