Skip to content

Commit

Permalink
refactor(ui/utils): mergeFns의 반환값 함수 선언으로 변경 (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
sukvvon authored Aug 13, 2024
1 parent c39ffe3 commit 4fd9853
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/ui/src/utils/merge-fns.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type AnyFunction<T = any> = (...args: T[]) => any;

export function mergeFns<T extends AnyFunction>(...fns: (T | undefined)[]) {
return (...args: Parameters<T>) => {
export function mergeFns<T extends (...args: any[]) => any>(
...fns: (T | undefined)[]
) {
return function mergedFns(...args: Parameters<T>) {
fns.forEach((fn) => {
fn?.(...args);
});
Expand Down

0 comments on commit 4fd9853

Please sign in to comment.