The value at the library's maidr slot.
Who is reading, and what they are reading it off.
Optionalreads: readonly T[]The declared types this adapter has a reading for. Omitted, every variant is accepted and the caller narrows for itself.
The validated declaration, or null when there is none to read.
Narrows an unknown value read from a library's pass-through slot into a validated declaration, or
null.A co-located block is untyped in plain JS, so this read-time check is the only defence an author has against a typo. It warns once per distinct problem and never throws: a binder that throws takes the host page down, so every failure degrades to the undeclared reading instead.
What it checks, and what each failure costs:
typenames no variant, is rejected outright, and the caller falls through to its chart-level declaration and then to its heuristic. ATraceTypevalue with no variant in MaidrTraceDeclaration —'bar', say — is unknown in the same sense: there is nothing here to declare about it.significanceDirection: 'Below'from being read as'above'and announcing precisely the points that failed to reach significance as the findings.dimensionson a parallel plot,groupon a ridgeline — is rejected. The alternative is returning a block typed as if the field were there, which is an invitation to the throw this function exists to prevent.readsset — a choropleth declared on a library that draws no map — is reported with warnUndrawnType and rejected. Every adapter reads some subset and each was otherwise hand-writing the same narrowing predicate after this returned, along with its own wording for the one sentence spec §7.1 fixes.undefinedandnullare "not given" wherever they appear, both as the block and as any key's value.The returned declaration is the block itself where nothing was dropped, and a copy without the dropped keys otherwise: the author's chart config is never mutated.
This is the only place an
unknownfrom a chart config is narrowed;anymust not escape it. The "each distinct warning at most once per chart per binding" contract holds however often this is called, since every warning it raises is keyed on the author's own block — an adapter that resolves declarations at two entry points per binding needs to arrange nothing.