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

Function apply

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

Source from the content-addressed store, hash-verified

313 * @publicApi 22.0
314 */
315export function apply<TValue>(
316 path: SchemaPath<TValue>,
317 schema: NoInfer<SchemaOrSchemaFn<TValue>>,
318): void {
319 assertPathIsCurrent(path);
320
321 const pathNode = FieldPathNode.unwrapFieldPath(path);
322 pathNode.mergeIn(SchemaImpl.create(schema));
323}
324
325/**
326 * 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