TypeScript one-liner that replaced 30 lines — by @ash_hacks on VOID | VOID