import { AnyResult, ResultMatch } from "./models.mjs"; //#region src/result/match.d.ts /** * Handles a _Result_ with match callbacks * * _Available as `asyncMatchResult` and `matchResult.async`_ * * @param result _Result_ to handle * @param handler Match callbacks * @returns Matched value-_Promise_ */ declare function asyncMatchResult(result: AnyResult | Promise> | (() => Promise>), handler: ResultMatch): Promise; /** * Handles a _Result_ with match callbacks * * _Available as `asyncMatchResult` and `matchResult.async`_ * * @param result _Result_ to handle * @param ok Ok callback * @param error Error callback * @returns Matched value-_Promise_ */ declare function asyncMatchResult(result: AnyResult | Promise> | (() => Promise>), ok: ResultMatch['ok'], error: ResultMatch['error']): Promise; /** * Handles a _Result_ with match callbacks * * @param result _Result_ to handle * @param handler Match callbacks * @returns Matched value */ declare function matchResult(result: AnyResult | (() => AnyResult), handler: ResultMatch): Returned; /** * Handles a _Result_ with match callbacks * * @param result _Result_ to handle * @param ok Ok callback * @param error Error callback * @returns Matched value */ declare function matchResult(result: AnyResult | (() => AnyResult), ok: ResultMatch['ok'], error: ResultMatch['error']): Returned; declare namespace matchResult { var async: typeof asyncMatchResult; } //#endregion export { asyncMatchResult, matchResult };