result.failWith
A failed result carrying diagnostics that already exist.
Usage
Result.failWith<T = never>(first: KernelDiagnostic, ...rest: KernelDiagnostic[]): Result<T>Parameters
firstKernelDiagnosticThe leading diagnostic; a failure always has at least one.
restKernelDiagnostic[]Further diagnostics, in order.
Returns
{ ok: false, diagnostics: [first,...rest] }, the diagnostics unchanged.
Example
const d = Result.fail('GEOMETRY_OP_FAILED', 'no hull').diagnostics[0]
Result.failWith(d).ok // → false