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; email?: string | undefined;
github_username?: string | undefined; github_username?: string | undefined;
name?: string | undefined; name?: string | undefined;
} & { } & Partial<Record<RepositoryName, number>>;
[K in RepositoryName]?: number;
};
type ContributorData = { type ContributorData = {
avatar: string; avatar: string;
email?: string | undefined; email?: string | undefined;

View File

@ -14,7 +14,7 @@ type TimeKey =
| "tomorrow_four_pm" | "tomorrow_four_pm"
| "monday_nine_am"; | "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; 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"; type ColorScheme = "automatic" | "dark" | "light";
export type ColorSchemeValues = { export type ColorSchemeValues = Record<
[key in ColorScheme]: { ColorScheme,
{
code: number; code: number;
description: string; description: string;
}; }
}; >;
export const color_scheme_values = { export const color_scheme_values = {
automatic: { automatic: {