Skip to content

StreamOptions

Defined in: client.ts:53

optional clearTimeout?: (handle) => void

Defined in: state.ts:169

unknown

void

ChoreographerOptions.clearTimeout


optional fetchImpl?: (input, init?) => Promise<Response>

Defined in: client.ts:57

Swap the transport (SSR, tests, a customer’s instrumented fetch).

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>


optional holdMs?: number

Defined in: state.ts:166

How long the canvas holds blank waiting for the stream before the initial copy paints. Defaults to COPY_HOLD_MS, and restarts ONCE when the stream proves it is alive — so the blank can last up to twice this.

ChoreographerOptions.holdMs


optional initial?: Partial<Record<CopyField, string>>

Defined in: state.ts:131

First paint. Real copy from SSR /content or the consumer’s fallback. Required by doctrine — there is no skeleton mode to fall back to.

ChoreographerOptions.initial


optional initialIsOnScreen?: boolean

Defined in: state.ts:145

True when the initial copy has been on screen since the page’s own first paint (SSR, or carried across a client-side navigation) and is therefore already being read. Such copy is EXEMPT from the hold: blanking text a reader has had in front of them is the very thing the hold exists to prevent, so applying the hold to it would invert the rule.

On-screen copy is never typed over, either: live deltas buffer off-canvas and the field changes at most once, composed, at its *-done. If the stream dies first the fallback simply stands. Delta-by-delta typing is reserved for the blank canvas the hold paints, where it is an entrance — not churn on words a reader is on.

ChoreographerOptions.initialIsOnScreen


optional onProtocolUnsupported?: (info) => void

Defined in: client.ts:65

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.

number

number[]

void


optional onState?: (state) => void

Defined in: client.ts:59

Called on every state change.

CreativeState

void


optional serverRendered?: boolean

Defined in: state.ts:162

True when the initial copy is genuinely finished, already-presented CAMPAIGN creative — server-rendered by the platform, not a developer’s fallback. This is the SDK analogue of the shell’s [data-baked-creative] gate (rendererService.ts streamIsland). It implies the hold exemption and the same one-composed-change rule every on-screen field gets: live deltas buffer off-canvas and the copy changes at most once, at *-done.

A developer’s fallback must NOT set this: a fallback that has not painted yet belongs to the hold, whose blank canvas is what keeps the typed entrance reachable. Setting it from the ordinary client commit (commit 3dc544913 treated every non-empty first paint this way) made paced streaming unreachable in every real integration, because fallback is required by doctrine and always paints before the stream opens.

ChoreographerOptions.serverRendered


optional setTimeout?: (fn, ms) => unknown

Defined in: state.ts:168

Injectable for tests; defaults to the platform timers.

() => void

number

unknown

ChoreographerOptions.setTimeout


optional signal?: AbortSignal

Defined in: client.ts:55


target: StreamTarget

Defined in: client.ts:54