Options accepted by the Failure constructor and by every generated factory.
cause: unknown
The error this failure was derived from. Preserved verbatim and walked by causes().
stackless: boolean
Skips stack capture. Only worth setting for failures produced in a hot loop and consumed immediately — the capture, not the allocation, is what a Failure costs. See the performance section of the docs before reaching for it.
stackAnchor: (...args: never[]) => unknown
The function to truncate the stack at, so the top frame is the code that reported the failure rather than the plumbing that built it. Defaults to the constructor.
Anything that wraps define() in another layer needs this, and so does define()
itself: eliding only the constructor leaves the factory's own frame on top, which
is how a Failure ends up pointing at failure.ts instead of at the caller.