import { Entity, Manifest, Manifester, Persister, Sequences } from './types'; export interface DefineOptions { sequences?: TSequences; manifest: Manifester; persist?: Persister; } /** * A realm is an isolated environment that entities may be registered with. * * Entity names must be unique within a realm. */ export declare class Realm { private readonly storage; /** * Defines an entity in the realm using the specified manifester and persister. */ readonly define: (Entity: Entity, { manifest: manifester, persist: persister, sequences, }: DefineOptions) => void; /** * Clears all of the entities within the realm. */ clear(): void; /** * Manifests an instance of the specified entity. * * @param Entity The entity to manifest. * @param overrides The overrides to pass to the manifester. */ readonly manifest: Manifest; /** * Persists an instance of the specified entity. * * @param Entity The entity to persist. * @param context The context to pass to the persister. * @param overrides The overrides to pass to the persister. */ readonly persist: (Entity: Entity, context: TContext, overrides?: Partial) => Promise; readonly persistLeaves: (context: TContext) => Promise; private manifestWithRefs; private manifestRef; private persistRef; }