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
|
@ -149,7 +149,7 @@ export default class EventListSummary extends React.Component<IProps> {
|
|||
* more items in `users` than `this.props.summaryLength`, which is the number of names
|
||||
* included before "and [n] others".
|
||||
*/
|
||||
private renderNameList(users: string[]) {
|
||||
private renderNameList(users: string[]): string {
|
||||
return formatCommaSeparatedList(users, this.props.summaryLength);
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,10 @@ export default class EventListSummary extends React.Component<IProps> {
|
|||
* @param {string[]} transitions the array of transitions to transform.
|
||||
* @returns {object[]} an array of coalesced transitions.
|
||||
*/
|
||||
private static coalesceRepeatedTransitions(transitions: TransitionType[]) {
|
||||
private static coalesceRepeatedTransitions(transitions: TransitionType[]): {
|
||||
transitionType: TransitionType;
|
||||
repeats: number;
|
||||
}[] {
|
||||
const res: {
|
||||
transitionType: TransitionType;
|
||||
repeats: number;
|
||||
|
@ -377,7 +380,7 @@ export default class EventListSummary extends React.Component<IProps> {
|
|||
return res;
|
||||
}
|
||||
|
||||
private static getTransitionSequence(events: IUserEvents[]) {
|
||||
private static getTransitionSequence(events: IUserEvents[]): TransitionType[] {
|
||||
return events.map(EventListSummary.getTransition);
|
||||
}
|
||||
|
||||
|
@ -451,7 +454,10 @@ export default class EventListSummary extends React.Component<IProps> {
|
|||
}
|
||||
}
|
||||
|
||||
public getAggregate(userEvents: Record<string, IUserEvents[]>) {
|
||||
public getAggregate(userEvents: Record<string, IUserEvents[]>): {
|
||||
names: Record<string, string[]>;
|
||||
indices: Record<string, number>;
|
||||
} {
|
||||
// A map of aggregate type to arrays of display names. Each aggregate type
|
||||
// is a comma-delimited string of transitions, e.g. "joined,left,kicked".
|
||||
// The array of display names is the array of users who went through that
|
||||
|
@ -489,7 +495,7 @@ export default class EventListSummary extends React.Component<IProps> {
|
|||
};
|
||||
}
|
||||
|
||||
public render() {
|
||||
public render(): JSX.Element {
|
||||
const eventsToRender = this.props.events;
|
||||
|
||||
// Map user IDs to latest Avatar Member. ES6 Maps are ordered by when the key was created,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue