Comply with noImplicitAny (#9940)
* Stash noImplicitAny work * Stash * Fix imports * Iterate * Fix tests * Delint * Fix tests
This commit is contained in:
parent
ac7f69216e
commit
61a63e47f4
359 changed files with 1621 additions and 1353 deletions
|
@ -35,13 +35,15 @@ const PowerLabel: Record<PowerStatus, string> = {
|
|||
[PowerStatus.Moderator]: _td("Mod"),
|
||||
};
|
||||
|
||||
const PRESENCE_CLASS = {
|
||||
export type PresenceState = "offline" | "online" | "unavailable";
|
||||
|
||||
const PRESENCE_CLASS: Record<PresenceState, string> = {
|
||||
offline: "mx_EntityTile_offline",
|
||||
online: "mx_EntityTile_online",
|
||||
unavailable: "mx_EntityTile_unavailable",
|
||||
};
|
||||
|
||||
function presenceClassForMember(presenceState: string, lastActiveAgo: number, showPresence: boolean): string {
|
||||
function presenceClassForMember(presenceState: PresenceState, lastActiveAgo: number, showPresence: boolean): string {
|
||||
if (showPresence === false) {
|
||||
return "mx_EntityTile_online_beenactive";
|
||||
}
|
||||
|
@ -67,7 +69,7 @@ interface IProps {
|
|||
title?: string;
|
||||
avatarJsx?: JSX.Element; // <BaseAvatar />
|
||||
className?: string;
|
||||
presenceState?: string;
|
||||
presenceState?: PresenceState;
|
||||
presenceLastActiveAgo?: number;
|
||||
presenceLastTs?: number;
|
||||
presenceCurrentlyActive?: boolean;
|
||||
|
@ -104,7 +106,7 @@ export default class EntityTile extends React.PureComponent<IProps, IState> {
|
|||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
const mainClassNames = {
|
||||
const mainClassNames: Record<string, boolean> = {
|
||||
mx_EntityTile: true,
|
||||
mx_EntityTile_noHover: this.props.suppressOnHover,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue