Compiler‑driven exhaustiveness vs developer‑controlled narrowing for heterogeneous JSON payloads
When processing heterogeneous JSON payloads in a strict‑mode TypeScript codebase, developers must decide how to obtain reliable type narrowing while preserving exhaustiveness checks. Approach A relies on hand‑written type guards using typeof and the in operator, which gives fine‑grained control but requires the author to manually verify that every possible r