InvestigationContext
type InvestigationContext = object;The failed call, as passed to callbacks, custom prompts, getSignal and investigate.
Properties
error
error: unknown;What the decorated method threw or rejected with.
methodName
methodName: string;The method's name; String(symbol) for a symbol-named method.
methodSource
methodSource: string;The decorated method's code as loaded at runtime (Function.prototype.toString()), so compiled and possibly minified rather than the original TypeScript. Decorators applied below @trypatch replace the method first, so this is their wrapper's code instead.
args
args: unknown[];The call's raw arguments, except in a custom InvestigationBehavior.prompt, which gets them after sanitizeArgs.
methodMetadata
methodMetadata: object;Where the method is defined and how.
className?
optional className?: string;Name of the class (or the instance's class) the method was called on, when it has one.
static
static: boolean;Whether it's a static method.
private
private: boolean;Whether it's a #private method; always false with legacy decorators.
timing
timing: object;When the failed call started and how long it ran before failing.
startedAt
startedAt: Date;When the decorated method was called.
durationMs
durationMs: number;Milliseconds from the call to its failure, measured with a monotonic clock.