@tanstack/pacer 0.20.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/async-batcher.cjs.map +1 -1
- package/dist/async-batcher.js.map +1 -1
- package/dist/async-debouncer.cjs.map +1 -1
- package/dist/async-debouncer.js.map +1 -1
- package/dist/async-queuer.cjs.map +1 -1
- package/dist/async-queuer.js.map +1 -1
- package/dist/async-rate-limiter.cjs.map +1 -1
- package/dist/async-rate-limiter.js.map +1 -1
- package/dist/async-retryer.cjs.map +1 -1
- package/dist/async-retryer.js.map +1 -1
- package/dist/async-throttler.cjs.map +1 -1
- package/dist/async-throttler.js.map +1 -1
- package/dist/batcher.cjs.map +1 -1
- package/dist/batcher.js.map +1 -1
- package/dist/debouncer.cjs.map +1 -1
- package/dist/debouncer.js.map +1 -1
- package/dist/queuer.cjs.map +1 -1
- package/dist/queuer.js.map +1 -1
- package/dist/rate-limiter.cjs.map +1 -1
- package/dist/rate-limiter.js.map +1 -1
- package/dist/throttler.cjs.map +1 -1
- package/dist/throttler.js.map +1 -1
- package/package.json +2 -2
- package/src/async-batcher.ts +1 -1
- package/src/async-debouncer.ts +1 -1
- package/src/async-queuer.ts +1 -1
- package/src/async-rate-limiter.ts +2 -2
- package/src/async-retryer.ts +1 -1
- package/src/async-throttler.ts +1 -1
- package/src/batcher.ts +1 -1
- package/src/debouncer.ts +1 -1
- package/src/queuer.ts +1 -1
- package/src/rate-limiter.ts +2 -2
- package/src/throttler.ts +1 -1
package/src/queuer.ts
CHANGED
|
@@ -272,7 +272,7 @@ export class Queuer<TValue> {
|
|
|
272
272
|
)
|
|
273
273
|
key: string | undefined
|
|
274
274
|
options: QueuerOptions<TValue>
|
|
275
|
-
#timeoutId:
|
|
275
|
+
#timeoutId: ReturnType<typeof setTimeout> | null = null
|
|
276
276
|
|
|
277
277
|
constructor(
|
|
278
278
|
public fn: (item: TValue) => void,
|
package/src/rate-limiter.ts
CHANGED
|
@@ -158,7 +158,7 @@ export class RateLimiter<TFn extends AnyFunction> {
|
|
|
158
158
|
new Store<RateLimiterState>(getDefaultRateLimiterState())
|
|
159
159
|
key: string | undefined
|
|
160
160
|
options: RateLimiterOptions<TFn>
|
|
161
|
-
#timeoutIds: Set<
|
|
161
|
+
#timeoutIds: Set<ReturnType<typeof setTimeout>> = new Set()
|
|
162
162
|
|
|
163
163
|
constructor(
|
|
164
164
|
public fn: TFn,
|
|
@@ -328,7 +328,7 @@ export class RateLimiter<TFn extends AnyFunction> {
|
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
#clearTimeout = (timeoutId:
|
|
331
|
+
#clearTimeout = (timeoutId: ReturnType<typeof setTimeout>): void => {
|
|
332
332
|
clearTimeout(timeoutId)
|
|
333
333
|
this.#timeoutIds.delete(timeoutId)
|
|
334
334
|
}
|
package/src/throttler.ts
CHANGED
|
@@ -153,7 +153,7 @@ export class Throttler<TFn extends AnyFunction> {
|
|
|
153
153
|
)
|
|
154
154
|
key: string | undefined
|
|
155
155
|
options: ThrottlerOptions<TFn>
|
|
156
|
-
#timeoutId:
|
|
156
|
+
#timeoutId: ReturnType<typeof setTimeout> | undefined
|
|
157
157
|
|
|
158
158
|
constructor(
|
|
159
159
|
public fn: TFn,
|