rhodonite
    Preparing search index...

    Class WeakNone<B>

    A class representing the absence of a value in the WeakOption pattern. This class implements the "None" case of the Option pattern, providing safe handling when no value exists.

    const none = new WeakNone<MyObject>();
    const obj = new MyObject();
    const value = none.unwrapOrDefault(obj, "default"); // Always returns "default"

    Type Parameters

    • B extends object

      The base object type used as a key

    Implements

    Index

    Constructors

    • Type Parameters

      • B extends object

        The base object type used as a key

      Returns WeakNone<B>

    Methods

    • Executes the function since no value exists.

      Parameters

      • _base: B
      • f: (...vals: any) => never

        Function to execute

      Returns never

      The result of the function