Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(typings): added typings for minor operators cache, catch, debou… #1352

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 114 additions & 62 deletions src/CoreOperators.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import {Observable} from './Observable';
import {Scheduler} from './Scheduler';
import {ConnectableObservable} from './observable/ConnectableObservable';
import {Subject} from './Subject';
import {GroupedObservable} from './operator/groupBy';
import {Notification} from './Notification';

import {CombineLatestSignature} from './operator/combineLatest';
import {WithLatestFromSignature} from './operator/withLatestFrom';
Expand All @@ -18,90 +14,146 @@ import {WindowCountSignature} from './operator/windowCount';
import {WindowTimeSignature} from './operator/windowTime';
import {WindowToggleSignature} from './operator/windowToggle';
import {WindowWhenSignature} from './operator/windowWhen';
import {CacheSignature} from './operator/cache';
import {CatchSignature} from './operator/catch';
import {CountSignature} from './operator/count';
import {DematerializeSignature} from './operator/dematerialize';
import {DebounceSignature} from './operator/debounce';
import {DebounceTimeSignature} from './operator/debounceTime';
import {DefaultIfEmptySignature} from './operator/defaultIfEmpty';
import {DelaySignature} from './operator/delay';
import {DelayWhenSignature} from './operator/delayWhen';
import {DistinctUntilChangedSignature} from './operator/distinctUntilChanged';
import {DoSignature} from './operator/do';
import {ExpandSignature} from './operator/expand';
import {FilterSignature} from './operator/filter';
import {FinallySignature} from './operator/finally';
import {FirstSignature} from './operator/first';
import {GroupBySignature} from './operator/groupBy';
import {IgnoreElementsSignature} from './operator/ignoreElements';
import {InspectSignature} from './operator/inspect';
import {InspectTimeSignature} from './operator/inspectTime';
import {LastSignature} from './operator/last';
import {LetSignature} from './operator/let';
import {EverySignature} from './operator/every';
import {MaterializeSignature} from './operator/materialize';
import {MulticastSignature} from './operator/multicast';
import {ObserveOnSignature} from './operator/observeOn';
import {PartitionSignature} from './operator/partition';
import {PluckSignature} from './operator/pluck';
import {PublishSignature} from './operator/publish';
import {PublishBehaviorSignature} from './operator/publishBehavior';
import {PublishReplaySignature} from './operator/publishReplay';
import {PublishLastSignature} from './operator/publishLast';
import {RaceSignature} from './operator/race';
import {ReduceSignature} from './operator/reduce';
import {RepeatSignature} from './operator/repeat';
import {RetrySignature} from './operator/retry';
import {RetryWhenSignature} from './operator/retryWhen';
import {SampleSignature} from './operator/sample';
import {SampleTimeSignature} from './operator/sampleTime';
import {ScanSignature} from './operator/scan';
import {ShareSignature} from './operator/share';
import {SingleSignature} from './operator/single';
import {SkipSignature} from './operator/skip';
import {SkipUntilSignature} from './operator/skipUntil';
import {SkipWhileSignature} from './operator/skipWhile';
import {StartWithSignature} from './operator/startWith';
import {SubscribeOnSignature} from './operator/subscribeOn';
import {TakeSignature} from './operator/take';
import {TakeLastSignature} from './operator/takeLast';
import {TakeUntilSignature} from './operator/takeUntil';
import {TakeWhileSignature} from './operator/takeWhile';
import {ThrottleSignature} from './operator/throttle';
import {ThrottleTimeSignature} from './operator/throttleTime';
import {TimeoutSignature} from './operator/timeout';
import {TimeoutWithSignature} from './operator/timeoutWith';
import {ToArraySignature} from './operator/toArray';
import {ToPromiseSignature} from './operator/toPromise';

export interface CoreOperators<T> {
buffer: BufferSignature<T>;
bufferCount: BufferCountSignature<T>;
bufferTime: BufferTimeSignature<T>;
bufferToggle: BufferToggleSignature<T>;
bufferWhen: BufferWhenSignature<T>;
catch?: (selector: (err: any, source: Observable<T>, caught: Observable<any>) => Observable<any>) => Observable<T>;
combineAll?: <R>(project?: (...values: Array<any>) => R) => Observable<R>;
cache: CacheSignature<T>;
catch: CatchSignature<T>;
combineAll: <R>(project?: (...values: Array<any>) => R) => Observable<R>;
combineLatest: CombineLatestSignature<T>;
concat?: <R>(...observables: (Observable<any> | Scheduler)[]) => Observable<R>;
concatAll?: () => Observable<T>;
concatMap?: <R>(project: ((x: T, ix: number) => Observable<any>), projectResult?: (x: T, y: any, ix: number, iy: number) => R) => Observable<R>;
concatMapTo?: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R) => Observable<R>;
count?: (predicate?: (value: T, index: number, source: Observable<T>) => boolean) => Observable<number>;
dematerialize?: () => Observable<any>;
debounce?: (durationSelector: (value: T) => Observable<any> | Promise<any>) => Observable<T>;
debounceTime?: <R>(dueTime: number, scheduler?: Scheduler) => Observable<R>;
defaultIfEmpty?: <R>(defaultValue?: T | R) => Observable<T> | Observable<R>;
delay?: (delay: number, scheduler?: Scheduler) => Observable<T>;
delayWhen?: (delayDurationSelector: (value: T) => Observable<any>, subscriptionDelay?: Observable<any>) => Observable<T>;
distinctUntilChanged?: (compare?: (x: T, y: T) => boolean) => Observable<T>;
do?: (next?: (x: T) => void, error?: (e: any) => void, complete?: () => void) => Observable<T>;
expand?: <R>(project: (x: T, ix: number) => Observable<R>, concurrent: number, scheduler: Scheduler) => Observable<R>;
filter?: (predicate: (x: T) => boolean, ix?: number, thisArg?: any) => Observable<T>;
finally?: (finallySelector: () => void) => Observable<T>;
first?: <R>(predicate?: (value: T, index: number, source: Observable<T>) => boolean,
resultSelector?: (value: T, index: number) => R, defaultValue?: any) => Observable<T> | Observable<R>;
count: CountSignature<T>;
dematerialize: DematerializeSignature<T>;
debounce: DebounceSignature<T>;
debounceTime: DebounceTimeSignature<T>;
defaultIfEmpty: DefaultIfEmptySignature<T>;
delay: DelaySignature<T>;
delayWhen: DelayWhenSignature<T>;
distinctUntilChanged: DistinctUntilChangedSignature<T>;
do: DoSignature<T>;
expand: ExpandSignature<T>;
filter: FilterSignature<T>;
finally: FinallySignature<T>;
first: FirstSignature<T>;
flatMap?: <R>(project: ((x: T, ix: number) => Observable<any>),
projectResult?: (x: T, y: any, ix: number, iy: number) => R,
concurrent?: number) => Observable<R>;
flatMapTo?: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R, concurrent?: number) => Observable<R>;
groupBy?: <K, R>(keySelector: (value: T) => string,
elementSelector?: (value: T) => R,
durationSelector?: (group: GroupedObservable<K, R>) => Observable<any>) => Observable<GroupedObservable<K, R>>;
ignoreElements?: () => Observable<T>;
inspect?: (durationSelector: (value: T) => Observable<any> | Promise<any>) => Observable<T>;
inspectTime?: (delay: number, scheduler?: Scheduler) => Observable<T>;
last?: <R>(predicate?: (value: T, index: number) => boolean,
resultSelector?: (value: T, index: number) => R,
defaultValue?: any) => Observable<T> | Observable<R>;
every?: (predicate: (value: T, index: number) => boolean, thisArg?: any) => Observable<T>;
groupBy: GroupBySignature<T>;
ignoreElements: IgnoreElementsSignature<T>;
inspect: InspectSignature<T>;
inspectTime: InspectTimeSignature<T>;
last: LastSignature<T>;
let: LetSignature<T>;
letBind: LetSignature<T>;
every: EverySignature<T>;
map?: <R>(project: (x: T, ix?: number) => R, thisArg?: any) => Observable<R>;
mapTo?: <R>(value: R) => Observable<R>;
materialize?: () => Observable<Notification<T>>;
materialize: MaterializeSignature<T>;
merge?: (...observables: any[]) => Observable<any>;
mergeAll?: (concurrent?: number) => Observable<T>;
mergeMap?: <R>(project: ((x: T, ix: number) => Observable<any>),
projectResult?: (x: T, y: any, ix: number, iy: number) => R, concurrent?: number) => Observable<R>;
mergeMapTo?: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R, concurrent?: number) => Observable<R>;
multicast?: (subjectOrSubjectFactory: Subject<T>|(() => Subject<T>)) => ConnectableObservable<T>;
observeOn?: (scheduler: Scheduler, delay?: number) => Observable<T>;
partition?: (predicate: (x: T) => boolean) => Observable<T>[];
publish?: () => ConnectableObservable<T>;
publishBehavior?: (value: any) => ConnectableObservable<T>;
publishReplay?: (bufferSize?: number, windowTime?: number, scheduler?: Scheduler) => ConnectableObservable<T>;
publishLast?: () => ConnectableObservable<T>;
reduce?: <R>(project: (acc: R, x: T) => R, seed?: R) => Observable<R>;
repeat?: (count?: number) => Observable<T>;
retry?: (count?: number) => Observable<T>;
retryWhen?: (notifier: (errors: Observable<any>) => Observable<any>) => Observable<T>;
sample?: (notifier: Observable<any>) => Observable<T>;
sampleTime?: (delay: number, scheduler?: Scheduler) => Observable<T>;
scan?: <R>(project: (acc: R, x: T) => R, acc?: R) => Observable<R>;
share?: () => Observable<T>;
single?: (predicate?: (value: T, index: number) => boolean) => Observable<T>;
skip?: (count: number) => Observable<T>;
skipUntil?: (notifier: Observable<any>) => Observable<T>;
skipWhile?: (predicate: (x: T, index: number) => boolean) => Observable<T>;
startWith?: (x: T) => Observable<T>;
subscribeOn?: (scheduler: Scheduler, delay?: number) => Observable<T>;
multicast: MulticastSignature<T>;
observeOn: ObserveOnSignature<T>;
partition: PartitionSignature<T>;
pluck: PluckSignature<T>;
publish: PublishSignature<T>;
publishBehavior: PublishBehaviorSignature<T>;
publishReplay: PublishReplaySignature<T>;
publishLast: PublishLastSignature<T>;
race: RaceSignature<T>;
reduce: ReduceSignature<T>;
repeat: RepeatSignature<T>;
retry: RetrySignature<T>;
retryWhen: RetryWhenSignature<T>;
sample: SampleSignature<T>;
sampleTime: SampleTimeSignature<T>;
scan: ScanSignature<T>;
share: ShareSignature<T>;
single: SingleSignature<T>;
skip: SkipSignature<T>;
skipUntil: SkipUntilSignature<T>;
skipWhile: SkipWhileSignature<T>;
startWith: StartWithSignature<T>;
subscribeOn: SubscribeOnSignature<T>;
switch?: () => Observable<T>;
switchMap?: <R>(project: ((x: T, ix: number) => Observable<any>), projectResult?: (x: T, y: any, ix: number, iy: number) => R) => Observable<R>;
switchMapTo?: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R) => Observable<R>;
take?: (count: number) => Observable<T>;
takeLast?: (count: number) => Observable<T>;
takeUntil?: (notifier: Observable<any>) => Observable<T>;
takeWhile?: (predicate: (value: T, index: number) => boolean) => Observable<T>;
throttle?: (durationSelector: (value: T) => Observable<any> | Promise<any>) => Observable<T>;
throttleTime?: (delay: number, scheduler?: Scheduler) => Observable<T>;
timeout?: (due: number | Date, errorToSend?: any, scheduler?: Scheduler) => Observable<T>;
timeoutWith?: <R>(due: number | Date, withObservable: Observable<R>, scheduler?: Scheduler) => Observable<T> | Observable<R>;
toArray?: () => Observable<T[]>;
toPromise?: (PromiseCtor: typeof Promise) => Promise<T>;
take: TakeSignature<T>;
takeLast: TakeLastSignature<T>;
takeUntil: TakeUntilSignature<T>;
takeWhile: TakeWhileSignature<T>;
throttle: ThrottleSignature<T>;
throttleTime: ThrottleTimeSignature<T>;
timeout: TimeoutSignature<T>;
timeoutWith: TimeoutWithSignature<T>;
toArray: ToArraySignature<T>;
toPromise: ToPromiseSignature<T>;
window: WindowSignature<T>;
windowCount: WindowCountSignature<T>;
windowTime: WindowTimeSignature<T>;
Expand Down
Loading