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
Fixed type definition of use method on AxiosInterceptorManager to match the the README #5071
Fixed type definition of use method on AxiosInterceptorManager to match the the README #5071
Conversation
I could've updated the README to have I had another idea to make use accept a single param with the following typescript interface interface AxiosInterceptorUseParams<V> {
onFulfilled?(value: V): V;
onRejected?: (error: any) => any;
options?: AxiosInterceptorOptions
} But that would've been a major breaking change, so I just incorporated the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty reasonable, thanks for the contribution.
Actually, I am incorrect, any in this instance cover null too? Let me know if I have it wrong but I am closing for now. |
Hi @jasonsaayman
If you still have any concerns, please reach out, I'd be quick to respond 👍 |
I will do, adding myself to this for now |
On the Interceptor section on README.md, where we are explaining the usage of the newly introduced
synchronous
andrunWhen
flags onAxiosInterceptorOptions
, we are passing null for the optional parameters for example:When using this in a typescript project you'll get an error saying:
The reason is we didn't specify null as a type for our interceptor handlers.
As per the
typescript
docsThis PR includes
null
as a type for the interceptor methodsFixes: #5070