ignore(context: string): (error: unknown) => void
Builds a .catch() handler for a failure that genuinely has no consequence — but says so
under QUNITX_DEBUG instead of vanishing. This is the raw handler; the ergonomic spelling
at call sites is Task(promise).ignore(context), which wraps exactly this function.
This is the counterpart to Result, not a lesser version of it. A Result is for a failure
the caller branches on; unlinking a temp directory that is already gone is not that, and
wrapping it would add ceremony while removing nothing (see the "when not to use this"
section of docs/error-handling.md).
What it does fix is that one .catch(() => {}) is indistinguishable from any other.
A real EACCES on a directory qunitx is trying to clean up, and a benign ENOENT because
it was already cleaned up, currently produce identical silence — inside code whose entire
job is diagnosing why a directory will not delete.
import * as Failure from './failure.ts'; import { unlink } from 'node:fs/promises'; const socketPath = '/tmp/qunitx-daemon.sock'; await unlink(socketPath).catch(Failure.ignore('daemon socket unlink')); // even a denied unlink is fine