>But in your TS example, the code would execute.
Incorrect. It's a type alias so it uses "type typeof" not "value typeof". It doesn't have the problem that the issue you linked to is about.
https://www.typescriptlang.org/play/#src=function%20getOptio...
Observe the JS output contains no `typeof` and that the type `Options` is considered to be the same as `{ num: number, str: string }` if you hover over it.