UNPKG

@lastos/page-spy-react-native

Version:

An SDK of PageSpy for debugging react native app

35 lines (34 loc) 1.23 kB
import { Client } from '@lastos/page-spy-base/dist/client'; import type { PageSpyPlugin, PageSpyPluginLifecycle, PluginOrder, PageSpyPluginLifecycleArgs } from '@lastos/page-spy-types'; import Request from './api'; import { Config, InitConfig } from './config'; type UpdateConfig = { title?: string; project?: string; unique?: string; url?: string; env?: 'dev' | 'test' | 'uat' | 'prod'; version?: string; }; declare class PageSpy { version: string; static plugins: Record<PluginOrder | 'normal', PageSpyPlugin[]>; static get pluginsWithOrder(): PageSpyPlugin[]; static client: Client; request: Request | null; name: string; address: string; roomUrl: string; socketStore: import("./helpers/socket").RNWebSocketStore; config: Config; static instance: PageSpy | null; static registerPlugin(plugin: PageSpyPlugin): void; constructor(init: InitConfig); updateConfiguration(): void; triggerPlugins<T extends PageSpyPluginLifecycle>(lifecycle: T, ...args: PageSpyPluginLifecycleArgs<T>): void; init(): Promise<void>; abort(): void; createNewConnection(): Promise<void>; updateRoomInfo(obj: UpdateConfig): void; } export default PageSpy;