MCPcopy
hub / github.com/angular/angular / hidden

Function hidden

packages/forms/signals/src/api/rules/hidden.ts:49–62  ·  view source on GitHub ↗
(
  path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
  configOrLogic:
    | {when: NoInfer<LogicFn<TValue, boolean, TPathKind>>}
    | NoInfer<LogicFn<TValue, boolean, TPathKind>>,
)

Source from the content-addressed store, hash-verified

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

Callers 7

TestCmpClass · 0.90
hidden.spec.tsFile · 0.90
TestCmpClass · 0.85
HiddenTestCmpClass · 0.85
field_node.spec.tsFile · 0.85
submit.spec.tsFile · 0.85
compat.spec.tsFile · 0.85

Calls 3

assertPathIsCurrentFunction · 0.90
unwrapFieldPathMethod · 0.80
addHiddenRuleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…