diff --git a/packages/rete/src/aggregate.ts b/packages/rete/src/aggregate.ts index 13dc449..f4fd220 100644 --- a/packages/rete/src/aggregate.ts +++ b/packages/rete/src/aggregate.ts @@ -62,7 +62,7 @@ * ExistentialNode upstream. */ import { Token, type Bindings } from "./beta.js"; -import type { EntityId } from "./schema.js"; +import { asEntityId } from "./schema.js"; import type { AttrKey, FactValue } from "./wm.js"; /** Supported aggregator kinds. Extending this list requires a new case in @@ -85,7 +85,7 @@ type DeactivateListener = (token: Token) => void; * `schema.ts`), so there is no risk of collision. */ const AGG_FACT = { - id: -1 as unknown as EntityId, + id: asEntityId(-1), attr: "__agg__" as AttrKey, value: null as FactValue, } as const;