Conform more of the code base to strict null checking (#10147)

* Conform more of the code base to strict null checking

* More strict fixes

* More strict work

* Fix missing optional type

* Iterate
This commit is contained in:
Michael Telatynski 2023-02-13 17:01:43 +00:00 committed by GitHub
parent fa036a5080
commit da7aa4055e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
380 changed files with 682 additions and 694 deletions

View file

@ -57,7 +57,7 @@ export default class CompleteSecurity extends React.Component<IProps, IState> {
store.stop();
}
public render(): JSX.Element {
public render(): React.ReactNode {
const { phase, lostKeys } = this.state;
let icon;
let title;

View file

@ -27,7 +27,7 @@ interface IProps {
}
export default class E2eSetup extends React.Component<IProps> {
public render(): JSX.Element {
public render(): React.ReactNode {
return (
<AuthPage>
<CompleteSecurityBody>

View file

@ -487,7 +487,7 @@ export default class ForgotPassword extends React.Component<Props, State> {
);
}
public render(): JSX.Element {
public render(): React.ReactNode {
let resetPasswordJsx: JSX.Element;
switch (this.state.phase) {

View file

@ -563,7 +563,7 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>
);
};
public render(): JSX.Element {
public render(): React.ReactNode {
const loader =
this.isBusy() && !this.state.busyLoggingIn ? (
<div className="mx_Login_loader">

View file

@ -573,7 +573,7 @@ export default class Registration extends React.Component<IProps, IState> {
}
}
public render(): JSX.Element {
public render(): React.ReactNode {
let errorText;
const err = this.state.errorText;
if (err) {

View file

@ -141,7 +141,7 @@ export default class SetupEncryptionBody extends React.Component<IProps, IState>
this.props.onFinished();
};
public render(): JSX.Element {
public render(): React.ReactNode {
const { phase, lostKeys } = this.state;
if (this.state.verificationRequest) {

View file

@ -326,7 +326,7 @@ export default class SoftLogout extends React.Component<IProps, IState> {
);
}
public render(): JSX.Element {
public render(): React.ReactNode {
return (
<AuthPage>
<AuthHeader />