mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-18 16:34:27 -04:00
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>
This commit is contained in:
+1
-2
@@ -48,8 +48,7 @@ export type Session = { _id: string; token: string; user_id: string } | string;
|
||||
* Events provided by the client
|
||||
*/
|
||||
export type Events = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
error: [error: any];
|
||||
error: [error: Error];
|
||||
|
||||
connected: [];
|
||||
connecting: [];
|
||||
|
||||
Reference in New Issue
Block a user