Public types
Every consumer-facing type alias and interface exported by @ngblocks/form-nodes or its /router entry point has a dedicated
reference below. Prefer inference for node declarations; use these types for component inputs,
reusable helpers, validator contracts, and integration boundaries.
Import types from the entry point shown on each reference page. Declarations show their exact generic defaults and constraints;
helper names appearing inside a declaration are not necessarily public imports. Follow the linked
public types and the associated API guide for practical usage. Types do not create runtime objects.
FormNodeDirective also has a runtime Angular import documented on the binding reference.
FormNodesModule is documented as an Angular module; _FormNode is an AOT implementation export,
not a consumer type to import.
Start with custom control contracts or validation error types when integrating components or error displays.
Nodes and values
| Type | Purpose |
|---|---|
| AddedNode | Result of attaching a node definition or shorthand dynamically to an object node. |
| AnyNode | Common callable contract for any field, group, form, or array node. |
| ArrayIndexes | Numeric node access with parent-aware array item types. |
| ArrayItemNode | The existing item node type of an array node, excluding undefined. |
| ArrayItems | The typed collection of item nodes exposed by an array node. |
| ArrayItemWithParent | An array item node whose parent is typed as the owning array. |
| ArrayNode | Array node model. Omit the first type argument for an unspecified structure, or provide it to preserve exact item types. Generic array nodes retain array operations. |
| ArrayPatch | Complete readonly sequence accepted by an array node's patch(), identical to its set value. |
| ArraySet | Complete readonly sequence accepted by an array node's set(). |
| ArrayValue | Mutable array value produced by an array node, with every item mapped to its readable value. |
| DynamicFormChildren | Readonly runtime-key map of dynamic and initially declared children. |
| DynamicNode | A dynamically discovered node whose concrete primitive is not known statically. |
| FieldNode | A field node. Omit TValue for an unspecified value, or supply it to constrain reads and writes. |
| FormNode | Form node model. Omit the first type argument for an unspecified structure, or provide it to preserve exact child types. |
| FormNodeValue | Committed value inferred from any form(), group(), array(), or field() instance. Equivalent to ReturnType<TNode>; preserves nested values and field nullability. |
| FormPatch | Partial object accepted by a form's patch(); omitted properties remain unchanged, but supplied arrays require complete item values and reconcile like set(). |
| FormSet | Complete object accepted by a form's set(), recursively using each child's set type. |
| FormValue | Object value produced by a form, with each child node mapped to its readable value. |
| FormValueContract | Structural contract for checking a form or group against an aggregate value type without replacing its inferred child-node types. |
| GroupNode | An object-shaped structural node without its own submission workflow. Omit the first type argument for an unspecified structure, or provide it to preserve exact child types. |
| GroupPatch | Partial object accepted by a group's patch(); omitted child properties remain unchanged and supplied arrays require complete item values. |
| GroupSet | Complete object accepted by a group's set(), recursively using each child's set type. |
| GroupValue | Object value produced by a group, with each child node mapped to its readable value. |
| NodeValueSignal | Reactive value views shared by fields, groups, forms, and arrays. Calling this signal is equivalent to calling the node: configured equal checks can retain an earlier equivalent value. Prefer calling the node for ordinary application reads. |
Node APIs
| Type | Purpose |
|---|---|
| ArrayApi | State and operations for an array node, including item access and reconciliation. |
| 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. |
| FieldApi | State, value views, navigation, and operations available on a field node. |
| FormApi | State and operations for a form, including typed children and submission. |
| GroupApi | State and operations for a structural group, including its typed children. |
| NodeApi | The common API surface shared by all node kinds. |
| NodeErrorsSignal | Reactive own-error signal with an optional descendant query. Calling with no options or descendants:false preserves the owning node's target type. descendants:true includes the subtree and is equivalent to allErrors(); descendant targets retain their original nodes and therefore have the broader AnyNode type. |
Controls and bindings
| Type | Purpose |
|---|---|
| ClosestFormState | Shared submission state of the form visible through Angular dependency injection. |
| ControlError | Errors a custom control may contribute without targeting another control. |
| ControlState | Read-only state of the form binding attached to a custom-control component. |
| ControlStateDisabledReason | A source-neutral explanation for why the bound control is disabled. |
| ControlStateError | A validation error normalized across supported Angular form-binding APIs. |
| ControlStateSource | Binding APIs that can supply a universal ControlState state facade. |
| FormNodeBinding | Public view of a concrete [formNode] binding. |
| FormNodeCheckboxControl | A custom control exposing a boolean checked model for [formNode]. |
| FormNodeControl | Either a value control or, for boolean values, a checkbox control recognized by [formNode]. |
| FormNodeDirective | The public instance type of the [formNode] Angular directive. |
| FormNodeErrorsContext | Context supplied once to the projected #message template when visible messages exist. |
| FormNodeStateOptions | Reactive error contribution configured by a custom-control component. |
| FormNodeSubmitEvent | A native form submission attempt. Values are exposed snapshots; form is the bound node. |
| FormNodeUiControl | Optional state inputs and interaction hooks recognized by [formNode] on Angular 21 and 22. |
| FormNodeValueControl | A custom control exposing a value model for [formNode]. |
Validator contracts
| Type | Purpose |
|---|---|
| AsyncValidator | Validator marked by asyncValidator() for asynchronous scheduling and cancellation. |
| AsyncValidatorApi | Default owner API shape used to specialize asynchronous validator contexts. The context exposes a readonly validation view; its node cannot be mutated through that view. |
| AsyncValidatorBaseContext | Reactive context shared by asynchronous validator conditions, params, and handlers. |
| AsyncValidatorContext | Reactive node context and cancellation signal provided to an asynchronous validator run. |
| AsyncValidatorOptions | Scheduling, activation, and failure-handling options for asyncValidator(). |
| AsyncValidatorState | Non-validation state available through the validated node API. |
| ComposableValidator | Validator that may return errors directly or compose one or more validators dynamically. |
| FieldContext | Reactive context available to validation functions for the current field. |
| ParameterizedAsyncValidatorConfig | The object-form asyncValidator configuration, combining reactive params with an asynchronous validate callback. |
| ParameterizedAsyncValidatorContext | Asynchronous validator context extended with the current reactive parameter snapshot. |
| ParameterizedAsyncValidatorOptions | Options for an async validator whose tracked dependencies are exposed as a typed snapshot. |
| Validator | Synchronous validator receiving the current value as a reactive signal. |
| ValidatorApi | Common node API exposed to validators when no exact owner API is specified. |
| ValidatorContext | Reactive context provided to synchronous validators. Generic public owners retain TValue on their node value reads. Concrete owners and partial structural owner contracts retain their value and child types through a read-only validation view. Validation outputs, metadata queries, and mutations are omitted recursively. |
| ValidatorOptions | Common options supported by built-in validators. |
| ValidatorReadonlyApi | Reactive value and navigation shared by all validator context specializations. |
| Validators | Readonly normalized collection of composable validators for a node value. |
| ValidatorSource | One validator or a readonly list in which null and undefined represent no validator. |
Validation errors and results
| Type | Purpose |
|---|---|
| AsyncValidationResult | Promise-like or observable-like result accepted from an asynchronous validator. |
| BuiltInValidationError | Union of every validation error provided by the library. |
| ComposableValidationResult | Result accepted from a composable validator, including nested validators and successful entries. |
| CustomValidationError | A custom validation error whose additional application-specific properties remain unknown. |
| ValidationError | A validation error produced by a validator. |
| ValidationErrorForKind | Resolves a known error kind to its structured type, with a generic fallback for custom kinds. |
| ValidationErrorMap | Extensible registry used to resolve structured errors by their discriminating kind. |
| ValidationErrorWithOptionalTargetNode | An error that may already define its target node. |
| ValidationErrorWithoutTargetNode | An error returned by a field validator before its target node is assigned. |
| ValidationErrorWithTargetNode | An error associated with a specific target node. |
| ValidationResult | A successful result, an error or message, or several errors and messages. Strings become errors with kind 'custom', including empty strings. Numeric error kinds are normalized to strings. |
| ValidationStatus | Aggregate result of validation; it does not describe the node's value type. |
| ValidationSuccess | Indicates that validation completed without errors. |
| ValidatorError | An error returned by a validator, optionally assigned to another node. |
Configuration
| Type | Purpose |
|---|---|
| ArrayOptions | Template, initial-data, validation, and ownership configuration for array(). |
| DisabledReason | Identifies one active cause of a node's disabled state. |
| DisabledStateSource | A static or reactive condition that disables a node, optionally with a user-facing reason. |
| FieldOptions | Value, validation, interaction, and ownership configuration for field(). |
| FormNodesConfig | Injector-scoped validator messages and configuration for [formNode] bindings. |
| FormOptions | Value, validation, interaction, ownership, and submission configuration for form(). |
| GlobalFormNodesConfig | Process-wide defaults below injector-scoped configuration. |
| GroupOptions | Configuration shared by object-shaped groups, excluding form submission behavior. |
| MarkAsTouchedOptions | Options controlling whether markAsTouched() propagates to descendants. |
| SyncInputName | Names accepted when selecting individual synchronized control inputs. |
| SyncInputs | Controls which node states and constraints are synchronized to a bound control. |
| ValidatorMessageParameters | Structured built-in error data available to a configured message function. |
| ValidatorMessages | Partial catalog used to replace built-in validator messages by error kind. |
Configured factories
| Type | Purpose |
|---|---|
| ArrayFactory | The array factory returned by createFormPrimitives(). |
| FieldFactory | A configured field factory with nullable and strict declaration modes. |
| FormFactory | The form factory returned by createFormPrimitives(). |
| FormPrimitives | The family of configured field, form, group, and array factories. |
| FormPrimitivesOptions | Shared defaults supplied to createFormPrimitives(). |
| GroupFactory | The group factory returned by createFormPrimitives(). |
| NonNullableFieldFactory | A configured field factory whose default declarations exclude null. |
Observable interoperability
| Type | Purpose |
|---|---|
| ObservableLike | Framework-neutral subset of an Observable accepted from asynchronous validators. |
| ObserverLike | Minimal observer contract accepted from an asynchronous validation source. |
| SubscriptionLike | Handle returned by an observable-like source so the current validation run can release it. |
Query parameter synchronization
| Type | Purpose |
|---|---|
| QueryParamBinding | Options for one form node or writable signal in a query parameter map. |
| QueryParamSerializer | Converts decoded, repeated query values to a source value and back. |
| QueryParamsSync | A live query connection with raw URL signals and explicit lifecycle control. |
| QueryParamSyncError | A URL conversion or navigation failure, independent of form validation. |
| QueryParamUrlSyncEvent | Values captured after importing a complete query parameter synchronization. |
| SyncQueryParamsOptions | Shared options for a synchronized query parameter map. |