proposit-core
    Preparing search index...

    Interface TOriginLookup<TDocument, TLink, TAnchor>

    Read-only view of an origin library — the source texts an argument was built from, their association with argument versions, and the spans of those texts individual argument parts derive from.

    interface TOriginLookup<
        TDocument extends TCoreOriginDocument = TCoreOriginDocument,
        TLink extends TCoreOriginLink = TCoreOriginLink,
        TAnchor extends TCoreOriginAnchor = TCoreOriginAnchor,
    > {
        getAnchor(id: string): TAnchor | undefined;
        getAnchorsForArgument(
            argumentId: string,
            argumentVersion: number,
        ): TAnchor[];
        getAnchorsForTarget(
            targetType: "expression" | "premise" | "argument",
            targetId: string,
        ): TAnchor[];
        getDocument(id: string): TDocument | undefined;
        getLink(id: string): TLink | undefined;
        getLinksForArgument(argumentId: string, argumentVersion: number): TLink[];
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Methods

    • Returns every anchor pointing at one target — a claim expression, a premise, or the argument itself.

      Parameters

      • targetType: "expression" | "premise" | "argument"
      • targetId: string

      Returns TAnchor[]