style: auto-fix lint and format

This commit is contained in:
ajnart authored and github-actions[bot] committed 2026-07-01 18:19:41 +00:00
1 parent 8571b4dcb7
commit 230ee3e1fc
2 files changed
+21 -52

No files matched your search

@@ -27,15 +27,18 @@ export const createRequestHandler = <TData, TInput extends Record<string, unknow
const existing = inflight.get(key);
if (existing) return existing as Promise<CacheEntry<TData>>;
const promise = options.requestAsync(input).then((data) => {
const entry: CacheEntry<TData> = { data, timestamp: new Date(), expiresAt: Date.now() + ttl };
cache.set(key, entry as CacheEntry<unknown>);
inflight.delete(key);
return entry;
}).catch((err) => {
inflight.delete(key);
throw err;
});
const promise = options
.requestAsync(input)
.then((data) => {
const entry: CacheEntry<TData> = { data, timestamp: new Date(), expiresAt: Date.now() + ttl };
cache.set(key, entry as CacheEntry<unknown>);
inflight.delete(key);
return entry;
})
.catch((err) => {
inflight.delete(key);
throw err;
});
inflight.set(key, promise as Promise<CacheEntry<unknown>>);
return promise;