Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requestMiddleware does not have a supported type that can be exported (RequestExtendedInit) #421

Closed
rcwestlake opened this issue Dec 20, 2022 · 3 comments · Fixed by #812

Comments

@rcwestlake
Copy link

When defining middleware, I cannot get access to the correct type RequestExtendedInit. I think RequestExtendedInit should be able to be exported.

export declare type RequestMiddleware<V extends Variables = Variables> = (request: RequestExtendedInit<V>) => RequestExtendedInit | Promise<RequestExtendedInit>;

image
image

@rcwestlake rcwestlake changed the title requestMiddleware does not have a supported type that can be exported (RequestExtendedInit requestMiddleware does not have a supported type that can be exported (RequestExtendedInit) Dec 20, 2022
@SzyVsSi
Copy link

SzyVsSi commented Jan 10, 2023

Have you found a temporary workaround for this perhaps?

Edit: For now creating the middleware function as an arrow function does the job.

image

@rocketana
Copy link

I encountered the same problem: RequestExtendedInit type is not exported. For now I use any as a type for my middleware's request.

image

@boardofchris
Copy link

Same issue for me with version 5.1.0. Reverted to 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants