Y
Hacker News
new
|
ask
|
show
|
jobs
by
nicoburns
1491 days ago
It’s also a feature of enums in languages like Java which don’t provide full sum types.
1 comments
vips7L
1491 days ago
Java does provide a form of sum types via sealed classes, but they’re definitely not like TypeScript’s:
type A = string | number;
link