[TS] Passing object/data from CF Functions middleware to function handlers
I would like to setup Prisma in a functions
I have a
In my function handler I would like to use
How should I pass the
And how to type it?
_middleware.ts like:I have a
wrangler types functions/worker-configuration.d.ts generated file that looks like:In my function handler I would like to use
prisma client (type-safe) like:How should I pass the
prisma client best? Via context.env or context.data ?And how to type it?