dynamic-forms / Function

applySchema

Apply schema configuration. Accepts both SchemaPath and SchemaPathTree for flexibility.

Note: We cast fieldPath to suppress TypeScript's union type errors. This is safe because:

  1. We only use signal forms (not AbstractControl), so SchemaPathTree is always the supported branch
  2. The Angular apply functions accept SchemaPath with any value type
  3. The actual schema application happens at runtime via the schema function

Presentation

function applySchema(
  config: SchemaApplicationConfig,
  fieldPath: SchemaPath<unknown> | SchemaPath<unknown, 1, Root>,
): void;

Returns

void

Parameters

NameTypeDescription
config
SchemaApplicationConfig
fieldPath
SchemaPath<unknown> | SchemaPath<unknown, 1, Root>