this is a type-only change that allows callbacks to return a promise. this was already possible before migrating the codebase to TypeScript, but it wasn't reflected correctly in our typings.
Related Issue
N/A
Motivation and Context
while working on the @nestjs/schedule PR to upgrade to cron@3.x, I got a SonarLint warning about passing an async function to onTick.
How Has This Been Tested?
added test case with async onTick.
Screenshots (if appropriate):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.
[ ] If my change introduces a breaking change, I have added a ! after the type/scope in the title (see the Conventional Commits standard).
Description
this is a type-only change that allows callbacks to return a promise. this was already possible before migrating the codebase to TypeScript, but it wasn't reflected correctly in our typings.
Related Issue
N/A
Motivation and Context
while working on the
@nestjs/schedule
PR to upgrade tocron@3.x
, I got a SonarLint warning about passing an async function to onTick.How Has This Been Tested?
added test case with async
onTick
.Screenshots (if appropriate):
Types of changes
Checklist:
!
after the type/scope in the title (see the Conventional Commits standard).