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(
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<any> { // 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') {