@pathmaker-digital/pmd-utilities - v2.2.6
    Preparing search index...

    Function Some

    • Represents a successful presence of a value, wrapped in an Option type.

      Type Parameters

      • T

        The type of the wrapped value.

      Parameters

      • value: T

        The value to wrap.

      Returns Option<T>

      An Option of kind "some" containing the provided value.

      const maybeName = Some("Alice");
      console.log(maybeName.kind); // "some"
      console.log(maybeName.value); // "Alice"