@metreeca/core - v0.9.19
    Preparing search index...

    Function isLazy

    • Checks if a value is a Lazy reference.

      Function values are accepted only when they declare no formal parameters, in which case they are treated as factories for the underlying value and the type guard is not invoked. Non-function values are validated by the type guard when provided, or accepted unconditionally otherwise.

      Type Parameters

      • T = unknown

        The type of the underlying value

      Parameters

      • value: unknown

        The value to check

      • Optionalis: Guard<T>

        Optional type guard for the underlying value

      Returns value is Lazy<T>

      True if the value is a no-arg factory, or a non-function that satisfies the type guard; false otherwise

      isEager for the dual guard accepting only plain values