Skip to content

Commit

Permalink
rename generic
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii committed Jul 11, 2023
1 parent 0efa6b1 commit 258ded9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/mui-utils/src/useEventCallback/useEventCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import useEnhancedEffect from '../useEnhancedEffect';
/**
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
*/
function useEventCallback<T extends (...args: any[]) => any = (...args: unknown[]) => any>(
fn: T,
): T;
function useEventCallback<Fn extends (...args: any[]) => any = (...args: unknown[]) => any>(
fn: Fn,
): Fn;
function useEventCallback<Args extends unknown[], Return>(
fn: (...args: Args) => Return,
): (...args: Args) => Return;
Expand Down

0 comments on commit 258ded9

Please sign in to comment.