@mastra/nestjs 0.1.8-alpha.0 → 0.1.8-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/_types/rxjs/dist/types/index.d.ts +173 -0
- package/dist/_types/rxjs/dist/types/internal/AnyCatcher.d.ts +10 -0
- package/dist/_types/rxjs/dist/types/internal/AsyncSubject.d.ts +15 -0
- package/dist/_types/rxjs/dist/types/internal/BehaviorSubject.d.ts +15 -0
- package/dist/_types/rxjs/dist/types/internal/Notification.d.ts +180 -0
- package/dist/_types/rxjs/dist/types/internal/Observable.d.ts +128 -0
- package/dist/_types/rxjs/dist/types/internal/Operator.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/ReplaySubject.d.ts +49 -0
- package/dist/_types/rxjs/dist/types/internal/Scheduler.d.ts +55 -0
- package/dist/_types/rxjs/dist/types/internal/Subject.d.ts +58 -0
- package/dist/_types/rxjs/dist/types/internal/Subscriber.d.ts +78 -0
- package/dist/_types/rxjs/dist/types/internal/Subscription.d.ts +96 -0
- package/dist/_types/rxjs/dist/types/internal/config.d.ts +73 -0
- package/dist/_types/rxjs/dist/types/internal/firstValueFrom.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/lastValueFrom.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts +42 -0
- package/dist/_types/rxjs/dist/types/internal/observable/bindCallback.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/observable/combineLatest.d.ts +33 -0
- package/dist/_types/rxjs/dist/types/internal/observable/concat.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/observable/connectable.d.ts +27 -0
- package/dist/_types/rxjs/dist/types/internal/observable/defer.d.ts +52 -0
- package/dist/_types/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts +76 -0
- package/dist/_types/rxjs/dist/types/internal/observable/empty.d.ts +72 -0
- package/dist/_types/rxjs/dist/types/internal/observable/forkJoin.d.ts +24 -0
- package/dist/_types/rxjs/dist/types/internal/observable/from.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/observable/fromEvent.d.ts +45 -0
- package/dist/_types/rxjs/dist/types/internal/observable/fromEventPattern.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/observable/generate.d.ts +311 -0
- package/dist/_types/rxjs/dist/types/internal/observable/iif.d.ts +82 -0
- package/dist/_types/rxjs/dist/types/internal/observable/interval.d.ts +49 -0
- package/dist/_types/rxjs/dist/types/internal/observable/merge.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/observable/never.d.ts +40 -0
- package/dist/_types/rxjs/dist/types/internal/observable/of.d.ts +14 -0
- package/dist/_types/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/observable/pairs.d.ts +19 -0
- package/dist/_types/rxjs/dist/types/internal/observable/partition.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/observable/race.d.ts +12 -0
- package/dist/_types/rxjs/dist/types/internal/observable/range.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/observable/throwError.d.ts +115 -0
- package/dist/_types/rxjs/dist/types/internal/observable/timer.d.ts +126 -0
- package/dist/_types/rxjs/dist/types/internal/observable/using.d.ts +32 -0
- package/dist/_types/rxjs/dist/types/internal/observable/zip.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/operators/audit.d.ts +48 -0
- package/dist/_types/rxjs/dist/types/internal/operators/auditTime.d.ts +50 -0
- package/dist/_types/rxjs/dist/types/internal/operators/buffer.d.ts +41 -0
- package/dist/_types/rxjs/dist/types/internal/operators/bufferCount.d.ts +54 -0
- package/dist/_types/rxjs/dist/types/internal/operators/bufferTime.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/operators/bufferToggle.d.ts +46 -0
- package/dist/_types/rxjs/dist/types/internal/operators/bufferWhen.d.ts +41 -0
- package/dist/_types/rxjs/dist/types/internal/operators/catchError.d.ts +4 -0
- package/dist/_types/rxjs/dist/types/internal/operators/combineAll.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/operators/combineLatestAll.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/operators/combineLatestWith.d.ts +43 -0
- package/dist/_types/rxjs/dist/types/internal/operators/concatAll.d.ts +59 -0
- package/dist/_types/rxjs/dist/types/internal/operators/concatMap.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/operators/concatMapTo.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/operators/concatWith.d.ts +43 -0
- package/dist/_types/rxjs/dist/types/internal/operators/connect.d.ts +87 -0
- package/dist/_types/rxjs/dist/types/internal/operators/count.d.ts +58 -0
- package/dist/_types/rxjs/dist/types/internal/operators/debounce.d.ts +61 -0
- package/dist/_types/rxjs/dist/types/internal/operators/debounceTime.d.ts +60 -0
- package/dist/_types/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts +38 -0
- package/dist/_types/rxjs/dist/types/internal/operators/delay.d.ts +59 -0
- package/dist/_types/rxjs/dist/types/internal/operators/delayWhen.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/operators/dematerialize.d.ts +51 -0
- package/dist/_types/rxjs/dist/types/internal/operators/distinct.d.ts +60 -0
- package/dist/_types/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts +4 -0
- package/dist/_types/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts +4 -0
- package/dist/_types/rxjs/dist/types/internal/operators/elementAt.d.ts +51 -0
- package/dist/_types/rxjs/dist/types/internal/operators/endWith.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/operators/every.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/operators/exhaust.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/operators/exhaustAll.d.ts +47 -0
- package/dist/_types/rxjs/dist/types/internal/operators/exhaustMap.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/operators/expand.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/operators/filter.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/operators/finalize.d.ts +64 -0
- package/dist/_types/rxjs/dist/types/internal/operators/find.d.ts +12 -0
- package/dist/_types/rxjs/dist/types/internal/operators/findIndex.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/operators/first.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/operators/flatMap.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/operators/groupBy.d.ts +119 -0
- package/dist/_types/rxjs/dist/types/internal/operators/ignoreElements.d.ts +38 -0
- package/dist/_types/rxjs/dist/types/internal/operators/isEmpty.d.ts +64 -0
- package/dist/_types/rxjs/dist/types/internal/operators/last.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/operators/map.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/operators/mapTo.d.ts +10 -0
- package/dist/_types/rxjs/dist/types/internal/operators/materialize.d.ts +52 -0
- package/dist/_types/rxjs/dist/types/internal/operators/max.d.ts +49 -0
- package/dist/_types/rxjs/dist/types/internal/operators/mergeAll.d.ts +62 -0
- package/dist/_types/rxjs/dist/types/internal/operators/mergeMap.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/operators/mergeMapTo.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/operators/mergeScan.d.ts +69 -0
- package/dist/_types/rxjs/dist/types/internal/operators/mergeWith.d.ts +44 -0
- package/dist/_types/rxjs/dist/types/internal/operators/min.d.ts +49 -0
- package/dist/_types/rxjs/dist/types/internal/operators/multicast.d.ts +63 -0
- package/dist/_types/rxjs/dist/types/internal/operators/observeOn.d.ts +56 -0
- package/dist/_types/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/operators/pairwise.d.ts +46 -0
- package/dist/_types/rxjs/dist/types/internal/operators/pluck.d.ts +18 -0
- package/dist/_types/rxjs/dist/types/internal/operators/publish.d.ts +30 -0
- package/dist/_types/rxjs/dist/types/internal/operators/publishBehavior.d.ts +19 -0
- package/dist/_types/rxjs/dist/types/internal/operators/publishLast.d.ts +69 -0
- package/dist/_types/rxjs/dist/types/internal/operators/publishReplay.d.ts +56 -0
- package/dist/_types/rxjs/dist/types/internal/operators/raceWith.d.ts +29 -0
- package/dist/_types/rxjs/dist/types/internal/operators/reduce.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/operators/refCount.d.ts +61 -0
- package/dist/_types/rxjs/dist/types/internal/operators/repeat.d.ts +108 -0
- package/dist/_types/rxjs/dist/types/internal/operators/repeatWhen.d.ts +38 -0
- package/dist/_types/rxjs/dist/types/internal/operators/retry.d.ts +28 -0
- package/dist/_types/rxjs/dist/types/internal/operators/retryWhen.d.ts +61 -0
- package/dist/_types/rxjs/dist/types/internal/operators/sample.d.ts +43 -0
- package/dist/_types/rxjs/dist/types/internal/operators/sampleTime.d.ts +46 -0
- package/dist/_types/rxjs/dist/types/internal/operators/scan.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/operators/sequenceEqual.d.ts +60 -0
- package/dist/_types/rxjs/dist/types/internal/operators/share.d.ts +43 -0
- package/dist/_types/rxjs/dist/types/internal/operators/shareReplay.d.ts +10 -0
- package/dist/_types/rxjs/dist/types/internal/operators/single.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/operators/skip.d.ts +36 -0
- package/dist/_types/rxjs/dist/types/internal/operators/skipLast.d.ts +45 -0
- package/dist/_types/rxjs/dist/types/internal/operators/skipUntil.d.ts +48 -0
- package/dist/_types/rxjs/dist/types/internal/operators/skipWhile.d.ts +5 -0
- package/dist/_types/rxjs/dist/types/internal/operators/startWith.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/operators/subscribeOn.d.ts +62 -0
- package/dist/_types/rxjs/dist/types/internal/operators/switchAll.d.ts +61 -0
- package/dist/_types/rxjs/dist/types/internal/operators/switchMap.d.ts +7 -0
- package/dist/_types/rxjs/dist/types/internal/operators/switchMapTo.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/operators/switchScan.d.ts +20 -0
- package/dist/_types/rxjs/dist/types/internal/operators/take.d.ts +45 -0
- package/dist/_types/rxjs/dist/types/internal/operators/takeLast.d.ts +42 -0
- package/dist/_types/rxjs/dist/types/internal/operators/takeUntil.d.ts +42 -0
- package/dist/_types/rxjs/dist/types/internal/operators/takeWhile.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/operators/tap.d.ts +72 -0
- package/dist/_types/rxjs/dist/types/internal/operators/throttle.d.ts +78 -0
- package/dist/_types/rxjs/dist/types/internal/operators/throttleTime.d.ts +53 -0
- package/dist/_types/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts +39 -0
- package/dist/_types/rxjs/dist/types/internal/operators/timeInterval.d.ts +50 -0
- package/dist/_types/rxjs/dist/types/internal/operators/timeout.d.ts +257 -0
- package/dist/_types/rxjs/dist/types/internal/operators/timeoutWith.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/operators/timestamp.d.ts +35 -0
- package/dist/_types/rxjs/dist/types/internal/operators/toArray.d.ts +33 -0
- package/dist/_types/rxjs/dist/types/internal/operators/window.d.ts +48 -0
- package/dist/_types/rxjs/dist/types/internal/operators/windowCount.d.ts +66 -0
- package/dist/_types/rxjs/dist/types/internal/operators/windowTime.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/operators/windowToggle.d.ts +51 -0
- package/dist/_types/rxjs/dist/types/internal/operators/windowWhen.d.ts +48 -0
- package/dist/_types/rxjs/dist/types/internal/operators/withLatestFrom.d.ts +4 -0
- package/dist/_types/rxjs/dist/types/internal/operators/zipAll.d.ts +14 -0
- package/dist/_types/rxjs/dist/types/internal/operators/zipWith.d.ts +26 -0
- package/dist/_types/rxjs/dist/types/internal/scheduled/scheduled.d.ts +15 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/Action.d.ts +32 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts +6 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts +25 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts +9 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts +4 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts +49 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/animationFrame.d.ts +38 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/asap.d.ts +41 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/async.d.ts +53 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/queue.d.ts +69 -0
- package/dist/_types/rxjs/dist/types/internal/scheduler/timerHandle.d.ts +2 -0
- package/dist/_types/rxjs/dist/types/internal/symbol/observable.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/types.d.ts +301 -0
- package/dist/_types/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts +21 -0
- package/dist/_types/rxjs/dist/types/internal/util/EmptyError.d.ts +23 -0
- package/dist/_types/rxjs/dist/types/internal/util/NotFoundError.d.ts +19 -0
- package/dist/_types/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts +20 -0
- package/dist/_types/rxjs/dist/types/internal/util/SequenceError.d.ts +19 -0
- package/dist/_types/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts +16 -0
- package/dist/_types/rxjs/dist/types/internal/util/identity.d.ts +44 -0
- package/dist/_types/rxjs/dist/types/internal/util/isObservable.d.ts +8 -0
- package/dist/_types/rxjs/dist/types/internal/util/noop.d.ts +2 -0
- package/dist/_types/rxjs/dist/types/internal/util/pipe.d.ts +14 -0
- package/dist/index.cjs +3 -228
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -226
- package/dist/index.js.map +1 -1
- package/dist/interceptors/request-tracking.interceptor.d.ts +1 -1
- package/dist/interceptors/streaming.interceptor.d.ts +1 -1
- package/dist/interceptors/tracing.interceptor.d.ts +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from './Action';
|
|
2
|
+
import { SchedulerAction } from '../types';
|
|
3
|
+
import { Subscription } from '../Subscription';
|
|
4
|
+
import { AsyncScheduler } from './AsyncScheduler';
|
|
5
|
+
import { TimerHandle } from './timerHandle';
|
|
6
|
+
export declare class AsyncAction<T> extends Action<T> {
|
|
7
|
+
protected scheduler: AsyncScheduler;
|
|
8
|
+
protected work: (this: SchedulerAction<T>, state?: T) => void;
|
|
9
|
+
id: TimerHandle | undefined;
|
|
10
|
+
state?: T;
|
|
11
|
+
delay: number;
|
|
12
|
+
protected pending: boolean;
|
|
13
|
+
constructor(scheduler: AsyncScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
|
|
14
|
+
schedule(state?: T, delay?: number): Subscription;
|
|
15
|
+
protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay?: number): TimerHandle;
|
|
16
|
+
protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay?: number | null): TimerHandle | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Immediately executes this action and the `work` it contains.
|
|
19
|
+
* @return {any}
|
|
20
|
+
*/
|
|
21
|
+
execute(state: T, delay: number): any;
|
|
22
|
+
protected _execute(state: T, _delay: number): any;
|
|
23
|
+
unsubscribe(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=AsyncAction.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Scheduler } from '../Scheduler';
|
|
2
|
+
import { Action } from './Action';
|
|
3
|
+
import { AsyncAction } from './AsyncAction';
|
|
4
|
+
export declare class AsyncScheduler extends Scheduler {
|
|
5
|
+
actions: Array<AsyncAction<any>>;
|
|
6
|
+
constructor(SchedulerAction: typeof Action, now?: () => number);
|
|
7
|
+
flush(action: AsyncAction<any>): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=AsyncScheduler.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AsyncAction } from './AsyncAction';
|
|
2
|
+
import { Subscription } from '../Subscription';
|
|
3
|
+
import { AsyncScheduler } from './AsyncScheduler';
|
|
4
|
+
import { SchedulerAction } from '../types';
|
|
5
|
+
import { TimerHandle } from './timerHandle';
|
|
6
|
+
export declare class VirtualTimeScheduler extends AsyncScheduler {
|
|
7
|
+
maxFrames: number;
|
|
8
|
+
/** @deprecated Not used in VirtualTimeScheduler directly. Will be removed in v8. */
|
|
9
|
+
static frameTimeFactor: number;
|
|
10
|
+
/**
|
|
11
|
+
* The current frame for the state of the virtual scheduler instance. The difference
|
|
12
|
+
* between two "frames" is synonymous with the passage of "virtual time units". So if
|
|
13
|
+
* you record `scheduler.frame` to be `1`, then later, observe `scheduler.frame` to be at `11`,
|
|
14
|
+
* that means `10` virtual time units have passed.
|
|
15
|
+
*/
|
|
16
|
+
frame: number;
|
|
17
|
+
/**
|
|
18
|
+
* Used internally to examine the current virtual action index being processed.
|
|
19
|
+
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
|
|
20
|
+
*/
|
|
21
|
+
index: number;
|
|
22
|
+
/**
|
|
23
|
+
* This creates an instance of a `VirtualTimeScheduler`. Experts only. The signature of
|
|
24
|
+
* this constructor is likely to change in the long run.
|
|
25
|
+
*
|
|
26
|
+
* @param schedulerActionCtor The type of Action to initialize when initializing actions during scheduling.
|
|
27
|
+
* @param maxFrames The maximum number of frames to process before stopping. Used to prevent endless flush cycles.
|
|
28
|
+
*/
|
|
29
|
+
constructor(schedulerActionCtor?: typeof AsyncAction, maxFrames?: number);
|
|
30
|
+
/**
|
|
31
|
+
* Prompt the Scheduler to execute all of its queued actions, therefore
|
|
32
|
+
* clearing its queue.
|
|
33
|
+
* @return {void}
|
|
34
|
+
*/
|
|
35
|
+
flush(): void;
|
|
36
|
+
}
|
|
37
|
+
export declare class VirtualAction<T> extends AsyncAction<T> {
|
|
38
|
+
protected scheduler: VirtualTimeScheduler;
|
|
39
|
+
protected work: (this: SchedulerAction<T>, state?: T) => void;
|
|
40
|
+
protected index: number;
|
|
41
|
+
protected active: boolean;
|
|
42
|
+
constructor(scheduler: VirtualTimeScheduler, work: (this: SchedulerAction<T>, state?: T) => void, index?: number);
|
|
43
|
+
schedule(state?: T, delay?: number): Subscription;
|
|
44
|
+
protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): TimerHandle;
|
|
45
|
+
protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): TimerHandle | undefined;
|
|
46
|
+
protected _execute(state: T, delay: number): any;
|
|
47
|
+
private static sortActions;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=VirtualTimeScheduler.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AnimationFrameScheduler } from './AnimationFrameScheduler';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Animation Frame Scheduler
|
|
5
|
+
*
|
|
6
|
+
* <span class="informal">Perform task when `window.requestAnimationFrame` would fire</span>
|
|
7
|
+
*
|
|
8
|
+
* When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler
|
|
9
|
+
* behaviour.
|
|
10
|
+
*
|
|
11
|
+
* Without delay, `animationFrame` scheduler can be used to create smooth browser animations.
|
|
12
|
+
* It makes sure scheduled task will happen just before next browser content repaint,
|
|
13
|
+
* thus performing animations as efficiently as possible.
|
|
14
|
+
*
|
|
15
|
+
* ## Example
|
|
16
|
+
* Schedule div height animation
|
|
17
|
+
* ```ts
|
|
18
|
+
* // html: <div style="background: #0ff;"></div>
|
|
19
|
+
* import { animationFrameScheduler } from 'rxjs';
|
|
20
|
+
*
|
|
21
|
+
* const div = document.querySelector('div');
|
|
22
|
+
*
|
|
23
|
+
* animationFrameScheduler.schedule(function(height) {
|
|
24
|
+
* div.style.height = height + "px";
|
|
25
|
+
*
|
|
26
|
+
* this.schedule(height + 1); // `this` references currently executing Action,
|
|
27
|
+
* // which we reschedule with new state
|
|
28
|
+
* }, 0, 0);
|
|
29
|
+
*
|
|
30
|
+
* // You will see a div element growing in height
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const animationFrameScheduler: AnimationFrameScheduler;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.
|
|
36
|
+
*/
|
|
37
|
+
export declare const animationFrame: AnimationFrameScheduler;
|
|
38
|
+
//# sourceMappingURL=animationFrame.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AsapScheduler } from './AsapScheduler';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Asap Scheduler
|
|
5
|
+
*
|
|
6
|
+
* <span class="informal">Perform task as fast as it can be performed asynchronously</span>
|
|
7
|
+
*
|
|
8
|
+
* `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task
|
|
9
|
+
* in time. If however you set delay to `0`, `asap` will wait for current synchronously executing
|
|
10
|
+
* code to end and then it will try to execute given task as fast as possible.
|
|
11
|
+
*
|
|
12
|
+
* `asap` scheduler will do its best to minimize time between end of currently executing code
|
|
13
|
+
* and start of scheduled task. This makes it best candidate for performing so called "deferring".
|
|
14
|
+
* Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves
|
|
15
|
+
* some (although minimal) unwanted delay.
|
|
16
|
+
*
|
|
17
|
+
* Note that using `asap` scheduler does not necessarily mean that your task will be first to process
|
|
18
|
+
* after currently executing code. In particular, if some task was also scheduled with `asap` before,
|
|
19
|
+
* that task will execute first. That being said, if you need to schedule task asynchronously, but
|
|
20
|
+
* as soon as possible, `asap` scheduler is your best bet.
|
|
21
|
+
*
|
|
22
|
+
* ## Example
|
|
23
|
+
* Compare async and asap scheduler<
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { asapScheduler, asyncScheduler } from 'rxjs';
|
|
26
|
+
*
|
|
27
|
+
* asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first...
|
|
28
|
+
* asapScheduler.schedule(() => console.log('asap'));
|
|
29
|
+
*
|
|
30
|
+
* // Logs:
|
|
31
|
+
* // "asap"
|
|
32
|
+
* // "async"
|
|
33
|
+
* // ... but 'asap' goes first!
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const asapScheduler: AsapScheduler;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Renamed to {@link asapScheduler}. Will be removed in v8.
|
|
39
|
+
*/
|
|
40
|
+
export declare const asap: AsapScheduler;
|
|
41
|
+
//# sourceMappingURL=asap.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { AsyncScheduler } from './AsyncScheduler';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Async Scheduler
|
|
5
|
+
*
|
|
6
|
+
* <span class="informal">Schedule task as if you used setTimeout(task, duration)</span>
|
|
7
|
+
*
|
|
8
|
+
* `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript
|
|
9
|
+
* event loop queue. It is best used to delay tasks in time or to schedule tasks repeating
|
|
10
|
+
* in intervals.
|
|
11
|
+
*
|
|
12
|
+
* If you just want to "defer" task, that is to perform it right after currently
|
|
13
|
+
* executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),
|
|
14
|
+
* better choice will be the {@link asapScheduler} scheduler.
|
|
15
|
+
*
|
|
16
|
+
* ## Examples
|
|
17
|
+
* Use async scheduler to delay task
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { asyncScheduler } from 'rxjs';
|
|
20
|
+
*
|
|
21
|
+
* const task = () => console.log('it works!');
|
|
22
|
+
*
|
|
23
|
+
* asyncScheduler.schedule(task, 2000);
|
|
24
|
+
*
|
|
25
|
+
* // After 2 seconds logs:
|
|
26
|
+
* // "it works!"
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Use async scheduler to repeat task in intervals
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { asyncScheduler } from 'rxjs';
|
|
32
|
+
*
|
|
33
|
+
* function task(state) {
|
|
34
|
+
* console.log(state);
|
|
35
|
+
* this.schedule(state + 1, 1000); // `this` references currently executing Action,
|
|
36
|
+
* // which we reschedule with new state and delay
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* asyncScheduler.schedule(task, 3000, 0);
|
|
40
|
+
*
|
|
41
|
+
* // Logs:
|
|
42
|
+
* // 0 after 3s
|
|
43
|
+
* // 1 after 4s
|
|
44
|
+
* // 2 after 5s
|
|
45
|
+
* // 3 after 6s
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare const asyncScheduler: AsyncScheduler;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.
|
|
51
|
+
*/
|
|
52
|
+
export declare const async: AsyncScheduler;
|
|
53
|
+
//# sourceMappingURL=async.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { QueueScheduler } from './QueueScheduler';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Queue Scheduler
|
|
5
|
+
*
|
|
6
|
+
* <span class="informal">Put every next task on a queue, instead of executing it immediately</span>
|
|
7
|
+
*
|
|
8
|
+
* `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.
|
|
9
|
+
*
|
|
10
|
+
* When used without delay, it schedules given task synchronously - executes it right when
|
|
11
|
+
* it is scheduled. However when called recursively, that is when inside the scheduled task,
|
|
12
|
+
* another task is scheduled with queue scheduler, instead of executing immediately as well,
|
|
13
|
+
* that task will be put on a queue and wait for current one to finish.
|
|
14
|
+
*
|
|
15
|
+
* This means that when you execute task with `queue` scheduler, you are sure it will end
|
|
16
|
+
* before any other task scheduled with that scheduler will start.
|
|
17
|
+
*
|
|
18
|
+
* ## Examples
|
|
19
|
+
* Schedule recursively first, then do something
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { queueScheduler } from 'rxjs';
|
|
22
|
+
*
|
|
23
|
+
* queueScheduler.schedule(() => {
|
|
24
|
+
* queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue
|
|
25
|
+
*
|
|
26
|
+
* console.log('first');
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* // Logs:
|
|
30
|
+
* // "first"
|
|
31
|
+
* // "second"
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Reschedule itself recursively
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { queueScheduler } from 'rxjs';
|
|
37
|
+
*
|
|
38
|
+
* queueScheduler.schedule(function(state) {
|
|
39
|
+
* if (state !== 0) {
|
|
40
|
+
* console.log('before', state);
|
|
41
|
+
* this.schedule(state - 1); // `this` references currently executing Action,
|
|
42
|
+
* // which we reschedule with new state
|
|
43
|
+
* console.log('after', state);
|
|
44
|
+
* }
|
|
45
|
+
* }, 0, 3);
|
|
46
|
+
*
|
|
47
|
+
* // In scheduler that runs recursively, you would expect:
|
|
48
|
+
* // "before", 3
|
|
49
|
+
* // "before", 2
|
|
50
|
+
* // "before", 1
|
|
51
|
+
* // "after", 1
|
|
52
|
+
* // "after", 2
|
|
53
|
+
* // "after", 3
|
|
54
|
+
*
|
|
55
|
+
* // But with queue it logs:
|
|
56
|
+
* // "before", 3
|
|
57
|
+
* // "after", 3
|
|
58
|
+
* // "before", 2
|
|
59
|
+
* // "after", 2
|
|
60
|
+
* // "before", 1
|
|
61
|
+
* // "after", 1
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare const queueScheduler: QueueScheduler;
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated Renamed to {@link queueScheduler}. Will be removed in v8.
|
|
67
|
+
*/
|
|
68
|
+
export declare const queue: QueueScheduler;
|
|
69
|
+
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Symbol.observable or a string "@@observable". Used for interop
|
|
3
|
+
*
|
|
4
|
+
* @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.
|
|
5
|
+
* Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable
|
|
6
|
+
*/
|
|
7
|
+
export declare const observable: string | symbol;
|
|
8
|
+
//# sourceMappingURL=observable.d.ts.map
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/// <reference lib="esnext.asynciterable" />
|
|
2
|
+
import { Observable } from './Observable';
|
|
3
|
+
import { Subscription } from './Subscription';
|
|
4
|
+
/**
|
|
5
|
+
* Note: This will add Symbol.observable globally for all TypeScript users,
|
|
6
|
+
* however, we are no longer polyfilling Symbol.observable
|
|
7
|
+
*/
|
|
8
|
+
declare global {
|
|
9
|
+
interface SymbolConstructor {
|
|
10
|
+
readonly observable: symbol;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A function type interface that describes a function that accepts one parameter `T`
|
|
15
|
+
* and returns another parameter `R`.
|
|
16
|
+
*
|
|
17
|
+
* Usually used to describe {@link OperatorFunction} - it always takes a single
|
|
18
|
+
* parameter (the source Observable) and returns another Observable.
|
|
19
|
+
*/
|
|
20
|
+
export interface UnaryFunction<T, R> {
|
|
21
|
+
(source: T): R;
|
|
22
|
+
}
|
|
23
|
+
export interface OperatorFunction<T, R> extends UnaryFunction<Observable<T>, Observable<R>> {
|
|
24
|
+
}
|
|
25
|
+
export declare type FactoryOrValue<T> = T | (() => T);
|
|
26
|
+
export interface MonoTypeOperatorFunction<T> extends OperatorFunction<T, T> {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A value and the time at which it was emitted.
|
|
30
|
+
*
|
|
31
|
+
* Emitted by the `timestamp` operator
|
|
32
|
+
*
|
|
33
|
+
* @see {@link timestamp}
|
|
34
|
+
*/
|
|
35
|
+
export interface Timestamp<T> {
|
|
36
|
+
value: T;
|
|
37
|
+
/**
|
|
38
|
+
* The timestamp. By default, this is in epoch milliseconds.
|
|
39
|
+
* Could vary based on the timestamp provider passed to the operator.
|
|
40
|
+
*/
|
|
41
|
+
timestamp: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A value emitted and the amount of time since the last value was emitted.
|
|
45
|
+
*
|
|
46
|
+
* Emitted by the `timeInterval` operator.
|
|
47
|
+
*
|
|
48
|
+
* @see {@link timeInterval}
|
|
49
|
+
*/
|
|
50
|
+
export interface TimeInterval<T> {
|
|
51
|
+
value: T;
|
|
52
|
+
/**
|
|
53
|
+
* The amount of time between this value's emission and the previous value's emission.
|
|
54
|
+
* If this is the first emitted value, then it will be the amount of time since subscription
|
|
55
|
+
* started.
|
|
56
|
+
*/
|
|
57
|
+
interval: number;
|
|
58
|
+
}
|
|
59
|
+
export interface Unsubscribable {
|
|
60
|
+
unsubscribe(): void;
|
|
61
|
+
}
|
|
62
|
+
export declare type TeardownLogic = Subscription | Unsubscribable | (() => void) | void;
|
|
63
|
+
export interface SubscriptionLike extends Unsubscribable {
|
|
64
|
+
unsubscribe(): void;
|
|
65
|
+
readonly closed: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Do not use. Most likely you want to use `ObservableInput`. Will be removed in v8.
|
|
69
|
+
*/
|
|
70
|
+
export declare type SubscribableOrPromise<T> = Subscribable<T> | Subscribable<never> | PromiseLike<T> | InteropObservable<T>;
|
|
71
|
+
/** OBSERVABLE INTERFACES */
|
|
72
|
+
export interface Subscribable<T> {
|
|
73
|
+
subscribe(observer: Partial<Observer<T>>): Unsubscribable;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Valid types that can be converted to observables.
|
|
77
|
+
*/
|
|
78
|
+
export declare type ObservableInput<T> = Observable<T> | InteropObservable<T> | AsyncIterable<T> | PromiseLike<T> | ArrayLike<T> | Iterable<T> | ReadableStreamLike<T>;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Renamed to {@link InteropObservable }. Will be removed in v8.
|
|
81
|
+
*/
|
|
82
|
+
export declare type ObservableLike<T> = InteropObservable<T>;
|
|
83
|
+
/**
|
|
84
|
+
* An object that implements the `Symbol.observable` interface.
|
|
85
|
+
*/
|
|
86
|
+
export interface InteropObservable<T> {
|
|
87
|
+
[Symbol.observable]: () => Subscribable<T>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A notification representing a "next" from an observable.
|
|
91
|
+
* Can be used with {@link dematerialize}.
|
|
92
|
+
*/
|
|
93
|
+
export interface NextNotification<T> {
|
|
94
|
+
/** The kind of notification. Always "N" */
|
|
95
|
+
kind: 'N';
|
|
96
|
+
/** The value of the notification. */
|
|
97
|
+
value: T;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A notification representing an "error" from an observable.
|
|
101
|
+
* Can be used with {@link dematerialize}.
|
|
102
|
+
*/
|
|
103
|
+
export interface ErrorNotification {
|
|
104
|
+
/** The kind of notification. Always "E" */
|
|
105
|
+
kind: 'E';
|
|
106
|
+
error: any;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* A notification representing a "completion" from an observable.
|
|
110
|
+
* Can be used with {@link dematerialize}.
|
|
111
|
+
*/
|
|
112
|
+
export interface CompleteNotification {
|
|
113
|
+
kind: 'C';
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Valid observable notification types.
|
|
117
|
+
*/
|
|
118
|
+
export declare type ObservableNotification<T> = NextNotification<T> | ErrorNotification | CompleteNotification;
|
|
119
|
+
export interface NextObserver<T> {
|
|
120
|
+
closed?: boolean;
|
|
121
|
+
next: (value: T) => void;
|
|
122
|
+
error?: (err: any) => void;
|
|
123
|
+
complete?: () => void;
|
|
124
|
+
}
|
|
125
|
+
export interface ErrorObserver<T> {
|
|
126
|
+
closed?: boolean;
|
|
127
|
+
next?: (value: T) => void;
|
|
128
|
+
error: (err: any) => void;
|
|
129
|
+
complete?: () => void;
|
|
130
|
+
}
|
|
131
|
+
export interface CompletionObserver<T> {
|
|
132
|
+
closed?: boolean;
|
|
133
|
+
next?: (value: T) => void;
|
|
134
|
+
error?: (err: any) => void;
|
|
135
|
+
complete: () => void;
|
|
136
|
+
}
|
|
137
|
+
export declare type PartialObserver<T> = NextObserver<T> | ErrorObserver<T> | CompletionObserver<T>;
|
|
138
|
+
/**
|
|
139
|
+
* An object interface that defines a set of callback functions a user can use to get
|
|
140
|
+
* notified of any set of {@link Observable}
|
|
141
|
+
* {@link guide/glossary-and-semantics#notification notification} events.
|
|
142
|
+
*
|
|
143
|
+
* For more info, please refer to {@link guide/observer this guide}.
|
|
144
|
+
*/
|
|
145
|
+
export interface Observer<T> {
|
|
146
|
+
/**
|
|
147
|
+
* A callback function that gets called by the producer during the subscription when
|
|
148
|
+
* the producer "has" the `value`. It won't be called if `error` or `complete` callback
|
|
149
|
+
* functions have been called, nor after the consumer has unsubscribed.
|
|
150
|
+
*
|
|
151
|
+
* For more info, please refer to {@link guide/glossary-and-semantics#next this guide}.
|
|
152
|
+
*/
|
|
153
|
+
next: (value: T) => void;
|
|
154
|
+
/**
|
|
155
|
+
* A callback function that gets called by the producer if and when it encountered a
|
|
156
|
+
* problem of any kind. The errored value will be provided through the `err` parameter.
|
|
157
|
+
* This callback can't be called more than one time, it can't be called if the
|
|
158
|
+
* `complete` callback function have been called previously, nor it can't be called if
|
|
159
|
+
* the consumer has unsubscribed.
|
|
160
|
+
*
|
|
161
|
+
* For more info, please refer to {@link guide/glossary-and-semantics#error this guide}.
|
|
162
|
+
*/
|
|
163
|
+
error: (err: any) => void;
|
|
164
|
+
/**
|
|
165
|
+
* A callback function that gets called by the producer if and when it has no more
|
|
166
|
+
* values to provide (by calling `next` callback function). This means that no error
|
|
167
|
+
* has happened. This callback can't be called more than one time, it can't be called
|
|
168
|
+
* if the `error` callback function have been called previously, nor it can't be called
|
|
169
|
+
* if the consumer has unsubscribed.
|
|
170
|
+
*
|
|
171
|
+
* For more info, please refer to {@link guide/glossary-and-semantics#complete this guide}.
|
|
172
|
+
*/
|
|
173
|
+
complete: () => void;
|
|
174
|
+
}
|
|
175
|
+
export interface SubjectLike<T> extends Observer<T>, Subscribable<T> {
|
|
176
|
+
}
|
|
177
|
+
export interface SchedulerLike extends TimestampProvider {
|
|
178
|
+
schedule<T>(work: (this: SchedulerAction<T>, state: T) => void, delay: number, state: T): Subscription;
|
|
179
|
+
schedule<T>(work: (this: SchedulerAction<T>, state?: T) => void, delay: number, state?: T): Subscription;
|
|
180
|
+
schedule<T>(work: (this: SchedulerAction<T>, state?: T) => void, delay?: number, state?: T): Subscription;
|
|
181
|
+
}
|
|
182
|
+
export interface SchedulerAction<T> extends Subscription {
|
|
183
|
+
schedule(state?: T, delay?: number): Subscription;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* This is a type that provides a method to allow RxJS to create a numeric timestamp
|
|
187
|
+
*/
|
|
188
|
+
export interface TimestampProvider {
|
|
189
|
+
/**
|
|
190
|
+
* Returns a timestamp as a number.
|
|
191
|
+
*
|
|
192
|
+
* This is used by types like `ReplaySubject` or operators like `timestamp` to calculate
|
|
193
|
+
* the amount of time passed between events.
|
|
194
|
+
*/
|
|
195
|
+
now(): number;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Extracts the type from an `ObservableInput<any>`. If you have
|
|
199
|
+
* `O extends ObservableInput<any>` and you pass in `Observable<number>`, or
|
|
200
|
+
* `Promise<number>`, etc, it will type as `number`.
|
|
201
|
+
*/
|
|
202
|
+
export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
|
|
203
|
+
/**
|
|
204
|
+
* Extracts a union of element types from an `ObservableInput<any>[]`.
|
|
205
|
+
* If you have `O extends ObservableInput<any>[]` and you pass in
|
|
206
|
+
* `Observable<string>[]` or `Promise<string>[]` you would get
|
|
207
|
+
* back a type of `string`.
|
|
208
|
+
* If you pass in `[Observable<string>, Observable<number>]` you would
|
|
209
|
+
* get back a type of `string | number`.
|
|
210
|
+
*/
|
|
211
|
+
export declare type ObservedValueUnionFromArray<X> = X extends Array<ObservableInput<infer T>> ? T : never;
|
|
212
|
+
/**
|
|
213
|
+
* @deprecated Renamed to {@link ObservedValueUnionFromArray}. Will be removed in v8.
|
|
214
|
+
*/
|
|
215
|
+
export declare type ObservedValuesFromArray<X> = ObservedValueUnionFromArray<X>;
|
|
216
|
+
/**
|
|
217
|
+
* Extracts a tuple of element types from an `ObservableInput<any>[]`.
|
|
218
|
+
* If you have `O extends ObservableInput<any>[]` and you pass in
|
|
219
|
+
* `[Observable<string>, Observable<number>]` you would get back a type
|
|
220
|
+
* of `[string, number]`.
|
|
221
|
+
*/
|
|
222
|
+
export declare type ObservedValueTupleFromArray<X> = {
|
|
223
|
+
[K in keyof X]: ObservedValueOf<X[K]>;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Used to infer types from arguments to functions like {@link forkJoin}.
|
|
227
|
+
* So that you can have `forkJoin([Observable<A>, PromiseLike<B>]): Observable<[A, B]>`
|
|
228
|
+
* et al.
|
|
229
|
+
*/
|
|
230
|
+
export declare type ObservableInputTuple<T> = {
|
|
231
|
+
[K in keyof T]: ObservableInput<T[K]>;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Constructs a new tuple with the specified type at the head.
|
|
235
|
+
* If you declare `Cons<A, [B, C]>` you will get back `[A, B, C]`.
|
|
236
|
+
*/
|
|
237
|
+
export declare type Cons<X, Y extends readonly any[]> = ((arg: X, ...rest: Y) => any) extends (...args: infer U) => any ? U : never;
|
|
238
|
+
/**
|
|
239
|
+
* Extracts the head of a tuple.
|
|
240
|
+
* If you declare `Head<[A, B, C]>` you will get back `A`.
|
|
241
|
+
*/
|
|
242
|
+
export declare type Head<X extends readonly any[]> = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never;
|
|
243
|
+
/**
|
|
244
|
+
* Extracts the tail of a tuple.
|
|
245
|
+
* If you declare `Tail<[A, B, C]>` you will get back `[B, C]`.
|
|
246
|
+
*/
|
|
247
|
+
export declare type Tail<X extends readonly any[]> = ((...args: X) => any) extends (arg: any, ...rest: infer U) => any ? U : never;
|
|
248
|
+
/**
|
|
249
|
+
* Extracts the generic value from an Array type.
|
|
250
|
+
* If you have `T extends Array<any>`, and pass a `string[]` to it,
|
|
251
|
+
* `ValueFromArray<T>` will return the actual type of `string`.
|
|
252
|
+
*/
|
|
253
|
+
export declare type ValueFromArray<A extends readonly unknown[]> = A extends Array<infer T> ? T : never;
|
|
254
|
+
/**
|
|
255
|
+
* Gets the value type from an {@link ObservableNotification}, if possible.
|
|
256
|
+
*/
|
|
257
|
+
export declare type ValueFromNotification<T> = T extends {
|
|
258
|
+
kind: 'N' | 'E' | 'C';
|
|
259
|
+
} ? T extends NextNotification<any> ? T extends {
|
|
260
|
+
value: infer V;
|
|
261
|
+
} ? V : undefined : never : never;
|
|
262
|
+
/**
|
|
263
|
+
* A simple type to represent a gamut of "falsy" values... with a notable exception:
|
|
264
|
+
* `NaN` is "falsy" however, it is not and cannot be typed via TypeScript. See
|
|
265
|
+
* comments here: https://github.com/microsoft/TypeScript/issues/28682#issuecomment-707142417
|
|
266
|
+
*/
|
|
267
|
+
export declare type Falsy = null | undefined | false | 0 | -0 | 0n | '';
|
|
268
|
+
export declare type TruthyTypesOf<T> = T extends Falsy ? never : T;
|
|
269
|
+
interface ReadableStreamDefaultReaderLike<T> {
|
|
270
|
+
read(): PromiseLike<{
|
|
271
|
+
done: false;
|
|
272
|
+
value: T;
|
|
273
|
+
} | {
|
|
274
|
+
done: true;
|
|
275
|
+
value?: undefined;
|
|
276
|
+
}>;
|
|
277
|
+
releaseLock(): void;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* The base signature RxJS will look for to identify and use
|
|
281
|
+
* a [ReadableStream](https://streams.spec.whatwg.org/#rs-class)
|
|
282
|
+
* as an {@link ObservableInput} source.
|
|
283
|
+
*/
|
|
284
|
+
export interface ReadableStreamLike<T> {
|
|
285
|
+
getReader(): ReadableStreamDefaultReaderLike<T>;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* An observable with a `connect` method that is used to create a subscription
|
|
289
|
+
* to an underlying source, connecting it with all consumers via a multicast.
|
|
290
|
+
*/
|
|
291
|
+
export interface Connectable<T> extends Observable<T> {
|
|
292
|
+
/**
|
|
293
|
+
* (Idempotent) Calling this method will connect the underlying source observable to all subscribed consumers
|
|
294
|
+
* through an underlying {@link Subject}.
|
|
295
|
+
* @returns A subscription, that when unsubscribed, will "disconnect" the source from the connector subject,
|
|
296
|
+
* severing notifications to all consumers.
|
|
297
|
+
*/
|
|
298
|
+
connect(): Subscription;
|
|
299
|
+
}
|
|
300
|
+
export {};
|
|
301
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ArgumentOutOfRangeError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export interface ArgumentOutOfRangeErrorCtor {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Internal implementation detail. Do not construct error instances.
|
|
6
|
+
* Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
|
|
7
|
+
*/
|
|
8
|
+
new (): ArgumentOutOfRangeError;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* An error thrown when an element was queried at a certain index of an
|
|
12
|
+
* Observable, but no such index or position exists in that sequence.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link elementAt}
|
|
15
|
+
* @see {@link take}
|
|
16
|
+
* @see {@link takeLast}
|
|
17
|
+
*
|
|
18
|
+
* @class ArgumentOutOfRangeError
|
|
19
|
+
*/
|
|
20
|
+
export declare const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor;
|
|
21
|
+
//# sourceMappingURL=ArgumentOutOfRangeError.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface EmptyError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export interface EmptyErrorCtor {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Internal implementation detail. Do not construct error instances.
|
|
6
|
+
* Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
|
|
7
|
+
*/
|
|
8
|
+
new (): EmptyError;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* An error thrown when an Observable or a sequence was queried but has no
|
|
12
|
+
* elements.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link first}
|
|
15
|
+
* @see {@link last}
|
|
16
|
+
* @see {@link single}
|
|
17
|
+
* @see {@link firstValueFrom}
|
|
18
|
+
* @see {@link lastValueFrom}
|
|
19
|
+
*
|
|
20
|
+
* @class EmptyError
|
|
21
|
+
*/
|
|
22
|
+
export declare const EmptyError: EmptyErrorCtor;
|
|
23
|
+
//# sourceMappingURL=EmptyError.d.ts.map
|