MCPcopy Create free account
hub / github.com/angular/angular / applyWhenValue

Function applyWhenValue

packages/forms/signals/src/api/structure.ts:405–411  ·  view source on GitHub ↗
(
  path: SchemaPath<unknown>,
  predicate: (value: unknown) => boolean,
  schema: SchemaOrSchemaFn<unknown>,
)

Source from the content-addressed store, hash-verified

403): void;
404
405export function applyWhenValue(
406 path: SchemaPath<unknown>,
407 predicate: (value: unknown) => boolean,
408 schema: SchemaOrSchemaFn<unknown>,
409) {
410 applyWhen(path, ({value}) => predicate(value()), schema);
411}
412
413/**
414 * Submits a given `FieldTree` using the given action function and applies any submission errors

Callers 3

debounce.spec.tsFile · 0.90
when.spec.tsFile · 0.85

Calls 3

applyWhenFunction · 0.85
valueFunction · 0.85
predicateFunction · 0.50

Tested by

no test coverage detected