From 6037230ea8e5935c3afb4530fc54da0b7da69d36 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 5 Nov 2024 12:54:33 -0800 Subject: [PATCH] eslint: Fix @typescript-eslint/consistent-indexed-object-style. Signed-off-by: Anders Kaseorg --- web/src/portico/team.ts | 4 +--- web/src/scheduled_messages.ts | 2 +- web/src/settings_config.ts | 9 +++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/web/src/portico/team.ts b/web/src/portico/team.ts index 55e6e512cd..61795f29ab 100644 --- a/web/src/portico/team.ts +++ b/web/src/portico/team.ts @@ -74,9 +74,7 @@ export type Contributor = { email?: string | undefined; github_username?: string | undefined; name?: string | undefined; -} & { - [K in RepositoryName]?: number; -}; +} & Partial>; type ContributorData = { avatar: string; email?: string | undefined; diff --git a/web/src/scheduled_messages.ts b/web/src/scheduled_messages.ts index 8c7c9f1bcd..4af844552e 100644 --- a/web/src/scheduled_messages.ts +++ b/web/src/scheduled_messages.ts @@ -14,7 +14,7 @@ type TimeKey = | "tomorrow_four_pm" | "monday_nine_am"; -type SendOption = {[key in TimeKey]?: {text: string; stamp: number}}; +type SendOption = Partial>; export const MINIMUM_SCHEDULED_MESSAGE_DELAY_SECONDS = 5 * 60; diff --git a/web/src/settings_config.ts b/web/src/settings_config.ts index 77bac3e0bf..c2bdfc552b 100644 --- a/web/src/settings_config.ts +++ b/web/src/settings_config.ts @@ -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: {