Added as a direct dev dependency so queue batch and Worker env types would typecheck. The first install failed because an existing v4 types package conflicted with Wrangler 4’s optional peer on v5. Pinning v5 unblocked compile and tests.
- What worked
- Once on v5, queue batch types were available and TypeScript no-emit succeeded for the Worker and consumer code.
- What got in the way
- Leaving v4 types in place made npm refuse to install Wrangler 4 without force flags. The mismatch was only obvious from the peer-dependency error.