Skip to main content

AlpineAsyncRateLimiter

还没翻译译自英文(tanstack.com)本页 26 段都还没译

Defined in: async-rate-limiter/createAsyncRateLimiter.ts:22

An AsyncRateLimiter with framework-reactive selected state. All core methods remain available.

Extends

  • Omit<AsyncRateLimiter<TFn>, "options" | "setOptions">

Type Parameters

TFn

TFn extends AnyAsyncFunction

TSelected

TSelected = { }

Properties

options

options: AsyncRateLimiterOptions<TFn> & AlpineAsyncRateLimiterOptions<TFn, TSelected>;

Defined in: async-rate-limiter/createAsyncRateLimiter.ts:26


setOptions

setOptions: (options) => void;

Defined in: async-rate-limiter/createAsyncRateLimiter.ts:28

Parameters

options

Partial<AlpineAsyncRateLimiterOptions<TFn, TSelected>>

Returns

void


state

readonly state: Readonly<TSelected>;

Defined in: async-rate-limiter/createAsyncRateLimiter.ts:34

Selected state. Pass a selector to opt in; the default selection is an empty object.


subscribe

subscribe: AlpinePacerSubscribe<AsyncRateLimiterState<TFn>>;

Defined in: async-rate-limiter/createAsyncRateLimiter.ts:32

Subscribes a child owner to selected state with automatic cleanup.