( path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, config: number | 'blur' | Debouncer<TValue, TPathKind>, )
| 27 | * @publicApi 22.0 |
| 28 | */ |
| 29 | export 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 | |
| 40 | function normalizeDebouncer<TValue, TPathKind extends PathKind>( |
| 41 | debouncer: number | 'blur' | Debouncer<TValue, TPathKind>, |
searching dependent graphs…