This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.
match
function match<T, E, R>(r, arms): R;Defined in: packages/engine/src/errors/Result.ts:76
Exhaustive pattern-match, the match/switch a Rust enum gets for free.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
E |
R |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
r | Result<T, E> |
arms | { err: (error) => R; ok: (value) => R; } |
arms.err | (error) => R |
arms.ok | (value) => R |
Returns
Section titled “Returns”R