Importing Response and Request manually from @cloudflare/workers-types
Hi, I am integrating a workers AI project onto my monorepo project
I am faced with this error in the fetch handler
I tried various ways to fix it such as import type { Reques, Response } from "@cloudflare/workers-types"
But there is no matching export for it when I run wrangler deploy.
I understand that the recommended solution is to add the type directly onto the tsconfig, but I would rather not in this case (because its a monorepo which will jeopardise some code written by others)
Are there any ways to work around this?

1 Reply
You need to have a tsconfig, or live with the IDE errors, this is how I pasted the templates
But you need the tsconfig one way or another for the transpiler to work