Nice write-up, thanks.
I wonder if some static analysis tools like ESLint or similar would have picked up that.
TypeScript is the answer to this kind of problem.
reply
We lint already. ESLint can only help with syntax.
A strict type system might've caught this.
reply