@threadplane/renderInterfacev0.3.4

RenderHost

The element-scoped host a mounted view component talks back through. Agent-agnostic: result(value) just means "this component produced a value"; the render lib surfaces it as a RenderResultEvent and never interprets it. Provided per-element by RenderElementComponent, and once per row for a repeating element, so emit carries the row that fired it and { $item: … } action params resolve in that row's scope.

import type { RenderHost } from '@threadplane/render';

Declaration

export interface RenderHost  {
  emit(event: string, payload?: Record<string, unknown>): void;
  result(value: unknown): void;
  set(path: string, value: unknown): void;
}

Members

emit · overload 1

Fire a named event; routed to the element's on[event] handlers.

emit(event: string, payload?: Record<string, unknown>): void;

Parameters

event · required
string
payload · optional
Record<string, unknown>

Returns

void

result · overload 1

Announce this component's result value (e.g. a HITL submission).

result(value: unknown): void;

Parameters

value · required
unknown

Returns

void

set · overload 1

Write a value to the render state store at a JSON-Pointer path.

set(path: string, value: unknown): void;

Parameters

path · required
string
value · required
unknown

Returns

void