Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

DebounceStrategyOptions.md

47 lines1.0 KB

1---
2id: DebounceStrategyOptions
3title: DebounceStrategyOptions
4---
5​
6# Interface: DebounceStrategyOptions
7​
8Defined in: [packages/db/src/strategies/types.ts:30](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L30)
9​
10Options for debounce strategy
11Delays execution until after a period of inactivity
12​
13## Properties
14​
15### leading?
16​
17```ts
18optional leading: boolean;
19```
20​
21Defined in: [packages/db/src/strategies/types.ts:34](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L34)
22​
23Execute immediately on the first call
24​
25***
26​
27### trailing?
28​
29```ts
30optional trailing: boolean;
31```
32​
33Defined in: [packages/db/src/strategies/types.ts:36](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L36)
34​
35Execute after the wait period on the last call
36​
37***
38​
39### wait
40​
41```ts
42wait: number;
43```
44​
45Defined in: [packages/db/src/strategies/types.ts:32](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L32)
46​
47Wait time in milliseconds before execution