Optionalnamethe 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.
Optionalopencontrols the opening trace message
Optionalclosecontrols the successful closing trace message
The options object a
trace.info()marker accepts: what the call is named, and how its opening and closing messages are built. The transform readsnamewhile it builds, so that one field has to be a string literal;openMessageandcloseMessageare 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)— infersArgsandResultfrom it, from the union of every listed target when it marks a list. Thetrace.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 inClassreports without that suffix. The parent is discovered only where aparent.template or a callback'sparentFnprints it.