import { Bridge } from './bridge'; export interface NativeDelegate { ready: boolean; } export declare type ErrorHandler = (err: Error) => void; export declare class NativeWrapper { private readonly delegate; private readonly handler; private readonly queue; constructor(delegate: T, handler: ErrorHandler, queue?: Array<() => void>); /** * Run a bridge method. * It first waits for `.setup()` or `.useNativeConfiguration()` to be * called and redirects exceptions to `handler`. * @param method Name of the method to call. * @param caller Function with the bridge function as first argument. */ run(method: M, caller: (fn: Bridge[M]) => Promise): Promise; /** Waits for `.setup()` or `.useNativeConfiguration()` to be called. */ wait(): Promise<{} | undefined>; ready(): void; }