@telegram-apps/toolkit
Version:
Internal toolkit used in the @telegram-apps packages.
10 lines (9 loc) • 371 B
TypeScript
export type CallbackFn = () => void;
/**
* Returns a tuple, containing function to add cleanup, call cleanup, and flag showing whether
* cleanup was called. Cleanup will not be performed in case, it was done before.
*/
export declare function createCbCollector(...cbs: (CallbackFn | CallbackFn[])[]): [
add: (...fns: CallbackFn[]) => void,
call: () => void
];