use-reducer-with-devtools.d.ts 399 B

123456789101112
  1. import type { reducer } from './reducer';
  2. import type { ReducerAction, Dispatch } from 'react';
  3. declare global {
  4. interface Window {
  5. __REDUX_DEVTOOLS_EXTENSION__: any;
  6. }
  7. }
  8. export declare function useReducerWithReduxDevtools(fn: typeof reducer, initialState: ReturnType<typeof reducer>): [
  9. ReturnType<typeof reducer>,
  10. Dispatch<ReducerAction<typeof reducer>>,
  11. () => void
  12. ];