@jcoreio/async-throttle
Advanced tools
Comparing version 1.5.0 to 1.6.0
export class CanceledError extends Error {} | ||
export type ThrottledFunction<Args extends any[], Value> = { | ||
(...args: Args): Promise<Value> | ||
invokeIgnoreResult: (...args: Args) => void | ||
cancel: () => Promise<void> | ||
flush: () => Promise<void> | ||
} | ||
export default function throttle<Args extends any[], Value>( | ||
@@ -9,7 +16,2 @@ fn: (...args: Args) => Value | Promise<Value>, | ||
} | ||
): { | ||
(...args: Args): Promise<Value> | ||
invokeIgnoreResult: (...args: Args) => void | ||
cancel: () => Promise<void> | ||
flush: () => Promise<void> | ||
} | ||
): ThrottledFunction<Args, Value> |
export class CanceledError extends Error {} | ||
export type ThrottledFunction<Args extends any[], Value> = { | ||
(...args: Args): Promise<Value> | ||
invokeIgnoreResult: (...args: Args) => void | ||
cancel: () => Promise<void> | ||
flush: () => Promise<void> | ||
} | ||
export default function throttle<Args extends any[], Value>( | ||
@@ -9,7 +16,2 @@ fn: (...args: Args) => Value | Promise<Value>, | ||
} | ||
): { | ||
(...args: Args): Promise<Value> | ||
invokeIgnoreResult: (...args: Args) => void | ||
cancel: () => Promise<void> | ||
flush: () => Promise<void> | ||
} | ||
): ThrottledFunction<Args, Value> |
{ | ||
"name": "@jcoreio/async-throttle", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "throttle async and promise-returning functions. Other packages don't do it right.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31070
341