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

Function debounce

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

Source from the content-addressed store, hash-verified

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