proposit-core
    Preparing search index...

    Interface TClaimLookup<TClaim>

    Narrow read-only interface for claim lookups. Used by ArgumentEngine for variable validation — callers that only need to verify claim existence should depend on this rather than the full ClaimLibrary.

    interface TClaimLookup<TClaim extends TCoreClaim = TCoreClaim> {
        get(id: string, version: number): TClaim | undefined;
        getCurrent(id: string): TClaim | undefined;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Methods

    Methods

    • Returns a claim by ID and version, or undefined if not found.

      Parameters

      • id: string

        The claim ID.

      • version: number

        The claim version number.

      Returns TClaim | undefined

      The claim entity, or undefined.

    • Returns the latest version of a claim for the given ID, or undefined if the claim does not exist in this lookup.

      Implementations backed by a flat array (e.g. createLookup) return the item with the highest version number for the given ID. The full ClaimLibrary class tracks versions natively and returns its internal latest version directly.

      Parameters

      • id: string

        The claim ID.

      Returns TClaim | undefined

      The latest claim entity, or undefined.