forgeplus-react/node_modules/ahooks/lib/useSafeState/index.d.ts

5 lines
282 B
TypeScript

import { Dispatch, SetStateAction } from 'react';
declare function useSafeState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
declare function useSafeState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
export default useSafeState;