Skip to content

fix(types): add handlers to AxiosInterceptorManager interface#5551

Merged
jasonsaayman merged 7 commits intoaxios:v1.xfrom
tiborpilz:add-interceptor-handler-types
Dec 30, 2025
Merged

fix(types): add handlers to AxiosInterceptorManager interface#5551
jasonsaayman merged 7 commits intoaxios:v1.xfrom
tiborpilz:add-interceptor-handler-types

Conversation

@tiborpilz
Copy link
Contributor

This PR adds the handlers property to the AxiosInterceptorManager interface. The missing property has been an issue in correctly setting up interceptor tests, as described in #3792

@tiborpilz tiborpilz force-pushed the add-interceptor-handler-types branch from 21edba8 to 63ab2f1 Compare February 25, 2023 14:52
@tiborpilz tiborpilz force-pushed the add-interceptor-handler-types branch from 63ab2f1 to 54354d9 Compare March 24, 2023 16:11
Copy link

@tiagobarros01 tiagobarros01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any predictions for progress on this PR?

@tiborpilz tiborpilz force-pushed the add-interceptor-handler-types branch from 54354d9 to 6c967e3 Compare May 23, 2023 10:45
@bugkarma
Copy link

bugkarma commented Oct 4, 2023

Ran into this issue trying to read handlers property. Will this be merged?

@faizanallex
Copy link

Waiting

@jasonsaayman
Copy link
Member

@tiborpilz is it possible for you to resolve conflicts?

@jasonsaayman jasonsaayman self-assigned this Dec 6, 2024
@jasonsaayman jasonsaayman self-requested a review December 6, 2024 10:03
@jasonsaayman jasonsaayman removed their request for review December 6, 2024 11:55
@jasonsaayman jasonsaayman removed their assignment Dec 6, 2024
@tiborpilz tiborpilz force-pushed the add-interceptor-handler-types branch from 6c967e3 to 6f1a291 Compare December 7, 2024 09:47
@tiborpilz
Copy link
Contributor Author

@jasonsaayman sure :)

@jasonsaayman jasonsaayman self-assigned this Dec 8, 2024
@jasonsaayman jasonsaayman self-requested a review December 8, 2024 16:49
@jasonsaayman jasonsaayman added this to the v1.8.0 milestone Dec 8, 2024
@tiborpilz tiborpilz force-pushed the add-interceptor-handler-types branch from 6f1a291 to c058c41 Compare December 17, 2024 15:57
@tiborpilz tiborpilz force-pushed the add-interceptor-handler-types branch from c058c41 to 2504ccf Compare December 19, 2024 15:59
@jasonsaayman jasonsaayman removed their assignment Dec 21, 2024
@jasonsaayman jasonsaayman removed this from v1.9.0 Apr 25, 2025
@jasonsaayman jasonsaayman removed this from the v1.9.0 milestone Apr 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the missing handlers property to the AxiosInterceptorManager interface to resolve testing issues where direct access to interceptor handlers was not available through the TypeScript definitions.

Key Changes:

  • Introduces new type aliases (AxiosInterceptorFulfilled, AxiosInterceptorRejected) to reduce duplication
  • Adds the AxiosInterceptorHandler interface to represent individual interceptor handlers
  • Exposes the handlers array property in AxiosInterceptorManager

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
index.d.ts Adds type aliases for interceptor callbacks, defines handler structure, and exposes handlers array in the ESM type definitions
index.d.cts Mirrors the changes from index.d.ts in the CommonJS type definitions

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jasonsaayman jasonsaayman added commit::fix The PR is related to a bugfix type::breaking The PR introduces breaking changes pr::fix and removed priority::medium A medium priority pr::types commit::fix The PR is related to a bugfix labels Nov 6, 2025
@jasonsaayman jasonsaayman merged commit 8d1271b into axios:v1.x Dec 30, 2025
11 checks passed
@jasonsaayman jasonsaayman removed the type::breaking The PR introduces breaking changes label Dec 30, 2025
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.

8 participants