diff --git a/ably.d.ts b/ably.d.ts index 012de0fe3..e8bcbb3a3 100644 --- a/ably.d.ts +++ b/ably.d.ts @@ -650,7 +650,7 @@ export interface AuthOptions { * @param tokenRequestOrDetails - A valid `TokenRequest`, `TokenDetails` or Ably JWT to be used for authentication. */ callback: ( - error: ErrorInfo | string | null, + error: Error | string | null, tokenRequestOrDetails: TokenDetails | TokenRequest | string | null, ) => void, ): void; diff --git a/src/common/lib/client/auth.ts b/src/common/lib/client/auth.ts index d457ce10c..218ba4189 100644 --- a/src/common/lib/client/auth.ts +++ b/src/common/lib/client/auth.ts @@ -400,7 +400,7 @@ class Auth { let tokenRequestCallback: ( data: API.TokenParams, callback: ( - error: API.ErrorInfo | RequestResultError | string | null, + error: API.ErrorInfo | Error | RequestResultError | string | null, tokenRequestOrDetails: API.TokenDetails | API.TokenRequest | string | null, contentType?: string, ) => void,