mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 07:43:58 +00:00
6 lines
175 B
TypeScript
6 lines
175 B
TypeScript
export function callFnsInSequence<
|
|
Args,
|
|
Fn extends ((...args: Args[]) => void) | void,
|
|
>(...fns: Fn[]) {
|
|
return (...args: Args[]) => fns.forEach(fn => fn?.(...args))
|
|
}
|