diff --git a/types/react-click-outside-hook/index.d.ts b/types/react-click-outside-hook/index.d.ts index 2e78125467..6bbbe7aa42 100644 --- a/types/react-click-outside-hook/index.d.ts +++ b/types/react-click-outside-hook/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Bryan Deloeste // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { MutableRefObject } from "react"; -export function useClickOutside(): [MutableRefObject, boolean]; +type HookReturnTuple = [((node?: Element | null) => void), boolean]; + +export function useClickOutside(): HookReturnTuple; diff --git a/types/react-click-outside-hook/react-click-outside-hook-tests.tsx b/types/react-click-outside-hook/react-click-outside-hook-tests.tsx index b5ce2ad7a6..e6730ce7fe 100644 --- a/types/react-click-outside-hook/react-click-outside-hook-tests.tsx +++ b/types/react-click-outside-hook/react-click-outside-hook-tests.tsx @@ -4,7 +4,7 @@ import { render } from "react-dom"; import { useClickOutside } from "react-click-outside-hook"; function Component() { - const [ref, hasClickedOutside] = useClickOutside(); + const [ref, hasClickedOutside] = useClickOutside(); return
{hasClickedOutside.toString()}
; }