The failure leaf of a result. Carries a string reason tag plus an optional value payload (defaulting to void), and a success: false discriminant.
reason
value
void
success: false
The reason tag — a string literal such as "not_found".
"not_found"
The payload type (void when there is no payload).
Readonly
The tag naming which failure mode this is.
Discriminant marking this leaf as a failure (always false).
false
The failure payload (undefined when constructed without one).
undefined
Type guard narrowing to Bad — always true for a Bad.
true
Bad
Type guard narrowing to Ok — always false for a Bad.
The failure leaf of a result. Carries a string
reasontag plus an optionalvaluepayload (defaulting tovoid), and asuccess: falsediscriminant.