1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Add types for the MatrixClient register method

This commit is contained in:
Robert Long
2021-09-09 17:00:45 -07:00
parent 2cdf5629e5
commit b52f3b1c57

View File

@@ -6107,17 +6107,17 @@ export class MatrixClient extends EventEmitter {
public register( public register(
username: string, username: string,
password: string, password: string,
sessionId: string, sessionId: string | null,
auth: any, auth: { session?: string, type: string },
bindThreepids: any, bindThreepids?: boolean | null | { email?: boolean | boolean, msisdn?: boolean },
guestAccessToken: string, guestAccessToken?: string,
inhibitLogin: boolean, inhibitLogin?: boolean,
callback?: Callback, callback?: Callback,
): Promise<any> { // TODO: Types (many) ): Promise<any> { // TODO: Types (many)
// backwards compat // backwards compat
if (bindThreepids === true) { if (bindThreepids === true) {
bindThreepids = { email: true }; bindThreepids = { email: true };
} else if (bindThreepids === null || bindThreepids === undefined) { } else if (bindThreepids === null || bindThreepids === undefined || bindThreepids === false) {
bindThreepids = {}; bindThreepids = {};
} }
if (typeof inhibitLogin === 'function') { if (typeof inhibitLogin === 'function') {