Bug Report
Current Behavior
EnqueueJobOptions's retry is configured (using zod) to take 1 to 10 options – that is, it does not allow an empty array. This is correctly enforced at runtime and leads to an error message "body/retry must NOT have fewer than 1 items" if violated. However, the type of retry does not reflect that retry needs to contain at least one option.
Expected behavior/code
The type of EnqueueJobOptions retry indicates that at least one option needs to be provided.
Environment
- Quirrel version: 1.14.1
- Node/npm version: v18.18.0
Possible Solution
The zod documentation clearly indicates for .min/.max that
Unlike .nonempty() these methods do not change the inferred type.
so we could use the .nonempty() modifier in addition or instead of of the .min.
Bug Report
Current Behavior
EnqueueJobOptions's retry is configured (using zod) to take 1 to 10 options – that is, it does not allow an empty array. This is correctly enforced at runtime and leads to an error message "body/retry must NOT have fewer than 1 items" if violated. However, the type of retry does not reflect that retry needs to contain at least one option.
Expected behavior/code
The type of EnqueueJobOptions retry indicates that at least one option needs to be provided.
Environment
Possible Solution
The zod documentation clearly indicates for .min/.max that
so we could use the .nonempty() modifier in addition or instead of of the .min.