UNPKG

one-firework

Version:

A library for singal use function execution.

12 lines (11 loc) 341 B
type AnyFunction = (...args: any[]) => any; interface FireworkOptions { throwOnMaxCalls?: boolean; fireShots?: number; } interface FireworkFactory { <T extends AnyFunction>(function_: T, options?: FireworkOptions): T; fired(function_: AnyFunction): number; } declare const firework: FireworkFactory; export default firework;