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?
image.png
Was this page helpful?