Skip to main content

Interface: RenderOpts<TIntermediate, TFinal>

core/render.RenderOpts

Type parameters

NameType
TIntermediatestring
TFinalstring

Properties

appendOnly

Optional appendOnly: boolean

Indicates that the stream should be append-only.

Defined in

packages/ai-jsx/src/core/render.ts:85


map

Optional map: (frame: TFinal) => TIntermediate

Type declaration

▸ (frame): TIntermediate

Maps the intermediate (but not final) results produced by rendering. By default the rendered elements are flattened into a string.

Parameters
NameTypeDescription
frameTFinalThe intermediate rendering, including any Elements selected by stop.
Returns

TIntermediate

The value to yield.

Defined in

packages/ai-jsx/src/core/render.ts:80


stop

Optional stop: TFinal extends string ? false : ElementPredicate

Instructs rendering to stop rendering on certain elements. When specified, rendering will return an array of strings and Elements rather than a string.

Defined in

packages/ai-jsx/src/core/render.ts:72