Skip to content

Commit c0bb437

Browse files
committed
fix(typings): allow generic Error in authCallback callback
1 parent 220646b commit c0bb437

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ably.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ export interface AuthOptions {
650650
* @param tokenRequestOrDetails - A valid `TokenRequest`, `TokenDetails` or Ably JWT to be used for authentication.
651651
*/
652652
callback: (
653-
error: ErrorInfo | string | null,
653+
error: Error | string | null,
654654
tokenRequestOrDetails: TokenDetails | TokenRequest | string | null,
655655
) => void,
656656
): void;

src/common/lib/client/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class Auth {
400400
let tokenRequestCallback: (
401401
data: API.TokenParams,
402402
callback: (
403-
error: API.ErrorInfo | RequestResultError | string | null,
403+
error: API.ErrorInfo | Error | RequestResultError | string | null,
404404
tokenRequestOrDetails: API.TokenDetails | API.TokenRequest | string | null,
405405
contentType?: string,
406406
) => void,

0 commit comments

Comments
 (0)