Skip to content

fix: remove stale constructor interceptors from types and pool options#4994

Open
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:remove-interceptors
Open

fix: remove stale constructor interceptors from types and pool options#4994
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:remove-interceptors

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented Apr 8, 2026

This relates to...

Fixes #4993

Rationale

#3399 removed constructor interceptor support at runtime, but the public type declarations still exposed interceptors on Client, Pool, RoundRobinPool, and Agent.

That left a type/runtime mismatch: TypeScript accepted these options even though they were no longer consumed.

Changes

  • Remove interceptors from the public Client.Options, Pool.Options, RoundRobinPool.Options, and Agent.Options type declarations.
  • Remove the dead options.interceptors copying that was still present in pool constructors.
  • Update tsd coverage

Features

N/A

Bug Fixes

  • Fix the stale type surface that still advertised constructor-time interceptors after runtime support was dropped.
  • Align the public declarations with the current post-chore!: drop interceptors #3399 runtime behavior.

Breaking Changes and Deprecations

A type-level breaking change for consumers still passing these unsupported options.

Status

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.87%. Comparing base (51cc6cb) to head (44bccca).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4994   +/-   ##
=======================================
  Coverage   92.86%   92.87%           
=======================================
  Files         110      110           
  Lines       35788    35779    -9     
=======================================
- Hits        33236    33229    -7     
+ Misses       2552     2550    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Client constructor accepts typed interceptors, but never applies them at runtime

2 participants