Metakit / @doeixd/metakit/temporal
evidence
function · packages/metakit/src/temporalReport.ts:136
function evidence<Name extends string, Over extends string>(
scope: Scope,
account: {
readonly owed: ReadonlyArray<WalkObligation<Name, Over>>
readonly discharges?: ReadonlyArray<Discharge<NoInfer<Name>>>
readonly decided?: ReadonlyArray<{
readonly name: string
readonly reason: string
readonly checked?: WalkResult
}>
},
): EvidenceOne owner's account of its obligations, as a value: what it owed, the
walks that ran for them (discharges, any number per obligation) and the
pairs it decided without a test. Throws for a name listed twice and for a
discharge of a name owed does not list. where is read from the call
stack when scope leaves it out.