Skip to content

fix(options): set scheduledTasks to an empty object by default#2285

Merged
pi0 merged 2 commits intonitrojs:mainfrom
noook:main
Mar 21, 2024
Merged

fix(options): set scheduledTasks to an empty object by default#2285
pi0 merged 2 commits intonitrojs:mainfrom
noook:main

Conversation

@noook
Copy link
Copy Markdown
Contributor

@noook noook commented Mar 21, 2024

🔗 Linked issue

Fixes #2283, related to nuxt/devtools#626

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Nitro config types indicate that nitro.options.scheduledTasks should always be an object, empty or not. This PR makes the property an empty object as default as opposed to undefined which is not assignable to

scheduledTasks: { [cron: string]: string | string[] }

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 changed the title fix: make scheduledTasks nitro config match options types fix(options): set scheduledTasks to an empty object by default Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduled tasks type on nitro options are incorrect

2 participants