TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Discriminated Union: Writing Easy-to-Use Types in TypeScript

3 pointsby philk10over 1 year ago

1 comment

bfeynmanover 1 year ago
While neat, this does not align with what I consider readable code. Outside of an IDE, this code can be quite hard to follow when you start to introduce tricks like these, especially since it's not paradigm in other languages.