Properly type Modal props to ensure useful typescript checking (#10238
* Properly type Modal props to ensure useful typescript checking * delint * Iterate * Iterate * Fix modal.close loop * Iterate * Fix tests * Add comment * Fix test
This commit is contained in:
parent
ae5725b24c
commit
629e5cb01f
124 changed files with 600 additions and 560 deletions
|
@ -24,7 +24,6 @@ import { logger } from "matrix-js-sdk/src/logger";
|
|||
import { MatrixClientPeg } from "../../../../MatrixClientPeg";
|
||||
import { _t } from "../../../../languageHandler";
|
||||
import { accessSecretStorage } from "../../../../SecurityManager";
|
||||
import { IDialogProps } from "../IDialogProps";
|
||||
import Spinner from "../../elements/Spinner";
|
||||
import DialogButtons from "../../elements/DialogButtons";
|
||||
import AccessibleButton from "../../elements/AccessibleButton";
|
||||
|
@ -42,13 +41,14 @@ enum ProgressState {
|
|||
LoadKeys = "load_keys",
|
||||
}
|
||||
|
||||
interface IProps extends IDialogProps {
|
||||
interface IProps {
|
||||
// if false, will close the dialog as soon as the restore completes successfully
|
||||
// default: true
|
||||
showSummary?: boolean;
|
||||
// If specified, gather the key from the user but then call the function with the backup
|
||||
// key rather than actually (necessarily) restoring the backup.
|
||||
keyCallback?: (key: Uint8Array) => void;
|
||||
onFinished(done?: boolean): void;
|
||||
}
|
||||
|
||||
interface IState {
|
||||
|
@ -77,7 +77,7 @@ interface IState {
|
|||
* Dialog for restoring e2e keys from a backup and the user's recovery key
|
||||
*/
|
||||
export default class RestoreKeyBackupDialog extends React.PureComponent<IProps, IState> {
|
||||
public static defaultProps = {
|
||||
public static defaultProps: Partial<IProps> = {
|
||||
showSummary: true,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue