Interface: RenderResult<TIntermediate, TFinal>
core/render.RenderResult
The result of rendering. Can be await
ed 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/render.ts:116
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
Name | Type |
---|---|
TResult1 | TFinal |
TResult2 | never |
Parameters
Name | Type | Description |
---|---|---|
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.