state.d.ts 419 B

12345678
  1. import { MutableRefObject } from 'react';
  2. import { State } from '../types';
  3. declare type StateKeys = keyof State<any, any>;
  4. /**
  5. * An implementation of state with dependency-tracking.
  6. */
  7. export declare const useStateWithDeps: <Data, Error_1, S = State<Data, Error_1>>(state: S, unmountedRef: MutableRefObject<boolean>) => [MutableRefObject<S>, Record<keyof State<any, any>, boolean>, (payload: S) => void];
  8. export {};