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: allow callbacks to return a promise #733

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

sheerlox
Copy link
Collaborator

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 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):

image

Types of changes

  • 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:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • 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).

@sheerlox sheerlox added the type:bug Bug reports and bug fixes label Oct 19, 2023
@sheerlox sheerlox self-assigned this Oct 19, 2023
@sheerlox sheerlox merged commit 8dd8b75 into kelektiv:main Oct 19, 2023
11 checks passed
@sheerlox sheerlox deleted the fix/callbacks-promise-return-type branch October 19, 2023 17:20
ncb000gt pushed a commit that referenced this pull request Oct 19, 2023
## [3.1.3](v3.1.2...v3.1.3) (2023-10-19)

### 🐛 Bug Fixes

* allow callbacks to return a promise ([#733](#733)) ([8dd8b75](8dd8b75))

### ⚙️ Continuous Integrations

* **renovate:** update configuration ([#732](#732)) [skip ci] ([2ff9c6e](2ff9c6e))
@ncb000gt
Copy link
Member

🎉 This PR is included in version 3.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sheerlox sheerlox removed their assignment Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released type:bug Bug reports and bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants