[PR #125] fix: Specify argument in Client "error" event to be Error instead of any. #121

Open
opened 2026-02-16 12:27:04 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stoatchat/javascript-client-sdk/pull/125
Author: @Taureon
Created: 2/12/2026
Status: 🔄 Open

Base: mainHead: patch-1


📝 Commits (1)

  • 4e25a1b Client.ts: change Events.error callback argument from any to Error

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 src/Client.ts (+1 -2)

📄 Description

I don't see a reason for this to be any, so I am updating this to be an Error instead for the type system.

Only location where the "error" event was emitted (I think): https://github.com/stoatchat/javascript-client-sdk/blob/cdf406094b9b81c3ff285b14ed97fb3d138e3061/src/Client.ts#L263

Callback argument type where that "error" event comes from: https://github.com/stoatchat/javascript-client-sdk/blob/cdf406094b9b81c3ff285b14ed97fb3d138e3061/src/events/EventClient.ts#L70


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stoatchat/javascript-client-sdk/pull/125 **Author:** [@Taureon](https://github.com/Taureon) **Created:** 2/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`4e25a1b`](https://github.com/stoatchat/javascript-client-sdk/commit/4e25a1b2331535a6f4cf034a516388499aa2af7f) Client.ts: change Events.error callback argument from any to Error ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/Client.ts` (+1 -2) </details> ### 📄 Description I don't see a reason for this to be `any`, so I am updating this to be an `Error` instead for the type system. Only location where the `"error"` event was emitted (I think): https://github.com/stoatchat/javascript-client-sdk/blob/cdf406094b9b81c3ff285b14ed97fb3d138e3061/src/Client.ts#L263 Callback argument type where that `"error"` event comes from: https://github.com/stoatchat/javascript-client-sdk/blob/cdf406094b9b81c3ff285b14ed97fb3d138e3061/src/events/EventClient.ts#L70 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 12:27:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/javascript-client-sdk#121