This commit is contained in:
Nathan Bierema 2025-12-01 08:39:59 -05:00
parent 51afe32a71
commit d734c9b43f
12 changed files with 50 additions and 31 deletions

View File

@ -13,8 +13,7 @@ const wrapperStyle = {
};
export interface Props<S, A extends Action<string>>
extends LiftedState<S, A, ChartMonitorState>,
Options {
extends LiftedState<S, A, ChartMonitorState>, Options {
dispatch: Dispatch<LiftedAction<S, A, ChartMonitorState>>;
preserveScrollTop: boolean;
select: (state: S) => unknown;

View File

@ -41,8 +41,7 @@ function invertColors(theme: Base16Theme) {
}
export interface ChartMonitorProps<S, A extends Action<string>>
extends LiftedState<S, A, ChartMonitorState>,
Options {
extends LiftedState<S, A, ChartMonitorState>, Options {
dispatch: Dispatch<LiftedAction<S, A, ChartMonitorState>>;
preserveScrollTop: boolean;
select: (state: S) => unknown;

View File

@ -44,8 +44,10 @@ interface DefaultProps {
fluid: boolean;
}
export interface DockMonitorProps<S, A extends Action<string>>
extends LiftedState<S, A, DockMonitorState> {
export interface DockMonitorProps<
S,
A extends Action<string>,
> extends LiftedState<S, A, DockMonitorState> {
defaultPosition: 'left' | 'top' | 'right' | 'bottom';
defaultIsVisible: boolean;
defaultSize: number;

View File

@ -48,8 +48,10 @@ const styles: {
const ROOT = '/'; // process.env.NODE_ENV === 'production' ? '/' : '/';
interface Props
extends Omit<DemoAppState, 'addFunction' | 'addSymbol' | 'shuffleArray'> {
interface Props extends Omit<
DemoAppState,
'addFunction' | 'addSymbol' | 'shuffleArray'
> {
toggleTimeoutUpdate: (timeoutUpdateEnabled: boolean) => void;
timeoutUpdate: () => void;
increment: () => void;

View File

@ -59,8 +59,10 @@ export function compare<S>(
).forEach(generate);
}
interface Props<S, A extends Action<string>>
extends Omit<TabComponentProps<S, A>, 'monitorState' | 'updateMonitorState'> {
interface Props<S, A extends Action<string>> extends Omit<
TabComponentProps<S, A>,
'monitorState' | 'updateMonitorState'
> {
name?: string;
isVanilla?: boolean;
wrap?: string | ((locals: WrapLocals) => string);

View File

@ -119,8 +119,10 @@ function buildUrl(options: Options) {
);
}
interface Props
extends Omit<DemoAppState, 'addFunction' | 'addSymbol' | 'shuffleArray'> {
interface Props extends Omit<
DemoAppState,
'addFunction' | 'addSymbol' | 'shuffleArray'
> {
toggleTimeoutUpdate: (timeoutUpdateEnabled: boolean) => void;
timeoutUpdate: () => void;
increment: () => void;

View File

@ -144,8 +144,10 @@ interface DefaultProps {
invertTheme: boolean;
}
export interface DevtoolsInspectorProps<S, A extends Action<string>>
extends LiftedState<S, A, DevtoolsInspectorState> {
export interface DevtoolsInspectorProps<
S,
A extends Action<string>,
> extends LiftedState<S, A, DevtoolsInspectorState> {
dispatch: Dispatch<
DevtoolsInspectorAction | LiftedAction<S, A, DevtoolsInspectorState>
>;

View File

@ -64,8 +64,10 @@ interface DefaultProps<S> {
markStateDiff: boolean;
}
export interface LogMonitorProps<S, A extends Action<string>>
extends LiftedState<S, A, LogMonitorState> {
export interface LogMonitorProps<
S,
A extends Action<string>,
> extends LiftedState<S, A, LogMonitorState> {
dispatch: Dispatch<LogMonitorAction | LiftedAction<S, A, LogMonitorState>>;
preserveScrollTop: boolean;

View File

@ -6,13 +6,12 @@ import { getJsonTreeTheme, StyleUtilsContext } from '../styles/themes';
import { getItemString, labelRenderer } from '../styles/tree';
import { identity } from '../utils/object';
export interface TreeViewProps
extends Partial<
Pick<
ComponentProps<typeof JSONTree>,
'keyPath' | 'shouldExpandNodeInitially' | 'hideRoot'
>
> {
export interface TreeViewProps extends Partial<
Pick<
ComponentProps<typeof JSONTree>,
'keyPath' | 'shouldExpandNodeInitially' | 'hideRoot'
>
> {
data: unknown;
isWideLayout: boolean;
before?: ReactNode;

View File

@ -23,8 +23,10 @@ type ForwardedMonitorProps<S, A extends Action<string>> = Pick<
'monitorState' | 'currentStateIndex' | 'computedStates' | 'actionsById'
>;
export interface RtkQueryInspectorProps<S, A extends Action<string>>
extends ForwardedMonitorProps<S, A> {
export interface RtkQueryInspectorProps<
S,
A extends Action<string>,
> extends ForwardedMonitorProps<S, A> {
dispatch: Dispatch<LiftedAction<S, A, RtkQueryMonitorState>>;
}

View File

@ -35,8 +35,10 @@ export interface RtkQueryMonitorState {
readonly selectedPreviewTab: QueryPreviewTabs;
}
export interface RtkQueryMonitorProps<S, A extends Action<string>>
extends LiftedState<S, A, RtkQueryMonitorState> {
export interface RtkQueryMonitorProps<
S,
A extends Action<string>,
> extends LiftedState<S, A, RtkQueryMonitorState> {
dispatch: Dispatch<Action | LiftedAction<S, A, RtkQueryMonitorState>>;
theme: keyof typeof base16Themes | Base16Theme;
invertTheme: boolean;
@ -187,8 +189,11 @@ export interface ApiStats {
}>;
}
export interface TabOption<S, P, V extends string = 'default'>
extends SelectOption<S, V> {
export interface TabOption<
S,
P,
V extends string = 'default',
> extends SelectOption<S, V> {
component: ComponentType<P>;
}

View File

@ -47,8 +47,11 @@ export type Monitor<
}
>;
export interface DevToolsInstance<S, A extends Action<string>, MonitorState>
extends Component<Props<S, A, MonitorState>> {
export interface DevToolsInstance<
S,
A extends Action<string>,
MonitorState,
> extends Component<Props<S, A, MonitorState>> {
liftedStore?: LiftedStore<S, A, MonitorState>;
}