result.ok
A successful result carrying a value and any warnings.
Usage
Result.ok<T>(value: T, diagnostics?: readonly KernelDiagnostic[]): Result<T>Parameters
valueTThe value.
diagnosticsreadonly KernelDiagnostic[]Warnings or notes to carry with the success. Default
[].
Returns
{ ok: true, value, diagnostics }. The value may itself be empty (an empty mesh); that is the operation’s documented success, not a failure.
Example
Result.ok(42) // → { ok: true, value: 42, diagnostics: [] }