You've already forked matrix-js-sdk
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:
@@ -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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user