Any Failure at all โ the type to reach for when a signature accepts failures it does not
enumerate, e.g. Result<T, Failure.Any> at a boundary that only logs.
import * as Failure from './failure.ts'; // the consumer spelling this module's docs use function report(failure: Failure.Any) { console.error(failure.code, failure.data); // every Failure has these, whatever its kind }
Since Data defaults to unknown, this is the same type as an unparameterised Failure
โ the alias earns its keep twice anyway. Under the standard import * as Failure
namespace import, the class type is not nameable without the stuttering Failure.Failure,
so Failure.Any is the spelling that reads. And ยง8.15 of the docs warns that widening to
the top type early silently discards exhaustiveness checking โ because every deliberate
widening is spelled Any, grep 'Failure.Any' audits exactly where the taxonomy goes
un-enumerated.
Failure<string, unknown>