Apply strictNullChecks
to src/utils/*!exportUtils
(#10455
* Apply `strictNullChecks` to `src/utils/exportUtils` * strict fix * fix strictNullChecks issues in some utils * fix error message * test coverage * lint * more strictNullChecks * small optimisation for getUniqueRoomsWithIndividuals * tidy * test coverage
This commit is contained in:
parent
4ed6e39067
commit
81a4498a8f
18 changed files with 143 additions and 81 deletions
|
@ -22,7 +22,11 @@ import { AuthType, IAuthData } from "matrix-js-sdk/src/interactive-auth";
|
|||
|
||||
import { _t } from "../../../languageHandler";
|
||||
import AccessibleButton from "../elements/AccessibleButton";
|
||||
import InteractiveAuth, { ERROR_USER_CANCELLED, InteractiveAuthCallback } from "../../structures/InteractiveAuth";
|
||||
import InteractiveAuth, {
|
||||
ERROR_USER_CANCELLED,
|
||||
InteractiveAuthCallback,
|
||||
InteractiveAuthProps,
|
||||
} from "../../structures/InteractiveAuth";
|
||||
import { SSOAuthEntry } from "../auth/InteractiveAuthEntryComponents";
|
||||
import BaseDialog from "./BaseDialog";
|
||||
|
||||
|
@ -37,17 +41,11 @@ type DialogAesthetics = Partial<{
|
|||
};
|
||||
}>;
|
||||
|
||||
export interface InteractiveAuthDialogProps {
|
||||
export interface InteractiveAuthDialogProps<T = unknown>
|
||||
extends Pick<InteractiveAuthProps<T>, "makeRequest" | "authData"> {
|
||||
// matrix client to use for UI auth requests
|
||||
matrixClient: MatrixClient;
|
||||
|
||||
// response from initial request. If not supplied, will do a request on
|
||||
// mount.
|
||||
authData?: IAuthData;
|
||||
|
||||
// callback
|
||||
makeRequest: (auth: IAuthData) => Promise<IAuthData>;
|
||||
|
||||
// Optional title and body to show when not showing a particular stage
|
||||
title?: string;
|
||||
body?: string;
|
||||
|
@ -83,8 +81,8 @@ interface IState {
|
|||
uiaStagePhase: number | null;
|
||||
}
|
||||
|
||||
export default class InteractiveAuthDialog extends React.Component<InteractiveAuthDialogProps, IState> {
|
||||
public constructor(props: InteractiveAuthDialogProps) {
|
||||
export default class InteractiveAuthDialog<T> extends React.Component<InteractiveAuthDialogProps<T>, IState> {
|
||||
public constructor(props: InteractiveAuthDialogProps<T>) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue