Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

Anders Kaseorgb9a28df63c00
diff --git a/web/src/blueslip_stacktrace.ts b/web/src/blueslip_stacktrace.ts
index 84553b5ff43..41fde9bff05 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<string>} = {};
+const sourceCache: Record<string, string | Promise<string>> = {};
const stack_trace_gps = new StackTraceGPS({sourceCache});
diff --git a/web/src/keydown_util.ts b/web/src/keydown_util.ts
index fc7f6cd7107..aa032773be6 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<string, (() => 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 0f0c2cfa501..7bea18447ef 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<string>};
- sourceMapConsumerCache?: {[sourceMappingUrl: string]: SourceMap.SourceMapConsumer};
+ sourceCache?: Record<string, string | Promise<string>>;
+ sourceMapConsumerCache?: Record<string, SourceMap.SourceMapConsumer>;
offline?: boolean;
ajax?(url: string): Promise<string>;
atob?(base64: string): string;