UNPKG

2.13 kBTypeScriptView Raw
1import React from 'react';
2import { Action, Dispatch } from 'redux';
3import * as themes from 'redux-devtools-themes';
4import { Base16Theme } from 'redux-devtools-themes';
5import { LiftedAction, LiftedState } from 'redux-devtools';
6import { LogMonitorAction } from './actions';
7import { LogMonitorState } from './reducers';
8import { DockMonitorState } from 'redux-devtools-dock-monitor/lib/reducers';
9import { DockMonitorAction } from 'redux-devtools-dock-monitor/lib/actions';
10interface ExternalProps<S, A extends Action<unknown>> {
11 dispatch: Dispatch<LogMonitorAction | LiftedAction<S, A, LogMonitorState>>;
12 preserveScrollTop: boolean;
13 select: (state: S) => unknown;
14 theme: keyof typeof themes | Base16Theme;
15 expandActionRoot: boolean;
16 expandStateRoot: boolean;
17 markStateDiff: boolean;
18 hideMainButtons?: boolean;
19}
20interface DefaultProps<S> {
21 select: (state: unknown) => unknown;
22 theme: keyof typeof themes | Base16Theme;
23 preserveScrollTop: boolean;
24 expandActionRoot: boolean;
25 expandStateRoot: boolean;
26 markStateDiff: boolean;
27}
28export interface LogMonitorProps<S, A extends Action<unknown>> extends LiftedState<S, A, LogMonitorState> {
29 dispatch: Dispatch<LogMonitorAction | LiftedAction<S, A, LogMonitorState>>;
30 preserveScrollTop: boolean;
31 select: (state: S) => unknown;
32 theme: keyof typeof themes | Base16Theme;
33 expandActionRoot: boolean;
34 expandStateRoot: boolean;
35 markStateDiff: boolean;
36 hideMainButtons?: boolean;
37}
38declare const _default: (React.ComponentClass<ExternalProps<unknown, Action<unknown>>, any> & {
39 update(monitorProps: ExternalProps<unknown, Action<unknown>>, state: DockMonitorState | undefined, action: DockMonitorAction): DockMonitorState;
40 defaultProps: DefaultProps<unknown>;
41}) | (React.FunctionComponent<ExternalProps<unknown, Action<unknown>>> & {
42 update(monitorProps: ExternalProps<unknown, Action<unknown>>, state: DockMonitorState | undefined, action: DockMonitorAction): DockMonitorState;
43 defaultProps: DefaultProps<unknown>;
44});
45export default _default;