diff --git a/src/collection-abstract.ts b/src/collection-abstract.ts index 5b0ed28..69565a5 100644 --- a/src/collection-abstract.ts +++ b/src/collection-abstract.ts @@ -20,7 +20,7 @@ export abstract class Collection { abstract initializeView(): void; - abstract resolve(id: string): ResolvedViewOne | undefined; + abstract resolve(id: DomainEntityID): ResolvedViewOne | undefined; rhizomeConnect(rhizomeNode: RhizomeNode) { this.rhizomeNode = rhizomeNode; @@ -36,7 +36,6 @@ export abstract class Collection { this.eventStream.emit("update", res); }); - // TODO: Fix this rhizomeNode.httpServer.httpApi.serveCollection(this); debug(`[${this.rhizomeNode.config.peerId}]`, `Connected ${this.name} to rhizome`); diff --git a/src/delta.ts b/src/delta.ts index 9b1683a..37166ab 100644 --- a/src/delta.ts +++ b/src/delta.ts @@ -17,7 +17,7 @@ type PointerV1 = { export type Scalar = string | number | null; export type Reference = { - [key: PropertyID]: DomainEntityID + [key: DomainEntityID]: PropertyID }; export type PointersV2 = { diff --git a/src/lossy.ts b/src/lossy.ts index d6776b6..bc27186 100644 --- a/src/lossy.ts +++ b/src/lossy.ts @@ -23,6 +23,7 @@ export abstract class Lossy { this.lossless.eventStream.on("updated", (id, deltaIds) => { debug(`[${this.lossless.rhizomeNode.config.peerId}] entity ${id} updated, deltaIds:`, JSON.stringify(deltaIds)); + this.ingestUpdate(id, deltaIds); }); }