UNPKG

1.3 kBTypeScriptView Raw
1import { Event } from "./event";
2import { EventStream } from "./observable";
3import { Reply } from "./reply";
4export declare type Sink<V> = (value: V) => Reply;
5export declare type EventSink<V> = (event: Event<V>) => Reply;
6export declare type VoidSink = () => Reply;
7/** an "unsubscribe" function returned by [subscribe](classes/Observable.html#subscribe) et al. You can cancel your subscription by calling this function.
8 */
9export declare type Unsub = () => void;
10/** @hidden */
11export declare const nullSink: Sink<any>;
12/** @hidden */
13export declare const nullVoidSink: VoidSink;
14export declare type Subscribe<T> = (arg: EventSink<T>) => Unsub;
15/** @hidden */
16export declare type EventStreamDelay<V> = (stream: EventStream<V>) => EventStream<V>;
17export declare type Function0<R> = () => R;
18export declare type Function1<T1, R> = (t1: T1) => R;
19export declare type Function2<T1, T2, R> = (t1: T1, t2: T2) => R;
20export declare type Function3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
21export declare type Function4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R;
22export declare type Function5<T1, T2, T3, T4, T5, R> = (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R;
23export declare type Function6<T1, T2, T3, T4, T5, T6, R> = (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6) => R;