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

Add AxiosInterceptorOptions to d.ts #3800

Merged

Conversation

Frugghi
Copy link
Contributor

@Frugghi Frugghi commented May 17, 2021

Add the options parameter of AxiosInterceptorManager.use in index.d.ts. This fixes an issue when using axios in TypeScript where TypeScript complains when calling AxiosInterceptorManager.use with the optional third parameter.

Fixes #3733 and closes #3734

@thexeos
Copy link

thexeos commented Nov 9, 2021

This is still an issue in latest version.

@borisilic-ap
Copy link

What's the hold up on this PR? Can we get it merged?

@realamirhe
Copy link

The project still is incompatible with the type, could we please merge this PR
source code vs type definition

One question about the typing we can have an empty config in this PR I'm sure it may cause any issue with the following config based on source code or not. because they both will be undefined then.

this.handlers.push({
    // ...
    synchronous: options ? options.synchronous : false,
    runWhen: options ? options.runWhen : null
}

The code says the props are both required or the options must be falsy, but it is in contrast with this review

Anyway thanks for this great npm package, and your time, but is it possible that Axios team guide the user to get more proper PR and finally fix this issue.

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

Successfully merging this pull request may close these issues.

InterceptorManager.use type does not include the third parameter options
5 participants