export type MyCallback = (...param: Argument) => boolean | undefined | void; /** * Manage a list of callback */ export declare class CallbackList { protected list: MyCallback[]; protected running: boolean; constructor(initial?: readonly MyCallback[]); count(): number; /** * remove all callback */ reset(): void; /** * @param name optional name of `item` (will assign displayName to `item`) * @returns function list length */ add(item: MyCallback, name?: string): number; /** * @returns if removed: return `item`; if did not exists: return null */ remove(item: MyCallback): null | MyCallback; /** * in a callback, return false (not 0 or other falsy value) to stop execute * @returns {boolean} true if every callback called, false if stop in middle */ run(...argument: Argument): boolean; } //# sourceMappingURL=callback-list.d.ts.map