You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec might never make it into typescript but there are still quite a few libraries that adhere to the proposed type: rxjs, xstate, redux, facebook's relay being a few of them. A simplified interface ObservableLike { subscribe: (_: (_: T) => void) => { unsubscribe: () => void }; } should be enough to be compatible w/ them w/o having to use the full type.
The spec might never make it into typescript but there are still quite a few libraries that adhere to the proposed type: rxjs, xstate, redux, facebook's relay being a few of them. A simplified interface ObservableLike { subscribe: (_: (_: T) => void) => { unsubscribe: () => void }; } should be enough to be compatible w/ them w/o having to use the full type.
Unless we introduce an Observable module I would avoid using the name, there is also the risk that the tc39 spec ends up in a different direction. I'd wait and see
What is the problem this feature would solve?
It would be nice to add a Stream.fromObservable fn to better interop. w/ rxjs and other libs which use Observables.
https://github.com/tc39/proposal-observable
What is the feature you are proposing to solve the problem?
Observable type could be simplified to a compatible
ObservableLike
.The text was updated successfully, but these errors were encountered: