eslint: Fix @typescript-eslint/consistent-indexed-object-style.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-11-05 12:54:33 -08:00 committed by Tim Abbott
parent 03c3bb31dc
commit 6037230ea8
3 changed files with 7 additions and 8 deletions

View File

@ -74,9 +74,7 @@ export type Contributor = {
email?: string | undefined;
github_username?: string | undefined;
name?: string | undefined;
} & {
[K in RepositoryName]?: number;
};
} & Partial<Record<RepositoryName, number>>;
type ContributorData = {
avatar: string;
email?: string | undefined;

View File

@ -14,7 +14,7 @@ type TimeKey =
| "tomorrow_four_pm"
| "monday_nine_am";
type SendOption = {[key in TimeKey]?: {text: string; stamp: number}};
type SendOption = Partial<Record<TimeKey, {text: string; stamp: number}>>;
export const MINIMUM_SCHEDULED_MESSAGE_DELAY_SECONDS = 5 * 60;

View File

@ -145,12 +145,13 @@ export const web_home_view_values = {
};
type ColorScheme = "automatic" | "dark" | "light";
export type ColorSchemeValues = {
[key in ColorScheme]: {
export type ColorSchemeValues = Record<
ColorScheme,
{
code: number;
description: string;
};
};
}
>;
export const color_scheme_values = {
automatic: {