MCPcopy
hub / github.com/angular/angular / assertPathIsCurrent

Function assertPathIsCurrent

packages/forms/signals/src/schema/schema.ts:109–117  ·  view source on GitHub ↗
(path: SchemaPath<unknown>)

Source from the content-addressed store, hash-verified

107
108/** Checks that a path node belongs to the schema function currently being compiled. */
109export function assertPathIsCurrent(path: SchemaPath<unknown>): void {
110 if (currentCompilingNode !== FieldPathNode.unwrapFieldPath(path).root) {
111 throw new RuntimeError(
112 RuntimeErrorCode.PATH_OUTSIDE_SCHEMA,
113 ngDevMode &&
114 `A FieldPath can only be used directly within the Schema that owns it, **not** outside of it or within a sub-schema.`,
115 );
116 }
117}

Callers 11

applyEachFunction · 0.90
applyFunction · 0.90
applyWhenFunction · 0.90
disabledFunction · 0.90
metadataFunction · 0.90
debounceFunction · 0.90
hiddenFunction · 0.90
readonlyFunction · 0.90
validateTreeFunction · 0.90
validateFunction · 0.90
validateAsyncFunction · 0.90

Calls 1

unwrapFieldPathMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…