Hacker News new | ask | show | jobs
by 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;