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:
parent
7a36ba0fde
commit
030b7e90bf
683 changed files with 3459 additions and 3013 deletions
|
@ -56,12 +56,12 @@ export default abstract class HeaderButtons<P = {}> extends React.Component<IPro
|
|||
};
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
public componentDidMount(): void {
|
||||
RightPanelStore.instance.on(UPDATE_EVENT, this.onRightPanelStoreUpdate);
|
||||
this.dispatcherRef = dis.register(this.onAction.bind(this)); // used by subclasses
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
public componentWillUnmount(): void {
|
||||
this.unmounted = true;
|
||||
RightPanelStore.instance.off(UPDATE_EVENT, this.onRightPanelStoreUpdate);
|
||||
if (this.dispatcherRef) dis.unregister(this.dispatcherRef);
|
||||
|
@ -69,7 +69,7 @@ export default abstract class HeaderButtons<P = {}> extends React.Component<IPro
|
|||
|
||||
protected abstract onAction(payload);
|
||||
|
||||
public setPhase(phase: RightPanelPhases, cardState?: Partial<IRightPanelCardState>) {
|
||||
public setPhase(phase: RightPanelPhases, cardState?: Partial<IRightPanelCardState>): void {
|
||||
const rps = RightPanelStore.instance;
|
||||
if (rps.currentCard.phase == phase && !cardState && rps.isOpen) {
|
||||
rps.togglePanel(null);
|
||||
|
@ -88,7 +88,7 @@ export default abstract class HeaderButtons<P = {}> extends React.Component<IPro
|
|||
}
|
||||
}
|
||||
|
||||
private onRightPanelStoreUpdate = () => {
|
||||
private onRightPanelStoreUpdate = (): void => {
|
||||
if (this.unmounted) return;
|
||||
this.setState({ phase: RightPanelStore.instance.currentCard.phase });
|
||||
};
|
||||
|
@ -96,7 +96,7 @@ export default abstract class HeaderButtons<P = {}> extends React.Component<IPro
|
|||
// XXX: Make renderButtons a prop
|
||||
public abstract renderButtons(): JSX.Element;
|
||||
|
||||
public render() {
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<div className="mx_HeaderButtons" role="tablist">
|
||||
{this.renderButtons()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue