reactotron-react-native
Version:
A development tool to explore, inspect, and diagnose your React Native apps.
41 lines (40 loc) • 2.07 kB
TypeScript
import type { ClientOptions, InferFeaturesFromPlugins, Reactotron, ReactotronCore } from "reactotron-core-client";
import type { AsyncStorageStatic } from "@react-native-async-storage/async-storage";
import asyncStorage, { AsyncStorageOptions } from "./plugins/asyncStorage";
import overlay from "./plugins/overlay";
import openInEditor, { OpenInEditorOptions } from "./plugins/openInEditor";
import trackGlobalErrors, { TrackGlobalErrorsOptions } from "./plugins/trackGlobalErrors";
import networking, { NetworkingOptions } from "./plugins/networking";
import storybook from "./plugins/storybook";
import devTools from "./plugins/devTools";
import trackGlobalLogs from "./plugins/trackGlobalLogs";
export interface UseReactNativeOptions {
errors?: TrackGlobalErrorsOptions | boolean;
log?: boolean;
editor?: OpenInEditorOptions | boolean;
overlay?: boolean;
asyncStorage?: AsyncStorageOptions | boolean;
networking?: NetworkingOptions | boolean;
storybook?: boolean;
devTools?: boolean;
}
export declare const reactNativeCorePlugins: (((reactotron: ReactotronCore) => {
features: {
trackAsyncStorage: () => void;
untrackAsyncStorage: () => void;
};
}) | (() => {
onCommand: (command: import("lib/reactotron-core-contract/dist/types/src").Command<import("lib/reactotron-core-contract/dist/types/src").CommandTypeKey, any>) => void;
}) | ((reactotron: ReactotronCore) => {
onConnect: () => void;
}))[];
type ReactNativePluginFeatures = InferFeaturesFromPlugins<ReactotronCore, typeof reactNativeCorePlugins>;
export interface ReactotronReactNative extends Reactotron, ReactNativePluginFeatures {
useReactNative: (options?: UseReactNativeOptions) => this;
asyncStorageHandler?: AsyncStorageStatic;
setAsyncStorageHandler: (asyncStorage: AsyncStorageStatic) => this;
}
declare const reactotron: ReactotronReactNative;
export { asyncStorage, trackGlobalErrors, trackGlobalLogs, openInEditor, overlay, networking, storybook, devTools, };
export type { ClientOptions };
export default reactotron;