• Reports the latest state of a subject by resolving all the values deeply contained within by using nestSignal. By default the output is just a console.log, but this can be changed with the .reporter option. Subject can be anything, but to be effective it should be a signal, an object that contains signals, or an array of signals.

    Type Parameters

    • T

    Parameters

    • subject: T

      This can be anything, but ideally it is some object that contains signals somewhere.

    • Optionaloptions: InspectOptions<T>

      Options that control the behavior of inspect. Globally, options can be changed from INSPECT_DEFAULTS.

    Returns void

    const $a = signal(1);
    const $b = signal(2);
    const $c = signal({ a: $a, b: $b });
    inspect([$c]); // log: [{ a: 1, b: 2 }];
    $b.set(3) // log: [{ a: 1, b: 3 }];