-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
CronRepeatOptions.repeat is wrongly enforcing declaration of the 'key' property in TS #2642
Comments
From what I gather, the Line 41 in dab0d82
Before it's set on the scheduled job: Line 65 in dab0d82
So my guess is that the type is correct as a return value, but not for input 🤷 At least, tracing the |
Got the same issue. Is a fix expected soon? |
Running into the same issue |
Let me know if the fix solves the issue. |
🎉 This issue has been resolved in version 4.11.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
The 4.11 release, specifically the (e4e6457) commit, introduced a requirement in the
repeat
property of theCronRepeatOptions
TS type to set areadonly key
property. This is requiring us to declare the key property to add scheduled jobs. For example, if we try to add a job with the opts{ repeat: { cron: "* * * * *" } }
the TS compiler will fail with the following message:According to the documentation this property is not set by the user, but by Bull. So this type declaration should be modified to conform with the documentation.
Minimal, Working Test code to reproduce the issue.
Try sending a scheduled job without the key property in TS and the compilation error will appear.
Bull version
4.11
Additional information
Introduced by this commit:
The text was updated successfully, but these errors were encountered: