chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase

This commit is contained in:
David Snelling 2026-06-11 14:51:00 -07:00
parent 970e08c466
commit 1f7e365a4e
237 changed files with 1951 additions and 49413 deletions

View file

@ -124,8 +124,11 @@ export class EntityIdMapper implements EntityIdMapperProvider {
try {
const metadata = await this.storage.getMetadata(this.storageKey)
// metadata IS the data (no nested 'data' property)
if (metadata && (metadata as any).nextId !== undefined) {
const data = metadata as any as EntityIdMapperData
if (metadata && metadata.nextId !== undefined) {
// Typed boundary: mapper state round-trips through the storage
// metadata channel as plain JSON; the `nextId` probe above identifies
// the persisted EntityIdMapperData shape.
const data = metadata as unknown as EntityIdMapperData
this.nextId = data.nextId
// Rebuild maps from serialized data
@ -305,7 +308,7 @@ export class EntityIdMapper implements EntityIdMapperProvider {
intToUuid: Object.fromEntries(this.intToUuid)
}
await this.storage.saveMetadata(this.storageKey, data as any)
await this.storage.saveMetadata(this.storageKey, data)
this.dirty = false
}