Mirror: 🎩 A tiny but capable push & pull stream library for TypeScript and Flow
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: subscription closed does not comply with proposal (#151)

Co-authored-by: Phil Pluckthun <phil@kitten.sh>

authored by

naporitan
Phil Pluckthun
and committed by
GitHub
95c15e76 990c8da8

+7 -2
+5
.changeset/five-rules-bow.md
··· 1 + --- 2 + 'wonka': patch 3 + --- 4 + 5 + Make `closed: boolean` on `ObservableSubscription`s a required field to comply with the Observable proposal's type spec.
+2 -2
src/observable.ts
··· 26 26 * 27 27 * @readonly 28 28 */ 29 - closed?: boolean; 29 + closed: boolean; 30 30 /** Cancels the subscription. 31 31 * @remarks 32 32 * This cancels the ongoing subscription and the {@link ObservableObserver}'s callbacks will ··· 76 76 * @see {@link ObservableObserver} for the callbacks in an object that are called as Observables 77 77 * issue events. 78 78 */ 79 - subscribe(observer: ObservableObserver<T>): ObservableSubscription; 79 + subscribe(observer: ObservableObserver<T>): { unsubscribe(): void }; 80 80 81 81 /** The well-known symbol specifying the default ES Observable for an object. */ 82 82 [Symbol.observable]?(): Observable<T>;