Comment Comment by boubiyeah But that's the simplest union type.You could have:type Result = {type: 'ok', value: string} | {type: 'err', value: string} parent boubiyeah 7 years ago
You could have:
type Result = {type: 'ok', value: string} | {type: 'err', value: string}