UNPKG

2.07 kBTypeScriptView Raw
1import type { ClientOptions, InferFeaturesFromPlugins, Reactotron, ReactotronCore } from "reactotron-core-client";
2import type { AsyncStorageStatic } from "@react-native-async-storage/async-storage";
3import asyncStorage, { AsyncStorageOptions } from "./plugins/asyncStorage";
4import overlay from "./plugins/overlay";
5import openInEditor, { OpenInEditorOptions } from "./plugins/openInEditor";
6import trackGlobalErrors, { TrackGlobalErrorsOptions } from "./plugins/trackGlobalErrors";
7import networking, { NetworkingOptions } from "./plugins/networking";
8import storybook from "./plugins/storybook";
9import devTools from "./plugins/devTools";
10import trackGlobalLogs from "./plugins/trackGlobalLogs";
11export interface UseReactNativeOptions {
12 errors?: TrackGlobalErrorsOptions | boolean;
13 log?: boolean;
14 editor?: OpenInEditorOptions | boolean;
15 overlay?: boolean;
16 asyncStorage?: AsyncStorageOptions | boolean;
17 networking?: NetworkingOptions | boolean;
18 storybook?: boolean;
19 devTools?: boolean;
20}
21export declare const reactNativeCorePlugins: (((reactotron: ReactotronCore) => {
22 features: {
23 trackAsyncStorage: () => void;
24 untrackAsyncStorage: () => void;
25 };
26}) | (() => {
27 onCommand: (command: import("lib/reactotron-core-contract/dist/types/src").Command<import("lib/reactotron-core-contract/dist/types/src").CommandTypeKey, any>) => void;
28}) | ((reactotron: ReactotronCore) => {
29 onConnect: () => void;
30}))[];
31type ReactNativePluginFeatures = InferFeaturesFromPlugins<ReactotronCore, typeof reactNativeCorePlugins>;
32export interface ReactotronReactNative extends Reactotron, ReactNativePluginFeatures {
33 useReactNative: (options?: UseReactNativeOptions) => this;
34 asyncStorageHandler?: AsyncStorageStatic;
35 setAsyncStorageHandler: (asyncStorage: AsyncStorageStatic) => this;
36}
37declare const reactotron: ReactotronReactNative;
38export { asyncStorage, trackGlobalErrors, trackGlobalLogs, openInEditor, overlay, networking, storybook, devTools, };
39export type { ClientOptions };
40export default reactotron;