You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When add vitest-environment-miniflare into project, the web api was contaminated with types under @types/node, calls like response.json() had type problems, I had to explicitly import { fetch } from '@cloudflare/workers-types to solve the problem, I wonder why miniflare didn't use @cloudflare/workers-types ?
The text was updated successfully, but these errors were encountered:
Hey! 👋 Make sure you're including vitest-environment-miniflare/globals in your tsconfig.json's types field. See https://legacy.miniflare.dev/testing/vitest#setup for more details. We recently announced support for a new Workers Vitest integration using Miniflare 3 and workerd. I'd encourage you to switch to that.
When add
vitest-environment-miniflare
into project, the web api was contaminated with types under @types/node, calls like response.json() had type problems, I had to explicitlyimport { fetch } from '@cloudflare/workers-types
to solve the problem, I wonder why miniflare didn't use@cloudflare/workers-types
?The text was updated successfully, but these errors were encountered: