(
path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
configOrLogic?:
| {when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>}
| NoInfer<LogicFn<TValue, boolean, TPathKind>>,
)
| 50 | ): void; |
| 51 | |
| 52 | export function hidden<TValue, TPathKind extends PathKind = PathKind.Root>( |
| 53 | path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, |
| 54 | configOrLogic?: |
| 55 | | {when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>} |
| 56 | | NoInfer<LogicFn<TValue, boolean, TPathKind>>, |
| 57 | ): void { |
| 58 | assertPathIsCurrent(path); |
| 59 | |
| 60 | const pathNode = FieldPathNode.unwrapFieldPath(path); |
| 61 | |
| 62 | const logic = |
| 63 | typeof configOrLogic === 'function' ? configOrLogic : (configOrLogic?.when ?? (() => true)); |
| 64 | |
| 65 | pathNode.builder.addHiddenRule(logic); |
| 66 | } |
no test coverage detected