mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
15 lines
546 B
TypeScript
15 lines
546 B
TypeScript
//#region src/function/compose-callbacks.d.ts
|
|
/**
|
|
* Composes multiple callbacks into one. All callbacks receive same args, no return value.
|
|
* Returns undefined if no callbacks provided.
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* const onSetup = composeCallbacks(base.onSetup, extension.onSetup);
|
|
* onSetup?.(ctx); // Calls both if defined
|
|
* ```
|
|
*/
|
|
declare function composeCallbacks<T extends (...args: any[]) => void>(...fns: (T | undefined | null)[]): T | undefined;
|
|
//#endregion
|
|
export { composeCallbacks };
|
|
//# sourceMappingURL=compose-callbacks.d.ts.map
|