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:
parent
fa036a5080
commit
da7aa4055e
380 changed files with 682 additions and 694 deletions
|
@ -118,7 +118,7 @@ export default class AudioFeed extends React.Component<IProps, IState> {
|
|||
this.playMedia();
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
// Do not render the audio element if there is no audio track
|
||||
if (this.state.audioMuted) return null;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class DialPadButton extends React.PureComponent<IButtonProps> {
|
|||
this.props.onButtonPress(this.props.digit, ev);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
switch (this.props.kind) {
|
||||
case DialPadButtonKind.Digit:
|
||||
return (
|
||||
|
@ -68,7 +68,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
export default class Dialpad extends React.PureComponent<IProps> {
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
const buttonNodes = [];
|
||||
|
||||
for (let i = 0; i < BUTTONS.length; i++) {
|
||||
|
|
|
@ -82,7 +82,7 @@ export default class DialpadModal extends React.PureComponent<IProps, IState> {
|
|||
this.props.onFinished(true);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
const backspaceButton = <DialPadBackspaceButton onBackspacePress={this.onDeletePress} />;
|
||||
|
||||
// Only show the backspace button if the field has content
|
||||
|
|
|
@ -549,7 +549,7 @@ export default class LegacyCallView extends React.Component<IProps, IState> {
|
|||
}
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
const { call, secondaryCall, pipMode, showApps, onMouseDownOnHeader } = this.props;
|
||||
const { sidebarShown, sidebarFeeds } = this.state;
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ export default class LegacyCallViewButtons extends React.Component<IProps, IStat
|
|||
this.setState({ showMoreMenu: false });
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
const callControlsClasses = classNames("mx_LegacyCallViewButtons", {
|
||||
mx_LegacyCallViewButtons_hidden: !this.state.visible,
|
||||
});
|
||||
|
|
|
@ -83,7 +83,7 @@ export default class LegacyCallViewForRoom extends React.Component<IProps, IStat
|
|||
this.props.resizeNotifier.stopResizing();
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
if (!this.state.call) return null;
|
||||
|
||||
return (
|
||||
|
|
|
@ -28,7 +28,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
export default class LegacyCallViewSidebar extends React.Component<IProps> {
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
const feeds = this.props.feeds.map((feed) => {
|
||||
return (
|
||||
<VideoFeed
|
||||
|
|
|
@ -177,7 +177,7 @@ export default class VideoFeed extends React.PureComponent<IProps, IState> {
|
|||
}
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public render(): React.ReactNode {
|
||||
const { pipMode, primary, secondary, feed } = this.props;
|
||||
|
||||
const wrapperClasses = classnames("mx_VideoFeed", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue