@fncts/observable 0.0.1
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/Action.d.ts +6 -0
- package/AnimationFrameAction.d.ts +11 -0
- package/AnimationFrameScheduler.d.ts +6 -0
- package/AsyncAction.d.ts +19 -0
- package/AsyncScheduler.d.ts +11 -0
- package/BehaviorSubject.d.ts +10 -0
- package/Notification.d.ts +59 -0
- package/Observable/api/connect.d.ts +10 -0
- package/Observable/api/connectable.d.ts +24 -0
- package/Observable/api/fromCallback.d.ts +11 -0
- package/Observable/api/fromEvent.d.ts +4 -0
- package/Observable/api/index.d.ts +14 -0
- package/Observable/api/race.d.ts +9 -0
- package/Observable/api/raceWith.d.ts +6 -0
- package/Observable/api/repeatWhen.d.ts +5 -0
- package/Observable/api/retryWhen.d.ts +10 -0
- package/Observable/api/share.d.ts +16 -0
- package/Observable/api/window.d.ts +8 -0
- package/Observable/api/windowCount.d.ts +6 -0
- package/Observable/api/windowTime.d.ts +12 -0
- package/Observable/api/windowToggle.d.ts +8 -0
- package/Observable/api/windowWhen.d.ts +9 -0
- package/Observable/api.d.ts +668 -0
- package/Observable/definition.d.ts +32 -0
- package/Observable/dom/animationFrames.d.ts +6 -0
- package/Observable/instances.d.ts +1 -0
- package/Observable.d.ts +19 -0
- package/Observer.d.ts +6 -0
- package/Operator.d.ts +19 -0
- package/Scheduler.d.ts +22 -0
- package/Subject.d.ts +48 -0
- package/Subscriber.d.ts +27 -0
- package/Subscription.d.ts +41 -0
- package/_cjs/Action.cjs +27 -0
- package/_cjs/Action.cjs.map +1 -0
- package/_cjs/AnimationFrameAction.cjs +48 -0
- package/_cjs/AnimationFrameAction.cjs.map +1 -0
- package/_cjs/AnimationFrameScheduler.cjs +51 -0
- package/_cjs/AnimationFrameScheduler.cjs.map +1 -0
- package/_cjs/AsyncAction.cjs +116 -0
- package/_cjs/AsyncAction.cjs.map +1 -0
- package/_cjs/AsyncScheduler.cjs +61 -0
- package/_cjs/AsyncScheduler.cjs.map +1 -0
- package/_cjs/BehaviorSubject.cjs +52 -0
- package/_cjs/BehaviorSubject.cjs.map +1 -0
- package/_cjs/Notification.cjs +110 -0
- package/_cjs/Notification.cjs.map +1 -0
- package/_cjs/Observable/api/connect.cjs +35 -0
- package/_cjs/Observable/api/connect.cjs.map +1 -0
- package/_cjs/Observable/api/connectable.cjs +64 -0
- package/_cjs/Observable/api/connectable.cjs.map +1 -0
- package/_cjs/Observable/api/fromCallback.cjs +74 -0
- package/_cjs/Observable/api/fromCallback.cjs.map +1 -0
- package/_cjs/Observable/api/fromEvent.cjs +22 -0
- package/_cjs/Observable/api/fromEvent.cjs.map +1 -0
- package/_cjs/Observable/api/index.cjs +188 -0
- package/_cjs/Observable/api/index.cjs.map +1 -0
- package/_cjs/Observable/api/race.cjs +47 -0
- package/_cjs/Observable/api/race.cjs.map +1 -0
- package/_cjs/Observable/api/raceWith.cjs +24 -0
- package/_cjs/Observable/api/raceWith.cjs.map +1 -0
- package/_cjs/Observable/api/repeatWhen.cjs +72 -0
- package/_cjs/Observable/api/repeatWhen.cjs.map +1 -0
- package/_cjs/Observable/api/retryWhen.cjs +61 -0
- package/_cjs/Observable/api/retryWhen.cjs.map +1 -0
- package/_cjs/Observable/api/share.cjs +115 -0
- package/_cjs/Observable/api/share.cjs.map +1 -0
- package/_cjs/Observable/api/window.cjs +53 -0
- package/_cjs/Observable/api/window.cjs.map +1 -0
- package/_cjs/Observable/api/windowCount.cjs +62 -0
- package/_cjs/Observable/api/windowCount.cjs.map +1 -0
- package/_cjs/Observable/api/windowTime.cjs +90 -0
- package/_cjs/Observable/api/windowTime.cjs.map +1 -0
- package/_cjs/Observable/api/windowToggle.cjs +92 -0
- package/_cjs/Observable/api/windowToggle.cjs.map +1 -0
- package/_cjs/Observable/api/windowWhen.cjs +68 -0
- package/_cjs/Observable/api/windowWhen.cjs.map +1 -0
- package/_cjs/Observable/api.cjs +2558 -0
- package/_cjs/Observable/api.cjs.map +1 -0
- package/_cjs/Observable/definition.cjs +76 -0
- package/_cjs/Observable/definition.cjs.map +1 -0
- package/_cjs/Observable/dom/animationFrames.cjs +51 -0
- package/_cjs/Observable/dom/animationFrames.cjs.map +1 -0
- package/_cjs/Observable/instances.cjs +6 -0
- package/_cjs/Observable/instances.cjs.map +1 -0
- package/_cjs/Observable.cjs +253 -0
- package/_cjs/Observable.cjs.map +1 -0
- package/_cjs/Observer.cjs +6 -0
- package/_cjs/Observer.cjs.map +1 -0
- package/_cjs/Operator.cjs +83 -0
- package/_cjs/Operator.cjs.map +1 -0
- package/_cjs/Scheduler.cjs +62 -0
- package/_cjs/Scheduler.cjs.map +1 -0
- package/_cjs/Subject.cjs +228 -0
- package/_cjs/Subject.cjs.map +1 -0
- package/_cjs/Subscriber.cjs +172 -0
- package/_cjs/Subscriber.cjs.map +1 -0
- package/_cjs/Subscription.cjs +174 -0
- package/_cjs/Subscription.cjs.map +1 -0
- package/_cjs/demo.cjs +40 -0
- package/_cjs/demo.cjs.map +1 -0
- package/_cjs/global.cjs +4 -0
- package/_cjs/global.cjs.map +1 -0
- package/_cjs/index.cjs +65 -0
- package/_cjs/index.cjs.map +1 -0
- package/_cjs/internal/animationFrameProvider.cjs +51 -0
- package/_cjs/internal/animationFrameProvider.cjs.map +1 -0
- package/_cjs/internal/args.cjs +26 -0
- package/_cjs/internal/args.cjs.map +1 -0
- package/_cjs/internal/intervalProvider.cjs +27 -0
- package/_cjs/internal/intervalProvider.cjs.map +1 -0
- package/_cjs/internal/performanceTimestampProvider.cjs +15 -0
- package/_cjs/internal/performanceTimestampProvider.cjs.map +1 -0
- package/_cjs/internal/timeoutProvider.cjs +27 -0
- package/_cjs/internal/timeoutProvider.cjs.map +1 -0
- package/_cjs/internal/timestampProvider.cjs +15 -0
- package/_cjs/internal/timestampProvider.cjs.map +1 -0
- package/_cjs/internal/util.cjs +107 -0
- package/_cjs/internal/util.cjs.map +1 -0
- package/_mjs/Action.mjs +14 -0
- package/_mjs/Action.mjs.map +1 -0
- package/_mjs/AnimationFrameAction.mjs +33 -0
- package/_mjs/AnimationFrameAction.mjs.map +1 -0
- package/_mjs/AnimationFrameScheduler.mjs +36 -0
- package/_mjs/AnimationFrameScheduler.mjs.map +1 -0
- package/_mjs/AsyncAction.mjs +99 -0
- package/_mjs/AsyncAction.mjs.map +1 -0
- package/_mjs/AsyncScheduler.mjs +45 -0
- package/_mjs/AsyncScheduler.mjs.map +1 -0
- package/_mjs/BehaviorSubject.mjs +38 -0
- package/_mjs/BehaviorSubject.mjs.map +1 -0
- package/_mjs/Notification.mjs +80 -0
- package/_mjs/Notification.mjs.map +1 -0
- package/_mjs/Observable/api/connect.mjs +21 -0
- package/_mjs/Observable/api/connect.mjs.map +1 -0
- package/_mjs/Observable/api/connectable.mjs +45 -0
- package/_mjs/Observable/api/connectable.mjs.map +1 -0
- package/_mjs/Observable/api/fromCallback.mjs +60 -0
- package/_mjs/Observable/api/fromCallback.mjs.map +1 -0
- package/_mjs/Observable/api/fromEvent.mjs +10 -0
- package/_mjs/Observable/api/fromEvent.mjs.map +1 -0
- package/_mjs/Observable/api/index.mjs +15 -0
- package/_mjs/Observable/api/index.mjs.map +1 -0
- package/_mjs/Observable/api/race.mjs +32 -0
- package/_mjs/Observable/api/race.mjs.map +1 -0
- package/_mjs/Observable/api/raceWith.mjs +12 -0
- package/_mjs/Observable/api/raceWith.mjs.map +1 -0
- package/_mjs/Observable/api/repeatWhen.mjs +57 -0
- package/_mjs/Observable/api/repeatWhen.mjs.map +1 -0
- package/_mjs/Observable/api/retryWhen.mjs +45 -0
- package/_mjs/Observable/api/retryWhen.mjs.map +1 -0
- package/_mjs/Observable/api/share.mjs +97 -0
- package/_mjs/Observable/api/share.mjs.map +1 -0
- package/_mjs/Observable/api/window.mjs +40 -0
- package/_mjs/Observable/api/window.mjs.map +1 -0
- package/_mjs/Observable/api/windowCount.mjs +50 -0
- package/_mjs/Observable/api/windowCount.mjs.map +1 -0
- package/_mjs/Observable/api/windowTime.mjs +73 -0
- package/_mjs/Observable/api/windowTime.mjs.map +1 -0
- package/_mjs/Observable/api/windowToggle.mjs +77 -0
- package/_mjs/Observable/api/windowToggle.mjs.map +1 -0
- package/_mjs/Observable/api/windowWhen.mjs +54 -0
- package/_mjs/Observable/api/windowWhen.mjs.map +1 -0
- package/_mjs/Observable/api.mjs +2291 -0
- package/_mjs/Observable/api.mjs.map +1 -0
- package/_mjs/Observable/definition.mjs +54 -0
- package/_mjs/Observable/definition.mjs.map +1 -0
- package/_mjs/Observable/dom/animationFrames.mjs +36 -0
- package/_mjs/Observable/dom/animationFrames.mjs.map +1 -0
- package/_mjs/Observable/instances.mjs +2 -0
- package/_mjs/Observable/instances.mjs.map +1 -0
- package/_mjs/Observable.mjs +25 -0
- package/_mjs/Observable.mjs.map +1 -0
- package/_mjs/Observer.mjs +2 -0
- package/_mjs/Observer.mjs.map +1 -0
- package/_mjs/Operator.mjs +63 -0
- package/_mjs/Operator.mjs.map +1 -0
- package/_mjs/Scheduler.mjs +41 -0
- package/_mjs/Scheduler.mjs.map +1 -0
- package/_mjs/Subject.mjs +204 -0
- package/_mjs/Subject.mjs.map +1 -0
- package/_mjs/Subscriber.mjs +147 -0
- package/_mjs/Subscriber.mjs.map +1 -0
- package/_mjs/Subscription.mjs +148 -0
- package/_mjs/Subscription.mjs.map +1 -0
- package/_mjs/demo.mjs +30 -0
- package/_mjs/demo.mjs.map +1 -0
- package/_mjs/global.mjs +2 -0
- package/_mjs/global.mjs.map +1 -0
- package/_mjs/index.mjs +15 -0
- package/_mjs/index.mjs.map +1 -0
- package/_mjs/internal/animationFrameProvider.mjs +38 -0
- package/_mjs/internal/animationFrameProvider.mjs.map +1 -0
- package/_mjs/internal/args.mjs +13 -0
- package/_mjs/internal/args.mjs.map +1 -0
- package/_mjs/internal/intervalProvider.mjs +20 -0
- package/_mjs/internal/intervalProvider.mjs.map +1 -0
- package/_mjs/internal/performanceTimestampProvider.mjs +8 -0
- package/_mjs/internal/performanceTimestampProvider.mjs.map +1 -0
- package/_mjs/internal/timeoutProvider.mjs +20 -0
- package/_mjs/internal/timeoutProvider.mjs.map +1 -0
- package/_mjs/internal/timestampProvider.mjs +8 -0
- package/_mjs/internal/timestampProvider.mjs.map +1 -0
- package/_mjs/internal/util.mjs +76 -0
- package/_mjs/internal/util.mjs.map +1 -0
- package/_src/Action.ts +10 -0
- package/_src/AnimationFrameAction.ts +27 -0
- package/_src/AnimationFrameScheduler.ts +30 -0
- package/_src/AsyncAction.ts +93 -0
- package/_src/AsyncScheduler.ts +41 -0
- package/_src/BehaviorSubject.ts +28 -0
- package/_src/Notification.ts +91 -0
- package/_src/Observable/api/connect.ts +23 -0
- package/_src/Observable/api/connectable.ts +52 -0
- package/_src/Observable/api/fromCallback.ts +57 -0
- package/_src/Observable/api/fromEvent.ts +12 -0
- package/_src/Observable/api/index.ts +14 -0
- package/_src/Observable/api/race.ts +31 -0
- package/_src/Observable/api/raceWith.ts +15 -0
- package/_src/Observable/api/repeatWhen.ts +63 -0
- package/_src/Observable/api/retryWhen.ts +47 -0
- package/_src/Observable/api/share.ts +107 -0
- package/_src/Observable/api/window.ts +44 -0
- package/_src/Observable/api/windowCount.ts +56 -0
- package/_src/Observable/api/windowTime.ts +102 -0
- package/_src/Observable/api/windowToggle.ts +84 -0
- package/_src/Observable/api/windowWhen.ts +59 -0
- package/_src/Observable/api.ts +2749 -0
- package/_src/Observable/definition.ts +69 -0
- package/_src/Observable/dom/animationFrames.ts +33 -0
- package/_src/Observable/instances.ts +106 -0
- package/_src/Observable.ts +27 -0
- package/_src/Observer.ts +5 -0
- package/_src/Operator.ts +73 -0
- package/_src/Scheduler.ts +52 -0
- package/_src/Subject.ts +171 -0
- package/_src/Subscriber.ts +130 -0
- package/_src/Subscription.ts +143 -0
- package/_src/demo.ts +29 -0
- package/_src/global.ts +141 -0
- package/_src/index.ts +14 -0
- package/_src/internal/animationFrameProvider.ts +37 -0
- package/_src/internal/args.ts +11 -0
- package/_src/internal/intervalProvider.ts +27 -0
- package/_src/internal/performanceTimestampProvider.ts +12 -0
- package/_src/internal/timeoutProvider.ts +27 -0
- package/_src/internal/timestampProvider.ts +14 -0
- package/_src/internal/util.ts +94 -0
- package/demo.d.ts +1 -0
- package/global.d.ts +125 -0
- package/index.d.ts +14 -0
- package/internal/animationFrameProvider.d.ts +12 -0
- package/internal/args.d.ts +3 -0
- package/internal/intervalProvider.d.ts +12 -0
- package/internal/performanceTimestampProvider.d.ts +6 -0
- package/internal/timeoutProvider.d.ts +12 -0
- package/internal/timestampProvider.d.ts +7 -0
- package/internal/util.d.ts +28 -0
- package/package.json +16 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export interface Unsubscribable {
|
|
2
|
+
readonly unsubscribe: () => void;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface SubscriptionLike extends Unsubscribable {
|
|
6
|
+
readonly closed: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type Finalizer = Unsubscribable | (() => void) | void;
|
|
10
|
+
|
|
11
|
+
export const SubscriptionTypeId = Symbol.for("@fncts/observable/Subscription");
|
|
12
|
+
export type SubscriptionTypeId = typeof SubscriptionTypeId;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @tsplus type fncts.observable.Subscription
|
|
16
|
+
* @tsplus companion fncts.observable.SubscriptionOps
|
|
17
|
+
*/
|
|
18
|
+
export class Subscription implements SubscriptionLike {
|
|
19
|
+
readonly [SubscriptionTypeId]: SubscriptionTypeId = SubscriptionTypeId;
|
|
20
|
+
|
|
21
|
+
public closed = false;
|
|
22
|
+
private finalizers: Set<Finalizer> | null = null;
|
|
23
|
+
private parents: Set<Subscription> | null = null;
|
|
24
|
+
|
|
25
|
+
constructor(private initialFinalizer?: () => void) {}
|
|
26
|
+
|
|
27
|
+
unsubscribe(): void {
|
|
28
|
+
let errors: unknown[] | undefined;
|
|
29
|
+
|
|
30
|
+
if (!this.closed) {
|
|
31
|
+
this.closed = true;
|
|
32
|
+
|
|
33
|
+
const { parents, initialFinalizer, finalizers } = this;
|
|
34
|
+
|
|
35
|
+
if (parents) {
|
|
36
|
+
this.parents = null;
|
|
37
|
+
for (const parent of parents) {
|
|
38
|
+
parent.remove(this);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (initialFinalizer) {
|
|
43
|
+
try {
|
|
44
|
+
initialFinalizer();
|
|
45
|
+
} catch (e) {
|
|
46
|
+
errors = isUnsubscribeError(e) ? e.errors : [e];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (finalizers) {
|
|
51
|
+
this.finalizers = null;
|
|
52
|
+
for (const finalizer of finalizers) {
|
|
53
|
+
try {
|
|
54
|
+
executeFinalizer(finalizer);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
errors ||= [];
|
|
57
|
+
if (isUnsubscribeError(e)) {
|
|
58
|
+
errors.push(...e.errors);
|
|
59
|
+
} else {
|
|
60
|
+
errors.push(e);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (errors) {
|
|
68
|
+
throw new UnsubscribeError(errors);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
add(finalizer: Finalizer): void {
|
|
73
|
+
if (finalizer && finalizer !== this) {
|
|
74
|
+
if (this.closed) {
|
|
75
|
+
executeFinalizer(finalizer);
|
|
76
|
+
} else {
|
|
77
|
+
if (isSubscription(finalizer)) {
|
|
78
|
+
if (finalizer.closed || finalizer.hasParent(this)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
finalizer.addParent(this);
|
|
82
|
+
}
|
|
83
|
+
if (!this.finalizers) {
|
|
84
|
+
this.finalizers = new Set();
|
|
85
|
+
}
|
|
86
|
+
this.finalizers.add(finalizer);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private hasParent(parent: Subscription) {
|
|
92
|
+
const parentage = this.parents;
|
|
93
|
+
return parentage ? parentage.has(parent) : false;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private addParent(parent: Subscription) {
|
|
97
|
+
if (!this.parents) {
|
|
98
|
+
this.parents = new Set();
|
|
99
|
+
}
|
|
100
|
+
this.parents.add(parent);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
private removeParent(parent: Subscription) {
|
|
104
|
+
this.parents?.delete(parent);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
remove(finalizer: Finalizer): void {
|
|
108
|
+
this.finalizers?.delete(finalizer);
|
|
109
|
+
|
|
110
|
+
if (isSubscription(finalizer)) {
|
|
111
|
+
finalizer.removeParent(this);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function isSubscription(u: unknown): u is Subscription {
|
|
117
|
+
return isObject(u) && SubscriptionTypeId in u;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function executeFinalizer(finalizer: Finalizer): void {
|
|
121
|
+
return finalizer && ("unsubscribe" in finalizer ? finalizer.unsubscribe() : finalizer());
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @tsplus static fncts.observable.SubscriptionOps empty
|
|
126
|
+
*/
|
|
127
|
+
export const EMPTY_SUBSCRIPTION = (() => {
|
|
128
|
+
const empty = new Subscription();
|
|
129
|
+
empty.closed = true;
|
|
130
|
+
return empty;
|
|
131
|
+
})();
|
|
132
|
+
|
|
133
|
+
export const UnsubscribeErrorTypeId = Symbol.for("@principia/observable/UnsubscribeError");
|
|
134
|
+
export type UnsubscribeErrorTypeId = typeof UnsubscribeErrorTypeId;
|
|
135
|
+
|
|
136
|
+
export class UnsubscribeError {
|
|
137
|
+
readonly [UnsubscribeErrorTypeId]: UnsubscribeErrorTypeId = UnsubscribeErrorTypeId;
|
|
138
|
+
constructor(readonly errors: unknown[]) {}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function isUnsubscribeError(u: unknown): u is UnsubscribeError {
|
|
142
|
+
return isObject(u) && UnsubscribeErrorTypeId in u;
|
|
143
|
+
}
|
package/_src/demo.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const x = new Observable<never, void>((subscriber) => {
|
|
2
|
+
setInterval(() => {
|
|
3
|
+
subscriber.next(undefined);
|
|
4
|
+
}, 1000);
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
new Observable<string, number>((subscriber) => {
|
|
8
|
+
let i = 0;
|
|
9
|
+
const handle = setInterval(() => {
|
|
10
|
+
if (i === 100) {
|
|
11
|
+
subscriber.error(Cause.fail("lmao"));
|
|
12
|
+
} else {
|
|
13
|
+
subscriber.next(i++);
|
|
14
|
+
}
|
|
15
|
+
}, 100);
|
|
16
|
+
subscriber.add(() => {
|
|
17
|
+
clearInterval(handle);
|
|
18
|
+
});
|
|
19
|
+
})
|
|
20
|
+
.share()
|
|
21
|
+
.window(x)
|
|
22
|
+
.subscribe({
|
|
23
|
+
next: (value) => {
|
|
24
|
+
value.subscribe(console.log.bind(console));
|
|
25
|
+
},
|
|
26
|
+
error: (cause) => {
|
|
27
|
+
console.log(cause);
|
|
28
|
+
},
|
|
29
|
+
});
|
package/_src/global.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import "@fncts/observable";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @tsplus global
|
|
5
|
+
*/
|
|
6
|
+
import { HashSet } from "@fncts/base/collection/immutable/HashSet";
|
|
7
|
+
/**
|
|
8
|
+
* @tsplus global
|
|
9
|
+
*/
|
|
10
|
+
import { Cause } from "@fncts/base/data/Cause";
|
|
11
|
+
/**
|
|
12
|
+
* @tsplus global
|
|
13
|
+
*/
|
|
14
|
+
import { Either } from "@fncts/base/data/Either";
|
|
15
|
+
/**
|
|
16
|
+
* @tsplus global
|
|
17
|
+
*/
|
|
18
|
+
import { Exit } from "@fncts/base/data/Exit";
|
|
19
|
+
/**
|
|
20
|
+
* @tsplus global
|
|
21
|
+
*/
|
|
22
|
+
import { Lazy } from "@fncts/base/data/function";
|
|
23
|
+
/**
|
|
24
|
+
* @tsplus global
|
|
25
|
+
*/
|
|
26
|
+
import { Just, Maybe, Nothing } from "@fncts/base/data/Maybe";
|
|
27
|
+
/**
|
|
28
|
+
* @tsplus global
|
|
29
|
+
*/
|
|
30
|
+
import { Predicate, PredicateWithIndex } from "@fncts/base/data/Predicate";
|
|
31
|
+
/**
|
|
32
|
+
* @tsplus global
|
|
33
|
+
*/
|
|
34
|
+
import { Refinement, RefinementWithIndex } from "@fncts/base/data/Refinement";
|
|
35
|
+
/**
|
|
36
|
+
* @tsplus global
|
|
37
|
+
*/
|
|
38
|
+
import { Eq } from "@fncts/base/typeclass";
|
|
39
|
+
/**
|
|
40
|
+
* @tsplus global
|
|
41
|
+
*/
|
|
42
|
+
import { isDate, isFunction, isIterable, isObject, isPlain } from "@fncts/base/util/predicates";
|
|
43
|
+
/**
|
|
44
|
+
* @tsplus global
|
|
45
|
+
*/
|
|
46
|
+
import { Fiber, FiberContext } from "@fncts/io/Fiber";
|
|
47
|
+
/**
|
|
48
|
+
* @tsplus global
|
|
49
|
+
*/
|
|
50
|
+
import { IO, isIO, UIO } from "@fncts/io/IO";
|
|
51
|
+
/**
|
|
52
|
+
* @tsplus global
|
|
53
|
+
*/
|
|
54
|
+
import { IOEnv } from "@fncts/io/IOEnv";
|
|
55
|
+
/**
|
|
56
|
+
* @tsplus global
|
|
57
|
+
*/
|
|
58
|
+
import { Action } from "@fncts/observable/Action";
|
|
59
|
+
/**
|
|
60
|
+
* @tsplus global
|
|
61
|
+
*/
|
|
62
|
+
import { AnimationFrameAction } from "@fncts/observable/AnimationFrameAction";
|
|
63
|
+
/**
|
|
64
|
+
* @tsplus global
|
|
65
|
+
*/
|
|
66
|
+
import { AnimationFrameScheduler } from "@fncts/observable/AnimationFrameScheduler";
|
|
67
|
+
/**
|
|
68
|
+
* @tsplus global
|
|
69
|
+
*/
|
|
70
|
+
import { AsyncAction } from "@fncts/observable/AsyncAction";
|
|
71
|
+
/**
|
|
72
|
+
* @tsplus global
|
|
73
|
+
*/
|
|
74
|
+
import { AsyncScheduler, asyncScheduler } from "@fncts/observable/AsyncScheduler";
|
|
75
|
+
/**
|
|
76
|
+
* @tsplus global
|
|
77
|
+
*/
|
|
78
|
+
import { animationFrameProvider } from "@fncts/observable/internal/animationFrameProvider";
|
|
79
|
+
/**
|
|
80
|
+
* @tsplus global
|
|
81
|
+
*/
|
|
82
|
+
import { timeoutProvider } from "@fncts/observable/internal/timeoutProvider";
|
|
83
|
+
/**
|
|
84
|
+
* @tsplus global
|
|
85
|
+
*/
|
|
86
|
+
import { TimestampProvider } from "@fncts/observable/internal/timestampProvider";
|
|
87
|
+
/**
|
|
88
|
+
* @tsplus global
|
|
89
|
+
*/
|
|
90
|
+
import {
|
|
91
|
+
isArrayLike,
|
|
92
|
+
isAsyncIterable,
|
|
93
|
+
isPromiseLike,
|
|
94
|
+
isReadableStream,
|
|
95
|
+
isValidDate,
|
|
96
|
+
noop,
|
|
97
|
+
ReadableStreamLike,
|
|
98
|
+
reportUnhandledError,
|
|
99
|
+
} from "@fncts/observable/internal/util";
|
|
100
|
+
/**
|
|
101
|
+
* @tsplus global
|
|
102
|
+
*/
|
|
103
|
+
import { Notification } from "@fncts/observable/Notification";
|
|
104
|
+
/**
|
|
105
|
+
* @tsplus global
|
|
106
|
+
*/
|
|
107
|
+
import { Observable, ObservableInput, Subscribable } from "@fncts/observable/Observable";
|
|
108
|
+
/**
|
|
109
|
+
* @tsplus global
|
|
110
|
+
*/
|
|
111
|
+
import { Observer } from "@fncts/observable/Observer";
|
|
112
|
+
/**
|
|
113
|
+
* @tsplus global
|
|
114
|
+
*/
|
|
115
|
+
import { operate_, Operator, OperatorSubscriber, operatorSubscriber } from "@fncts/observable/Operator";
|
|
116
|
+
/**
|
|
117
|
+
* @tsplus global
|
|
118
|
+
*/
|
|
119
|
+
import { isScheduler, Scheduler, SchedulerAction, SchedulerLike } from "@fncts/observable/Scheduler";
|
|
120
|
+
/**
|
|
121
|
+
* @tsplus global
|
|
122
|
+
*/
|
|
123
|
+
import { Subject, SubjectLike } from "@fncts/observable/Subject";
|
|
124
|
+
/**
|
|
125
|
+
* @tsplus global
|
|
126
|
+
*/
|
|
127
|
+
import { AsyncSubject } from "@fncts/observable/Subject";
|
|
128
|
+
/**
|
|
129
|
+
* @tsplus global
|
|
130
|
+
*/
|
|
131
|
+
import { isSubscriber, SafeSubscriber, Subscriber } from "@fncts/observable/Subscriber";
|
|
132
|
+
/**
|
|
133
|
+
* @tsplus global
|
|
134
|
+
*/
|
|
135
|
+
import {
|
|
136
|
+
Finalizer,
|
|
137
|
+
isSubscription,
|
|
138
|
+
Subscription,
|
|
139
|
+
SubscriptionLike,
|
|
140
|
+
Unsubscribable,
|
|
141
|
+
} from "@fncts/observable/Subscription";
|
package/_src/index.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * as action from "@fncts/observable/Action";
|
|
2
|
+
export * as animationFrameAction from "@fncts/observable/AnimationFrameAction";
|
|
3
|
+
export * as animationFrameScheduler from "@fncts/observable/AnimationFrameScheduler";
|
|
4
|
+
export * as asyncAction from "@fncts/observable/AsyncAction";
|
|
5
|
+
export * as asyncScheduler from "@fncts/observable/AsyncScheduler";
|
|
6
|
+
export * as behaviorSubject from "@fncts/observable/BehaviorSubject";
|
|
7
|
+
export * as observable from "@fncts/observable/Observable";
|
|
8
|
+
export * as notification from "@fncts/observable/Observable";
|
|
9
|
+
export * as observer from "@fncts/observable/Observer";
|
|
10
|
+
export * as operator from "@fncts/observable/Operator";
|
|
11
|
+
export * as scheduler from "@fncts/observable/Scheduler";
|
|
12
|
+
export * as subject from "@fncts/observable/Subject";
|
|
13
|
+
export * as subscriber from "@fncts/observable/Subscriber";
|
|
14
|
+
export * as subscription from "@fncts/observable/Subscription";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
interface AnimationFrameProvider {
|
|
2
|
+
schedule(callback: FrameRequestCallback): Subscription;
|
|
3
|
+
requestAnimationFrame: typeof requestAnimationFrame;
|
|
4
|
+
cancelAnimationFrame: typeof cancelAnimationFrame;
|
|
5
|
+
delegate:
|
|
6
|
+
| {
|
|
7
|
+
requestAnimationFrame: typeof requestAnimationFrame;
|
|
8
|
+
cancelAnimationFrame: typeof cancelAnimationFrame;
|
|
9
|
+
}
|
|
10
|
+
| undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const animationFrameProvider: AnimationFrameProvider = {
|
|
14
|
+
schedule(callback) {
|
|
15
|
+
let request = requestAnimationFrame;
|
|
16
|
+
let cancel: typeof this.cancelAnimationFrame | undefined = cancelAnimationFrame;
|
|
17
|
+
const { delegate } = animationFrameProvider;
|
|
18
|
+
if (delegate) {
|
|
19
|
+
request = delegate.requestAnimationFrame;
|
|
20
|
+
cancel = delegate.cancelAnimationFrame;
|
|
21
|
+
}
|
|
22
|
+
const handle = request((timestamp) => {
|
|
23
|
+
cancel = undefined;
|
|
24
|
+
callback(timestamp);
|
|
25
|
+
});
|
|
26
|
+
return new Subscription(() => cancel?.(handle));
|
|
27
|
+
},
|
|
28
|
+
requestAnimationFrame(...args) {
|
|
29
|
+
const { delegate } = animationFrameProvider;
|
|
30
|
+
return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args);
|
|
31
|
+
},
|
|
32
|
+
cancelAnimationFrame(...args) {
|
|
33
|
+
const { delegate } = animationFrameProvider;
|
|
34
|
+
return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args);
|
|
35
|
+
},
|
|
36
|
+
delegate: undefined,
|
|
37
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function last<A>(arr: A[]): A | undefined {
|
|
2
|
+
return arr[arr.length - 1];
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function popNumber(args: any[], defaultValue: number): number {
|
|
6
|
+
return typeof last(args) === "number" ? args.pop()! : defaultValue;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function popScheduler(args: any[]): SchedulerLike | undefined {
|
|
10
|
+
return isScheduler(last(args)) ? args.pop() : undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;
|
|
2
|
+
type ClearIntervalFunction = (handle: number) => void;
|
|
3
|
+
|
|
4
|
+
interface IntervalProvider {
|
|
5
|
+
setInterval: SetIntervalFunction;
|
|
6
|
+
clearInterval: ClearIntervalFunction;
|
|
7
|
+
delegate:
|
|
8
|
+
| {
|
|
9
|
+
setInterval: SetIntervalFunction;
|
|
10
|
+
clearInterval: ClearIntervalFunction;
|
|
11
|
+
}
|
|
12
|
+
| undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const intervalProvider: IntervalProvider = {
|
|
16
|
+
// When accessing the delegate, use the variable rather than `this` so that
|
|
17
|
+
// the functions can be called without being bound to the provider.
|
|
18
|
+
setInterval(...args) {
|
|
19
|
+
const { delegate } = intervalProvider;
|
|
20
|
+
return (delegate?.setInterval || setInterval)(...args);
|
|
21
|
+
},
|
|
22
|
+
clearInterval(handle) {
|
|
23
|
+
const { delegate } = intervalProvider;
|
|
24
|
+
return (delegate?.clearInterval || clearInterval)(handle);
|
|
25
|
+
},
|
|
26
|
+
delegate: undefined,
|
|
27
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TimestampProvider } from "./timestampProvider";
|
|
2
|
+
|
|
3
|
+
interface PerformanceTimestampProvider extends TimestampProvider {
|
|
4
|
+
delegate: TimestampProvider | undefined;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const performanceTimestampProvider: PerformanceTimestampProvider = {
|
|
8
|
+
now() {
|
|
9
|
+
return (performanceTimestampProvider.delegate || performance).now();
|
|
10
|
+
},
|
|
11
|
+
delegate: undefined,
|
|
12
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;
|
|
2
|
+
type ClearTimeoutFunction = (handle: number) => void;
|
|
3
|
+
|
|
4
|
+
interface TimeoutProvider {
|
|
5
|
+
setTimeout: SetTimeoutFunction;
|
|
6
|
+
clearTimeout: ClearTimeoutFunction;
|
|
7
|
+
delegate:
|
|
8
|
+
| {
|
|
9
|
+
setTimeout: SetTimeoutFunction;
|
|
10
|
+
clearTimeout: ClearTimeoutFunction;
|
|
11
|
+
}
|
|
12
|
+
| undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const timeoutProvider: TimeoutProvider = {
|
|
16
|
+
// When accessing the delegate, use the variable rather than `this` so that
|
|
17
|
+
// the functions can be called without being bound to the provider.
|
|
18
|
+
setTimeout(...args) {
|
|
19
|
+
const { delegate } = timeoutProvider;
|
|
20
|
+
return (delegate?.setTimeout || setTimeout)(...args);
|
|
21
|
+
},
|
|
22
|
+
clearTimeout(handle) {
|
|
23
|
+
const { delegate } = timeoutProvider;
|
|
24
|
+
return (delegate?.clearTimeout || clearTimeout)(handle);
|
|
25
|
+
},
|
|
26
|
+
delegate: undefined,
|
|
27
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TimestampProvider {
|
|
2
|
+
now(): number;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface DateTimestampProvider extends TimestampProvider {
|
|
6
|
+
delegate: TimestampProvider | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const dateTimestampProvider: DateTimestampProvider = {
|
|
10
|
+
now() {
|
|
11
|
+
return (dateTimestampProvider.delegate || Date).now();
|
|
12
|
+
},
|
|
13
|
+
delegate: undefined,
|
|
14
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export function arrayRemove<T>(arr: T[] | undefined | null, item: T) {
|
|
2
|
+
if (arr) {
|
|
3
|
+
const index = arr.indexOf(item);
|
|
4
|
+
0 <= index && arr.splice(index, 1);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function noop(): void {
|
|
9
|
+
// noop
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function isAsyncIterable(u: any): u is AsyncIterable<any> {
|
|
13
|
+
return Symbol.asyncIterator && isFunction(u?.[Symbol.asyncIterator]);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function isArrayLike(u: any): u is ArrayLike<any> {
|
|
17
|
+
return u != null && typeof u.length === "number" && typeof u !== "function";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function isPromiseLike(u: any): u is PromiseLike<any> {
|
|
21
|
+
return isFunction(u?.then);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function isValidDate(u: unknown): u is Date {
|
|
25
|
+
return isDate(u) && !isNaN(u as any);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function reportUnhandledError(err: unknown) {
|
|
29
|
+
return timeoutProvider.setTimeout(() => {
|
|
30
|
+
throw err;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function arrayOrObject<T, O extends Record<string, T>>(
|
|
35
|
+
args: ReadonlyArray<T> | [O] | [ReadonlyArray<T>],
|
|
36
|
+
): { args: ReadonlyArray<T>; keys: ReadonlyArray<string> | null } {
|
|
37
|
+
if (args.length === 1) {
|
|
38
|
+
const first = args[0];
|
|
39
|
+
if (Array.isArray(first)) {
|
|
40
|
+
return { args: first, keys: null };
|
|
41
|
+
}
|
|
42
|
+
if (isPlain(first)) {
|
|
43
|
+
const keys = Object.keys(first);
|
|
44
|
+
return {
|
|
45
|
+
args: Object.values(first),
|
|
46
|
+
keys,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return { args: args as ReadonlyArray<T>, keys: null };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/*
|
|
55
|
+
* -------------------------------------------------------------------------------------------------
|
|
56
|
+
* ReadableStream
|
|
57
|
+
* -------------------------------------------------------------------------------------------------
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
interface ReadableStreamDefaultReaderLike<T> {
|
|
61
|
+
read(): PromiseLike<
|
|
62
|
+
| {
|
|
63
|
+
done: false;
|
|
64
|
+
value: T;
|
|
65
|
+
}
|
|
66
|
+
| { done: true; value?: undefined }
|
|
67
|
+
>;
|
|
68
|
+
releaseLock(): void;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ReadableStreamLike<T> {
|
|
72
|
+
getReader(): ReadableStreamDefaultReaderLike<T>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export async function* readableStreamToAsyncGenerator<A>(readableStream: ReadableStreamLike<A>): AsyncGenerator<A> {
|
|
76
|
+
const reader = readableStream.getReader();
|
|
77
|
+
try {
|
|
78
|
+
while (true) {
|
|
79
|
+
const { value, done } = await reader.read();
|
|
80
|
+
if (done) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
yield value!;
|
|
84
|
+
}
|
|
85
|
+
} finally {
|
|
86
|
+
reader.releaseLock();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function isReadableStream<A>(u: any): u is ReadableStreamLike<A> {
|
|
91
|
+
return isFunction(u?.getReader);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type Init<A extends ReadonlyArray<unknown>> = A extends [...infer Init, infer Last] ? Init : never;
|
package/demo.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/global.d.ts
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @tsplus global
|
|
3
|
+
*/
|
|
4
|
+
import { HashSet } from "@fncts/base/collection/immutable/HashSet";
|
|
5
|
+
/**
|
|
6
|
+
* @tsplus global
|
|
7
|
+
*/
|
|
8
|
+
import { Cause } from "@fncts/base/data/Cause";
|
|
9
|
+
/**
|
|
10
|
+
* @tsplus global
|
|
11
|
+
*/
|
|
12
|
+
import { Either } from "@fncts/base/data/Either";
|
|
13
|
+
/**
|
|
14
|
+
* @tsplus global
|
|
15
|
+
*/
|
|
16
|
+
import { Exit } from "@fncts/base/data/Exit";
|
|
17
|
+
/**
|
|
18
|
+
* @tsplus global
|
|
19
|
+
*/
|
|
20
|
+
import { Lazy } from "@fncts/base/data/function";
|
|
21
|
+
/**
|
|
22
|
+
* @tsplus global
|
|
23
|
+
*/
|
|
24
|
+
import { Just, Maybe, Nothing } from "@fncts/base/data/Maybe";
|
|
25
|
+
/**
|
|
26
|
+
* @tsplus global
|
|
27
|
+
*/
|
|
28
|
+
import { Predicate, PredicateWithIndex } from "@fncts/base/data/Predicate";
|
|
29
|
+
/**
|
|
30
|
+
* @tsplus global
|
|
31
|
+
*/
|
|
32
|
+
import { Refinement, RefinementWithIndex } from "@fncts/base/data/Refinement";
|
|
33
|
+
/**
|
|
34
|
+
* @tsplus global
|
|
35
|
+
*/
|
|
36
|
+
import { Eq } from "@fncts/base/typeclass";
|
|
37
|
+
/**
|
|
38
|
+
* @tsplus global
|
|
39
|
+
*/
|
|
40
|
+
import { isDate, isFunction, isIterable, isObject, isPlain } from "@fncts/base/util/predicates";
|
|
41
|
+
/**
|
|
42
|
+
* @tsplus global
|
|
43
|
+
*/
|
|
44
|
+
import { Fiber, FiberContext } from "@fncts/io/Fiber";
|
|
45
|
+
/**
|
|
46
|
+
* @tsplus global
|
|
47
|
+
*/
|
|
48
|
+
import { IO, isIO, UIO } from "@fncts/io/IO";
|
|
49
|
+
/**
|
|
50
|
+
* @tsplus global
|
|
51
|
+
*/
|
|
52
|
+
import { IOEnv } from "@fncts/io/IOEnv";
|
|
53
|
+
/**
|
|
54
|
+
* @tsplus global
|
|
55
|
+
*/
|
|
56
|
+
import { Action } from "@fncts/observable/Action";
|
|
57
|
+
/**
|
|
58
|
+
* @tsplus global
|
|
59
|
+
*/
|
|
60
|
+
import { AnimationFrameAction } from "@fncts/observable/AnimationFrameAction";
|
|
61
|
+
/**
|
|
62
|
+
* @tsplus global
|
|
63
|
+
*/
|
|
64
|
+
import { AnimationFrameScheduler } from "@fncts/observable/AnimationFrameScheduler";
|
|
65
|
+
/**
|
|
66
|
+
* @tsplus global
|
|
67
|
+
*/
|
|
68
|
+
import { AsyncAction } from "@fncts/observable/AsyncAction";
|
|
69
|
+
/**
|
|
70
|
+
* @tsplus global
|
|
71
|
+
*/
|
|
72
|
+
import { AsyncScheduler, asyncScheduler } from "@fncts/observable/AsyncScheduler";
|
|
73
|
+
/**
|
|
74
|
+
* @tsplus global
|
|
75
|
+
*/
|
|
76
|
+
import { animationFrameProvider } from "@fncts/observable/internal/animationFrameProvider";
|
|
77
|
+
/**
|
|
78
|
+
* @tsplus global
|
|
79
|
+
*/
|
|
80
|
+
import { timeoutProvider } from "@fncts/observable/internal/timeoutProvider";
|
|
81
|
+
/**
|
|
82
|
+
* @tsplus global
|
|
83
|
+
*/
|
|
84
|
+
import { TimestampProvider } from "@fncts/observable/internal/timestampProvider";
|
|
85
|
+
/**
|
|
86
|
+
* @tsplus global
|
|
87
|
+
*/
|
|
88
|
+
import { isArrayLike, isAsyncIterable, isPromiseLike, isReadableStream, isValidDate, noop, ReadableStreamLike, reportUnhandledError, } from "@fncts/observable/internal/util";
|
|
89
|
+
/**
|
|
90
|
+
* @tsplus global
|
|
91
|
+
*/
|
|
92
|
+
import { Notification } from "@fncts/observable/Notification";
|
|
93
|
+
/**
|
|
94
|
+
* @tsplus global
|
|
95
|
+
*/
|
|
96
|
+
import { Observable, ObservableInput, Subscribable } from "@fncts/observable/Observable";
|
|
97
|
+
/**
|
|
98
|
+
* @tsplus global
|
|
99
|
+
*/
|
|
100
|
+
import { Observer } from "@fncts/observable/Observer";
|
|
101
|
+
/**
|
|
102
|
+
* @tsplus global
|
|
103
|
+
*/
|
|
104
|
+
import { operate_, Operator, OperatorSubscriber, operatorSubscriber } from "@fncts/observable/Operator";
|
|
105
|
+
/**
|
|
106
|
+
* @tsplus global
|
|
107
|
+
*/
|
|
108
|
+
import { isScheduler, Scheduler, SchedulerAction, SchedulerLike } from "@fncts/observable/Scheduler";
|
|
109
|
+
/**
|
|
110
|
+
* @tsplus global
|
|
111
|
+
*/
|
|
112
|
+
import { Subject, SubjectLike } from "@fncts/observable/Subject";
|
|
113
|
+
/**
|
|
114
|
+
* @tsplus global
|
|
115
|
+
*/
|
|
116
|
+
import { AsyncSubject } from "@fncts/observable/Subject";
|
|
117
|
+
/**
|
|
118
|
+
* @tsplus global
|
|
119
|
+
*/
|
|
120
|
+
import { isSubscriber, SafeSubscriber, Subscriber } from "@fncts/observable/Subscriber";
|
|
121
|
+
/**
|
|
122
|
+
* @tsplus global
|
|
123
|
+
*/
|
|
124
|
+
import { Finalizer, isSubscription, Subscription, SubscriptionLike, Unsubscribable, } from "@fncts/observable/Subscription";
|
|
125
|
+
import "@fncts/observable";
|