cloudflare / cloudflare/cloudflare-docs
Example rate limit queue article gives a type error with latest wrangler typegen
- Dominant language
- MDX
- Stars
- 5.2k
- Forks
- 16.7k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 337
Description
### Existing documentation URL(s)
https://developers.cloudflare.com/queues/tutorials/handle-rate-limits/#related-resources
### What changes are you suggesting?
If you follow this guide now you'll get a type error on the queue consumer function
`Type '(batch: MessageBatch, env: Env) => Promise' is not assignable to type 'ExportedHandlerQueueHandler'.
Types of parameters 'batch' and 'batch' are incompatible.
Type 'MessageBatch' is not assignable to type 'MessageBatch'.
Type 'unknown' is not assignable to type 'Message'.`
### Additional information
I couldn't find any clear explanation of how to get type checking to work for queue messages easily.
Contributor guide
Assessment
This issue has not been assessed yet.