mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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))
|
||
|
}
|