@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/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: NodeJS.Timeout | null = null
275
+ #timeoutId: ReturnType<typeof setTimeout> | null = null
276
276
 
277
277
  constructor(
278
278
  public fn: (item: TValue) => void,
@@ -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<NodeJS.Timeout> = new 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: NodeJS.Timeout): void => {
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: NodeJS.Timeout | undefined
156
+ #timeoutId: ReturnType<typeof setTimeout> | undefined
157
157
 
158
158
  constructor(
159
159
  public fn: TFn,