MCPcopy
hub / github.com/angular/angular / debounce

Function debounce

packages/forms/signals/src/api/rules/debounce.ts:29–38  ·  view source on GitHub ↗
(
  path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
  config: number | 'blur' | Debouncer<TValue, TPathKind>,
)

Source from the content-addressed store, hash-verified

27 * @publicApi 22.0
28 */
29export function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(
30 path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,
31 config: number | 'blur' | Debouncer<TValue, TPathKind>,
32): void {
33 assertPathIsCurrent(path);
34
35 const pathNode = FieldPathNode.unwrapFieldPath(path);
36 const debouncer = normalizeDebouncer(config);
37 pathNode.builder.addMetadataRule(DEBOUNCER, () => debouncer);
38}
39
40function normalizeDebouncer<TValue, TPathKind extends PathKind>(
41 debouncer: number | 'blur' | Debouncer<TValue, TPathKind>,

Callers 8

TestCmpClass · 0.90
debounce.spec.tsFile · 0.90
schema1Function · 0.90
schema2Function · 0.90
ReproCmpClass · 0.85
TestCmpClass · 0.85
field_node.spec.tsFile · 0.85

Calls 4

assertPathIsCurrentFunction · 0.90
normalizeDebouncerFunction · 0.85
unwrapFieldPathMethod · 0.80
addMetadataRuleMethod · 0.45

Tested by 2

schema1Function · 0.72
schema2Function · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…