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
This was working fine in the Miniflare 1.x version I was using, but upon updating to version 2.4 it seems the type definition no longer includes the Request (and other things like Response) leading to an error like this in Typescript:
I am able to import them directly from @miniflare/core however, import { Request, Response } from '@miniflare/core'
The text was updated successfully, but these errors were encountered:
Hey! 👋 Thanks for raising this. As you note, the correct thing to do here is import Response from @miniflare/core. Didn't realise there were still examples using Miniflare 1's imports. Will get this fixed soon. 👍
Hey! I've just released version 2.5.0 with a fix for this. Request, Response and RequestInfo/RequestInit types are now exported from miniflare. Please let me know if you have any other issues.
In the Miniflare examples there's a code snippet that imports Request from the miniflare package:
https://miniflare.dev/core/fetch#dispatching-events
This was working fine in the Miniflare 1.x version I was using, but upon updating to version 2.4 it seems the type definition no longer includes the Request (and other things like Response) leading to an error like this in Typescript:
![image](https://user-images.githubusercontent.com/1740731/168143675-82f64d9d-4947-4e70-b205-c4c4566b6c0d.png)
I am able to import them directly from @miniflare/core however,
import { Request, Response } from '@miniflare/core'
The text was updated successfully, but these errors were encountered: