MCPcopy
hub / github.com/angular/angular / applyEach

Function applyEach

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

Source from the content-addressed store, hash-verified

270 schema: NoInfer<SchemaOrSchemaFn<ItemType<TValue>, PathKind.Child>>,
271): void;
272export function applyEach<TValue extends Object>(
273 path: SchemaPath<TValue>,
274 schema: NoInfer<SchemaOrSchemaFn<ItemType<TValue>, PathKind.Item>>,
275): void {
276 assertPathIsCurrent(path);
277
278 const elementPath = FieldPathNode.unwrapFieldPath(path).getChild(DYNAMIC).fieldPathProxy;
279 apply(elementPath, schema as Schema<TValue>);
280}
281
282/**
283 * Applies a predefined schema to a given `FieldPath`.

Callers 9

structure.spec.tsFile · 0.90
ReproCmpClass · 0.85
field_node.spec.tsFile · 0.85
path.spec.tsFile · 0.85
sFunction · 0.85
when.spec.tsFile · 0.85

Calls 4

assertPathIsCurrentFunction · 0.90
unwrapFieldPathMethod · 0.80
applyFunction · 0.70
getChildMethod · 0.65

Tested by 1

sFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…