Skip to main content

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

TypePurpose
AddedNodeResult of attaching a node definition or shorthand dynamically to an object node.
AnyNodeCommon callable contract for any field, group, form, or array node.
ArrayIndexesNumeric node access with parent-aware array item types.
ArrayItemNodeThe existing item node type of an array node, excluding undefined.
ArrayItemsThe typed collection of item nodes exposed by an array node.
ArrayItemWithParentAn array item node whose parent is typed as the owning array.
ArrayNodeArray 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.
ArrayPatchComplete readonly sequence accepted by an array node's patch(), identical to its set value.
ArraySetComplete readonly sequence accepted by an array node's set().
ArrayValueMutable array value produced by an array node, with every item mapped to its readable value.
DynamicFormChildrenReadonly runtime-key map of dynamic and initially declared children.
DynamicNodeA dynamically discovered node whose concrete primitive is not known statically.
FieldNodeA field node. Omit TValue for an unspecified value, or supply it to constrain reads and writes.
FormNodeForm node model. Omit the first type argument for an unspecified structure, or provide it to preserve exact child types.
FormNodeValueCommitted value inferred from any form(), group(), array(), or field() instance. Equivalent to ReturnType<TNode>; preserves nested values and field nullability.
FormPatchPartial object accepted by a form's patch(); omitted properties remain unchanged, but supplied arrays require complete item values and reconcile like set().
FormSetComplete object accepted by a form's set(), recursively using each child's set type.
FormValueObject value produced by a form, with each child node mapped to its readable value.
FormValueContractStructural contract for checking a form or group against an aggregate value type without replacing its inferred child-node types.
GroupNodeAn 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.
GroupPatchPartial object accepted by a group's patch(); omitted child properties remain unchanged and supplied arrays require complete item values.
GroupSetComplete object accepted by a group's set(), recursively using each child's set type.
GroupValueObject value produced by a group, with each child node mapped to its readable value.
NodeValueSignalReactive 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

TypePurpose
ArrayApiState and operations for an array node, including item access and reconciliation.
CallableNodeApiA 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.
FieldApiState, value views, navigation, and operations available on a field node.
FormApiState and operations for a form, including typed children and submission.
GroupApiState and operations for a structural group, including its typed children.
NodeApiThe common API surface shared by all node kinds.
NodeErrorsSignalReactive 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

TypePurpose
ClosestFormStateShared submission state of the form visible through Angular dependency injection.
ControlErrorErrors a custom control may contribute without targeting another control.
ControlStateRead-only state of the form binding attached to a custom-control component.
ControlStateDisabledReasonA source-neutral explanation for why the bound control is disabled.
ControlStateErrorA validation error normalized across supported Angular form-binding APIs.
ControlStateSourceBinding APIs that can supply a universal ControlState state facade.
FormNodeBindingPublic view of a concrete [formNode] binding.
FormNodeCheckboxControlA custom control exposing a boolean checked model for [formNode].
FormNodeControlEither a value control or, for boolean values, a checkbox control recognized by [formNode].
FormNodeDirectiveThe public instance type of the [formNode] Angular directive.
FormNodeErrorsContextContext supplied once to the projected #message template when visible messages exist.
FormNodeStateOptionsReactive error contribution configured by a custom-control component.
FormNodeSubmitEventA native form submission attempt. Values are exposed snapshots; form is the bound node.
FormNodeUiControlOptional state inputs and interaction hooks recognized by [formNode] on Angular 21 and 22.
FormNodeValueControlA custom control exposing a value model for [formNode].

Validator contracts

TypePurpose
AsyncValidatorValidator marked by asyncValidator() for asynchronous scheduling and cancellation.
AsyncValidatorApiDefault owner API shape used to specialize asynchronous validator contexts. The context exposes a readonly validation view; its node cannot be mutated through that view.
AsyncValidatorBaseContextReactive context shared by asynchronous validator conditions, params, and handlers.
AsyncValidatorContextReactive node context and cancellation signal provided to an asynchronous validator run.
AsyncValidatorOptionsScheduling, activation, and failure-handling options for asyncValidator().
AsyncValidatorStateNon-validation state available through the validated node API.
ComposableValidatorValidator that may return errors directly or compose one or more validators dynamically.
FieldContextReactive context available to validation functions for the current field.
ParameterizedAsyncValidatorConfigThe object-form asyncValidator configuration, combining reactive params with an asynchronous validate callback.
ParameterizedAsyncValidatorContextAsynchronous validator context extended with the current reactive parameter snapshot.
ParameterizedAsyncValidatorOptionsOptions for an async validator whose tracked dependencies are exposed as a typed snapshot.
ValidatorSynchronous validator receiving the current value as a reactive signal.
ValidatorApiCommon node API exposed to validators when no exact owner API is specified.
ValidatorContextReactive 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.
ValidatorOptionsCommon options supported by built-in validators.
ValidatorReadonlyApiReactive value and navigation shared by all validator context specializations.
ValidatorsReadonly normalized collection of composable validators for a node value.
ValidatorSourceOne validator or a readonly list in which null and undefined represent no validator.

Validation errors and results

TypePurpose
AsyncValidationResultPromise-like or observable-like result accepted from an asynchronous validator.
BuiltInValidationErrorUnion of every validation error provided by the library.
ComposableValidationResultResult accepted from a composable validator, including nested validators and successful entries.
CustomValidationErrorA custom validation error whose additional application-specific properties remain unknown.
ValidationErrorA validation error produced by a validator.
ValidationErrorForKindResolves a known error kind to its structured type, with a generic fallback for custom kinds.
ValidationErrorMapExtensible registry used to resolve structured errors by their discriminating kind.
ValidationErrorWithOptionalTargetNodeAn error that may already define its target node.
ValidationErrorWithoutTargetNodeAn error returned by a field validator before its target node is assigned.
ValidationErrorWithTargetNodeAn error associated with a specific target node.
ValidationResultA 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.
ValidationStatusAggregate result of validation; it does not describe the node's value type.
ValidationSuccessIndicates that validation completed without errors.
ValidatorErrorAn error returned by a validator, optionally assigned to another node.

Configuration

TypePurpose
ArrayOptionsTemplate, initial-data, validation, and ownership configuration for array().
DisabledReasonIdentifies one active cause of a node's disabled state.
DisabledStateSourceA static or reactive condition that disables a node, optionally with a user-facing reason.
FieldOptionsValue, validation, interaction, and ownership configuration for field().
FormNodesConfigInjector-scoped validator messages and configuration for [formNode] bindings.
FormOptionsValue, validation, interaction, ownership, and submission configuration for form().
GlobalFormNodesConfigProcess-wide defaults below injector-scoped configuration.
GroupOptionsConfiguration shared by object-shaped groups, excluding form submission behavior.
MarkAsTouchedOptionsOptions controlling whether markAsTouched() propagates to descendants.
SyncInputNameNames accepted when selecting individual synchronized control inputs.
SyncInputsControls which node states and constraints are synchronized to a bound control.
ValidatorMessageParametersStructured built-in error data available to a configured message function.
ValidatorMessagesPartial catalog used to replace built-in validator messages by error kind.

Configured factories

TypePurpose
ArrayFactoryThe array factory returned by createFormPrimitives().
FieldFactoryA configured field factory with nullable and strict declaration modes.
FormFactoryThe form factory returned by createFormPrimitives().
FormPrimitivesThe family of configured field, form, group, and array factories.
FormPrimitivesOptionsShared defaults supplied to createFormPrimitives().
GroupFactoryThe group factory returned by createFormPrimitives().
NonNullableFieldFactoryA configured field factory whose default declarations exclude null.

Observable interoperability

TypePurpose
ObservableLikeFramework-neutral subset of an Observable accepted from asynchronous validators.
ObserverLikeMinimal observer contract accepted from an asynchronous validation source.
SubscriptionLikeHandle returned by an observable-like source so the current validation run can release it.

Query parameter synchronization

TypePurpose
QueryParamBindingOptions for one form node or writable signal in a query parameter map.
QueryParamSerializerConverts decoded, repeated query values to a source value and back.
QueryParamsSyncA live query connection with raw URL signals and explicit lifecycle control.
QueryParamSyncErrorA URL conversion or navigation failure, independent of form validation.
QueryParamUrlSyncEventValues captured after importing a complete query parameter synchronization.
SyncQueryParamsOptionsShared options for a synchronized query parameter map.