nucleux
Version:
Simple, atomic hub for all your React application's state management needs. No providers, no boilerplate, just state that works.
36 lines (35 loc) • 928 B
TypeScript
interface ReduxDevToolsConfig {
name?: string;
maxAge?: number;
trace?: boolean;
}
interface ReduxDevToolsConnection {
send(action: {
type: string;
payload?: any;
}, state?: any): void;
}
interface ReduxDevToolsExtension {
connect(config?: ReduxDevToolsConfig): ReduxDevToolsConnection;
}
interface FlipperClient {
send(method: string, params?: any): void;
}
declare global {
interface Window {
__REDUX_DEVTOOLS_EXTENSION__?: ReduxDevToolsExtension;
}
var __flipperClient: FlipperClient | undefined;
}
interface DebugConnection {
type: 'redux' | 'flipper' | 'console';
instance: ReduxDevToolsConnection | FlipperClient | null;
}
interface DebugLogData {
storeName: string;
atomName: string;
newValue: any;
previousValue?: any;
timestamp: number;
}
export type { DebugConnection, DebugLogData, FlipperClient, ReduxDevToolsConnection, };