Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Last active August 29, 2015 14:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpodwysocki/52b6a1b4c261c4b89daf to your computer and use it in GitHub Desktop.
Save mattpodwysocki/52b6a1b4c261c4b89daf to your computer and use it in GitHub Desktop.
interface Disposable {
dispose(): void
}
interface Observable<T> {
subscribe(observer: Observer<T>) : Disposable
// OR
forEach(observer: Observer<T>) : Disposable
}
interface Observer<T> {
onNext(value: T)
onError(error: Error)
onCompleted()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment