FuncType - v0.8.85
    Preparing search index...

    Function OptionConstructor

    • Safely wraps a value that might be null or undefined in an Option. Creates Some if the value is defined, None otherwise.

      Type Parameters

      • T extends unknown

        The type of the value

      Parameters

      • value: undefined | null | T

        The value to wrap (might be null/undefined)

      Returns Option<T>

      Some(value) if value is defined, None otherwise