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

ThrottleStrategyOptions.md

47 lines1.0 KB

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