Chapter 3 of "Compiler Design: Virtual Machines" but this time in TypeScript.