MCPcopy
hub / github.com/angular/angular / apply

Function apply

packages/forms/signals/src/api/structure.ts:303–311  ·  view source on GitHub ↗
(
  path: SchemaPath<TValue>,
  schema: NoInfer<SchemaOrSchemaFn<TValue>>,
)

Source from the content-addressed store, hash-verified

301 * @publicApi 22.0
302 */
303export function apply<TValue>(
304 path: SchemaPath<TValue>,
305 schema: NoInfer<SchemaOrSchemaFn<TValue>>,
306): void {
307 assertPathIsCurrent(path);
308
309 const pathNode = FieldPathNode.unwrapFieldPath(path);
310 pathNode.mergeIn(SchemaImpl.create(schema));
311}
312
313/**
314 * Conditionally applies a predefined schema to a given `FieldPath`.

Callers 4

structure.spec.tsFile · 0.90
applyEachFunction · 0.70
field_node.spec.tsFile · 0.50
path.spec.tsFile · 0.50

Calls 4

assertPathIsCurrentFunction · 0.90
unwrapFieldPathMethod · 0.80
createMethod · 0.65
mergeInMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…