zen-observable-ts
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,5 +0,1 @@ | ||
import Observable = require("zen-observable"); | ||
export { Observable }; | ||
export type Observer<T> = ZenObservable.Observer<T>; | ||
export type Subscription = ZenObservable.Subscription; | ||
export type Subscriber<T> = ZenObservable.Subscriber<T>; | ||
export * from "./module"; |
@@ -1,1 +0,58 @@ | ||
export * from "./index"; | ||
export interface Subscription { | ||
closed: boolean; | ||
unsubscribe(): void; | ||
} | ||
interface SubscriptionObserver<T> { | ||
closed: boolean; | ||
next(value: T): void; | ||
error(errorValue: any): void; | ||
complete(): void; | ||
} | ||
export interface Observer<T> { | ||
start?(subscription: Subscription): any; | ||
next?(value: T): void; | ||
error?(errorValue: any): void; | ||
complete?(): void; | ||
} | ||
export type Subscriber<T> = ( | ||
observer: SubscriptionObserver<T>, | ||
) => void | (() => void) | Subscription; | ||
interface ObservableLike<T> { | ||
subscribe?: Subscriber<T> | undefined; | ||
[Symbol.observable](): Observable<T> | ObservableLike<T>; | ||
} | ||
export declare class Observable<T> { | ||
constructor(subscriber: Subscriber<T>); | ||
// For backwards compatibility when super(subscriber) is transpiled to | ||
// Observable.call(this, subscriber), which typically happens when the | ||
// Observable class is compiled to ES5 function contructor syntax. | ||
static call<R>(instance: Observable<R>, subscriber: Subscriber<R>): undefined; | ||
static apply<R>(instance: Observable<R>, args: IArguments | [Subscriber<R>]): undefined; | ||
subscribe(observer: Observer<T>): Subscription; | ||
subscribe( | ||
onNext: (value: T) => void, | ||
onError?: (error: any) => void, | ||
onComplete?: () => void, | ||
): Subscription; | ||
[Symbol.observable](): Observable<T>; | ||
forEach(callback: (value: T) => void): Promise<void>; | ||
map<R>(callback: (value: T) => R): Observable<R>; | ||
filter<S extends T>(callback: (value: T) => value is S): Observable<S>; | ||
filter(callback: (value: T) => boolean): Observable<T>; | ||
reduce(callback: (previousValue: T, currentValue: T) => T, initialValue?: T): Observable<T>; | ||
reduce<R>(callback: (previousValue: R, currentValue: T) => R, initialValue?: R): Observable<R>; | ||
flatMap<R>(callback: (value: T) => ObservableLike<R>): Observable<R>; | ||
concat<R>(...observable: Array<Observable<R>>): Observable<R>; | ||
static from<R>(observable: Observable<R> | ObservableLike<R> | ArrayLike<R>): Observable<R>; | ||
static of<R>(...items: R[]): Observable<R>; | ||
} |
{ | ||
"name": "zen-observable-ts", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Thin wrapper around zen-observable and @types/zen-observable, to support ESM exports as well as CommonJS exports", | ||
@@ -8,3 +8,3 @@ "license": "MIT", | ||
"module": "module.js", | ||
"types": "index.d.ts", | ||
"types": "module.d.ts", | ||
"repository": { | ||
@@ -24,3 +24,2 @@ "type": "git", | ||
"dependencies": { | ||
"@types/zen-observable": "0.8.3", | ||
"zen-observable": "0.8.15" | ||
@@ -35,3 +34,3 @@ }, | ||
"@types/chai": "^4.2.14", | ||
"@types/mocha": "^8.2.0", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "^16.0.1", | ||
@@ -38,0 +37,0 @@ "chai": "^4.2.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
22632
1
546
0
- Removed@types/zen-observable@0.8.3
- Removed@types/zen-observable@0.8.3(transitive)