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

Why does FastifyRequest need HttpRequest as an argument? #47

Open
yaharga opened this issue Oct 26, 2021 · 1 comment
Open

Why does FastifyRequest need HttpRequest as an argument? #47

yaharga opened this issue Oct 26, 2021 · 1 comment

Comments

@yaharga
Copy link

yaharga commented Oct 26, 2021

In the ambient type, why is HttpRequest needed as an argument? How is it used and why?

declare module 'fastify' {
  interface FastifyRequest<HttpRequest> {
    url(): url.URL;
    url<K extends keyof url.URL>(key: K): url.URL[K];
  }
}

It's causing FastifyRequest to require an argument.

@therealsamf
Copy link
Owner

@yaharga To be honest I haven't touched this library in years and wasn't aware anyone actually used it!

I've been out of the game in terms of fastify for a long time now and this library probably needs an overhaul. I'd recommend using fastify-url-data over this library for the time being because I can't promise I'm going to maintain this library going forward.

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

No branches or pull requests

2 participants