Hacker News new | ask | show | jobs
by goodoldneon 1756 days ago
I prefer this too, but sometimes poor type-narrowing support hinders it. For example, TypeScript only recently added support for aliased type-narrowing:

https://devblogs.microsoft.com/typescript/announcing-typescr...