overleaf/services/web/frontend/js/utils/functions.ts
ilkin-overleaf 7f8d2e37d5 Merge pull request #11530 from overleaf/ii-payment-page-migration-checkout-panel
[web] Payment page migration checkout panel

GitOrigin-RevId: 04edf9961e0032d6fe3631c255e49dc1d4c3e0ca
2023-02-07 09:04:53 +00:00

6 lines
174 B
TypeScript

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