Comment Comment by wk_end I mean, you can trivially do it with a (non-G) ADT, if you're content with wrapping the return value.OTOH you can do this in TypeScript easily without wrapping; it could return a union type `number | string`. parent wk_end 11 months ago
OTOH you can do this in TypeScript easily without wrapping; it could return a union type `number | string`.