3 ms·
But that's the simplest union type. You could have: type Result = {type: 'ok', value: string} | {type: 'err', value: string}
by boubiyeah 7y ago
But that's the simplest union type.
You could have:
type Result = {type: 'ok', value: string} | {type: 'err', value: string}