rimmel
Version:
A Streams-Oriented UI library for the Rx.Observable Universe
29 lines • 1.85 kB
TypeScript
import type { MaybeFuture, Observer, OperatorPipeline } from '../types/futures';
import type { RMLTemplateExpressions } from '../types/internal';
/**
* Create an "input pipe" by prepending operators to the input of an Observer, Subject, BehaviorSubject, or plain subscriber function.
* This works the opposite of RxJS's pipe(), which works on the output of an Observable.
**/
export declare const pipeIn: <I, O = I>(target: RMLTemplateExpressions.TargetEventHandler<O>) => Observer<I>;
/**
* Create an "input pipe" by prepending operators to an Observer or a Subject
*
* @remarks This works the opposite of the `pipe()` function in RxJS, which
* transforms the output of an observable whilst this transforms the input.
*
* You normally use an input pipe to create Event Adapters.
*
* @template I the input type of the returned stream (the event adapter)
* @template O the output type of the returned stream (= the input type of the actual target stream)
* @example const MyUsefulEventAdapter = inputPipe(...pipeline);
* const template = rml`
* <input onkeypress="${MyUsefulEventAdapter(targetObserver)}">
* `;
**/
export declare const inputPipe: <I extends unknown, O extends unknown>() => (target: RMLTemplateExpressions.TargetEventHandler<O>) => Observer<I>;
export declare const feed: <I, O = I>(target: RMLTemplateExpressions.TargetEventHandler<O>) => Observer<I>;
export declare const feedIn: <I, O = I>(target: RMLTemplateExpressions.TargetEventHandler<O>) => Observer<I>;
export declare const reversePipe: <I extends unknown, O extends unknown>() => (target: RMLTemplateExpressions.TargetEventHandler<O>) => Observer<I>;
export declare const source: <I, O = I>(reversePipeline_0: Function | Observer<any>) => Observer<unknown>;
export declare const sink: (source: MaybeFuture<any>) => any;
//# sourceMappingURL=input-pipe.d.ts.map