Skip to content

Scheduled tasks type on nitro options are incorrect #2283

@noook

Description

@noook

Environment

Nitro 2.9

Reproduction

— (I'll do the PR)

Describe the bug

https://github.com/unjs/nitro/blob/8a62e7dbaeeffb6dff533c7000aba51a5c85e479/src/types/nitro.ts#L342

The types are incorrect, it should be

 scheduledTasks?:  { [cron: string]: string[] }; 

I think maybe of having to handle the undefined case when we have no scheduled tasks, we could just make this property be an empty object as default (as it's assignable).

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions