Loxer - v3.0.0
    Preparing search index...

    Interface TraceOptions<Args, Result>

    The options object a trace.info() marker accepts: what the call is named, and how its opening and closing messages are built. The transform reads name while it builds, so that one field has to be a string literal; openMessage and closeMessage are evaluated at run time, which is why either may be a callback rather than a template.

    Module routing, level, highlighting and props capture are the marker's fluent chain (trace.m('DB').h().props('args').info(...)) rather than fields here.

    A marker that names its target — trace.info(target | [targets], options) — infers Args and Result from it, from the union of every listed target when it marks a list. The trace.info(options) marker inside a function has no signature in hand, so supply them explicitly when formatter callbacks need precise types.

    A parent. template names the class a traced method, getter, setter or field belongs to, and otherwise the file a marked function is written in. A class name ending in Class reports without that suffix. The parent is discovered only where a parent. template or a callback's parentFn prints it.

    interface TraceOptions<
        Args extends readonly unknown[] = readonly unknown[],
        Result = unknown,
    > {
        name?: string;
        openMessage?: FunctionOpenMessage<Args>;
        closeMessage?: FunctionCloseMessage<Result>;
    }

    Type Parameters

    • Args extends readonly unknown[] = readonly unknown[]
    • Result = unknown
    Index
    name?: string

    the name a marked function reports in its box messages

    A function reached by a marker rather than by name — a literal passed to trace.info(), or the function a trace.info(options) statement sits in — is named after itself, or after the binding, assignment target, or property it belongs to: const load = useCallback(trace.info(...), []) reports load. Supply name where nothing names it, such as useEffect(trace.info(() => { ... }, { name: 'syncOrders' }), []).

    Has to be a string literal, because the transform reads it while it builds. trace.info(namedFunction, options) knows its target's name and ignores it.

    openMessage?: FunctionOpenMessage<Args>

    controls the opening trace message

    controls the successful closing trace message