Type Alias TPersistBaseCtor<EntityName, Entity>

TPersistBaseCtor: new (
    entityName: EntityName,
    baseDir: string,
) => IPersistBase<Entity>

Defines a constructor type for creating PersistBase instances, parameterized by entity name and type. Enables customization of persistence behavior through subclassing or adapter injection (e.g., for swarm or state persistence).

Type Parameters

  • EntityName extends string = string

    The type of entity name (e.g., SwarmName, SessionId), defaults to string.

  • Entity extends IEntity = IEntity

    The type of entity (e.g., IPersistAliveData), defaults to IEntity.