Semantics of RxJS
summary
Defines a small-step operational semantics for a selected subset of RxJS, modeling runtime as a Heap mapping observables and subscription objects plus an event queue that orders internal vs external events (internal events go to the front). Formalizes operators like switchMap, combineLatest, concat and catchError, shows the real bug where catchError placed outside switchMap kills the whole pipeline and moving it inside fixes it. Implements the semantics with cancelable promise-like threads (asyncM) and exposes a subscription graph for debugging; works but hits timer-precision and operator-coverage limits.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:17Outline
- 0:50Background and motivation
- 5:54Model the semantics of RxJS
- 6:49Syntax of representative observables
- 8:11Syntax of expressions
- 9:26Reduction phases
- 12:15Event propagation
- 16:25Debugging ideas
- 16:58Stack trace
- 18:03Subscription states
- 19:49Runtime Invariants
- 20:35implementation
- 23:23Conclusion








