Created
March 10, 2015 19:36
-
-
Save mattpodwysocki/e3e6df438e0efbc1224a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Disposable { | |
dispose(): void | |
} | |
interface AsyncObservable<T> { | |
subscribe(observer: AsyncObserver<T>) : Disposable | |
// OR | |
forEach(observer: AsyncObserver<T>) : Disposable | |
} | |
interface AsyncObserver<T> { | |
onNext(value: T) : Promise | |
onError(error: Error) : Promise | |
onCompleted() : Promise | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment