You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-05 00:42:10 +03:00
Improve typing (#2055)
This commit is contained in:
committed by
GitHub
parent
95e7a76ba9
commit
f8097221e6
@@ -18,7 +18,6 @@ limitations under the License.
|
||||
|
||||
/** @module interactive-auth */
|
||||
|
||||
import * as utils from "./utils";
|
||||
import { logger } from './logger';
|
||||
import { MatrixClient } from "./client";
|
||||
import { defer, IDeferred } from "./utils";
|
||||
@@ -68,7 +67,7 @@ export enum AuthType {
|
||||
export interface IAuthDict {
|
||||
// [key: string]: any;
|
||||
type?: string;
|
||||
// session?: string; // TODO
|
||||
session?: string;
|
||||
// TODO: Remove `user` once servers support proper UIA
|
||||
// See https://github.com/vector-im/element-web/issues/10312
|
||||
user?: string;
|
||||
@@ -360,12 +359,12 @@ export class InteractiveAuth {
|
||||
}
|
||||
|
||||
// use the sessionid from the last request, if one is present.
|
||||
let auth;
|
||||
let auth: IAuthDict;
|
||||
if (this.data.session) {
|
||||
auth = {
|
||||
session: this.data.session,
|
||||
};
|
||||
utils.extend(auth, authData);
|
||||
Object.assign(auth, authData);
|
||||
} else {
|
||||
auth = authData;
|
||||
}
|
||||
|
Reference in New Issue
Block a user