@fncts/observable 0.0.4 → 0.0.7

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/Notification.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Cause } from "@fncts/base/data/Cause/definition";
2
2
  import { Observer } from "@fncts/observable/Observer";
3
3
  export declare const NextTypeId: unique symbol;
4
- export declare type NextTypeId = typeof NextTypeId;
4
+ export type NextTypeId = typeof NextTypeId;
5
5
  export declare class Next<A> {
6
6
  readonly value: A;
7
7
  readonly _tag = "Next";
@@ -9,7 +9,7 @@ export declare class Next<A> {
9
9
  constructor(value: A);
10
10
  }
11
11
  export declare const FailTypeId: unique symbol;
12
- export declare type FailTypeId = typeof FailTypeId;
12
+ export type FailTypeId = typeof FailTypeId;
13
13
  export declare class Fail<E> {
14
14
  readonly error: Cause<E>;
15
15
  readonly _tag = "Fail";
@@ -17,7 +17,7 @@ export declare class Fail<E> {
17
17
  constructor(error: Cause<E>);
18
18
  }
19
19
  export declare const CompleteTypeId: unique symbol;
20
- export declare type CompleteTypeId = typeof CompleteTypeId;
20
+ export type CompleteTypeId = typeof CompleteTypeId;
21
21
  export declare class Complete {
22
22
  readonly _tag = "Complete";
23
23
  readonly [CompleteTypeId]: CompleteTypeId;
@@ -25,7 +25,7 @@ export declare class Complete {
25
25
  /**
26
26
  * @tsplus type fncts.observable.Notification
27
27
  */
28
- export declare type Notification<E, A> = Next<A> | Fail<E> | Complete;
28
+ export type Notification<E, A> = Next<A> | Fail<E> | Complete;
29
29
  /**
30
30
  * @tsplus type fncts.observable.NotificationOps
31
31
  */
@@ -1,4 +1,4 @@
1
1
  import { Observable } from "@fncts/observable/Observable";
2
- declare type EventHandler = (...args: any[]) => void;
2
+ type EventHandler = (...args: any[]) => void;
3
3
  export declare function fromEvent<A extends ReadonlyArray<unknown>>(addHandler: (handler: (...args: A) => void) => any, removeHandler?: (handler: EventHandler, signal?: any) => void): Observable<never, never, A extends [infer X] ? X : A>;
4
4
  export {};
@@ -19,7 +19,7 @@ import { Observable } from "@fncts/observable/Observable/definition";
19
19
  export interface Subscribable<E, A> {
20
20
  subscribe(observer: Partial<Observer<E, A>>): Unsubscribable;
21
21
  }
22
- export declare type ObservableInput<R = never, E = never, A = never> = Observable<R, E, A> | Subscribable<E, A> | AsyncIterable<A> | PromiseLike<A> | ArrayLike<A> | Iterable<A> | ReadableStreamLike<A> | IO<R, E, A>;
22
+ export type ObservableInput<R = never, E = never, A = never> = Observable<R, E, A> | Subscribable<E, A> | AsyncIterable<A> | PromiseLike<A> | ArrayLike<A> | Iterable<A> | ReadableStreamLike<A> | IO<R, E, A>;
23
23
  /**
24
24
  * @tsplus static fncts.observable.ObservableOps halt
25
25
  * @tsplus location "@fncts/observable/Observable/api"
@@ -651,7 +651,7 @@ export declare function throttle_<R, E, A, R1, E1>(fa: Observable<R, E, A>, dura
651
651
  * @tsplus location "@fncts/observable/Observable/api"
652
652
  */
653
653
  export declare function throttleTime_<R, E, A>(fa: Observable<R, E, A>, duration: number, scheduler?: SchedulerLike, config?: ThrottleConfig): Observable<R, E, A>;
654
- export declare type TimeoutConfig<R, E, A, B, M = unknown> = ({
654
+ export type TimeoutConfig<R, E, A, B, M = unknown> = ({
655
655
  readonly each: number;
656
656
  readonly first?: number | Date;
657
657
  } | {
@@ -12,7 +12,7 @@ export declare namespace Observable {
12
12
  type EnvironmentOf<X> = X extends ObservableInput<infer R, any, any> ? R : never;
13
13
  }
14
14
  export declare const ObservableTypeId: unique symbol;
15
- export declare type ObservableTypeId = typeof ObservableTypeId;
15
+ export type ObservableTypeId = typeof ObservableTypeId;
16
16
  /**
17
17
  * @tsplus type fncts.observable.Observable
18
18
  * @tsplus companion fncts.observable.ObservableOps
package/Scheduler.d.ts CHANGED
@@ -9,7 +9,7 @@ export interface SchedulerAction<T> extends Subscription {
9
9
  schedule(state?: T, delay?: number): Subscription;
10
10
  }
11
11
  export declare const SchedulerTypeId: unique symbol;
12
- export declare type SchedulerTypeId = typeof SchedulerTypeId;
12
+ export type SchedulerTypeId = typeof SchedulerTypeId;
13
13
  export declare class Scheduler implements SchedulerLike {
14
14
  private actionConstructor;
15
15
  readonly [SchedulerTypeId]: SchedulerTypeId;
package/Subscriber.d.ts CHANGED
@@ -4,7 +4,7 @@ import { Cause } from "@fncts/base/data/Cause/definition";
4
4
  import { isFunction } from "@fncts/base/util/predicates";
5
5
  import { noop } from "@fncts/observable/internal/util";
6
6
  export declare const SubscriberTypeId: unique symbol;
7
- export declare type SubscriberTypeId = typeof SubscriberTypeId;
7
+ export type SubscriberTypeId = typeof SubscriberTypeId;
8
8
  export declare class Subscriber<E, A> extends Subscription implements Observer<E, A> {
9
9
  readonly [SubscriberTypeId]: SubscriberTypeId;
10
10
  private isStopped;
package/Subscription.d.ts CHANGED
@@ -4,9 +4,9 @@ export interface Unsubscribable {
4
4
  export interface SubscriptionLike extends Unsubscribable {
5
5
  readonly closed: boolean;
6
6
  }
7
- export declare type Finalizer = Unsubscribable | (() => void) | void;
7
+ export type Finalizer = Unsubscribable | (() => void) | void;
8
8
  export declare const SubscriptionTypeId: unique symbol;
9
- export declare type SubscriptionTypeId = typeof SubscriptionTypeId;
9
+ export type SubscriptionTypeId = typeof SubscriptionTypeId;
10
10
  /**
11
11
  * @tsplus type fncts.observable.Subscription
12
12
  * @tsplus companion fncts.observable.SubscriptionOps
@@ -32,7 +32,7 @@ export declare function isSubscription(u: unknown): u is Subscription;
32
32
  */
33
33
  export declare const EMPTY_SUBSCRIPTION: Subscription;
34
34
  export declare const UnsubscribeErrorTypeId: unique symbol;
35
- export declare type UnsubscribeErrorTypeId = typeof UnsubscribeErrorTypeId;
35
+ export type UnsubscribeErrorTypeId = typeof UnsubscribeErrorTypeId;
36
36
  export declare class UnsubscribeError {
37
37
  readonly errors: unknown[];
38
38
  readonly [UnsubscribeErrorTypeId]: UnsubscribeErrorTypeId;
@@ -1,5 +1,5 @@
1
- declare type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;
2
- declare type ClearIntervalFunction = (handle: number) => void;
1
+ type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;
2
+ type ClearIntervalFunction = (handle: number) => void;
3
3
  interface IntervalProvider {
4
4
  setInterval: SetIntervalFunction;
5
5
  clearInterval: ClearIntervalFunction;
@@ -1,5 +1,5 @@
1
- declare type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;
2
- declare type ClearTimeoutFunction = (handle: number) => void;
1
+ type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => number;
2
+ type ClearTimeoutFunction = (handle: number) => void;
3
3
  interface TimeoutProvider {
4
4
  setTimeout: SetTimeoutFunction;
5
5
  clearTimeout: ClearTimeoutFunction;
@@ -24,5 +24,5 @@ export interface ReadableStreamLike<T> {
24
24
  }
25
25
  export declare function readableStreamToAsyncGenerator<A>(readableStream: ReadableStreamLike<A>): AsyncGenerator<A>;
26
26
  export declare function isReadableStream<A>(u: any): u is ReadableStreamLike<A>;
27
- export declare type Init<A extends ReadonlyArray<unknown>> = A extends [...infer Init, infer Last] ? Init : never;
27
+ export type Init<A extends ReadonlyArray<unknown>> = A extends [...infer Init, infer Last] ? Init : never;
28
28
  export {};
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@fncts/observable",
3
- "version": "0.0.4",
3
+ "version": "0.0.7",
4
4
  "dependencies": {
5
- "@fncts/base": "0.0.15"
5
+ "@fncts/base": "0.0.18"
6
6
  },
7
7
  "exports": {
8
8
  "./*": {