Skip to content

fix(types): keep redis-errors out of public error declarations - #2322

Merged
PavelPashov merged 1 commit into
redis:mainfrom
PavelPashov:fix/redis-errors-types
Dec 2, 2026
Merged

PavelPashov merged 1 commit into
redis:mainfrom
PavelPashov:fix/redis-errors-types

Conversation

@PavelPashov

Copy link
Copy Markdown
Contributor

Fixes #2319

WatchError and MaxRetriesPerRequestError extended AbortError imported from redis-errors, so their published .d.ts files imported an untyped package. Consumers without @types/redis-errors lost message, stack, command, and args on these errors.

Re-declare AbortError in lib/errors/AbortError.ts with an explicit type so the emitted declarations are self-contained. The runtime value is still the redis-errors class, so instanceof behavior is unchanged.

WatchError and MaxRetriesPerRequestError extended AbortError imported
from redis-errors, so their published .d.ts files imported an untyped
package. Consumers without @types/redis-errors lost message, stack,
command, and args on these errors.

Re-declare AbortError in lib/errors/AbortError.ts with an explicit type
so the emitted declarations are self-contained. The runtime value is
still the redis-errors class, so instanceof behavior is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T13:50:27.948804Z 809f68b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@PavelPashov
PavelPashov merged commit 754d967 into redis:main Dec 2, 2026
21 checks passed
@PavelPashov
PavelPashov deleted the fix/redis-errors-types branch December 2, 2026 10:39
github-actions Bot pushed a commit that referenced this pull request Dec 2, 2026
## [6.1.1](v6.1.0...v6.1.1) (2026-12-02)

### Bug Fixes

* exclude all subscriber-mode commands from auto pipelines ([#2311](#2311)) ([466f6be](466f6be))
* keep the current db when Redis rejects a SELECT ([#2308](#2308)) ([0516749](0516749)), closes [#2307](#2307)
* reject length-prefixed strings that are not followed by CRLF ([#2300](#2300)) ([77f88ee](77f88ee)), closes [#1172](#1172)
* **types:** accept binary keys in scan streams ([#2296](#2296)) ([1c1fd3c](1c1fd3c))
* **types:** keep redis-errors out of public error declarations ([#2322](#2322)) ([754d967](754d967))
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 6.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS7016: Could not find a declaration file for module 'redis-errors' (since 6.1.0)

2 participants