Skip to content

Commit

Permalink
fix: πŸ› allow every promise in usePromise() hook have own type
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 15, 2019
1 parent e330ccb commit d60fef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usePromise.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {useCallback} from 'react';
import useRefMounted from './useRefMounted';

export type UsePromise = <T>() => (promise: Promise<T>) => Promise<T>;
export type UsePromise = () => <T>(promise: Promise<T>) => Promise<T>;

const usePromise: UsePromise = () => {
const refMounted = useRefMounted();
Expand Down

0 comments on commit d60fef7

Please sign in to comment.