overleaf/services/web/frontend/js/utils/functions.ts
ilkin-overleaf 0e71084600 Merge pull request #19840 from overleaf/ii-bs5-project-tools
[web] BS5 project tools

GitOrigin-RevId: 3181c62985b6db4051292b484f53178a0736fa75
2024-08-22 14:01:43 +00:00

6 lines
190 B
TypeScript

export function callFnsInSequence<
Args extends Array<any>,
Fn extends ((...args: Args) => void) | void,
>(...fns: Fn[]) {
return (...args: Args) => fns.forEach(fn => fn?.(...args))
}