hele-hbus
Version:
HEle bindings for HBus.
23 lines (22 loc) • 703 B
TypeScript
import { Component } from "hele";
import * as HBus from "hbus";
import { BusNameIndex } from "./Bus";
export declare type SubscriptionProps<S = any, P extends keyof S = any> = {
bus?: BusNameIndex;
children: (state: S) => any;
} | {
bus?: BusNameIndex;
prop: P;
children: (prop: S[P]) => any;
};
export declare class Subscription<S = any, P extends keyof S = any> extends Component<SubscriptionProps<S, P>> {
constructor(props: SubscriptionProps<S, P>, context: any);
static defaultProps: {
bus: string;
};
readonly bus: HBus.Bus<S>;
readonly subscriber: any;
onWillMount(): void;
render(): any;
onWillUnmount(): void;
}