fix(atlas): keep the cached regions projection typed as unknown

The offline snapshot may contain any legacy value. Explicitly retain its unknown type throughout the queue projection to pass the strict client type check.
This commit is contained in:
Maurice
2026-12-06 18:09:21 +01:00
parent 4516edfdad
commit 87107d7cba
+1 -1
View File
@@ -277,7 +277,7 @@ export async function withWaitingWrites(part: AtlasSnapshotPart, data: unknown):
if (part !== 'stats' || !writes.some((w) => w.resource === ATLAS_RESOURCE.region && w.method === 'DELETE')) {
return writes.reduce((out, w) => applyAtlasWrite(part, out, w), data);
}
let regions = (await keptAtlasPart('regions'))?.data ?? {};
let regions: unknown = (await keptAtlasPart('regions'))?.data ?? {};
for (const w of writes) {
data = applyToStats(data, w, regions);
regions = applyToRegions(regions, w);