OF MIND @meeroslav ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences. Reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change.
.getJSON<{ name: string }>("/api/employees/alice") .map(employee => employee.name) .catch(error => Rx.Observable.of(null)); How it used to be… With prototype patching… REACTIVE STATE OF MIND @meeroslav import { Observable } from "rxjs/Observable"; import "rxjs/add/observable/dom/ajax"; import "rxjs/add/operator/catch"; import "rxjs/add/operator/map"; const name = Observable.ajax .getJSON<{ name: string }>(“/api/employees/alice") .map(employee => employee.name) .catch(error => Observable.of(null));