Skip to content

Commit 2c3d0c5

Browse files
authored
fix: Specify argument in Client "error" event to be Error instead of any. (#125)
Client.ts: change Events.error callback argument from any to 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>
1 parent ed6ee06 commit 2c3d0c5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/Client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ export type Session = { _id: string; token: string; user_id: string } | string;
4848
* Events provided by the client
4949
*/
5050
export type Events = {
51-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
52-
error: [error: any];
51+
error: [error: Error];
5352

5453
connected: [];
5554
connecting: [];

0 commit comments

Comments
 (0)