import * as React from "react"; import { Route, Url } from './router'; export declare type CmdCommon = { cont: Cont; context: () => Context; key: string; debug_info: () => string; }; export declare type UnitProps = { kind: "unit"; value: A; } & CmdCommon; export declare type BindProps = { kind: "bind"; once: boolean; p: C; k: (_: B) => C; className: string; } & CmdCommon; export declare type MapProps = { kind: "map"; p: C; f: (_: A) => B; } & CmdCommon; export declare type FilterProps = { kind: "filter"; p: C; f: (_: A) => boolean; } & CmdCommon; export declare type ShouldComponentUpdateProps = { kind: "should component update"; p: (_: A) => C; f: (_: A) => boolean; v: A; } & CmdCommon; export declare type Mode = "edit" | "view"; export declare type Context = { logic_frame: number; force_reload: (callback?: () => void) => C; current_page: C; set_page: (x: T, new_page: Route, callback?: () => void) => C; set_url: (x: T, new_url: Url, callback?: () => void) => C; push_route: (new_route: Route<{}>, callback?: () => void) => C; set_routes: (routes: Array>, callback?: () => void) => C; }; export declare type Cont = (callback: () => void) => (_: A) => void; export declare type C = { comp: (ctxt: () => Context) => (cont: Cont) => JSX.Element; then: (key: string, k: (_: A) => C, className?: string, dbg?: () => string) => C; never: (key?: string) => C; ignore: (key?: string) => C; ignore_with: (x: B) => C; map: (f: (_: A) => B, key?: string, dbg?: () => string) => C; filter: (f: (_: A) => boolean, key?: string, dbg?: () => string) => C; }; export declare function make_C(comp: (ctxt: () => Context) => (cont: Cont) => JSX.Element): C; export declare let unit: (x: A, key?: string, dbg?: () => string) => C; export declare type JoinProps = { p: C>; } & CmdCommon; export declare type JoinState = { p_inner: "waiting" | JSX.Element; p_outer: JSX.Element; }; export declare let bind: (key: string, p: C, k: (_: A) => C, className?: string, dbg?: () => string) => C; export declare let map: (key?: string, dbg?: () => string) => (_: (_: A) => B) => (_: C) => C; export declare let filter: (key?: string, dbg?: () => string) => (_: (_: A) => boolean) => (_: C) => C; export declare let should_component_update: (key?: string, dbg?: () => string) => (_: (_: A) => boolean) => (_: (_: A) => C) => (_: A) => C; export declare type SimpleApplicationProps = { p: C; cont: (_: A) => void; }; export declare type SimpleApplicationState = { context: Context; }; export declare class SimpleApplication extends React.Component, SimpleApplicationState> { constructor(props: SimpleApplicationProps, context: any); context_from_props(props: SimpleApplicationProps, p: C): Context; render(): JSX.Element; } export declare let simple_application: (p: C, cont: (_: A) => void) => JSX.Element;