Appearance
Type Alias: RenderFunction()
ts
type RenderFunction = <T>(fn: (resolve: (value: T) => void) => unknown) => Promise<T>;Defined in: src/context/index.ts:26
Legacy ctx.render signature, kept on Context for backward compatibility with skills that still call it directly. The body is wired by the host runtime; new code should prefer the renderer entry-point (render(ctx, tree)).
Generic in the resolved value so resolve is typed at the call site: ctx.render<MyResult>((resolve) => { ... resolve(myResult) }) returns Promise<MyResult>. Defaults to unknown when the caller omits the type argument, preserving prior behavior.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type |
|---|---|
fn | (resolve: (value: T) => void) => unknown |
Returns
Promise<T>