Might Fail
GitHub Repo stars

Function: Might()

function Might<T>(result: NotUndefined<T>): Either<T>
function Might<T>(result: NotUndefined<T>): Either<T>
function Might<T>(result: NotUndefined<T>): Either<T>
function Might<T>(result: NotUndefined<T>): Either<T>

A pure constructor function that takes a non-null value and returns an Either object with the value as the result and undefined as the error.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
resultNotUndefined<T>

Returns

Either<T>