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

ThrottleStrategyOptions.md

45 lines991 Bytes

1---
2id: ThrottleStrategyOptions
3title: ThrottleStrategyOptions
4---
5​
6Defined in: [packages/db/src/strategies/types.ts:74](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L74)
7​
8Options for throttle strategy
9Ensures executions are evenly spaced over time
10​
11## Properties
12​
13### leading?
14​
15```ts
16optional leading: boolean;
17```
18​
19Defined in: [packages/db/src/strategies/types.ts:78](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L78)
20​
21Execute immediately on the first call
22​
23***
24​
25### trailing?
26​
27```ts
28optional trailing: boolean;
29```
30​
31Defined in: [packages/db/src/strategies/types.ts:80](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L80)
32​
33Execute on the last call after wait period
34​
35***
36​
37### wait
38​
39```ts
40wait: number;
41```
42​
43Defined in: [packages/db/src/strategies/types.ts:76](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L76)
44​
45Minimum wait time between executions (milliseconds)