mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 18:54:17 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user