Skip to main content

Module: core/render

This module defines the core rendering interfaces for AI.JSX.

See: https://ai-jsx.com for more details.

Interfaces

Type Aliases

Renderable

Ƭ Renderable: Node | PromiseLike<Renderable> | RenderableStream

A Renderable represents a value that can be rendered to a string.

Defined in

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

Functions

AppendOnlyStream

AppendOnlyStream(node?): Object

A value that can be yielded by a component to indicate that each yielded value should be appended to, rather than replace, the previously yielded values.

Parameters

NameType
node?Node

Returns

Object

NameType
[appendOnlyStreamSymbol]Node

Defined in

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


createRenderContext

createRenderContext(opts?): RenderContext

Creates a new RenderContext with the provided logger.

Parameters

NameType
opts?Object
opts.enableOpenTelemetry?boolean
opts.logger?LogImplementation

Returns

RenderContext

A new RenderContext.

Defined in

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