const assertion
TIL | Custom hook with return tuple type array
ISSUE // 단순 예시입니다. import { useState } from "react"; const useToast = () => { const [isOpen, setIsOpen] = useState(false); const handleToast = () => { setIsOpen((prev) => !prev); }; return [isOpen, handleToast]; }; export default useToast; // error // const handleToast: boolean | (() => void) // This expression is not callable. // Not all constituents of type 'boolean | (() => void)' are..