@known-as-bmf/hookable
Version:
Function hooking utility.
18 lines • 476 B
TypeScript
import { AnyFn, Hook } from './types';
/**
* Create a hook subscriber that never unsubscribes.
*
* @param fn - The hook to register.
*
* @public
*/
export declare const every: <H extends AnyFn>(fn: H) => Hook<H>;
/**
* Create a hook subscriber that unsubscribes after the first call.
*
* @param fn - The hook to register.
*
* @public
*/
export declare const once: <H extends AnyFn>(fn: H) => Hook<H>;
//# sourceMappingURL=hook-subscribers.d.ts.map