Skip to content

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

Open
Taureon wants to merge 1 commit intostoatchat:mainfrom
Taureon:patch-1
Open

fix: Specify argument in Client "error" event to be Error instead of any.#125
Taureon wants to merge 1 commit intostoatchat:mainfrom
Taureon:patch-1

Conversation

@Taureon
Copy link

@Taureon Taureon commented Feb 12, 2026

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):

this.events.on("error", (error) => this.emit("error", error));

Callback argument type where that "error" event comes from:

error: [error: Error];

Only location where the "error" event was emitted:
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/main/src/events/EventClient.ts#L70

Signed-off-by: Taureon <45183108+Taureon@users.noreply.github.com>
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