@buzzr/dfs-engine
    Preparing search index...

    Type Alias StatExtractionFailure

    StatExtractionFailure:
        | { detail: string; ok: false; reason: "unknown_prop" }
        | { detail: string; ok: false; reason: "unsupported_league" }
        | { detail: string; ok: false; reason: "prop_not_supported_for_league" }
        | { detail: string; ok: false; reason: "adapter_returned_null" }

    Discriminated-union result types for the *Explained variants of the grading API. The null-returning originals (extractStatForProp, gradeLegFromActual) stay stable; the Explained variants carry a reason code so callers can distinguish "we don't support this league" from "the player didn't play" from "the slip used a prop name we don't know" without re-deriving from inputs.

    Reason codes are an additive enum — new failure modes are pushed onto the union, never renamed or repurposed.

    Type Declaration

    • { detail: string; ok: false; reason: "unknown_prop" }

      Slip's propType string isn't in DfsPropTypeKey (or its alias table).

    • { detail: string; ok: false; reason: "unsupported_league" }

      League has no registered adapter table.

    • { detail: string; ok: false; reason: "prop_not_supported_for_league" }

      League is supported but its table doesn't carry an adapter for this prop.

    • { detail: string; ok: false; reason: "adapter_returned_null" }

      Adapter ran but couldn't compute a value (missing gamelog field, gated off, etc.).