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

Function apply

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

Source from the content-addressed store, hash-verified

328 * @publicApi 22.0
329 */
330export function apply<TValue>(
331 path: SchemaPath<TValue>,
332 schema: NoInfer<SchemaOrSchemaFn<TValue>>,
333): void {
334 assertPathIsCurrent(path);
335
336 const pathNode = FieldPathNode.unwrapFieldPath(path);
337 pathNode.mergeIn(SchemaImpl.create(schema));
338}
339
340/**
341 * 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