(path: SchemaPath<unknown>)
| 107 | |
| 108 | /** Checks that a path node belongs to the schema function currently being compiled. */ |
| 109 | export 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 | } |
no test coverage detected
searching dependent graphs…