refactor: improve types in the frontend, misc fixes (#39142)

This commit is contained in:
silverwind
2026-08-31 04:12:25 -07:00
committed by GitHub
parent 535fc29ae8
commit 7c93ead628
46 changed files with 392 additions and 217 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ export type TimedFunction<T extends (...args: Array<any>) => any> = ((...args: P
function createTimed<T extends (...args: Array<any>) => any>(func: T, wait: number, leading: boolean, trailing: boolean, isThrottle: boolean): TimedFunction<T> {
let timer: TimeoutId | null = null;
let pendingArgs: Parameters<T> | null = null;
let resolvers: Array<{resolve: (value: any) => void, reject: (reason: any) => void}> = [];
let resolvers: Array<{resolve: (value: Awaited<ReturnType<T>>) => void, reject: (reason: any) => void}> = [];
const invoke = async (args: Parameters<T>): Promise<void> => {
const settling = resolvers;