diff --git a/src/client.ts b/src/client.ts index 894c5a09d..a1ac2685a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -6107,17 +6107,17 @@ export class MatrixClient extends EventEmitter { public register( username: string, password: string, - sessionId: string, - auth: any, - bindThreepids: any, - guestAccessToken: string, - inhibitLogin: boolean, + sessionId: string | null, + auth: { session?: string, type: string }, + bindThreepids?: boolean | null | { email?: boolean | boolean, msisdn?: boolean }, + guestAccessToken?: string, + inhibitLogin?: boolean, callback?: Callback, ): Promise { // TODO: Types (many) // backwards compat if (bindThreepids === true) { bindThreepids = { email: true }; - } else if (bindThreepids === null || bindThreepids === undefined) { + } else if (bindThreepids === null || bindThreepids === undefined || bindThreepids === false) { bindThreepids = {}; } if (typeof inhibitLogin === 'function') {