proposit-core
    Preparing search index...

    Class VersionedLibrary<TEntity>Abstract

    Abstract base class for versioned, freezable entity libraries. Provides CRUD, freeze/unfreeze lifecycle, schema validation, and checksum computation. Subclasses supply the entity label, schema, and validation codes.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    checksumConfig?: TCoreChecksumConfig
    checksumFieldsKey: keyof TCoreChecksumConfig
    entities: Map<string, Map<number, TEntity>>
    entityLabel: string
    frozenSuccessorCode: string
    schema: TSchema
    schemaInvalidCode: string

    Methods

    • Applies partial updates to the latest version of an entity. Throws if the entity is frozen.

      Parameters

      • id: string
      • updates: Partial<Omit<TEntity, "id" | "version" | "frozen" | "checksum">>

      Returns TEntity