Motivation
When called with { resolve: true }, short-form citations carry a resolution object (resolvedTo, antecedentIndex, confidence, warnings). But resolution is typed only on the ResolvedCitation<C> wrapper — it's undefined on the base Citation — so consumers tend to read just the resolvedTo index and drop confidence/warnings.
That's a loss: the resolver does real work to compute those signals (confidence downgrades on chained/ambiguous Id., soft bracket-balance caps, supra non-unique-key abstention, etc.). A consumer that can't easily reach them has no way to act on the library's own uncertainty and only discovers a bad resolution much further downstream.
Proposal
- Make
resolution (or a getResolution(citation) helper) reachable without the ResolvedCitation narrowing dance, and/or document the intended pattern for consuming confidence + warnings.
- Optionally add a convenience accessor returning the resolved antecedent citation plus its confidence/warnings in one shot.
Benefit
Consumers can gate on resolution confidence (e.g. flag or down-rank low-confidence Id. binds) instead of treating every resolvedTo as equally trustworthy.
Motivation
When called with
{ resolve: true }, short-form citations carry aresolutionobject (resolvedTo,antecedentIndex,confidence,warnings). Butresolutionis typed only on theResolvedCitation<C>wrapper — it'sundefinedon the baseCitation— so consumers tend to read just theresolvedToindex and dropconfidence/warnings.That's a loss: the resolver does real work to compute those signals (confidence downgrades on chained/ambiguous
Id., soft bracket-balance caps, supra non-unique-key abstention, etc.). A consumer that can't easily reach them has no way to act on the library's own uncertainty and only discovers a bad resolution much further downstream.Proposal
resolution(or agetResolution(citation)helper) reachable without theResolvedCitationnarrowing dance, and/or document the intended pattern for consumingconfidence+warnings.Benefit
Consumers can gate on resolution confidence (e.g. flag or down-rank low-confidence
Id.binds) instead of treating everyresolvedToas equally trustworthy.