UNPKG

react-native-devtools-sync

Version:

A tool for syncing React Query state to an external Dev Tools

117 lines (116 loc) 4.82 kB
import { Socket } from "socket.io-client"; import { ExpoCommand } from "./expoDevToolsTypes"; /** * Execute an Expo command based on the command type * * @param command The command to execute * @param socket The socket connection to send the result back * @param deviceId The device ID * @param enableLogs Whether to enable logs */ export declare const executeExpoCommand: (command: ExpoCommand, socket: Socket, deviceId: string, enableLogs?: boolean) => Promise<void>; /** * Execute the reload command * Default implementation attempts to use Expo's reload function if available */ export declare let executeReload: () => Promise<void>; /** * Execute the toggle inspector command * Default implementation attempts to use React Native's DevSettings if available */ export declare let executeToggleInspector: () => Promise<void>; /** * Execute the toggle performance monitor command * Default implementation attempts to use React Native's DevSettings if available */ export declare let executeTogglePerformanceMonitor: () => Promise<void>; /** * Execute the toggle element inspector command * Default implementation attempts to use React Native's DevSettings if available */ export declare let executeToggleElementInspector: () => Promise<void>; /** * Execute the clear cache command * Default implementation attempts to clear AsyncStorage if available */ export declare let executeClearCache: () => Promise<void>; /** * Execute the toggle remote debugging command * Default implementation attempts to use React Native's DevSettings if available */ export declare let executeToggleRemoteDebugging: () => Promise<void>; /** * Execute the open dev menu command * Default implementation attempts to use React Native's DevSettings if available */ export declare let executeOpenDevMenu: () => Promise<void>; /** * Execute the take screenshot command * Default implementation attempts to use React Native's NativeModules if available */ export declare let executeTakeScreenshot: () => Promise<void>; /** * Execute the shake device command * Default implementation attempts to use React Native's NativeModules if available */ export declare let executeShakeDevice: () => Promise<void>; /** * Set the implementation for the reload command * @param implementation The implementation function */ export declare const setReloadImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the toggle inspector command * @param implementation The implementation function */ export declare const setToggleInspectorImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the toggle performance monitor command * @param implementation The implementation function */ export declare const setTogglePerformanceMonitorImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the toggle element inspector command * @param implementation The implementation function */ export declare const setToggleElementInspectorImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the clear cache command * @param implementation The implementation function */ export declare const setClearCacheImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the toggle remote debugging command * @param implementation The implementation function */ export declare const setToggleRemoteDebuggingImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the open dev menu command * @param implementation The implementation function */ export declare const setOpenDevMenuImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the take screenshot command * @param implementation The implementation function */ export declare const setTakeScreenshotImplementation: (implementation: () => Promise<void>) => void; /** * Set the implementation for the shake device command * @param implementation The implementation function */ export declare const setShakeDeviceImplementation: (implementation: () => Promise<void>) => void; /** * Set implementations for all Expo commands at once * @param implementations Object containing implementations for each command */ export declare const setExpoCommandImplementations: (implementations: { reload?: () => Promise<void>; toggleInspector?: () => Promise<void>; togglePerformanceMonitor?: () => Promise<void>; toggleElementInspector?: () => Promise<void>; clearCache?: () => Promise<void>; toggleRemoteDebugging?: () => Promise<void>; openDevMenu?: () => Promise<void>; takeScreenshot?: () => Promise<void>; shakeDevice?: () => Promise<void>; }) => void;