@reactive-js/async-iterator-resource
Advanced tools
Comparing version 0.0.8 to 0.0.9
import { AsyncIteratorResourceLike } from "@reactive-js/ix"; | ||
import { ErrorLike, ObservableLike, ObserverLike } from "@reactive-js/rx"; | ||
import { ObservableOperatorLike } from "@reactive-js/observable"; | ||
import { SchedulerLike } from "@reactive-js/scheduler"; | ||
import { OperatorLike } from "@reactive-js/pipe"; | ||
import { ObservableLike, MulticastObservableLike } from "@reactive-js/rx"; | ||
export interface AsyncIteratorResourceOperatorLike<TSrcReq, TSrc, TReq, T> { | ||
(iter: AsyncIteratorResourceLike<TSrcReq, TSrc>): AsyncIteratorResourceLike<TReq, T>; | ||
} | ||
export declare const lift: <TReq, T, TA>(operator: ObservableOperatorLike<T, TA>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TA>; | ||
export declare const lift: <TReq, T, TA>(operator: OperatorLike<ObservableLike<T>, MulticastObservableLike<TA>>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TA>; | ||
export declare const liftReq: <TReq, T, TReqA>(operator: (dispatcher: (req: TReq) => void) => (ref: TReqA) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReqA, T>; | ||
export declare const concatAll: <TReq, T>(maxBufferSize?: number) => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const distinctUntilChanged: <TReq, T>(equals?: ((a: T, b: T) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const endWith: <TReq, T>(value: T, ...values: T[]) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const exhaust: <TReq, T>() => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const ignoreElements: <TReq, TA, TB>() => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB>; | ||
export declare const keep: <TReq, T>(predicate: (data: T) => boolean) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const map: <TReq, TA, TB>(mapper: (data: TA) => TB) => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB>; | ||
export declare const mergeAll: <TReq, T>(options?: { | ||
maxBufferSize?: number | undefined; | ||
maxConcurrency?: number | undefined; | ||
} | undefined) => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const observe: <TReq, T>(observer: ObserverLike<T>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onComplete: <TReq, T>(onComplete: (err?: ErrorLike | undefined) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onError: <TReq, T>(onError: (err: unknown) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onNext: <TReq, T>(onNext: (next: T) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const repeat: <TReq, T>(predicate?: number | ((count: number) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const retry: <TReq, T>(predicate?: ((count: number, error: unknown) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const scan: <TReq, T, TAcc>(scanner: (acc: TAcc, next: T) => TAcc, initialValue: () => TAcc) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TAcc>; | ||
export declare const share: <TReq, T>(scheduler: SchedulerLike, replayCount?: number | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const startWith: <TReq, T>(value: T, ...values: T[]) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const subscribeOn: <TReq, T>(scheduler: SchedulerLike) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const switchAll: <TReq, T>() => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const take: <TReq, T>(count: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const takeLast: <TReq, T>(count: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const takeWhile: <TReq, T>(predicate: (next: T) => boolean) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttle: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleFirst: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleFirstTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleLast: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleLastTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const timeout: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const withLatestFrom: <TReq, TA, TB, TC>(other: ObservableLike<TB>, selector: (a: TA, b: TB) => TC) => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TC>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const observable_1 = require("@reactive-js/observable"); | ||
class LiftedIteratorResourceImpl { | ||
@@ -13,2 +12,5 @@ constructor(dispatcher, disposable, observable) { | ||
} | ||
get subscriberCount() { | ||
return this.observable.subscriberCount; | ||
} | ||
add(disposable, ...disposables) { | ||
@@ -42,32 +44,2 @@ this.disposable.add(disposable, ...disposables); | ||
exports.liftReq = (operator) => liftImpl(undefined, operator); | ||
exports.concatAll = (maxBufferSize = Number.MAX_SAFE_INTEGER) => exports.lift(observable_1.concatAll(maxBufferSize)); | ||
exports.distinctUntilChanged = (equals) => exports.lift(observable_1.distinctUntilChanged(equals)); | ||
exports.endWith = (value, ...values) => exports.lift(observable_1.endWith(value, ...values)); | ||
exports.exhaust = () => exports.lift(observable_1.exhaust()); | ||
exports.ignoreElements = () => exports.lift(observable_1.ignoreElements()); | ||
exports.keep = (predicate) => exports.lift(observable_1.keep(predicate)); | ||
exports.map = (mapper) => exports.lift(observable_1.map(mapper)); | ||
exports.mergeAll = (options) => exports.lift(observable_1.mergeAll(options)); | ||
exports.observe = (observer) => exports.lift(observable_1.observe(observer)); | ||
exports.onComplete = (onComplete) => exports.lift(observable_1.onComplete(onComplete)); | ||
exports.onError = (onError) => exports.lift(observable_1.onError(onError)); | ||
exports.onNext = (onNext) => exports.lift(observable_1.onNext(onNext)); | ||
exports.repeat = (predicate) => exports.lift(observable_1.repeat(predicate)); | ||
exports.retry = (predicate) => exports.lift(observable_1.retry(predicate)); | ||
exports.scan = (scanner, initialValue) => exports.lift(observable_1.scan(scanner, initialValue)); | ||
exports.share = (scheduler, replayCount) => exports.lift(observable_1.share(scheduler, replayCount)); | ||
exports.startWith = (value, ...values) => exports.lift(observable_1.startWith(value, ...values)); | ||
exports.subscribeOn = (scheduler) => exports.lift(observable_1.subscribeOn(scheduler)); | ||
exports.switchAll = () => exports.lift(observable_1.switchAll()); | ||
exports.take = (count) => exports.lift(observable_1.take(count)); | ||
exports.takeLast = (count) => exports.lift(observable_1.takeLast(count)); | ||
exports.takeWhile = (predicate) => exports.lift(observable_1.takeWhile(predicate)); | ||
exports.throttle = (durationSelector) => exports.lift(observable_1.throttle(durationSelector)); | ||
exports.throttleTime = (duration) => exports.lift(observable_1.throttleTime(duration)); | ||
exports.throttleFirst = (durationSelector) => exports.lift(observable_1.throttleFirst(durationSelector)); | ||
exports.throttleFirstTime = (duration) => exports.lift(observable_1.throttleFirstTime(duration)); | ||
exports.throttleLast = (durationSelector) => exports.lift(observable_1.throttleLast(durationSelector)); | ||
exports.throttleLastTime = (duration) => exports.lift(observable_1.throttleLastTime(duration)); | ||
exports.timeout = (duration) => exports.lift(observable_1.timeout(duration)); | ||
exports.withLatestFrom = (other, selector) => exports.lift(observable_1.withLatestFrom(other, selector)); | ||
//# sourceMappingURL=index.js.map |
import { AsyncIteratorResourceLike } from "@reactive-js/ix"; | ||
import { ErrorLike, ObservableLike, ObserverLike } from "@reactive-js/rx"; | ||
import { ObservableOperatorLike } from "@reactive-js/observable"; | ||
import { SchedulerLike } from "@reactive-js/scheduler"; | ||
import { OperatorLike } from "@reactive-js/pipe"; | ||
import { ObservableLike, MulticastObservableLike } from "@reactive-js/rx"; | ||
export interface AsyncIteratorResourceOperatorLike<TSrcReq, TSrc, TReq, T> { | ||
(iter: AsyncIteratorResourceLike<TSrcReq, TSrc>): AsyncIteratorResourceLike<TReq, T>; | ||
} | ||
export declare const lift: <TReq, T, TA>(operator: ObservableOperatorLike<T, TA>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TA>; | ||
export declare const lift: <TReq, T, TA>(operator: OperatorLike<ObservableLike<T>, MulticastObservableLike<TA>>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TA>; | ||
export declare const liftReq: <TReq, T, TReqA>(operator: (dispatcher: (req: TReq) => void) => (ref: TReqA) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReqA, T>; | ||
export declare const concatAll: <TReq, T>(maxBufferSize?: number) => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const distinctUntilChanged: <TReq, T>(equals?: ((a: T, b: T) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const endWith: <TReq, T>(value: T, ...values: T[]) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const exhaust: <TReq, T>() => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const ignoreElements: <TReq, TA, TB>() => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB>; | ||
export declare const keep: <TReq, T>(predicate: (data: T) => boolean) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const map: <TReq, TA, TB>(mapper: (data: TA) => TB) => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB>; | ||
export declare const mergeAll: <TReq, T>(options?: { | ||
maxBufferSize?: number | undefined; | ||
maxConcurrency?: number | undefined; | ||
} | undefined) => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const observe: <TReq, T>(observer: ObserverLike<T>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onComplete: <TReq, T>(onComplete: (err?: ErrorLike | undefined) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onError: <TReq, T>(onError: (err: unknown) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onNext: <TReq, T>(onNext: (next: T) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const repeat: <TReq, T>(predicate?: number | ((count: number) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const retry: <TReq, T>(predicate?: ((count: number, error: unknown) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const scan: <TReq, T, TAcc>(scanner: (acc: TAcc, next: T) => TAcc, initialValue: () => TAcc) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TAcc>; | ||
export declare const share: <TReq, T>(scheduler: SchedulerLike, replayCount?: number | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const startWith: <TReq, T>(value: T, ...values: T[]) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const subscribeOn: <TReq, T>(scheduler: SchedulerLike) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const switchAll: <TReq, T>() => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const take: <TReq, T>(count: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const takeLast: <TReq, T>(count: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const takeWhile: <TReq, T>(predicate: (next: T) => boolean) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttle: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleFirst: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleFirstTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleLast: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleLastTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const timeout: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const withLatestFrom: <TReq, TA, TB, TC>(other: ObservableLike<TB>, selector: (a: TA, b: TB) => TC) => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TC>; |
@@ -1,2 +0,1 @@ | ||
import { concatAll as concatAllObs, distinctUntilChanged as distinctUntilChangedObs, endWith as endWithObs, exhaust as exhaustObs, ignoreElements as ignoreElementsObs, keep as keepObs, map as mapObs, mergeAll as mergeAllObs, observe as observeObs, onComplete as onCompleteObs, onError as onErrorObs, onNext as onNextObs, repeat as repeatObs, retry as retryObs, scan as scanObs, share as shareObs, startWith as startWithObs, subscribeOn as subscribeOnObs, switchAll as switchAllObs, take as takeObs, takeLast as takeLastObs, takeWhile as takeWhileObs, throttle as throttleObs, throttleFirst as throttleFirstObs, throttleFirstTime as throttleFirstTimeObs, throttleLast as throttleLastObs, throttleLastTime as throttleLastTimeObs, throttleTime as throttleTimeObs, timeout as timeoutObs, withLatestFrom as withLatestFromObs, } from "@reactive-js/observable"; | ||
class LiftedIteratorResourceImpl { | ||
@@ -11,2 +10,5 @@ constructor(dispatcher, disposable, observable) { | ||
} | ||
get subscriberCount() { | ||
return this.observable.subscriberCount; | ||
} | ||
add(disposable, ...disposables) { | ||
@@ -40,32 +42,2 @@ this.disposable.add(disposable, ...disposables); | ||
export const liftReq = (operator) => liftImpl(undefined, operator); | ||
export const concatAll = (maxBufferSize = Number.MAX_SAFE_INTEGER) => lift(concatAllObs(maxBufferSize)); | ||
export const distinctUntilChanged = (equals) => lift(distinctUntilChangedObs(equals)); | ||
export const endWith = (value, ...values) => lift(endWithObs(value, ...values)); | ||
export const exhaust = () => lift(exhaustObs()); | ||
export const ignoreElements = () => lift(ignoreElementsObs()); | ||
export const keep = (predicate) => lift(keepObs(predicate)); | ||
export const map = (mapper) => lift(mapObs(mapper)); | ||
export const mergeAll = (options) => lift(mergeAllObs(options)); | ||
export const observe = (observer) => lift(observeObs(observer)); | ||
export const onComplete = (onComplete) => lift(onCompleteObs(onComplete)); | ||
export const onError = (onError) => lift(onErrorObs(onError)); | ||
export const onNext = (onNext) => lift(onNextObs(onNext)); | ||
export const repeat = (predicate) => lift(repeatObs(predicate)); | ||
export const retry = (predicate) => lift(retryObs(predicate)); | ||
export const scan = (scanner, initialValue) => lift(scanObs(scanner, initialValue)); | ||
export const share = (scheduler, replayCount) => lift(shareObs(scheduler, replayCount)); | ||
export const startWith = (value, ...values) => lift(startWithObs(value, ...values)); | ||
export const subscribeOn = (scheduler) => lift(subscribeOnObs(scheduler)); | ||
export const switchAll = () => lift(switchAllObs()); | ||
export const take = (count) => lift(takeObs(count)); | ||
export const takeLast = (count) => lift(takeLastObs(count)); | ||
export const takeWhile = (predicate) => lift(takeWhileObs(predicate)); | ||
export const throttle = (durationSelector) => lift(throttleObs(durationSelector)); | ||
export const throttleTime = (duration) => lift(throttleTimeObs(duration)); | ||
export const throttleFirst = (durationSelector) => lift(throttleFirstObs(durationSelector)); | ||
export const throttleFirstTime = (duration) => lift(throttleFirstTimeObs(duration)); | ||
export const throttleLast = (durationSelector) => lift(throttleLastObs(durationSelector)); | ||
export const throttleLastTime = (duration) => lift(throttleLastTimeObs(duration)); | ||
export const timeout = (duration) => lift(timeoutObs(duration)); | ||
export const withLatestFrom = (other, selector) => lift(withLatestFromObs(other, selector)); | ||
//# sourceMappingURL=index.js.map |
import { AsyncIteratorResourceLike } from "@reactive-js/ix"; | ||
import { ErrorLike, ObservableLike, ObserverLike } from "@reactive-js/rx"; | ||
import { ObservableOperatorLike } from "@reactive-js/observable"; | ||
import { SchedulerLike } from "@reactive-js/scheduler"; | ||
import { OperatorLike } from "@reactive-js/pipe"; | ||
import { ObservableLike, MulticastObservableLike } from "@reactive-js/rx"; | ||
export interface AsyncIteratorResourceOperatorLike<TSrcReq, TSrc, TReq, T> { | ||
(iter: AsyncIteratorResourceLike<TSrcReq, TSrc>): AsyncIteratorResourceLike<TReq, T>; | ||
} | ||
export declare const lift: <TReq, T, TA>(operator: ObservableOperatorLike<T, TA>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TA>; | ||
export declare const lift: <TReq, T, TA>(operator: OperatorLike<ObservableLike<T>, MulticastObservableLike<TA>>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TA>; | ||
export declare const liftReq: <TReq, T, TReqA>(operator: (dispatcher: (req: TReq) => void) => (ref: TReqA) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReqA, T>; | ||
export declare const concatAll: <TReq, T>(maxBufferSize?: number) => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const distinctUntilChanged: <TReq, T>(equals?: ((a: T, b: T) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const endWith: <TReq, T>(value: T, ...values: T[]) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const exhaust: <TReq, T>() => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const ignoreElements: <TReq, TA, TB>() => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB>; | ||
export declare const keep: <TReq, T>(predicate: (data: T) => boolean) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const map: <TReq, TA, TB>(mapper: (data: TA) => TB) => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB>; | ||
export declare const mergeAll: <TReq, T>(options?: { | ||
maxBufferSize?: number | undefined; | ||
maxConcurrency?: number | undefined; | ||
} | undefined) => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const observe: <TReq, T>(observer: ObserverLike<T>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onComplete: <TReq, T>(onComplete: (err?: ErrorLike | undefined) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onError: <TReq, T>(onError: (err: unknown) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const onNext: <TReq, T>(onNext: (next: T) => void) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const repeat: <TReq, T>(predicate?: number | ((count: number) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const retry: <TReq, T>(predicate?: ((count: number, error: unknown) => boolean) | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const scan: <TReq, T, TAcc>(scanner: (acc: TAcc, next: T) => TAcc, initialValue: () => TAcc) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, TAcc>; | ||
export declare const share: <TReq, T>(scheduler: SchedulerLike, replayCount?: number | undefined) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const startWith: <TReq, T>(value: T, ...values: T[]) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const subscribeOn: <TReq, T>(scheduler: SchedulerLike) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const switchAll: <TReq, T>() => AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T>; | ||
export declare const take: <TReq, T>(count: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const takeLast: <TReq, T>(count: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const takeWhile: <TReq, T>(predicate: (next: T) => boolean) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttle: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleFirst: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleFirstTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleLast: <TReq, T>(durationSelector: (next: T) => ObservableLike<unknown>) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const throttleLastTime: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const timeout: <TReq, T>(duration: number) => AsyncIteratorResourceOperatorLike<TReq, T, TReq, T>; | ||
export declare const withLatestFrom: <TReq, TA, TB, TC>(other: ObservableLike<TB>, selector: (a: TA, b: TB) => TC) => AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TC>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -13,157 +13,10 @@ [@reactive-js/async-iterator-resource](README.md) | ||
* [concatAll](README.md#const-concatall) | ||
* [distinctUntilChanged](README.md#const-distinctuntilchanged) | ||
* [endWith](README.md#const-endwith) | ||
* [exhaust](README.md#const-exhaust) | ||
* [ignoreElements](README.md#const-ignoreelements) | ||
* [keep](README.md#const-keep) | ||
* [lift](README.md#const-lift) | ||
* [liftReq](README.md#const-liftreq) | ||
* [map](README.md#const-map) | ||
* [mergeAll](README.md#const-mergeall) | ||
* [observe](README.md#const-observe) | ||
* [onComplete](README.md#const-oncomplete) | ||
* [onError](README.md#const-onerror) | ||
* [onNext](README.md#const-onnext) | ||
* [repeat](README.md#const-repeat) | ||
* [retry](README.md#const-retry) | ||
* [scan](README.md#const-scan) | ||
* [share](README.md#const-share) | ||
* [startWith](README.md#const-startwith) | ||
* [subscribeOn](README.md#const-subscribeon) | ||
* [switchAll](README.md#const-switchall) | ||
* [take](README.md#const-take) | ||
* [takeLast](README.md#const-takelast) | ||
* [takeWhile](README.md#const-takewhile) | ||
* [throttle](README.md#const-throttle) | ||
* [throttleFirst](README.md#const-throttlefirst) | ||
* [throttleFirstTime](README.md#const-throttlefirsttime) | ||
* [throttleLast](README.md#const-throttlelast) | ||
* [throttleLastTime](README.md#const-throttlelasttime) | ||
* [throttleTime](README.md#const-throttletime) | ||
* [timeout](README.md#const-timeout) | ||
* [withLatestFrom](README.md#const-withlatestfrom) | ||
## Functions | ||
### `Const` concatAll | ||
▸ **concatAll**<**TReq**, **T**>(`maxBufferSize`: number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | Default | | ||
------ | ------ | ------ | | ||
`maxBufferSize` | number | Number.MAX_SAFE_INTEGER | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
___ | ||
### `Const` distinctUntilChanged | ||
▸ **distinctUntilChanged**<**TReq**, **T**>(`equals?`: undefined | function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`equals?` | undefined | function | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` endWith | ||
▸ **endWith**<**TReq**, **T**>(`value`: T, ...`values`: T[]): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`value` | T | | ||
`...values` | T[] | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` exhaust | ||
▸ **exhaust**<**TReq**, **T**>(): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
___ | ||
### `Const` ignoreElements | ||
▸ **ignoreElements**<**TReq**, **TA**, **TB**>(): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, TA, TReq, TB›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **TA** | ||
▪ **TB** | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, TA, TReq, TB›* | ||
___ | ||
### `Const` keep | ||
▸ **keep**<**TReq**, **T**>(`predicate`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **predicate**: *function* | ||
▸ (`data`: T): *boolean* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`data` | T | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` lift | ||
▸ **lift**<**TReq**, **T**, **TA**>(`operator`: ObservableOperatorLike‹T, TA›): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, TA›* | ||
▸ **lift**<**TReq**, **T**, **TA**>(`operator`: OperatorLike‹ObservableLike‹T›, MulticastObservableLike‹TA››): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, TA›* | ||
@@ -182,3 +35,3 @@ **Type parameters:** | ||
------ | ------ | | ||
`operator` | ObservableOperatorLike‹T, TA› | | ||
`operator` | OperatorLike‹ObservableLike‹T›, MulticastObservableLike‹TA›› | | ||
@@ -228,553 +81,1 @@ **Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, TA›* | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReqA, T›* | ||
___ | ||
### `Const` map | ||
▸ **map**<**TReq**, **TA**, **TB**>(`mapper`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, TA, TReq, TB›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **TA** | ||
▪ **TB** | ||
**Parameters:** | ||
▪ **mapper**: *function* | ||
▸ (`data`: TA): *TB* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`data` | TA | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, TA, TReq, TB›* | ||
___ | ||
### `Const` mergeAll | ||
▸ **mergeAll**<**TReq**, **T**>(`options?`: undefined | object): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`options?` | undefined | object | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
___ | ||
### `Const` observe | ||
▸ **observe**<**TReq**, **T**>(`observer`: ObserverLike‹T›): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`observer` | ObserverLike‹T› | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` onComplete | ||
▸ **onComplete**<**TReq**, **T**>(`onComplete`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **onComplete**: *function* | ||
▸ (`err?`: ErrorLike): *void* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`err?` | ErrorLike | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` onError | ||
▸ **onError**<**TReq**, **T**>(`onError`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **onError**: *function* | ||
▸ (`err`: unknown): *void* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`err` | unknown | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` onNext | ||
▸ **onNext**<**TReq**, **T**>(`onNext`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **onNext**: *function* | ||
▸ (`next`: T): *void* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`next` | T | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` repeat | ||
▸ **repeat**<**TReq**, **T**>(`predicate?`: function | number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`predicate?` | function | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` retry | ||
▸ **retry**<**TReq**, **T**>(`predicate?`: undefined | function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`predicate?` | undefined | function | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` scan | ||
▸ **scan**<**TReq**, **T**, **TAcc**>(`scanner`: function, `initialValue`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, TAcc›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
▪ **TAcc** | ||
**Parameters:** | ||
▪ **scanner**: *function* | ||
▸ (`acc`: TAcc, `next`: T): *TAcc* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`acc` | TAcc | | ||
`next` | T | | ||
▪ **initialValue**: *function* | ||
▸ (): *TAcc* | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, TAcc›* | ||
___ | ||
### `Const` share | ||
▸ **share**<**TReq**, **T**>(`scheduler`: SchedulerLike, `replayCount?`: undefined | number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`scheduler` | SchedulerLike | | ||
`replayCount?` | undefined | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` startWith | ||
▸ **startWith**<**TReq**, **T**>(`value`: T, ...`values`: T[]): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`value` | T | | ||
`...values` | T[] | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` subscribeOn | ||
▸ **subscribeOn**<**TReq**, **T**>(`scheduler`: SchedulerLike): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`scheduler` | SchedulerLike | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` switchAll | ||
▸ **switchAll**<**TReq**, **T**>(): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, ObservableLike‹T›, TReq, T›* | ||
___ | ||
### `Const` take | ||
▸ **take**<**TReq**, **T**>(`count`: number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`count` | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` takeLast | ||
▸ **takeLast**<**TReq**, **T**>(`count`: number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`count` | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` takeWhile | ||
▸ **takeWhile**<**TReq**, **T**>(`predicate`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **predicate**: *function* | ||
▸ (`next`: T): *boolean* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`next` | T | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` throttle | ||
▸ **throttle**<**TReq**, **T**>(`durationSelector`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **durationSelector**: *function* | ||
▸ (`next`: T): *ObservableLike‹unknown›* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`next` | T | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` throttleFirst | ||
▸ **throttleFirst**<**TReq**, **T**>(`durationSelector`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **durationSelector**: *function* | ||
▸ (`next`: T): *ObservableLike‹unknown›* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`next` | T | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` throttleFirstTime | ||
▸ **throttleFirstTime**<**TReq**, **T**>(`duration`: number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`duration` | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` throttleLast | ||
▸ **throttleLast**<**TReq**, **T**>(`durationSelector`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
▪ **durationSelector**: *function* | ||
▸ (`next`: T): *ObservableLike‹unknown›* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`next` | T | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` throttleLastTime | ||
▸ **throttleLastTime**<**TReq**, **T**>(`duration`: number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`duration` | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` throttleTime | ||
▸ **throttleTime**<**TReq**, **T**>(`duration`: number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`duration` | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` timeout | ||
▸ **timeout**<**TReq**, **T**>(`duration`: number): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **T** | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`duration` | number | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, T, TReq, T›* | ||
___ | ||
### `Const` withLatestFrom | ||
▸ **withLatestFrom**<**TReq**, **TA**, **TB**, **TC**>(`other`: ObservableLike‹TB›, `selector`: function): *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, TA, TReq, TC›* | ||
**Type parameters:** | ||
▪ **TReq** | ||
▪ **TA** | ||
▪ **TB** | ||
▪ **TC** | ||
**Parameters:** | ||
▪ **other**: *ObservableLike‹TB›* | ||
▪ **selector**: *function* | ||
▸ (`a`: TA, `b`: TB): *TC* | ||
**Parameters:** | ||
Name | Type | | ||
------ | ------ | | ||
`a` | TA | | ||
`b` | TB | | ||
**Returns:** *[AsyncIteratorResourceOperatorLike](interfaces/asynciteratorresourceoperatorlike.md)‹TReq, TA, TReq, TC›* |
{ | ||
"name": "@reactive-js/async-iterator-resource", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"main": "dist/cjs/index.js", | ||
@@ -41,7 +41,6 @@ "module": "dist/esm5/index.js", | ||
"dependencies": { | ||
"@reactive-js/disposable": "^0.0.8", | ||
"@reactive-js/ix": "^0.0.8", | ||
"@reactive-js/observable": "^0.0.8", | ||
"@reactive-js/rx": "^0.0.8", | ||
"@reactive-js/scheduler": "^0.0.8" | ||
"@reactive-js/disposable": "^0.0.9", | ||
"@reactive-js/ix": "^0.0.9", | ||
"@reactive-js/pipe": "^0.0.9", | ||
"@reactive-js/rx": "^0.0.9" | ||
}, | ||
@@ -58,3 +57,3 @@ "scripts": { | ||
}, | ||
"gitHead": "0cfcb561e3b732fc999a2b43e328d5932fc93139" | ||
"gitHead": "24008ff071cc86dfb1eaf3940996e6feb8e69704" | ||
} |
218
src/index.ts
import { DisposableLike, DisposableOrTeardown } from "@reactive-js/disposable"; | ||
import { AsyncIteratorResourceLike } from "@reactive-js/ix"; | ||
import { OperatorLike } from "@reactive-js/pipe"; | ||
import { | ||
ErrorLike, | ||
ObservableLike, | ||
ObserverLike, | ||
SubscriberLike, | ||
MulticastObservableLike, | ||
} from "@reactive-js/rx"; | ||
import { | ||
concatAll as concatAllObs, | ||
distinctUntilChanged as distinctUntilChangedObs, | ||
endWith as endWithObs, | ||
exhaust as exhaustObs, | ||
ignoreElements as ignoreElementsObs, | ||
keep as keepObs, | ||
map as mapObs, | ||
mergeAll as mergeAllObs, | ||
observe as observeObs, | ||
onComplete as onCompleteObs, | ||
onError as onErrorObs, | ||
onNext as onNextObs, | ||
repeat as repeatObs, | ||
retry as retryObs, | ||
scan as scanObs, | ||
share as shareObs, | ||
startWith as startWithObs, | ||
subscribeOn as subscribeOnObs, | ||
switchAll as switchAllObs, | ||
take as takeObs, | ||
takeLast as takeLastObs, | ||
takeWhile as takeWhileObs, | ||
throttle as throttleObs, | ||
throttleFirst as throttleFirstObs, | ||
throttleFirstTime as throttleFirstTimeObs, | ||
throttleLast as throttleLastObs, | ||
throttleLastTime as throttleLastTimeObs, | ||
throttleTime as throttleTimeObs, | ||
timeout as timeoutObs, | ||
withLatestFrom as withLatestFromObs, | ||
ObservableOperatorLike, | ||
} from "@reactive-js/observable"; | ||
import { SchedulerLike } from "@reactive-js/scheduler"; | ||
@@ -55,7 +21,8 @@ export interface AsyncIteratorResourceOperatorLike<TSrcReq, TSrc, TReq, T> { | ||
readonly disposable: DisposableLike; | ||
readonly observable: ObservableLike<T>; | ||
readonly observable: MulticastObservableLike<T>; | ||
constructor( | ||
dispatcher: (req: TReq) => void, | ||
disposable: DisposableLike, | ||
observable: ObservableLike<T>, | ||
observable: MulticastObservableLike<T>, | ||
) { | ||
@@ -71,2 +38,6 @@ this.dispatcher = dispatcher; | ||
get subscriberCount(): number { | ||
return this.observable.subscriberCount; | ||
} | ||
add( | ||
@@ -100,6 +71,8 @@ disposable: DisposableOrTeardown, | ||
const liftImpl = <TReq, T, TReqA, TA>( | ||
operator?: ObservableOperatorLike<T, TA>, | ||
operator?: OperatorLike<ObservableLike<T>, MulticastObservableLike<TA>>, | ||
dispatchOperator?: (dispatcher: (req: TReq) => void) => (req: TReqA) => void, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReqA, TA> => iterator => { | ||
const observable: ObservableLike<T> = | ||
// Cheat here. AsyncIteratorImpl follows the same protocol, so | ||
// dynamically pull properties off of it. | ||
const observable: MulticastObservableLike<T> = | ||
(iterator as any).observable || iterator; | ||
@@ -121,3 +94,3 @@ const dispatcher: (req: TReq) => void = | ||
disposable, | ||
liftedObservable as ObservableLike<TA>, | ||
liftedObservable as MulticastObservableLike<TA>, | ||
); | ||
@@ -127,3 +100,3 @@ }; | ||
export const lift = <TReq, T, TA>( | ||
operator: ObservableOperatorLike<T, TA>, | ||
operator: OperatorLike<ObservableLike<T>, MulticastObservableLike<TA>>, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, TA> => | ||
@@ -136,162 +109,1 @@ liftImpl(operator, undefined); | ||
liftImpl(undefined, operator); | ||
export const concatAll = <TReq, T>( | ||
maxBufferSize = Number.MAX_SAFE_INTEGER, | ||
): AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T> => | ||
lift(concatAllObs(maxBufferSize)); | ||
export const distinctUntilChanged = <TReq, T>( | ||
equals?: (a: T, b: T) => boolean, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(distinctUntilChangedObs(equals)); | ||
export const endWith = <TReq, T>( | ||
value: T, | ||
...values: T[] | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(endWithObs(value, ...values)); | ||
export const exhaust = <TReq, T>(): AsyncIteratorResourceOperatorLike< | ||
TReq, | ||
ObservableLike<T>, | ||
TReq, | ||
T | ||
> => lift(exhaustObs()); | ||
export const ignoreElements = < | ||
TReq, | ||
TA, | ||
TB | ||
>(): AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB> => | ||
lift(ignoreElementsObs()); | ||
export const keep = <TReq, T>( | ||
predicate: (data: T) => boolean, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(keepObs(predicate)); | ||
export const map = <TReq, TA, TB>( | ||
mapper: (data: TA) => TB, | ||
): AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TB> => | ||
lift(mapObs(mapper)); | ||
export const mergeAll = <TReq, T>(options?: { | ||
maxBufferSize?: number; | ||
maxConcurrency?: number; | ||
}): AsyncIteratorResourceOperatorLike<TReq, ObservableLike<T>, TReq, T> => | ||
lift(mergeAllObs(options)); | ||
export const observe = <TReq, T>( | ||
observer: ObserverLike<T>, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(observeObs(observer)); | ||
export const onComplete = <TReq, T>( | ||
onComplete: (err?: ErrorLike) => void, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(onCompleteObs(onComplete)); | ||
export const onError = <TReq, T>( | ||
onError: (err: unknown) => void, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(onErrorObs(onError)); | ||
export const onNext = <TReq, T>( | ||
onNext: (next: T) => void, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(onNextObs(onNext)); | ||
export const repeat = <TReq, T>( | ||
predicate?: ((count: number) => boolean) | number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(repeatObs(predicate)); | ||
export const retry = <TReq, T>( | ||
predicate?: (count: number, error: unknown) => boolean, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(retryObs(predicate)); | ||
export const scan = <TReq, T, TAcc>( | ||
scanner: (acc: TAcc, next: T) => TAcc, | ||
initialValue: () => TAcc, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, TAcc> => | ||
lift(scanObs(scanner, initialValue)); | ||
export const share = <TReq, T>( | ||
scheduler: SchedulerLike, | ||
replayCount?: number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(shareObs(scheduler, replayCount)); | ||
export const startWith = <TReq, T>( | ||
value: T, | ||
...values: T[] | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(startWithObs(value, ...values)); | ||
export const subscribeOn = <TReq, T>( | ||
scheduler: SchedulerLike, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(subscribeOnObs(scheduler)); | ||
export const switchAll = <TReq, T>(): AsyncIteratorResourceOperatorLike< | ||
TReq, | ||
ObservableLike<T>, | ||
TReq, | ||
T | ||
> => lift(switchAllObs()); | ||
export const take = <TReq, T>( | ||
count: number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => lift(takeObs(count)); | ||
export const takeLast = <TReq, T>( | ||
count: number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(takeLastObs(count)); | ||
export const takeWhile = <TReq, T>( | ||
predicate: (next: T) => boolean, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(takeWhileObs(predicate)); | ||
export const throttle = <TReq, T>( | ||
durationSelector: (next: T) => ObservableLike<unknown>, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(throttleObs(durationSelector)); | ||
export const throttleTime = <TReq, T>( | ||
duration: number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(throttleTimeObs(duration)); | ||
export const throttleFirst = <TReq, T>( | ||
durationSelector: (next: T) => ObservableLike<unknown>, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(throttleFirstObs(durationSelector)); | ||
export const throttleFirstTime = <TReq, T>( | ||
duration: number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(throttleFirstTimeObs(duration)); | ||
export const throttleLast = <TReq, T>( | ||
durationSelector: (next: T) => ObservableLike<unknown>, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(throttleLastObs(durationSelector)); | ||
export const throttleLastTime = <TReq, T>( | ||
duration: number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(throttleLastTimeObs(duration)); | ||
export const timeout = <TReq, T>( | ||
duration: number, | ||
): AsyncIteratorResourceOperatorLike<TReq, T, TReq, T> => | ||
lift(timeoutObs(duration)); | ||
export const withLatestFrom = <TReq, TA, TB, TC>( | ||
other: ObservableLike<TB>, | ||
selector: (a: TA, b: TB) => TC, | ||
): AsyncIteratorResourceOperatorLike<TReq, TA, TReq, TC> => | ||
lift(withLatestFromObs(other, selector)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4
371249
241
+ Added@reactive-js/pipe@^0.0.9
+ Added@reactive-js/disposable@0.0.9(transitive)
+ Added@reactive-js/ix@0.0.9(transitive)
+ Added@reactive-js/observable@0.0.9(transitive)
+ Added@reactive-js/pipe@0.0.9(transitive)
+ Added@reactive-js/rx@0.0.9(transitive)
+ Added@reactive-js/scheduler@0.0.9(transitive)
+ Added@reactive-js/schedulers@0.0.9(transitive)
- Removed@reactive-js/observable@^0.0.8
- Removed@reactive-js/scheduler@^0.0.8
- Removed@reactive-js/disposable@0.0.8(transitive)
- Removed@reactive-js/ix@0.0.8(transitive)
- Removed@reactive-js/observable@0.0.8(transitive)
- Removed@reactive-js/pipe@0.0.8(transitive)
- Removed@reactive-js/rx@0.0.8(transitive)
- Removed@reactive-js/scheduler@0.0.8(transitive)
- Removed@reactive-js/schedulers@0.0.8(transitive)
Updated@reactive-js/ix@^0.0.9
Updated@reactive-js/rx@^0.0.9