Skip to content

types: mark DecoratorHandler as @deprecated - #5789

Open
kilisamemarisaaa wants to merge 2 commits into
nodejs:mainfrom
kilisamemarisaaa:types/deprecated-decorator-handler
Open

types: mark DecoratorHandler as @deprecated#5789
kilisamemarisaaa wants to merge 2 commits into
nodejs:mainfrom
kilisamemarisaaa:types/deprecated-decorator-handler

Conversation

@kilisamemarisaaa

Copy link
Copy Markdown

This relates to...

Follow-up to #5707, which added @deprecated to lib/handler/decorator-handler.js (shipped in v8.10.1). No existing issue or PR tracks this — found by comparing the runtime deprecation against types/handlers.d.ts.

Rationale

DecoratorHandler is marked @deprecated at runtime since v8.10.1, but the type declaration in types/handlers.d.ts carries no @deprecated JSDoc tag and no deprecation marker anywhere in docs/. TypeScript consumers importing DecoratorHandler (or using it through the globalThis install) get no deprecation signal in their editors — the runtime and the types currently disagree about the class's status.

Changes

  • Adds a @deprecated JSDoc tag with migration guidance (Use a plain handler object instead.) to DecoratorHandler in types/handlers.d.ts, matching the runtime annotation. The tag propagates to the index.d.ts re-export and the globalThis install, so editors will show the deprecation for all import paths.

Features

N/A

Bug Fixes

N/A (types annotation only — aligns the published types with the already-shipped runtime deprecation)

Breaking Changes and Deprecations

None — this change documents an already-existing deprecation; it does not deprecate anything new or alter any runtime behavior.

Status

  • I have read and agreed to the Developer's Certificate of Origin
  • Tested (npx tsd, tsc test/imports/undici-import.ts --noEmit, tsc types/*.d.ts --noEmit — all pass; test:typescript glob step verified equivalent)
  • Benchmarked (S — not applicable)
  • Documented (S — the deprecation note itself is the change; no DecoratorHandler doc page exists, and adding one for a deprecated class seemed out of scope)
  • Review ready
  • In review
  • Merge ready

kilisamemarisaaa and others added 2 commits September 7, 2026 11:02
Co-Authored-By: EvoX <evox@evomap.ai>
Signed-off-by: kilisamemarisaaa <1798456934@qq.com>
Signed-off-by: kilisamemarisaaa <1798456934@qq.com>

Co-Authored-By: EvoX <evox@evomap.ai>
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.

1 participant