@fncts/observable 0.0.26 → 0.0.28
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/Observable/api/raceWith.d.ts +0 -1
- package/Observable/api/repeatWhen.d.ts +1 -1
- package/Observable/api/share.d.ts +1 -1
- package/Observable/api.d.ts +4 -4
- package/Observable/definition.d.ts +1 -4
- package/Observable.d.ts +16 -16
- package/ObservableRef.d.ts +2 -2
- package/Operator.d.ts +3 -3
- package/Subject.d.ts +14 -5
- package/Subscriber.d.ts +23 -8
- package/Subscription.d.ts +2 -2
- package/_cjs/Action.cjs +1 -1
- package/_cjs/AnimationFrameAction.cjs +2 -2
- package/_cjs/AnimationFrameScheduler.cjs +2 -2
- package/_cjs/AsyncAction.cjs +4 -4
- package/_cjs/AsyncAction.cjs.map +1 -1
- package/_cjs/AsyncScheduler.cjs +2 -2
- package/_cjs/BehaviorSubject.cjs +2 -2
- package/_cjs/BehaviorSubject.cjs.map +1 -1
- package/_cjs/Observable/api/connect.cjs +7 -7
- package/_cjs/Observable/api/connect.cjs.map +1 -1
- package/_cjs/Observable/api/connectable.cjs +4 -4
- package/_cjs/Observable/api/connectable.cjs.map +1 -1
- package/_cjs/Observable/api/fromCallback.cjs +2 -2
- package/_cjs/Observable/api/fromEvent.cjs +1 -1
- package/_cjs/Observable/api/race.cjs +4 -4
- package/_cjs/Observable/api/race.cjs.map +1 -1
- package/_cjs/Observable/api/raceWith.cjs +3 -4
- package/_cjs/Observable/api/raceWith.cjs.map +1 -1
- package/_cjs/Observable/api/repeatWhen.cjs +9 -8
- package/_cjs/Observable/api/repeatWhen.cjs.map +1 -1
- package/_cjs/Observable/api/retryWhen.cjs +9 -8
- package/_cjs/Observable/api/retryWhen.cjs.map +1 -1
- package/_cjs/Observable/api/share.cjs +9 -9
- package/_cjs/Observable/api/share.cjs.map +1 -1
- package/_cjs/Observable/api/window.cjs +12 -11
- package/_cjs/Observable/api/window.cjs.map +1 -1
- package/_cjs/Observable/api/windowCount.cjs +12 -10
- package/_cjs/Observable/api/windowCount.cjs.map +1 -1
- package/_cjs/Observable/api/windowTime.cjs +12 -11
- package/_cjs/Observable/api/windowTime.cjs.map +1 -1
- package/_cjs/Observable/api/windowToggle.cjs +26 -24
- package/_cjs/Observable/api/windowToggle.cjs.map +1 -1
- package/_cjs/Observable/api/windowWhen.cjs +17 -15
- package/_cjs/Observable/api/windowWhen.cjs.map +1 -1
- package/_cjs/Observable/api.cjs +325 -311
- package/_cjs/Observable/api.cjs.map +1 -1
- package/_cjs/Observable/definition.cjs +7 -14
- package/_cjs/Observable/definition.cjs.map +1 -1
- package/_cjs/Observable/dom/animationFrames.cjs +3 -3
- package/_cjs/Observable/dom/animationFrames.cjs.map +1 -1
- package/_cjs/Observable.cjs +64 -64
- package/_cjs/Observable.cjs.map +1 -1
- package/_cjs/ObservableRef/api.cjs +2 -2
- package/_cjs/ObservableRef/atomic.cjs +2 -2
- package/_cjs/ObservableRef/definition.cjs +1 -1
- package/_cjs/ObservableRef.cjs +8 -8
- package/_cjs/ObservableRef.cjs.map +1 -1
- package/_cjs/Operator.cjs +9 -14
- package/_cjs/Operator.cjs.map +1 -1
- package/_cjs/Scheduler.cjs +2 -2
- package/_cjs/Subject.cjs +69 -43
- package/_cjs/Subject.cjs.map +1 -1
- package/_cjs/Subscriber.cjs +122 -70
- package/_cjs/Subscriber.cjs.map +1 -1
- package/_cjs/Subscription.cjs +7 -7
- package/_cjs/Subscription.cjs.map +1 -1
- package/_cjs/config.cjs +15 -0
- package/_cjs/config.cjs.map +1 -0
- package/_cjs/index.cjs +13 -13
- package/_cjs/internal/animationFrameProvider.cjs +1 -1
- package/_cjs/internal/args.cjs +1 -1
- package/_cjs/internal/util.cjs +2 -2
- package/_mjs/AsyncAction.mjs +3 -3
- package/_mjs/AsyncAction.mjs.map +1 -1
- package/_mjs/BehaviorSubject.mjs +1 -1
- package/_mjs/BehaviorSubject.mjs.map +1 -1
- package/_mjs/Observable/api/connect.mjs +6 -6
- package/_mjs/Observable/api/connect.mjs.map +1 -1
- package/_mjs/Observable/api/connectable.mjs +1 -1
- package/_mjs/Observable/api/connectable.mjs.map +1 -1
- package/_mjs/Observable/api/race.mjs +1 -1
- package/_mjs/Observable/api/race.mjs.map +1 -1
- package/_mjs/Observable/api/raceWith.mjs +3 -4
- package/_mjs/Observable/api/raceWith.mjs.map +1 -1
- package/_mjs/Observable/api/repeatWhen.mjs +9 -8
- package/_mjs/Observable/api/repeatWhen.mjs.map +1 -1
- package/_mjs/Observable/api/retryWhen.mjs +9 -8
- package/_mjs/Observable/api/retryWhen.mjs.map +1 -1
- package/_mjs/Observable/api/share.mjs +8 -8
- package/_mjs/Observable/api/share.mjs.map +1 -1
- package/_mjs/Observable/api/window.mjs +12 -11
- package/_mjs/Observable/api/window.mjs.map +1 -1
- package/_mjs/Observable/api/windowCount.mjs +12 -10
- package/_mjs/Observable/api/windowCount.mjs.map +1 -1
- package/_mjs/Observable/api/windowTime.mjs +11 -10
- package/_mjs/Observable/api/windowTime.mjs.map +1 -1
- package/_mjs/Observable/api/windowToggle.mjs +25 -23
- package/_mjs/Observable/api/windowToggle.mjs.map +1 -1
- package/_mjs/Observable/api/windowWhen.mjs +17 -15
- package/_mjs/Observable/api/windowWhen.mjs.map +1 -1
- package/_mjs/Observable/api.mjs +304 -290
- package/_mjs/Observable/api.mjs.map +1 -1
- package/_mjs/Observable/definition.mjs +2 -9
- package/_mjs/Observable/definition.mjs.map +1 -1
- package/_mjs/Observable/dom/animationFrames.mjs +1 -1
- package/_mjs/Observable/dom/animationFrames.mjs.map +1 -1
- package/_mjs/Observable.mjs +16 -18
- package/_mjs/Observable.mjs.map +1 -1
- package/_mjs/ObservableRef.mjs +2 -3
- package/_mjs/ObservableRef.mjs.map +1 -1
- package/_mjs/Operator.mjs +6 -11
- package/_mjs/Operator.mjs.map +1 -1
- package/_mjs/Subject.mjs +65 -39
- package/_mjs/Subject.mjs.map +1 -1
- package/_mjs/Subscriber.mjs +119 -67
- package/_mjs/Subscriber.mjs.map +1 -1
- package/_mjs/Subscription.mjs +6 -6
- package/_mjs/Subscription.mjs.map +1 -1
- package/_mjs/config.mjs +9 -0
- package/_mjs/config.mjs.map +1 -0
- package/_src/AsyncAction.ts +3 -3
- package/_src/BehaviorSubject.ts +1 -1
- package/_src/Observable/api/connect.ts +2 -2
- package/_src/Observable/api/connectable.ts +1 -1
- package/_src/Observable/api/race.ts +1 -1
- package/_src/Observable/api/raceWith.ts +2 -5
- package/_src/Observable/api/repeatWhen.ts +4 -4
- package/_src/Observable/api/retryWhen.ts +3 -3
- package/_src/Observable/api/share.ts +6 -6
- package/_src/Observable/api/window.ts +3 -3
- package/_src/Observable/api/windowCount.ts +30 -33
- package/_src/Observable/api/windowTime.ts +4 -4
- package/_src/Observable/api/windowToggle.ts +19 -21
- package/_src/Observable/api/windowWhen.ts +10 -13
- package/_src/Observable/api.ts +358 -363
- package/_src/Observable/definition.ts +2 -17
- package/_src/Observable/dom/animationFrames.ts +1 -1
- package/_src/Observable.ts +17 -18
- package/_src/ObservableRef.ts +2 -3
- package/_src/Operator.ts +9 -21
- package/_src/Subject.ts +66 -39
- package/_src/Subscriber.ts +134 -59
- package/_src/Subscription.ts +8 -8
- package/_src/config.ts +40 -0
- package/_src/global.ts +1 -1
- package/config.d.ts +36 -0
- package/global.d.ts +1 -1
- package/package.json +4 -2
package/_src/config.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Notification } from "./Notification.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The {@link GlobalConfig} object for RxJS. It is used to configure things
|
|
5
|
+
* like how to react on unhandled errors.
|
|
6
|
+
*/
|
|
7
|
+
export const config: GlobalConfig = {
|
|
8
|
+
onUnhandledError: null,
|
|
9
|
+
onStoppedNotification: null,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The global configuration object for RxJS, used to configure things
|
|
14
|
+
* like how to react on unhandled errors. Accessible via {@link config}
|
|
15
|
+
* object.
|
|
16
|
+
*/
|
|
17
|
+
export interface GlobalConfig {
|
|
18
|
+
/**
|
|
19
|
+
* A registration point for unhandled errors from RxJS. These are errors that
|
|
20
|
+
* cannot were not handled by consuming code in the usual subscription path. For
|
|
21
|
+
* example, if you have this configured, and you subscribe to an observable without
|
|
22
|
+
* providing an error handler, errors from that subscription will end up here. This
|
|
23
|
+
* will _always_ be called asynchronously on another job in the runtime. This is because
|
|
24
|
+
* we do not want errors thrown in this user-configured handler to interfere with the
|
|
25
|
+
* behavior of the library.
|
|
26
|
+
*/
|
|
27
|
+
onUnhandledError: (<E>(err: Cause<E>) => void) | null;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A registration point for notifications that cannot be sent to subscribers because they
|
|
31
|
+
* have completed, errored or have been explicitly unsubscribed. By default, next, complete
|
|
32
|
+
* and error notifications sent to stopped subscribers are noops. However, sometimes callers
|
|
33
|
+
* might want a different behavior. For example, with sources that attempt to report errors
|
|
34
|
+
* to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.
|
|
35
|
+
* This will _always_ be called asynchronously on another job in the runtime. This is because
|
|
36
|
+
* we do not want errors thrown in this user-configured handler to interfere with the
|
|
37
|
+
* behavior of the library.
|
|
38
|
+
*/
|
|
39
|
+
onStoppedNotification: (<E, A>(notification: Notification<E, A>, subscriber: Subscriber<E, A>) => void) | null;
|
|
40
|
+
}
|
package/_src/global.ts
CHANGED
|
@@ -103,7 +103,7 @@ import { AsyncSubject } from "@fncts/observable/Subject";
|
|
|
103
103
|
/**
|
|
104
104
|
* @tsplus global
|
|
105
105
|
*/
|
|
106
|
-
import { isSubscriber,
|
|
106
|
+
import { isSubscriber, Subscriber } from "@fncts/observable/Subscriber";
|
|
107
107
|
/**
|
|
108
108
|
* @tsplus global
|
|
109
109
|
*/
|
package/config.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
2
|
+
import { Subscriber } from "@fncts/observable/Subscriber";
|
|
3
|
+
import type { Notification } from "./Notification.js";
|
|
4
|
+
/**
|
|
5
|
+
* The {@link GlobalConfig} object for RxJS. It is used to configure things
|
|
6
|
+
* like how to react on unhandled errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const config: GlobalConfig;
|
|
9
|
+
/**
|
|
10
|
+
* The global configuration object for RxJS, used to configure things
|
|
11
|
+
* like how to react on unhandled errors. Accessible via {@link config}
|
|
12
|
+
* object.
|
|
13
|
+
*/
|
|
14
|
+
export interface GlobalConfig {
|
|
15
|
+
/**
|
|
16
|
+
* A registration point for unhandled errors from RxJS. These are errors that
|
|
17
|
+
* cannot were not handled by consuming code in the usual subscription path. For
|
|
18
|
+
* example, if you have this configured, and you subscribe to an observable without
|
|
19
|
+
* providing an error handler, errors from that subscription will end up here. This
|
|
20
|
+
* will _always_ be called asynchronously on another job in the runtime. This is because
|
|
21
|
+
* we do not want errors thrown in this user-configured handler to interfere with the
|
|
22
|
+
* behavior of the library.
|
|
23
|
+
*/
|
|
24
|
+
onUnhandledError: (<E>(err: Cause<E>) => void) | null;
|
|
25
|
+
/**
|
|
26
|
+
* A registration point for notifications that cannot be sent to subscribers because they
|
|
27
|
+
* have completed, errored or have been explicitly unsubscribed. By default, next, complete
|
|
28
|
+
* and error notifications sent to stopped subscribers are noops. However, sometimes callers
|
|
29
|
+
* might want a different behavior. For example, with sources that attempt to report errors
|
|
30
|
+
* to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.
|
|
31
|
+
* This will _always_ be called asynchronously on another job in the runtime. This is because
|
|
32
|
+
* we do not want errors thrown in this user-configured handler to interfere with the
|
|
33
|
+
* behavior of the library.
|
|
34
|
+
*/
|
|
35
|
+
onStoppedNotification: (<E, A>(notification: Notification<E, A>, subscriber: Subscriber<E, A>) => void) | null;
|
|
36
|
+
}
|
package/global.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ import { AsyncSubject } from "@fncts/observable/Subject";
|
|
|
93
93
|
/**
|
|
94
94
|
* @tsplus global
|
|
95
95
|
*/
|
|
96
|
-
import { isSubscriber,
|
|
96
|
+
import { isSubscriber, Subscriber } from "@fncts/observable/Subscriber";
|
|
97
97
|
/**
|
|
98
98
|
* @tsplus global
|
|
99
99
|
*/
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fncts/observable",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@fncts/base": "0.0.
|
|
5
|
+
"@fncts/base": "0.0.39"
|
|
6
6
|
},
|
|
7
7
|
"exports": {
|
|
8
8
|
"./*": {
|
|
9
|
+
"types": "./*.d.ts",
|
|
9
10
|
"import": "./_mjs/*.mjs",
|
|
10
11
|
"require": "./_cjs/*.cjs"
|
|
11
12
|
},
|
|
12
13
|
".": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
13
15
|
"import": "./_mjs/index.mjs",
|
|
14
16
|
"require": "./_cjs/index.cjs"
|
|
15
17
|
}
|