|
| 1 | +import { App } from 'frint'; |
| 2 | +import React, { PropTypes } from 'react'; |
| 3 | +import { BehaviorSubject, Observable } from 'rxjs'; |
| 4 | + |
| 5 | +export class Streamer { |
| 6 | + constructor(...args: any[]); |
| 7 | + |
| 8 | + set(value: any, ...args: any[]): Streamer; |
| 9 | + |
| 10 | + setKey(key: string, value: any): Streamer; |
| 11 | + |
| 12 | + setPlainObject(obj: any): Streamer; |
| 13 | + |
| 14 | + setObservable(obj$: Observable<any>, mapper: Array<(item: any, index?: number) => void>): Streamer; |
| 15 | + |
| 16 | + setDispatch(actions: {[name: string]: (...args:any[]) => void}): Streamer; |
| 17 | + |
| 18 | + get$(): Observable<any>; |
| 19 | +} |
| 20 | + |
| 21 | +export class RegionService { |
| 22 | + constructor(); |
| 23 | + |
| 24 | + emit() : void; |
| 25 | + |
| 26 | + getProps$(): BehaviorSubject<any>; |
| 27 | + |
| 28 | + getData$(): Observable<any>; |
| 29 | +} |
| 30 | + |
| 31 | +export class Provider extends React.Component<any, any> { |
| 32 | + propTypes: PropTypes = { |
| 33 | + app: PropTypes.object.isRequired, |
| 34 | + children: PropTypes.element.isRequired, |
| 35 | + }; |
| 36 | + |
| 37 | + childContextTypes: PropTypes = { |
| 38 | + app: PropTypes.object.isRequired, |
| 39 | + }; |
| 40 | + |
| 41 | + getChildContext(): { app: App }; |
| 42 | + |
| 43 | + constructor(props: PropTypes, context: any); |
| 44 | + |
| 45 | + render(): React.ReactElement<any>; |
| 46 | +} |
| 47 | + |
| 48 | +export function streamProps(...args: any[]): Streamer; |
| 49 | +export function isObservable(obj: any): boolean; |
| 50 | +export function render(app: App, node: Element): void | Element | React.Component<any, React.ComponentState>; |
| 51 | +export function getMountableComponent(app: App): () => React.Component | Element; |
| 52 | +export function observe(fn: (app: App) => Observable<any>): () => React.Component | Element; |
0 commit comments