applyContextualOverlay
applyContextualOverlay<
T>(content,contextualValues):T
The contextual overlay rule (“the edge’s own values override the target’s stored defaults”) —
applied by the server at resolve ≥ 1, and by the SDK’s normalized strategy after fetching a
reference’s target itself. Shallow: each key of contextualValues replaces the same
top-level key of content wholesale (an object is replaced, never merged; null overlays to
null; a key the target lacks is added). Contextual fields are always top-level on their owning
Contract, which is what makes shallow correct.
This is the one delivery rule that exists on both sides. It mirrors the server’s own implementation exactly, and both are tested against one shared set of cases.
Type Parameters
Section titled “Type Parameters”T extends ContentDocument
Parameters
Section titled “Parameters”content
Section titled “content”T
contextualValues
Section titled “contextualValues”ContentDocument | null | undefined
Returns
Section titled “Returns”T