mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 05:42:15 -05:00
7 lines
174 B
TypeScript
7 lines
174 B
TypeScript
|
export function callFnsInSequence<
|
||
|
Args,
|
||
|
Fn extends ((...args: Args[]) => void) | void
|
||
|
>(...fns: Fn[]) {
|
||
|
return (...args: Args[]) => fns.forEach(fn => fn?.(...args))
|
||
|
}
|