Conform more of the codebase to strictNullChecks (#10672)
* Conform more of the codebase to `strictNullChecks` * Iterate * Iterate * Iterate * Iterate * Conform more of the codebase to `strictNullChecks` * Iterate * Update record key
This commit is contained in:
parent
792a39a39b
commit
be5928cb64
34 changed files with 143 additions and 115 deletions
|
@ -260,7 +260,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
|
|||
|
||||
// if the user should also be ignored, do that
|
||||
if (this.state.ignoreUserToo) {
|
||||
await client.setIgnoredUsers([...client.getIgnoredUsers(), ev.getSender()]);
|
||||
await client.setIgnoredUsers([...client.getIgnoredUsers(), ev.getSender()!]);
|
||||
}
|
||||
|
||||
this.props.onFinished(true);
|
||||
|
@ -309,8 +309,8 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
|
|||
// Display report-to-moderator dialog.
|
||||
// We let the user pick a nature.
|
||||
const client = MatrixClientPeg.get();
|
||||
const homeServerName = SdkConfig.get("validated_server_config").hsName;
|
||||
let subtitle;
|
||||
const homeServerName = SdkConfig.get("validated_server_config")!.hsName;
|
||||
let subtitle: string;
|
||||
switch (this.state.nature) {
|
||||
case Nature.Disagreement:
|
||||
subtitle = _t(
|
||||
|
|
|
@ -130,7 +130,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
|||
|
||||
// also clear the file upload control so that the user can upload the same file
|
||||
// the did before (otherwise the onchange wouldn't fire)
|
||||
if (this.fileUpload.current) this.fileUpload.current.value = null;
|
||||
if (this.fileUpload.current) this.fileUpload.current.value = "";
|
||||
|
||||
// We don't use Field's validation here because a) we want it in a separate place rather
|
||||
// than in a tooltip and b) we want it to display feedback based on the uploaded file
|
||||
|
|
|
@ -324,7 +324,10 @@ export default class RestoreKeyBackupDialog extends React.PureComponent<IProps,
|
|||
details = _t("Fetching keys from server…");
|
||||
} else if (this.state.progress.stage === ProgressState.LoadKeys) {
|
||||
const { total, successes, failures } = this.state.progress;
|
||||
details = _t("%(completed)s of %(total)s keys restored", { total, completed: successes + failures });
|
||||
details = _t("%(completed)s of %(total)s keys restored", {
|
||||
total,
|
||||
completed: (successes ?? 0) + (failures ?? 0),
|
||||
});
|
||||
} else if (this.state.progress.stage === ProgressState.PreFetch) {
|
||||
details = _t("Fetching keys from server…");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue