How to make postMessage type-safe in under 350 bytes
How-to 10 min +100 XP
typed-channel wraps postMessage, BroadcastChannel, MessagePort and EventTarget behind one TypeScript-checked emit/on API, where message names and payloads are declared once in shared type maps and mirrored on each side.