UNPKG

723 BTypeScriptView Raw
1import * as React from 'react';
2import { Observable } from 'rxjs';
3declare const initialValue: unique symbol;
4interface Props<T> {
5 readonly props?: any[];
6 readonly createStream: () => Observable<T>;
7 readonly children: (props: T) => React.ReactNode;
8}
9interface State<T> {
10 readonly value: T | typeof initialValue;
11}
12export declare class FromStream<T> extends React.Component<Props<T>, State<T>> {
13 state: State<T>;
14 private mutableSubscription;
15 private mutableMounted;
16 constructor(props: Props<T>);
17 componentWillUnmount(): void;
18 componentDidUpdate(prevProps: any): void;
19 render(): React.ReactNode;
20 private subscribe;
21 private _setValue;
22 private unsubscribe;
23}
24export {};