import React from 'react'; import { Updater } from './core'; declare type Handler = (prevState: S, preload: any) => Partial; export interface Plugin { props: T; component: React.ComponentType; subscribes: { [key: string]: Handler; }; } export declare type FPluginOptions = () => (Plugin | Promise>)[] | Plugin | Promise>; export declare type OPluginOptions = (Plugin | Promise>)[] | Plugin | Promise>; export declare type PluginOptions = FPluginOptions | OPluginOptions; export default class Rope { static id: number; private AppElement; private __origin_plugins; private __pending; private __plugins; private __hooks; private __updater; useApp(AppElement: React.ReactNode): void; plugin(plugin: PluginOptions): this; applyPlugin(plugin: (Plugin | Promise>)[] | Plugin | Promise>): this; trigger(name: string, handler: (prevState: S) => any): Promise; render(): Promise; __handlePlugin(plugins: Plugin[]): void; __setUpdater: (updater: Updater) => void; getComponent(): JSX.Element; } export {};