fix(metering): type the array read's retry callback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
404oopsandClaude Opus 5.5 authored and GitHub committed 2026-11-05 10:23:46 -07:00
1 parent 2ed3e78dfa
commit 74b60c1227
1 file changed
+4 -2
@@ -922,11 +922,13 @@ export class MeteringBufferStore extends PuterStore {
});
const fetchedValues = fetched as (unknown | null)[];
await Promise.all(
misses.map(async (i, idx) => {
misses.map(async (i, idx): Promise<void> => {
const k = keys[i]!;
// As in `#readStoreAndBuffer`: a buffer that shrank during
// the store read may be counted in both, so read again.
const now = await this.#readBuffered(k).catch(() => null);
const now = await this.#readBuffered(k).catch(
(): null => null,
);
if (now && !sameAmounts(deltas[i]!, now.delta)) {
const { stored, buffered } =
await this.#readStoreAndBuffer(k);