StreamOptions
Defined in: client.ts:73
Extends
Section titled “Extends”Properties
Section titled “Properties”choreographer?
Section titled “choreographer?”
optionalchoreographer?:CopyChoreographer
Defined in: client.ts:87
Drive an existing choreographer instead of creating one. For a renderer that started holding before the request could open (a stream waiting on a shared variant): one choreographer, so one hold budget, spans the wait and the stream. The choreographer options in these options are ignored when this is set.
clearTimeout?
Section titled “clearTimeout?”
optionalclearTimeout?: (handle) =>void
Defined in: state.ts:327
Parameters
Section titled “Parameters”handle
Section titled “handle”unknown
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ChoreographerOptions.clearTimeout
fallback?
Section titled “fallback?”
optionalfallback?:Partial<Record<CopyField,string>>
Defined in: state.ts:324
The authored fallback, when initial is other copy (for example copy
already produced for this view). It is what keepFallback lands.
Defaults to initial.
Inherited from
Section titled “Inherited from”fallbackDefinesSlots?
Section titled “fallbackDefinesSlots?”
optionalfallbackDefinesSlots?:boolean
Defined in: state.ts:311
When true, the fallback decides which fields exist: a field whose
initial copy is empty is never shown, and the stream’s copy for it is
dropped. A slot sized by its fallback has no room for a field the
fallback does not have. Ignored when initial has no copy at all.
Inherited from
Section titled “Inherited from”ChoreographerOptions.fallbackDefinesSlots
fetchImpl?
Section titled “fetchImpl?”
optionalfetchImpl?: (input,init?) =>Promise<Response>
Defined in: client.ts:77
Swap the transport (SSR, tests, a customer’s instrumented fetch).
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
holdElapsedMs?
Section titled “holdElapsedMs?”
optionalholdElapsedMs?:number
Defined in: state.ts:265
How long the slot has ALREADY been holding before this choreographer took over — for example, since a server-rendered reservation first painted. It is spent from the budget and from the absolute maximum, so the wait before hydration and the wait after it are one hold. Defaults to 0.
Inherited from
Section titled “Inherited from”ChoreographerOptions.holdElapsedMs
holdMs?
Section titled “holdMs?”
optionalholdMs?:number
Defined in: state.ts:258
The hold budget for this view. Defaults to COPY_HOLD_MS; restarts once
when the stream proves alive. However the restart falls, the hold never
lasts longer than twice this in total.
Inherited from
Section titled “Inherited from”holdStartsInView?
Section titled “holdStartsInView?”
optionalholdStartsInView?:boolean
Defined in: state.ts:289
When true, the hold budget does not start until slotInView() is called.
The stream may open (and buffer) earlier; a slot that never comes into
view never shows anything changing. When false (the default), the slot
is treated as in view from streamOpened().
Inherited from
Section titled “Inherited from”ChoreographerOptions.holdStartsInView
initial?
Section titled “initial?”
optionalinitial?:Partial<Record<CopyField,string>>
Defined in: state.ts:231
The fallback: what lands if live copy does not arrive in time. Required by doctrine — there is no skeleton mode.
Inherited from
Section titled “Inherited from”initialIsComplete?
Section titled “initialIsComplete?”
optionalinitialIsComplete?:boolean
Defined in: state.ts:282
With serverRendered: the initial copy is the WHOLE copy for this
view, so the stream writes no field, empty ones included. Use it for
copy decided before the slot was shown (for example cached copy a
server read for this visitor): a field it left empty stays empty rather
than gaining text later.
Inherited from
Section titled “Inherited from”ChoreographerOptions.initialIsComplete
initialIsOnScreen?
Section titled “initialIsOnScreen?”
optionalinitialIsOnScreen?:boolean
Defined in: state.ts:241
True when the initial copy is ALREADY VISIBLE when the stream opens: copy at rest from earlier in this view, or a fallback the page revealed before the SDK could hold it. Every non-empty field is then final for this view: no hold, and the stream’s copy events for it are dropped.
Leave it unset for copy that has not been seen yet — the normal case. The hold then keeps the slot blank until live copy or the fallback lands.
Inherited from
Section titled “Inherited from”ChoreographerOptions.initialIsOnScreen
initialSource?
Section titled “initialSource?”
optionalinitialSource?:"generated"|"cached"|"static"
Defined in: state.ts:272
Provenance of the initial copy when it is finished creative
(serverRendered), for example copy already generated for this view.
Those fields carry it as their source and are settled from the start.
Defaults to static.
Inherited from
Section titled “Inherited from”ChoreographerOptions.initialSource
initialSources?
Section titled “initialSources?”
optionalinitialSources?:Partial<Record<CopyField,"generated"|"cached"|"static">>
Defined in: state.ts:318
Per-field provenance of the initial copy when it is finished creative
(serverRendered). Overrides initialSource for the fields it names,
for copy that mixes provenance, such as live copy for one field and the
fallback for another.
Inherited from
Section titled “Inherited from”ChoreographerOptions.initialSources
initialVariantId?
Section titled “initialVariantId?”
optionalinitialVariantId?:string
Defined in: state.ts:274
The variant the initial copy belongs to, if known. Seeds variantId.
Inherited from
Section titled “Inherited from”ChoreographerOptions.initialVariantId
optionalnow?: () =>number
Defined in: state.ts:328
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”onProtocolUnsupported?
Section titled “onProtocolUnsupported?”
optionalonProtocolUnsupported?: (info) =>void
Defined in: client.ts:93
Called when the server cannot speak the version this build requested. The SDK has already kept its own first paint by the time this fires; the hook exists so a consumer can log it once, not so it can retry.
Parameters
Section titled “Parameters”requested
Section titled “requested”number
supported
Section titled “supported”number[]
Returns
Section titled “Returns”void
onState?
Section titled “onState?”
optionalonState?: (state) =>void
Defined in: client.ts:79
Called on every state change.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
releaseOn?
Section titled “releaseOn?”
optionalreleaseOn?:"complete"|"text"
Defined in: state.ts:301
When the held canvas is handed to the stream.
"text" (default): on the first text the stream delivers — live copy
types into the blank slot.
"complete": only when the stream finishes (done), so the whole new
copy lands at once. For a slot whose canvas is showing something else in
the meantime (a campaign or context change); the hold budget still
applies.
Inherited from
Section titled “Inherited from”ChoreographerOptions.releaseOn
serverRendered?
Section titled “serverRendered?”
optionalserverRendered?:boolean
Defined in: state.ts:252
True when the initial copy is FINISHED CAMPAIGN CREATIVE rendered by the platform — not a developer’s fallback. It is the copy for this view: nothing holds, and the stream’s copy events for those fields are dropped (theme, media and the action still apply). Fields left empty may still be written by the stream.
Do not set it for a fallback: a fallback is what lands only when live
copy does not.
Inherited from
Section titled “Inherited from”ChoreographerOptions.serverRendered
setTimeout?
Section titled “setTimeout?”
optionalsetTimeout?: (fn,ms) =>unknown
Defined in: state.ts:326
Injectable for tests; defaults to the platform timers and clock.
Parameters
Section titled “Parameters”() => void
number
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”ChoreographerOptions.setTimeout
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: client.ts:75
target
Section titled “target”target:
StreamTarget
Defined in: client.ts:74
unfinishedCopy?
Section titled “unfinishedCopy?”
optionalunfinishedCopy?:UnfinishedCopyPolicy
Defined in: state.ts:304
What happens to a field the stream was still writing when it ended.
Defaults to keepUnlessClearlyError.