Hyperlinkv0.8.0-beta.28

Option

Option.Someinterfaceeffect/Option.ts:127
Some<A>

Represents the presence of a value within an Option.

When to use

Use as a type guard target when narrowing via isSome

  • Access the inner value via .value

Details

  • _tag is always "Some"
  • .value holds the contained value of type A
  • Implements Pipeable, Inspectable, and structural equality
Source effect/Option.ts:12713 lines
export interface Some<out A> extends Pipeable, Inspectable {
  readonly _tag: "Some"
  readonly _op: "Some"
  readonly value: A
  readonly valueOrUndefined: A
  readonly [TypeId]: {
    readonly _A: Covariant<A>
  }
  [Symbol.iterator](): OptionIterator<Option<A>>
  [Unify.typeSymbol]?: unknown
  [Unify.unifySymbol]?: OptionUnify<this>
  [Unify.ignoreSymbol]?: OptionUnifyIgnore
}
Referenced by 4 symbols