Hyperlinkv0.8.0-beta.28

Exit

Exit.Successinterfaceeffect/Exit.ts:119
Success<A, E>

A successful Exit containing a value.

When to use

Use when working with the successful branch of an Exit after narrowing with isSuccess. Access the value via the value property after narrowing.

Example (Accessing the success value)

import { Exit } from "effect"

const success = Exit.succeed(42)

if (Exit.isSuccess(success)) {
  console.log(success._tag) // "Success"
  console.log(success.value) // 42
}
Source effect/Exit.ts:1194 lines
export interface Success<out A, out E = never> extends Exit.Proto<A, E> {
  readonly _tag: "Success"
  readonly value: A
}
Referenced by 6 symbols