MCPcopy Create free account
hub / github.com/angular/angular / hidden

Function hidden

packages/forms/signals/src/api/rules/hidden.ts:52–65  ·  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

50): void;
51
52export 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 = typeof configOrLogic === 'function' ? configOrLogic : configOrLogic.when;
63
64 pathNode.builder.addHiddenRule(logic);
65}

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