Module / v2.0.0-beta.13

@typed/fx/RefOption

13 unique exports available through this public import path, including their members and aliases.

import * as RefOption from "@typed/fx/RefOption";

Constructors

  • make

    function

    Creates a new RefOption from an Option, Effect, or Fx.

Derived queries

  • filter

    variable

    Filter the value inside the Option of a RefOption.

  • flatMap

    variable

    FlatMap the value inside the Option of a RefOption.

  • getOrElse

    variable

    Get the value from the Option or use a fallback value.

  • map

    variable

    Map the value inside the Option of a RefOption.

Optional queries

  • getValue

    variable

    Get the value from the Option as a Filtered (fails if None).

State models

  • RefOption

    interface

    A RefOption is a RefSubject specialized over an Option value.

State predicates

  • contains

    variable

    Check if the current state of a RefOption contains a value.

  • exists

    variable

    Check if the value inside the Option satisfies a predicate.

  • isNone

    variable

    Check if the current state of a RefOption is None.

  • isSome

    variable

    Check if the current state of a RefOption is Some.

State updates

  • setNone

    variable

    Set the current state of a RefOption to None.

  • setSome

    variable

    Set the current state of a RefOption to Some(value).