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

providePacerOptions.md

39 lines842 Bytes

1---
2id: providePacerOptions
3title: providePacerOptions
4---
5​
6```ts
7function providePacerOptions(host, options): void;
8```
9​
10Defined in: [provider/PacerProvider.ts:55](https://github.com/TanStack/pacer/blob/main/packages/lit-pacer/src/provider/PacerProvider.ts#L55)
11​
12Supplies reactive defaults for this host and its descendants, including across
13shadow roots. Call during construction, before creating utilities. The nearest
14provider wins, and each utility's local options override provider defaults.
15​
16## Parameters
17​
18### host
19​
20`ReactiveControllerHost`
21​
22### options
23​
24[`LitPacerOptions`](../type-aliases/LitPacerOptions.md)\<[`PacerProviderOptions`](../interfaces/PacerProviderOptions.md)\>
25​
26## Returns
27​
28`void`
29​
30## Example
31​
32```ts
33constructor() {
34 super()
35 providePacerOptions(this, () => ({
36 debouncer: { leading: this.leading },
37 }))
39```