mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add rsocket types * Drop `types` from `tsconfig.json Use triple-slash references * Fix linting errors * Remove private members * Fix linting errors
16 lines
711 B
TypeScript
16 lines
711 B
TypeScript
import { IPublisher, ISubscriber } from 'rsocket-types';
|
|
export type Source<T> = (subscriber: ISubscriber<T>) => void;
|
|
/**
|
|
* Implements the ReactiveStream `Publisher` interface with Rx-style operators.
|
|
*/
|
|
export default class Flowable<T> implements IPublisher<T> {
|
|
static just<U>(...values: U[]): Flowable<U>;
|
|
static error(error: Error): Flowable<{}>;
|
|
static never(): Flowable<{}>;
|
|
constructor(source: Source<T>, max?: number);
|
|
subscribe(subscriberOrCallback?: Partial<ISubscriber<T>> | ((a: T) => void)): void;
|
|
lift<R>(onSubscribeLift: (subscriber: ISubscriber<R>) => ISubscriber<T>): Flowable<R>;
|
|
map<R>(fn: (data: T) => R): Flowable<R>;
|
|
take(toTake: number): Flowable<T>;
|
|
}
|