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

Function applyEach

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

Source from the content-addressed store, hash-verified

280 schema: NoInfer<SchemaOrSchemaFn<ItemType<TValue>, PathKind.Child>>,
281): void;
282export function applyEach<TValue extends Object>(
283 path: SchemaPath<TValue>,
284 schema: NoInfer<SchemaOrSchemaFn<ItemType<TValue>, PathKind.Item>>,
285): void {
286 assertPathIsCurrent(path);
287
288 const elementPath = FieldPathNode.unwrapFieldPath(path).getChild(DYNAMIC).fieldPathProxy;
289 apply(elementPath, schema as Schema<TValue>);
290}
291
292/**
293 * 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