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
The SchedulerRegistry.addCronJob method should implement the CronJob type generics:
SchedulerRegistry.addCronJob
CronJob
addCronJob<T = null, C = null>(name: string, job: CronJob<T, C>): void;
Otherwise a type error occurs when the onComplete function is defined.
onComplete
https://github.com/nestjs/schedule/blob/master/lib/scheduler.registry.ts#L50
schedulerRegistry.addCronJob
Expected not to receive a type error when onComplete callback is defined.
4.0.0
10.3.0
18.18.2
No response
The text was updated successfully, but these errors were encountered:
Would you like to create a PR for this issue?
Sorry, something went wrong.
Hey @kamilmysliwiec yeah I can put in a PR for this, no problem.
Let's track this here #1538
No branches or pull requests
Is there an existing issue for this?
Current behavior
The
SchedulerRegistry.addCronJob
method should implement theCronJob
type generics:Otherwise a type error occurs when the
onComplete
function is defined.Minimum reproduction code
https://github.com/nestjs/schedule/blob/master/lib/scheduler.registry.ts#L50
Steps to reproduce
CronJob
with anonComplete
callback defined.schedulerRegistry.addCronJob
with the job instanceExpected behavior
Expected not to receive a type error when
onComplete
callback is defined.Package version
4.0.0
NestJS version
10.3.0
Node.js version
18.18.2
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: