Skip to content

True Myth / result / Variant

Variable: Variant

const Variant: object

Discriminant for Ok and Err variants of the Result type.

You can use the discriminant via the variant property of Result instances if you need to match explicitly on it.

Type declaration

Err

readonly Err: "Err" = 'Err'

Ok

readonly Ok: "Ok" = 'Ok'