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

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

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

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