( path: SchemaPath<TValue>, schema: NoInfer<SchemaOrSchemaFn<TValue>>, )
| 313 | * @publicApi 22.0 |
| 314 | */ |
| 315 | export 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`. |
no test coverage detected