Skip to main content

CallableNodeApi

A collision-safe node API that is also an Angular signal of the exposed node value. Concrete node APIs satisfy WritableSignal<T> and expose a stable asReadonly() value view.

Import

import type { CallableNodeApi } from '@ngblocks/form-nodes';

When to use it

Use to describe a collision-safe API that is also callable as a signal. Calling it reads the exposed node value; its own members are not replaced by child names.

Declaration

type CallableNodeApi<TApi extends {
value: Signal<any>;
}> = NodeSignal<ReturnType<TApi['value']>> & TApi & HiddenFunctionMembers<keyof TApi>;

Type parameters

ParameterConstraintDefault
TApi{ value: Signal<any> }Required