Earlier quoted context omitted.
The fact that there can be runtime type errors that were proven impossible at compile time is why I will never enjoy TypeScript.
That scenario is usually either misuse of escape hatches (especially at API boundaries) or a misunderstanding of what Typescript actually guarantees.
https://www.typescriptlang.org/play/?#code/MYewdgzgLgBAllApg...
https://www.typescriptlang.org/play/?#code/DYUwLgBAHgXBB2BXA...