mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-07 22:44:06 +00:00
fix(metering): type the array read's retry callback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user