Hyperlinkv0.8.0-beta.28

Exit

Exit.isSuccessconsteffect/Exit.ts:403
<A, E>(self: Exit<A, E>): self is Success<A, E>

Checks whether an Exit is a Success.

When to use

Use as a type guard to narrow Exit<A, E> to Success<A, E> and access the value property.

Example (Narrowing to success)

import { Exit } from "effect"

const exit = Exit.succeed(42)

if (Exit.isSuccess(exit)) {
  console.log(exit.value) // 42
}
Source effect/Exit.ts:4031 lines
export const isSuccess: <A, E>(self: Exit<A, E>) => self is Success<A, E> = effect.exitIsSuccess
Referenced by 13 symbols