Structured result returned by both lineage explainers.

cause is the commit responsible for the classification (or null for no-cause); path is the node ids forming the dependency chain that led to the conclusion (or null when no chain applies); inputs carries contextual node ids used to render because.

interface WhyResult {
    because: string;
    cause: null | Commit;
    inputs?: readonly string[];
    node: string;
    path: null | readonly string[];
    reason: WhyReason;
}

Properties

because: string

Human-readable, derived from reason.

cause: null | Commit

Commit that produced the outcome, or null for no-cause.

inputs?: readonly string[]

Optional contextual node ids, depending on reason.

node: string

The id of the node being explained.

path: null | readonly string[]

Dependency-chain path, or null when no chain applies.

reason: WhyReason

Tag classifying the outcome; see WhyReason.