From b9a28df63c00c980f166f08b410df2bf96c930e0 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 19 Apr 2023 14:46:25 -0700 Subject: [PATCH] eslint: Fix @typescript-eslint/consistent-indexed-object-style. Signed-off-by: Anders Kaseorg --- web/src/blueslip_stacktrace.ts | 2 +- web/src/keydown_util.ts | 4 +--- web/src/types/stacktrace-gps/index.d.ts | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/src/blueslip_stacktrace.ts b/web/src/blueslip_stacktrace.ts index 84553b5ff4..41fde9bff0 100644 --- a/web/src/blueslip_stacktrace.ts +++ b/web/src/blueslip_stacktrace.ts @@ -53,7 +53,7 @@ export function clean_function_name( }; } -const sourceCache: {[source: string]: string | Promise} = {}; +const sourceCache: Record> = {}; const stack_trace_gps = new StackTraceGPS({sourceCache}); diff --git a/web/src/keydown_util.ts b/web/src/keydown_util.ts index fc7f6cd710..aa032773be 100644 --- a/web/src/keydown_util.ts +++ b/web/src/keydown_util.ts @@ -9,9 +9,7 @@ export const vim_right = "l"; export function handle(opts: { $elem: JQuery; - handlers: { - [handler: string]: (() => boolean) | undefined; - }; + handlers: Record boolean) | undefined>; }): void { opts.$elem.on("keydown", (e) => { if (e.altKey || e.ctrlKey || e.shiftKey) { diff --git a/web/src/types/stacktrace-gps/index.d.ts b/web/src/types/stacktrace-gps/index.d.ts index 0f0c2cfa50..7bea18447e 100644 --- a/web/src/types/stacktrace-gps/index.d.ts +++ b/web/src/types/stacktrace-gps/index.d.ts @@ -3,8 +3,8 @@ import type StackFrame from "stackframe"; declare namespace StackTraceGPS { type StackTraceGPSOptions = { - sourceCache?: {[url: string]: string | Promise}; - sourceMapConsumerCache?: {[sourceMappingUrl: string]: SourceMap.SourceMapConsumer}; + sourceCache?: Record>; + sourceMapConsumerCache?: Record; offline?: boolean; ajax?(url: string): Promise; atob?(base64: string): string;