/** * Requires the option produced by this value to be `None`. * * @tsplus getter effect/core/stm/STM noneOrFail */ export function noneOrFail( self: STM> ): STM, void> { return self.foldSTM( (e) => STM.fail(Maybe.some(e)), (option) => option.fold(STM.unit, () => STM.fail(Maybe.none)) ) }