10 lines
382 B
Plaintext
10 lines
382 B
Plaintext
import type { Dispatch, SetStateAction } from 'react';
|
|
type GetStateAction<S> = () => S;
|
|
declare function useGetState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>, GetStateAction<S>];
|
|
declare function useGetState<S = undefined>(): [
|
|
S | undefined,
|
|
Dispatch<SetStateAction<S | undefined>>,
|
|
GetStateAction<S | undefined>
|
|
];
|
|
export default useGetState;
|