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

Function applyWhenValue

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

Source from the content-addressed store, hash-verified

388): void;
389
390export function applyWhenValue(
391 path: SchemaPath<unknown>,
392 predicate: (value: unknown) => boolean,
393 schema: SchemaOrSchemaFn<unknown>,
394) {
395 applyWhen(path, ({value}) => predicate(value()), schema);
396}
397
398/**
399 * 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