Skip to main content

Interface: RenderResult<TIntermediate, TFinal>

core/core.RenderResult

The result of rendering. Can be awaited for the final result or used as an async iterable to access the intermediate and final results.

Type parameters

Name
TIntermediate
TFinal

Properties

[asyncIterator]

[asyncIterator]: () => AsyncIterator<TIntermediate, TFinal, unknown>

Type declaration

▸ (): AsyncIterator<TIntermediate, TFinal, unknown>

Returns

AsyncIterator<TIntermediate, TFinal, unknown>

Defined in

packages/ai-jsx/src/core/core.ts:127


then

then: <TResult1, TResult2>(onfulfilled?: null | (value: TFinal) => TResult1 | PromiseLike<TResult1>, onrejected?: null | (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>

Type declaration

▸ <TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>

Attaches callbacks for the resolution and/or rejection of the Promise.

Type parameters
NameType
TResult1TFinal
TResult2never
Parameters
NameTypeDescription
onfulfilled?null | (value: TFinal) => TResult1 | PromiseLike<TResult1>The callback to execute when the Promise is resolved.
onrejected?null | (reason: any) => TResult2 | PromiseLike<TResult2>The callback to execute when the Promise is rejected.
Returns

Promise<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Defined in

packages/ai-jsx/src/core/core.ts:126