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
Type 'string' is not assignable to type 'HttpMethod'.ts(2345) #3168
Comments
This is actually a bug in your implementation and not of undici tylings. Meaning that you are not narrowing down the type to an intersection of HTTPmethod. You have to typecast it to any, or typecast it to HTTPMethod, or the interface were you defined method as string to HTTPMethod. If we set it to string, it would mean we accept any method name, even custom ones, like |
Can we change the type of
method
to just regular string? I keep getting this ts warning.The text was updated successfully, but these errors were encountered: