mirror of https://github.com/vector-im/riot-web
Step 5: Fix newly-discovered TS issues
parent
7e21da0c7f
commit
115ae198c8
|
@ -37,7 +37,7 @@ interface IProps {
|
|||
// Whether to wrap the page in a scrollbar
|
||||
scrollbar?: boolean;
|
||||
// Map of keys to replace with values, e.g {$placeholder: "value"}
|
||||
replaceMap?: Map<string, string>;
|
||||
replaceMap?: Record<string, string>;
|
||||
}
|
||||
|
||||
interface IState {
|
||||
|
|
|
@ -174,7 +174,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
|||
this.fileUpload.current.click();
|
||||
};
|
||||
|
||||
private onPassPhraseNext = async (ev: FormEvent<HTMLFormElement>) => {
|
||||
private onPassPhraseNext = async (ev: FormEvent<HTMLFormElement> | React.MouseEvent) => {
|
||||
ev.preventDefault();
|
||||
|
||||
if (this.state.passPhrase.length <= 0) return;
|
||||
|
@ -189,7 +189,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
|||
}
|
||||
};
|
||||
|
||||
private onRecoveryKeyNext = async (ev: FormEvent<HTMLFormElement>) => {
|
||||
private onRecoveryKeyNext = async (ev: FormEvent<HTMLFormElement> | React.MouseEvent) => {
|
||||
ev.preventDefault();
|
||||
|
||||
if (!this.state.recoveryKeyValid) return;
|
||||
|
|
|
@ -30,8 +30,9 @@ interface IProps {
|
|||
// If true, make the primary button a form submit button (input type="submit")
|
||||
primaryIsSubmit?: boolean;
|
||||
|
||||
// onClick handler for the primary button.
|
||||
onPrimaryButtonClick?: (ev: React.MouseEvent) => void;
|
||||
// onClick handler for the primary button. Note that the returned promise, if
|
||||
// returning a promise, is not used.
|
||||
onPrimaryButtonClick?: (ev: React.MouseEvent) => (void | Promise<void>);
|
||||
|
||||
// should there be a cancel button? default: true
|
||||
hasCancel?: boolean;
|
||||
|
|
Loading…
Reference in New Issue