We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
isInsideCallback
err
error
I'm using no-promise-in-callback rule and defining top-level function with err (or error) parameter.
no-promise-in-callback
Once I use Promise.resolve outside of return context, it reports an error.
Promise.resolve
return
Enable no-promise-in-callback and check this code:
function fn(err) { return { promise: Promise.resolve(err) }; }
Expected behavior: no warning inside functions top-level functions, methods or static methods.
Actual behavior: warnings that are confusing at first. Check out my actual code example:
static err<E>(err: NonNullable<E>): AsyncResult<never, E> { return new AsyncResult(Promise.resolve(Result.err(err))); }
[Please fill this in if you are submitting a bug report]
18
8.45.0
6.1.1
Probably, this line is the root cause.
The text was updated successfully, but these errors were encountered:
AsyncResult
PromiseLike
No branches or pull requests
Description
I'm using
no-promise-in-callback
rule and defining top-level function witherr
(orerror
) parameter.Once I use
Promise.resolve
outside ofreturn
context, it reports an error.Steps to Reproduce
Enable
no-promise-in-callback
and check this code:Expected behavior: no warning inside functions top-level functions, methods or static methods.
Actual behavior: warnings that are confusing at first. Check out my actual code example:
Versions
[Please fill this in if you are submitting a bug report]
18
8.45.0
6.1.1
Additional Information
Probably, this line is the root cause.
The text was updated successfully, but these errors were encountered: