You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using docs example to add failed event listener causes ts(2345) error (Job is unassignable to Job | undefined)
Possible fix:
worker.on('failed', (job: Job | undefined, error: Error) => {
// Do something with the return value.
});
How to reproduce.
worker.on('failed', (job: Job, error: Error) => {
// Do something with the return value.
});
Relevant log output
Аргумент типа "(job: Job, error: Error) => void" нельзя назначить параметру типа "(job: Job<any, any, string> | undefined, error: Error, prev: string) => void".
Типы параметров "job" и "job" несовместимы.
Тип "Job<any, any, string> | undefined" не может быть назначен для типа "Job<any, any, string>".
Тип "undefined" не может быть назначен для типа "Job<any, any, string>".ts(2345)
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
manast
changed the title
[Bug]: ts(2345) error on failed event listener from docs
[BetterDocs]: ts(2345) error on failed event listener from docs
Oct 11, 2024
Version
v5.18.0
Platform
NodeJS
What happened?
Using docs example to add failed event listener causes ts(2345) error (Job is unassignable to Job | undefined)
Possible fix:
How to reproduce.
Relevant log output
The text was updated successfully, but these errors were encountered: