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

    Type Alias Handler<V, R, D>

    Handler:
        | R
        | ([D] extends [never] ? (value: V) => R : (value: V, delegate: D) => R)

    Option handler.

    Either a constant value of type R, or a function that receives the matched value and optionally a delegate function for invoking the fallback handler.

    Type Parameters

    • V = unknown

      The type of the matched option value

    • R = unknown

      The return type of the handler

    • D extends (() => R) | never = never

      The delegate function type; defaults to never (no delegation)