( path: SchemaPath<TValue>, schema: NoInfer<SchemaOrSchemaFn<TValue>>, )
| 328 | * @publicApi 22.0 |
| 329 | */ |
| 330 | export function apply<TValue>( |
| 331 | path: SchemaPath<TValue>, |
| 332 | schema: NoInfer<SchemaOrSchemaFn<TValue>>, |
| 333 | ): void { |
| 334 | assertPathIsCurrent(path); |
| 335 | |
| 336 | const pathNode = FieldPathNode.unwrapFieldPath(path); |
| 337 | pathNode.mergeIn(SchemaImpl.create(schema)); |
| 338 | } |
| 339 | |
| 340 | /** |
| 341 | * Conditionally applies a predefined schema to a given `FieldPath`. |
no test coverage detected