Skip to content

Commit 115ae19

Browse files
committed
Step 5: Fix newly-discovered TS issues
1 parent 7e21da0 commit 115ae19

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Diff for: src/components/structures/EmbeddedPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface IProps {
3737
// Whether to wrap the page in a scrollbar
3838
scrollbar?: boolean;
3939
// Map of keys to replace with values, e.g {$placeholder: "value"}
40-
replaceMap?: Map<string, string>;
40+
replaceMap?: Record<string, string>;
4141
}
4242

4343
interface IState {

Diff for: src/components/views/dialogs/security/AccessSecretStorageDialog.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
174174
this.fileUpload.current.click();
175175
};
176176

177-
private onPassPhraseNext = async (ev: FormEvent<HTMLFormElement>) => {
177+
private onPassPhraseNext = async (ev: FormEvent<HTMLFormElement> | React.MouseEvent) => {
178178
ev.preventDefault();
179179

180180
if (this.state.passPhrase.length <= 0) return;
@@ -189,7 +189,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
189189
}
190190
};
191191

192-
private onRecoveryKeyNext = async (ev: FormEvent<HTMLFormElement>) => {
192+
private onRecoveryKeyNext = async (ev: FormEvent<HTMLFormElement> | React.MouseEvent) => {
193193
ev.preventDefault();
194194

195195
if (!this.state.recoveryKeyValid) return;

Diff for: src/components/views/elements/DialogButtons.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ interface IProps {
3030
// If true, make the primary button a form submit button (input type="submit")
3131
primaryIsSubmit?: boolean;
3232

33-
// onClick handler for the primary button.
34-
onPrimaryButtonClick?: (ev: React.MouseEvent) => void;
33+
// onClick handler for the primary button. Note that the returned promise, if
34+
// returning a promise, is not used.
35+
onPrimaryButtonClick?: (ev: React.MouseEvent) => (void | Promise<void>);
3536

3637
// should there be a cancel button? default: true
3738
hasCancel?: boolean;

0 commit comments

Comments
 (0)