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
|
@ -63,24 +63,24 @@ export default class AuxPanel extends React.Component<IProps, IState> {
|
|||
};
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
public componentDidMount(): void {
|
||||
const cli = MatrixClientPeg.get();
|
||||
if (SettingsStore.getValue("feature_state_counters")) {
|
||||
cli.on(RoomStateEvent.Events, this.onRoomStateEvents);
|
||||
}
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
public componentWillUnmount(): void {
|
||||
if (SettingsStore.getValue("feature_state_counters")) {
|
||||
MatrixClientPeg.get()?.removeListener(RoomStateEvent.Events, this.onRoomStateEvents);
|
||||
}
|
||||
}
|
||||
|
||||
public shouldComponentUpdate(nextProps, nextState) {
|
||||
public shouldComponentUpdate(nextProps, nextState): boolean {
|
||||
return objectHasDiff(this.props, nextProps) || objectHasDiff(this.state, nextState);
|
||||
}
|
||||
|
||||
private onRoomStateEvents = (ev: MatrixEvent) => {
|
||||
private onRoomStateEvents = (ev: MatrixEvent): void => {
|
||||
if (ev.getType() === "re.jki.counter") {
|
||||
this.updateCounters();
|
||||
}
|
||||
|
@ -94,8 +94,8 @@ export default class AuxPanel extends React.Component<IProps, IState> {
|
|||
{ leading: true, trailing: true },
|
||||
);
|
||||
|
||||
private computeCounters() {
|
||||
const counters = [];
|
||||
private computeCounters(): Counter[] {
|
||||
const counters: Counter[] = [];
|
||||
|
||||
if (this.props.room && SettingsStore.getValue("feature_state_counters")) {
|
||||
const stateEvs = this.props.room.currentState.getStateEvents("re.jki.counter");
|
||||
|
@ -125,7 +125,7 @@ export default class AuxPanel extends React.Component<IProps, IState> {
|
|||
return counters;
|
||||
}
|
||||
|
||||
public render() {
|
||||
public render(): JSX.Element {
|
||||
const callView = (
|
||||
<LegacyCallViewForRoom
|
||||
roomId={this.props.room.roomId}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue