fix ts definition to get no argument for dispatch function

This commit is contained in:
MHA15 2019-12-15 18:30:41 +03:30 committed by GitHub
parent 036d1c2f1f
commit baab9df948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ const updateReducer = (num: number): number => (num + 1) % 1_000_000;
const useUpdate = () => {
const [, update] = useReducer(updateReducer, 0);
return update;
return update as (() => void);
};
export default useUpdate;