You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-07 03:42:20 +03:00
Enable @typescript-eslint/explicit-function-return-type in /src (#9788)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier * Enable `@typescript-eslint/explicit-function-return-type` in /src * Fix types * tsc strict fixes * Delint * Fix test * Fix bad merge
This commit is contained in:
committed by
GitHub
parent
7a36ba0fde
commit
030b7e90bf
@@ -65,12 +65,12 @@ export default class UploadBar extends React.PureComponent<IProps, IState> {
|
||||
this.state = this.calculateState();
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
public componentDidMount(): void {
|
||||
this.dispatcherRef = dis.register(this.onAction);
|
||||
this.mounted = true;
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
public componentWillUnmount(): void {
|
||||
this.mounted = false;
|
||||
dis.unregister(this.dispatcherRef!);
|
||||
}
|
||||
@@ -91,19 +91,19 @@ export default class UploadBar extends React.PureComponent<IProps, IState> {
|
||||
};
|
||||
}
|
||||
|
||||
private onAction = (payload: ActionPayload) => {
|
||||
private onAction = (payload: ActionPayload): void => {
|
||||
if (!this.mounted) return;
|
||||
if (isUploadPayload(payload)) {
|
||||
this.setState(this.calculateState());
|
||||
}
|
||||
};
|
||||
|
||||
private onCancelClick = (ev: ButtonEvent) => {
|
||||
private onCancelClick = (ev: ButtonEvent): void => {
|
||||
ev.preventDefault();
|
||||
ContentMessages.sharedInstance().cancelUpload(this.state.currentUpload!);
|
||||
};
|
||||
|
||||
public render() {
|
||||
public render(): JSX.Element {
|
||||
if (!this.state.currentFile) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user