ts-data-forge
    Preparing search index...
    • Creates an Optional.Some containing the given value.

      Type Parameters

      • S

        The type of the value.

      Parameters

      Returns Some<S>

      An Optional.Some containing the value.

      const someValue = Optional.some({ id: 1 });
      const noneValue = Optional.none;

      assert.ok(Optional.isSome(someValue));
      assert.ok(Optional.isNone(noneValue));