@shirudo/result 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/collections.cjs +181 -9
- package/dist/collections.cjs.map +1 -0
- package/dist/collections.d.cts +101 -3
- package/dist/collections.d.cts.map +1 -0
- package/dist/collections.d.mts +101 -3
- package/dist/collections.d.mts.map +1 -0
- package/dist/collections.mjs +175 -3
- package/dist/collections.mjs.map +1 -0
- package/dist/errors-CVgC7NII.cjs +278 -0
- package/dist/errors-CVgC7NII.cjs.map +1 -0
- package/dist/errors-MuakEcnM.mjs +146 -0
- package/dist/errors-MuakEcnM.mjs.map +1 -0
- package/dist/errors.cjs +22 -130
- package/dist/errors.d.cts +9 -9
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.mts +9 -9
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +2 -109
- package/dist/index.cjs +99 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -74
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +87 -74
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +64 -34
- package/dist/index.mjs.map +1 -1
- package/dist/operators.cjs +412 -31
- package/dist/operators.cjs.map +1 -0
- package/dist/operators.d.cts +211 -3
- package/dist/operators.d.cts.map +1 -0
- package/dist/operators.d.mts +211 -3
- package/dist/operators.d.mts.map +1 -0
- package/dist/operators.mjs +384 -3
- package/dist/operators.mjs.map +1 -0
- package/dist/{result-q9Na2bGa.mjs → result-DQCpkuOJ.mjs} +36 -17
- package/dist/result-DQCpkuOJ.mjs.map +1 -0
- package/dist/{result-BBOGxvSH.cjs → result-DoqQufvR.cjs} +36 -17
- package/dist/result-DoqQufvR.cjs.map +1 -0
- package/dist/{sequence-DDwePRLd.d.cts → sequence-CmugKPbu.d.cts} +105 -84
- package/dist/sequence-CmugKPbu.d.cts.map +1 -0
- package/dist/{sequence-DDwePRLd.d.mts → sequence-CmugKPbu.d.mts} +105 -84
- package/dist/sequence-CmugKPbu.d.mts.map +1 -0
- package/package.json +20 -12
- package/dist/errors.cjs.map +0 -1
- package/dist/errors.mjs.map +0 -1
- package/dist/flatten-B_XIkaOK.cjs +0 -208
- package/dist/flatten-B_XIkaOK.cjs.map +0 -1
- package/dist/flatten-C7D6Kttf.d.mts +0 -81
- package/dist/flatten-C7D6Kttf.d.mts.map +0 -1
- package/dist/flatten-ChTL5BfA.mjs +0 -167
- package/dist/flatten-ChTL5BfA.mjs.map +0 -1
- package/dist/flatten-D0K8UcQH.d.cts +0 -81
- package/dist/flatten-D0K8UcQH.d.cts.map +0 -1
- package/dist/result-BBOGxvSH.cjs.map +0 -1
- package/dist/result-q9Na2bGa.mjs.map +0 -1
- package/dist/sequence-DDwePRLd.d.cts.map +0 -1
- package/dist/sequence-DDwePRLd.d.mts.map +0 -1
- package/dist/swap-BnyMBdD_.cjs +0 -552
- package/dist/swap-BnyMBdD_.cjs.map +0 -1
- package/dist/swap-CFD2g1cB.mjs +0 -385
- package/dist/swap-CFD2g1cB.mjs.map +0 -1
- package/dist/swap-CrHQZIax.d.cts +0 -212
- package/dist/swap-CrHQZIax.d.cts.map +0 -1
- package/dist/swap-DT4LdRFV.d.mts +0 -212
- package/dist/swap-DT4LdRFV.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.cjs","names":["ok","InvalidResultStateError","err","InvalidResultStateError","ok","err","InvalidResultStateError","InvalidResultStateError","InvalidResultStateError","err","InvalidResultStateError","InvalidResultStateError","ok","err","InvalidResultStateError","ok","err","ok","InvalidResultStateError","InvalidResultStateError","ok","InvalidResultStateError","err","InvalidResultStateError","InvalidResultStateError","InvalidResultStateError","err","InvalidResultStateError","InvalidResultStateError","ok","err","InvalidResultStateError","ok","err","InvalidResultStateError","InvalidResultStateError","InvalidResultStateError","InvalidResultStateError","InvalidResultStateError","InvalidResultStateError","err","ok","InvalidResultStateError"],"sources":["../src/core/map.ts","../src/core/mapErr.ts","../src/core/mapBoth.ts","../src/core/flatMap.ts","../src/core/tap.ts","../src/core/filter.ts","../src/core/fold.ts","../src/core/tryCatch.ts","../src/core/tryMap.ts","../src/core/recover.ts","../src/core/match.ts","../src/core/mapAsync.ts","../src/core/mapErrAsync.ts","../src/core/flatMapAsync.ts","../src/core/tapAsync.ts","../src/core/filterAsync.ts","../src/core/foldAsync.ts","../src/core/tryCatchAsync.ts","../src/core/tryMapAsync.ts","../src/core/matchAsync.ts","../src/core/and.ts","../src/core/or.ts","../src/core/orElse.ts","../src/core/mapOr.ts","../src/core/mapOrElse.ts","../src/core/swap.ts"],"sourcesContent":["import type { Result } from './result';\nimport { ok } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Transforms the value (Ok case).\n * Corresponds to Rust `map`.\n */\nexport function map<T, E, U>(project: (value: T) => U) {\n return (source: Result<T, E>): Result<U, E> => {\n if (source.isOk()) {\n return ok(project(source.value));\n }\n if (source.isErr()) return source as unknown as Result<U, E>;\n throw new InvalidResultStateError('map');\n };\n}\n","import type { Result } from './result';\nimport { err } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Transforms the error (Err case).\n * Corresponds to Rust `map_err`.\n */\nexport function mapErr<T, E, F>(project: (error: E) => F) {\n return (source: Result<T, E>): Result<T, F> => {\n if (source.isErr()) {\n return err(project(source.error));\n }\n if (source.isOk()) return source as unknown as Result<T, F>;\n throw new InvalidResultStateError('mapErr');\n };\n}\n","import type { Result } from './result';\nimport { err, ok } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Transforms both the Ok value and the Err error.\n * Corresponds to FP `bimap` / `mapBoth`.\n */\nexport function mapBoth<T, E, U, F>(mapOk: (value: T) => U, mapErr: (error: E) => F) {\n return (source: Result<T, E>): Result<U, F> => {\n if (source.isOk()) {\n return ok<U, F>(mapOk(source.value));\n }\n if (source.isErr()) {\n return err<F, U>(mapErr(source.error));\n }\n throw new InvalidResultStateError('mapBoth');\n };\n}\n\n/**\n * Alias for `mapBoth`.\n */\nexport const bimap: typeof mapBoth = mapBoth;\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Chains another operation that returns a Result.\n * Corresponds to Rust `and_then` or JS `flatMap`.\n */\nexport function flatMap<T, E, U, F>(project: (value: T) => Result<U, F>) {\n return (source: Result<T, E>): Result<U, E | F> => {\n if (source.isOk()) {\n return project(source.value);\n }\n if (source.isErr()) return source as unknown as Result<U, E | F>;\n throw new InvalidResultStateError('flatMap');\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Executes a side effect (logging, debugging) without changing the Result.\n * Corresponds to Rust `inspect` / `inspect_err`.\n */\nexport function tap<T, E>(observer: { ok?: (val: T) => void; err?: (e: E) => void }) {\n return (source: Result<T, E>): Result<T, E> => {\n if (source.isOk()) {\n if (observer.ok) observer.ok(source.value);\n return source;\n }\n if (source.isErr()) {\n if (observer.err) observer.err(source.error);\n return source;\n }\n throw new InvalidResultStateError('tap');\n };\n}\n","import type { Result } from './result';\nimport { err } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Checks a condition. If false, the Result becomes Err.\n * Corresponds to Rust `filter` (partially).\n */\nexport function filter<T, E>(predicate: (val: T) => boolean, errorFn: () => E) {\n return (source: Result<T, E>): Result<T, E> => {\n if (source.isOk()) {\n if (predicate(source.value)) {\n return source;\n }\n return err(errorFn());\n }\n if (source.isErr()) return source;\n throw new InvalidResultStateError('filter');\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Folds the Result into a single value by applying one of two functions.\n * The end of the pipe.\n *\n * This is the pipe operator equivalent of the `.fold()` instance method.\n */\nexport function fold<T, E, R>(handlers: { ok: (val: T) => R; err: (e: E) => R }) {\n return (source: Result<T, E>): R => {\n if (source.isOk()) {\n return handlers.ok(source.value);\n }\n if (source.isErr()) return handlers.err(source.error);\n throw new InvalidResultStateError('fold');\n };\n}\n","import type { Result } from './result';\nimport { ok, err } from './result';\n\n/**\n * Executes a function and catches exceptions.\n * Converts exceptions into Result<E>.\n * Corresponds to Rust `Result::from` for fallible operations.\n */\nexport function tryCatch<T>(fn: () => T): <SE>(source: Result<unknown, SE>) => Result<T, unknown>;\nexport function tryCatch<T, E>(\n fn: () => T,\n errorMapper: (error: unknown) => E\n): <SE>(source: Result<unknown, SE>) => Result<T, SE | E>;\nexport function tryCatch<T, E>(\n fn: () => T,\n errorMapper?: (error: unknown) => E\n): <SE>(source: Result<unknown, SE>) => Result<T, SE | E> {\n return <SE>(source: Result<unknown, SE>): Result<T, SE | E> => {\n if (source.isErr()) return source as unknown as Result<T, SE | E>;\n\n try {\n return ok<T, SE | E>(fn());\n } catch (error) {\n return err<SE | E, T>(errorMapper ? errorMapper(error) : error as E);\n }\n };\n}\n","import type { Result } from './result';\nimport { ok, err } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Like `map`, but catches exceptions and converts them to Err.\n */\nexport function tryMap<T, E, U>(project: (value: T) => U): (source: Result<T, E>) => Result<U, unknown>;\nexport function tryMap<T, E, U, F>(\n project: (value: T) => U,\n errorMapper: (error: unknown) => F\n): (source: Result<T, E>) => Result<U, E | F>;\nexport function tryMap<T, E, U, F>(\n project: (value: T) => U,\n errorMapper?: (error: unknown) => F\n): (source: Result<T, E>) => Result<U, E | F> {\n return (source: Result<T, E>): Result<U, E | F> => {\n if (source.isErr()) {\n return source as unknown as Result<U, E | F>;\n }\n if (!source.isOk()) throw new InvalidResultStateError('tryMap');\n\n try {\n return ok<U, E | F>(project(source.value));\n } catch (error) {\n return err<E | F, U>(errorMapper ? errorMapper(error) : error as F);\n }\n };\n}\n","import type { Result } from './result';\nimport { ok } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Recover: converts Err to Ok(defaultValue).\n * Result is guaranteed to be Ok → Error type becomes `never`.\n */\nexport function recover<T, E, F>(defaultValue: F) {\n return (source: Result<T, E>): Result<T | F, never> => {\n if (source.isOk()) return source as unknown as Result<T | F, never>;\n if (source.isErr()) return ok(defaultValue);\n throw new InvalidResultStateError('recover');\n };\n}\n\n/**\n * Like `recover`, but calculates the default value based on the error.\n */\nexport function recoverWith<T, E, F>(fn: (error: E) => F) {\n return (source: Result<T, E>): Result<T | F, never> => {\n if (source.isOk()) return source as unknown as Result<T | F, never>;\n if (source.isErr()) return ok(fn(source.error));\n throw new InvalidResultStateError('recoverWith');\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Resolves the Result. The end of the pipe.\n * Corresponds to Rust `match`.\n */\nexport function match<T, E, R>(handlers: { ok: (val: T) => R; err: (e: E) => R }) {\n return (source: Result<T, E>): R => {\n if (source.isOk()) {\n return handlers.ok(source.value);\n }\n if (source.isErr()) return handlers.err(source.error);\n throw new InvalidResultStateError('match');\n };\n}\n","import type { Result } from './result';\nimport { ok } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of map.\n */\nexport function mapAsync<T, E, U>(project: (value: T) => Promise<U>) {\n return async (source: Result<T, E>): Promise<Result<U, E>> => {\n if (source.isOk()) {\n return ok(await project(source.value));\n }\n if (source.isErr()) return source as unknown as Result<U, E>;\n throw new InvalidResultStateError('mapAsync');\n };\n}\n","import type { Result } from './result';\nimport { err } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of mapErr.\n */\nexport function mapErrAsync<T, E, F>(project: (error: E) => Promise<F>) {\n return async (source: Result<T, E>): Promise<Result<T, F>> => {\n if (source.isErr()) {\n return err(await project(source.error));\n }\n if (source.isOk()) return source as unknown as Result<T, F>;\n throw new InvalidResultStateError('mapErrAsync');\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of flatMap.\n */\nexport function flatMapAsync<T, E, U, F>(project: (value: T) => Promise<Result<U, F>>) {\n return async (source: Result<T, E>): Promise<Result<U, E | F>> => {\n if (source.isOk()) {\n return await project(source.value);\n }\n if (source.isErr()) return source as unknown as Result<U, E | F>;\n throw new InvalidResultStateError('flatMapAsync');\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of tap.\n */\nexport function tapAsync<T, E>(observer: { ok?: (val: T) => Promise<void>; err?: (e: E) => Promise<void> }) {\n return async (source: Result<T, E>): Promise<Result<T, E>> => {\n if (source.isOk()) {\n if (observer.ok) await observer.ok(source.value);\n return source;\n }\n if (source.isErr()) {\n if (observer.err) await observer.err(source.error);\n return source;\n }\n throw new InvalidResultStateError('tapAsync');\n };\n}\n","import type { Result } from './result';\nimport { err } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of filter.\n */\nexport function filterAsync<T, E>(predicate: (val: T) => Promise<boolean>, errorFn: () => Promise<E>) {\n return async (source: Result<T, E>): Promise<Result<T, E>> => {\n if (source.isOk()) {\n if (await predicate(source.value)) {\n return source;\n }\n return err(await errorFn());\n }\n if (source.isErr()) return source;\n throw new InvalidResultStateError('filterAsync');\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of `fold`. Folds the Result into a single value asynchronously.\n * The end of the pipe.\n *\n * This is the async pipe operator equivalent of the `.fold()` instance method.\n */\nexport function foldAsync<T, E, R>(handlers: { ok: (val: T) => Promise<R>; err: (e: E) => Promise<R> }) {\n return async (source: Result<T, E>): Promise<R> => {\n if (source.isOk()) {\n return await handlers.ok(source.value);\n }\n if (source.isErr()) return await handlers.err(source.error);\n throw new InvalidResultStateError('foldAsync');\n };\n}\n","import type { Result } from './result';\nimport { ok, err } from './result';\n\n/**\n * Async version of tryCatch.\n */\nexport function tryCatchAsync<T>(fn: () => Promise<T>): <SE>(source: Result<unknown, SE>) => Promise<Result<T, unknown>>;\nexport function tryCatchAsync<T, E>(\n fn: () => Promise<T>,\n errorMapper: (error: unknown) => E\n): <SE>(source: Result<unknown, SE>) => Promise<Result<T, SE | E>>;\nexport function tryCatchAsync<T, E>(\n fn: () => Promise<T>,\n errorMapper?: (error: unknown) => E\n): <SE>(source: Result<unknown, SE>) => Promise<Result<T, SE | E>> {\n return async <SE>(source: Result<unknown, SE>): Promise<Result<T, SE | E>> => {\n if (source.isErr()) return source as unknown as Result<T, SE | E>;\n\n try {\n return ok<T, SE | E>(await fn());\n } catch (error) {\n return err<SE | E, T>(errorMapper ? errorMapper(error) : error as E);\n }\n };\n}\n","import type { Result } from './result';\nimport { ok, err } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of tryMap.\n */\nexport function tryMapAsync<T, E, U>(project: (value: T) => Promise<U>): (source: Result<T, E>) => Promise<Result<U, unknown>>;\nexport function tryMapAsync<T, E, U, F>(\n project: (value: T) => Promise<U>,\n errorMapper: (error: unknown) => F\n): (source: Result<T, E>) => Promise<Result<U, E | F>>;\nexport function tryMapAsync<T, E, U, F>(\n project: (value: T) => Promise<U>,\n errorMapper?: (error: unknown) => F\n): (source: Result<T, E>) => Promise<Result<U, E | F>> {\n return async (source: Result<T, E>): Promise<Result<U, E | F>> => {\n if (source.isErr()) {\n return source as unknown as Result<U, E | F>;\n }\n if (!source.isOk()) throw new InvalidResultStateError('tryMapAsync');\n\n try {\n return ok<U, E | F>(await project(source.value));\n } catch (error) {\n return err<E | F, U>(errorMapper ? errorMapper(error) : error as F);\n }\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Async version of match.\n */\nexport function matchAsync<T, E, R>(handlers: { ok: (val: T) => Promise<R>; err: (e: E) => Promise<R> }) {\n return async (source: Result<T, E>): Promise<R> => {\n if (source.isOk()) {\n return await handlers.ok(source.value);\n }\n if (source.isErr()) return await handlers.err(source.error);\n throw new InvalidResultStateError('matchAsync');\n };\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Combines two Results. Returns the second one only if the first is Ok.\n * Corresponds to Rust `and`.\n */\nexport function and<T, E, U>(result: Result<T, E>, other: Result<U, E>): Result<U, E> {\n if (result.isOk()) return other;\n if (result.isErr()) return result as unknown as Result<U, E>;\n throw new InvalidResultStateError('and');\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Fallback to another Result if the first is Err.\n * Corresponds to Rust `or`.\n */\nexport function or<T, E, F>(result: Result<T, E>, other: Result<T, F>): Result<T, F> {\n if (result.isOk()) return result as unknown as Result<T, F>;\n if (result.isErr()) return other;\n throw new InvalidResultStateError('or');\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Fallback with a function that returns a Result.\n * Corresponds to Rust `or_else`.\n */\nexport function orElse<T, E, F>(result: Result<T, E>, fn: (error: E) => Result<T, F>): Result<T, F> {\n if (result.isOk()) return result as unknown as Result<T, F>;\n if (result.isErr()) return fn(result.error);\n throw new InvalidResultStateError('orElse');\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Transforms the value or returns a default value.\n * Corresponds to Rust `map_or`.\n */\nexport function mapOr<T, E, U>(result: Result<T, E>, defaultValue: U, fn: (value: T) => U): U {\n if (result.isOk()) return fn(result.value);\n if (result.isErr()) return defaultValue;\n throw new InvalidResultStateError('mapOr');\n}\n","import type { Result } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Transforms the value or calculates a default value using a function.\n * Corresponds to Rust `map_or_else`.\n */\nexport function mapOrElse<T, E, U>(result: Result<T, E>, defaultFn: (error: E) => U, fn: (value: T) => U): U {\n if (result.isOk()) return fn(result.value);\n if (result.isErr()) return defaultFn(result.error);\n throw new InvalidResultStateError('mapOrElse');\n}\n","import type { Result } from './result';\nimport { err, ok } from './result';\nimport { InvalidResultStateError } from '../errors';\n\n/**\n * Swaps Ok and Err.\n * Result<T, E> → Result<E, T>\n */\nexport function swap<T, E>(result: Result<T, E>): Result<E, T> {\n if (result.isOk()) {\n return err<T, E>(result.value);\n }\n if (result.isErr()) {\n return ok<E, T>(result.error);\n }\n throw new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AIC,uCAAwB,MAAM;AAC5C"}
|
package/dist/operators.d.cts
CHANGED
|
@@ -1,3 +1,211 @@
|
|
|
1
|
-
import { v as combine, y as zip } from "./sequence-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { s as Result, v as combine, y as zip } from "./sequence-CmugKPbu.cjs";
|
|
2
|
+
//#region src/core/map.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Transforms the value (Ok case).
|
|
5
|
+
* Corresponds to Rust `map`.
|
|
6
|
+
*/
|
|
7
|
+
declare function map<T, E, U>(project: (value: T) => U): (source: Result<T, E>) => Result<U, E>;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/core/mapErr.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Transforms the error (Err case).
|
|
12
|
+
* Corresponds to Rust `map_err`.
|
|
13
|
+
*/
|
|
14
|
+
declare function mapErr<T, E, F>(project: (error: E) => F): (source: Result<T, E>) => Result<T, F>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/core/mapBoth.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Transforms both the Ok value and the Err error.
|
|
19
|
+
* Corresponds to FP `bimap` / `mapBoth`.
|
|
20
|
+
*/
|
|
21
|
+
declare function mapBoth<T, E, U, F>(mapOk: (value: T) => U, mapErr: (error: E) => F): (source: Result<T, E>) => Result<U, F>;
|
|
22
|
+
/**
|
|
23
|
+
* Alias for `mapBoth`.
|
|
24
|
+
*/
|
|
25
|
+
declare const bimap: typeof mapBoth;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/core/flatMap.d.ts
|
|
28
|
+
/**
|
|
29
|
+
* Chains another operation that returns a Result.
|
|
30
|
+
* Corresponds to Rust `and_then` or JS `flatMap`.
|
|
31
|
+
*/
|
|
32
|
+
declare function flatMap<T, E, U, F>(project: (value: T) => Result<U, F>): (source: Result<T, E>) => Result<U, E | F>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/core/tap.d.ts
|
|
35
|
+
/**
|
|
36
|
+
* Executes a side effect (logging, debugging) without changing the Result.
|
|
37
|
+
* Corresponds to Rust `inspect` / `inspect_err`.
|
|
38
|
+
*/
|
|
39
|
+
declare function tap<T, E>(observer: {
|
|
40
|
+
ok?: (val: T) => void;
|
|
41
|
+
err?: (e: E) => void;
|
|
42
|
+
}): (source: Result<T, E>) => Result<T, E>;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/core/filter.d.ts
|
|
45
|
+
/**
|
|
46
|
+
* Checks a condition. If false, the Result becomes Err.
|
|
47
|
+
* Corresponds to Rust `filter` (partially).
|
|
48
|
+
*/
|
|
49
|
+
declare function filter<T, E>(predicate: (val: T) => boolean, errorFn: () => E): (source: Result<T, E>) => Result<T, E>;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/core/fold.d.ts
|
|
52
|
+
/**
|
|
53
|
+
* Folds the Result into a single value by applying one of two functions.
|
|
54
|
+
* The end of the pipe.
|
|
55
|
+
*
|
|
56
|
+
* This is the pipe operator equivalent of the `.fold()` instance method.
|
|
57
|
+
*/
|
|
58
|
+
declare function fold<T, E, R>(handlers: {
|
|
59
|
+
ok: (val: T) => R;
|
|
60
|
+
err: (e: E) => R;
|
|
61
|
+
}): (source: Result<T, E>) => R;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/core/tryCatch.d.ts
|
|
64
|
+
/**
|
|
65
|
+
* Executes a function and catches exceptions.
|
|
66
|
+
* Converts exceptions into Result<E>.
|
|
67
|
+
* Corresponds to Rust `Result::from` for fallible operations.
|
|
68
|
+
*/
|
|
69
|
+
declare function tryCatch<T>(fn: () => T): <SE>(source: Result<unknown, SE>) => Result<T, unknown>;
|
|
70
|
+
declare function tryCatch<T, E>(fn: () => T, errorMapper: (error: unknown) => E): <SE>(source: Result<unknown, SE>) => Result<T, SE | E>;
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/core/tryMap.d.ts
|
|
73
|
+
/**
|
|
74
|
+
* Like `map`, but catches exceptions and converts them to Err.
|
|
75
|
+
*/
|
|
76
|
+
declare function tryMap<T, E, U>(project: (value: T) => U): (source: Result<T, E>) => Result<U, unknown>;
|
|
77
|
+
declare function tryMap<T, E, U, F>(project: (value: T) => U, errorMapper: (error: unknown) => F): (source: Result<T, E>) => Result<U, E | F>;
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/core/recover.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* Recover: converts Err to Ok(defaultValue).
|
|
82
|
+
* Result is guaranteed to be Ok → Error type becomes `never`.
|
|
83
|
+
*/
|
|
84
|
+
declare function recover<T, E, F>(defaultValue: F): (source: Result<T, E>) => Result<T | F, never>;
|
|
85
|
+
/**
|
|
86
|
+
* Like `recover`, but calculates the default value based on the error.
|
|
87
|
+
*/
|
|
88
|
+
declare function recoverWith<T, E, F>(fn: (error: E) => F): (source: Result<T, E>) => Result<T | F, never>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/core/match.d.ts
|
|
91
|
+
/**
|
|
92
|
+
* Resolves the Result. The end of the pipe.
|
|
93
|
+
* Corresponds to Rust `match`.
|
|
94
|
+
*/
|
|
95
|
+
declare function match<T, E, R>(handlers: {
|
|
96
|
+
ok: (val: T) => R;
|
|
97
|
+
err: (e: E) => R;
|
|
98
|
+
}): (source: Result<T, E>) => R;
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/core/mapAsync.d.ts
|
|
101
|
+
/**
|
|
102
|
+
* Async version of map.
|
|
103
|
+
*/
|
|
104
|
+
declare function mapAsync<T, E, U>(project: (value: T) => Promise<U>): (source: Result<T, E>) => Promise<Result<U, E>>;
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/core/mapErrAsync.d.ts
|
|
107
|
+
/**
|
|
108
|
+
* Async version of mapErr.
|
|
109
|
+
*/
|
|
110
|
+
declare function mapErrAsync<T, E, F>(project: (error: E) => Promise<F>): (source: Result<T, E>) => Promise<Result<T, F>>;
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/core/flatMapAsync.d.ts
|
|
113
|
+
/**
|
|
114
|
+
* Async version of flatMap.
|
|
115
|
+
*/
|
|
116
|
+
declare function flatMapAsync<T, E, U, F>(project: (value: T) => Promise<Result<U, F>>): (source: Result<T, E>) => Promise<Result<U, E | F>>;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/core/tapAsync.d.ts
|
|
119
|
+
/**
|
|
120
|
+
* Async version of tap.
|
|
121
|
+
*/
|
|
122
|
+
declare function tapAsync<T, E>(observer: {
|
|
123
|
+
ok?: (val: T) => Promise<void>;
|
|
124
|
+
err?: (e: E) => Promise<void>;
|
|
125
|
+
}): (source: Result<T, E>) => Promise<Result<T, E>>;
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/core/filterAsync.d.ts
|
|
128
|
+
/**
|
|
129
|
+
* Async version of filter.
|
|
130
|
+
*/
|
|
131
|
+
declare function filterAsync<T, E>(predicate: (val: T) => Promise<boolean>, errorFn: () => Promise<E>): (source: Result<T, E>) => Promise<Result<T, E>>;
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/core/foldAsync.d.ts
|
|
134
|
+
/**
|
|
135
|
+
* Async version of `fold`. Folds the Result into a single value asynchronously.
|
|
136
|
+
* The end of the pipe.
|
|
137
|
+
*
|
|
138
|
+
* This is the async pipe operator equivalent of the `.fold()` instance method.
|
|
139
|
+
*/
|
|
140
|
+
declare function foldAsync<T, E, R>(handlers: {
|
|
141
|
+
ok: (val: T) => Promise<R>;
|
|
142
|
+
err: (e: E) => Promise<R>;
|
|
143
|
+
}): (source: Result<T, E>) => Promise<R>;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/core/tryCatchAsync.d.ts
|
|
146
|
+
/**
|
|
147
|
+
* Async version of tryCatch.
|
|
148
|
+
*/
|
|
149
|
+
declare function tryCatchAsync<T>(fn: () => Promise<T>): <SE>(source: Result<unknown, SE>) => Promise<Result<T, unknown>>;
|
|
150
|
+
declare function tryCatchAsync<T, E>(fn: () => Promise<T>, errorMapper: (error: unknown) => E): <SE>(source: Result<unknown, SE>) => Promise<Result<T, SE | E>>;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/core/tryMapAsync.d.ts
|
|
153
|
+
/**
|
|
154
|
+
* Async version of tryMap.
|
|
155
|
+
*/
|
|
156
|
+
declare function tryMapAsync<T, E, U>(project: (value: T) => Promise<U>): (source: Result<T, E>) => Promise<Result<U, unknown>>;
|
|
157
|
+
declare function tryMapAsync<T, E, U, F>(project: (value: T) => Promise<U>, errorMapper: (error: unknown) => F): (source: Result<T, E>) => Promise<Result<U, E | F>>;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/core/matchAsync.d.ts
|
|
160
|
+
/**
|
|
161
|
+
* Async version of match.
|
|
162
|
+
*/
|
|
163
|
+
declare function matchAsync<T, E, R>(handlers: {
|
|
164
|
+
ok: (val: T) => Promise<R>;
|
|
165
|
+
err: (e: E) => Promise<R>;
|
|
166
|
+
}): (source: Result<T, E>) => Promise<R>;
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/core/and.d.ts
|
|
169
|
+
/**
|
|
170
|
+
* Combines two Results. Returns the second one only if the first is Ok.
|
|
171
|
+
* Corresponds to Rust `and`.
|
|
172
|
+
*/
|
|
173
|
+
declare function and<T, E, U>(result: Result<T, E>, other: Result<U, E>): Result<U, E>;
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/core/or.d.ts
|
|
176
|
+
/**
|
|
177
|
+
* Fallback to another Result if the first is Err.
|
|
178
|
+
* Corresponds to Rust `or`.
|
|
179
|
+
*/
|
|
180
|
+
declare function or<T, E, F>(result: Result<T, E>, other: Result<T, F>): Result<T, F>;
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/core/orElse.d.ts
|
|
183
|
+
/**
|
|
184
|
+
* Fallback with a function that returns a Result.
|
|
185
|
+
* Corresponds to Rust `or_else`.
|
|
186
|
+
*/
|
|
187
|
+
declare function orElse<T, E, F>(result: Result<T, E>, fn: (error: E) => Result<T, F>): Result<T, F>;
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/core/mapOr.d.ts
|
|
190
|
+
/**
|
|
191
|
+
* Transforms the value or returns a default value.
|
|
192
|
+
* Corresponds to Rust `map_or`.
|
|
193
|
+
*/
|
|
194
|
+
declare function mapOr<T, E, U>(result: Result<T, E>, defaultValue: U, fn: (value: T) => U): U;
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/core/mapOrElse.d.ts
|
|
197
|
+
/**
|
|
198
|
+
* Transforms the value or calculates a default value using a function.
|
|
199
|
+
* Corresponds to Rust `map_or_else`.
|
|
200
|
+
*/
|
|
201
|
+
declare function mapOrElse<T, E, U>(result: Result<T, E>, defaultFn: (error: E) => U, fn: (value: T) => U): U;
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/core/swap.d.ts
|
|
204
|
+
/**
|
|
205
|
+
* Swaps Ok and Err.
|
|
206
|
+
* Result<T, E> → Result<E, T>
|
|
207
|
+
*/
|
|
208
|
+
declare function swap<T, E>(result: Result<T, E>): Result<E, T>;
|
|
209
|
+
//#endregion
|
|
210
|
+
export { and, bimap, combine, filter, filterAsync, flatMap, flatMapAsync, fold, foldAsync, map, mapAsync, mapBoth, mapErr, mapErrAsync, mapOr, mapOrElse, match, matchAsync, or, orElse, recover, recoverWith, swap, tap, tapAsync, tryCatch, tryCatchAsync, tryMap, tryMapAsync, zip };
|
|
211
|
+
//# sourceMappingURL=operators.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.d.cts","names":[],"sources":["../src/core/map.ts","../src/core/mapErr.ts","../src/core/mapBoth.ts","../src/core/flatMap.ts","../src/core/tap.ts","../src/core/filter.ts","../src/core/fold.ts","../src/core/tryCatch.ts","../src/core/tryMap.ts","../src/core/recover.ts","../src/core/match.ts","../src/core/mapAsync.ts","../src/core/mapErrAsync.ts","../src/core/flatMapAsync.ts","../src/core/tapAsync.ts","../src/core/filterAsync.ts","../src/core/foldAsync.ts","../src/core/tryCatchAsync.ts","../src/core/tryMapAsync.ts","../src/core/matchAsync.ts","../src/core/and.ts","../src/core/or.ts","../src/core/orElse.ts","../src/core/mapOr.ts","../src/core/mapOrElse.ts","../src/core/swap.ts"],"mappings":";;;;;;iBAQgB,IAAI,GAAG,GAAG,GAAG,UAAU,OAAO,MAAM,KAAC,QACjC,OAAO,GAAG,OAAK,OAAO,GAAG;;;;;;;iBCD7B,OAAO,GAAG,GAAG,GAAG,UAAU,OAAO,MAAM,KAAC,QACpC,OAAO,GAAG,OAAK,OAAO,GAAG;;;;;;;iBCD7B,QAAQ,GAAG,GAAG,GAAG,GAAG,QAAQ,OAAO,MAAM,GAAG,SAAS,OAAO,MAAM,KAAC,QAC/D,OAAO,GAAG,OAAK,OAAO,GAAG;;;;cAchC,cAAc;;;;;;;iBChBX,QAAQ,GAAG,GAAG,GAAG,GAAG,UAAU,OAAO,MAAM,OAAO,GAAG,MAAE,QACnD,OAAO,GAAG,OAAK,OAAO,GAAG,IAAI;;;;;;;iBCDjC,IAAI,GAAG,GAAG;EAAY,MAAM,KAAK;EAAY,OAAO,GAAG;KAAY,QAC/D,OAAO,GAAG,OAAK,OAAO,GAAG;;;;;;;iBCA7B,OAAO,GAAG,GAAG,YAAY,KAAK,eAAe,eAAe,KAAC,QACzD,OAAO,GAAG,OAAK,OAAO,GAAG;;;;;;;;;iBCA7B,KAAK,GAAG,GAAG,GAAG;EAAY,KAAK,KAAK,MAAM;EAAG,MAAM,GAAG,MAAM;KAAG,QAC3D,OAAO,GAAG,OAAK;;;;;;;;iBCFnB,SAAS,GAAG,UAAU,KAAK,IAAI,QAAQ,gBAAgB,QAAQ,OAAO;iBACtE,SAAS,GAAG,GACxB,UAAU,GACV,cAAc,mBAAmB,KACjC,IAAI,QAAQ,gBAAgB,QAAQ,OAAO,GAAG,KAAK;;;;;;iBCLvC,OAAO,GAAG,GAAG,GAAG,UAAU,OAAO,MAAM,KAAK,QAAQ,OAAO,GAAG,OAAO,OAAO;iBAC5E,OAAO,G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
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { s as Result, v as combine, y as zip } from "./sequence-CmugKPbu.mjs";
|
|
2
|
+
//#region src/core/map.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Transforms the value (Ok case).
|
|
5
|
+
* Corresponds to Rust `map`.
|
|
6
|
+
*/
|
|
7
|
+
declare function map<T, E, U>(project: (value: T) => U): (source: Result<T, E>) => Result<U, E>;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/core/mapErr.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Transforms the error (Err case).
|
|
12
|
+
* Corresponds to Rust `map_err`.
|
|
13
|
+
*/
|
|
14
|
+
declare function mapErr<T, E, F>(project: (error: E) => F): (source: Result<T, E>) => Result<T, F>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/core/mapBoth.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Transforms both the Ok value and the Err error.
|
|
19
|
+
* Corresponds to FP `bimap` / `mapBoth`.
|
|
20
|
+
*/
|
|
21
|
+
declare function mapBoth<T, E, U, F>(mapOk: (value: T) => U, mapErr: (error: E) => F): (source: Result<T, E>) => Result<U, F>;
|
|
22
|
+
/**
|
|
23
|
+
* Alias for `mapBoth`.
|
|
24
|
+
*/
|
|
25
|
+
declare const bimap: typeof mapBoth;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/core/flatMap.d.ts
|
|
28
|
+
/**
|
|
29
|
+
* Chains another operation that returns a Result.
|
|
30
|
+
* Corresponds to Rust `and_then` or JS `flatMap`.
|
|
31
|
+
*/
|
|
32
|
+
declare function flatMap<T, E, U, F>(project: (value: T) => Result<U, F>): (source: Result<T, E>) => Result<U, E | F>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/core/tap.d.ts
|
|
35
|
+
/**
|
|
36
|
+
* Executes a side effect (logging, debugging) without changing the Result.
|
|
37
|
+
* Corresponds to Rust `inspect` / `inspect_err`.
|
|
38
|
+
*/
|
|
39
|
+
declare function tap<T, E>(observer: {
|
|
40
|
+
ok?: (val: T) => void;
|
|
41
|
+
err?: (e: E) => void;
|
|
42
|
+
}): (source: Result<T, E>) => Result<T, E>;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/core/filter.d.ts
|
|
45
|
+
/**
|
|
46
|
+
* Checks a condition. If false, the Result becomes Err.
|
|
47
|
+
* Corresponds to Rust `filter` (partially).
|
|
48
|
+
*/
|
|
49
|
+
declare function filter<T, E>(predicate: (val: T) => boolean, errorFn: () => E): (source: Result<T, E>) => Result<T, E>;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/core/fold.d.ts
|
|
52
|
+
/**
|
|
53
|
+
* Folds the Result into a single value by applying one of two functions.
|
|
54
|
+
* The end of the pipe.
|
|
55
|
+
*
|
|
56
|
+
* This is the pipe operator equivalent of the `.fold()` instance method.
|
|
57
|
+
*/
|
|
58
|
+
declare function fold<T, E, R>(handlers: {
|
|
59
|
+
ok: (val: T) => R;
|
|
60
|
+
err: (e: E) => R;
|
|
61
|
+
}): (source: Result<T, E>) => R;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/core/tryCatch.d.ts
|
|
64
|
+
/**
|
|
65
|
+
* Executes a function and catches exceptions.
|
|
66
|
+
* Converts exceptions into Result<E>.
|
|
67
|
+
* Corresponds to Rust `Result::from` for fallible operations.
|
|
68
|
+
*/
|
|
69
|
+
declare function tryCatch<T>(fn: () => T): <SE>(source: Result<unknown, SE>) => Result<T, unknown>;
|
|
70
|
+
declare function tryCatch<T, E>(fn: () => T, errorMapper: (error: unknown) => E): <SE>(source: Result<unknown, SE>) => Result<T, SE | E>;
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/core/tryMap.d.ts
|
|
73
|
+
/**
|
|
74
|
+
* Like `map`, but catches exceptions and converts them to Err.
|
|
75
|
+
*/
|
|
76
|
+
declare function tryMap<T, E, U>(project: (value: T) => U): (source: Result<T, E>) => Result<U, unknown>;
|
|
77
|
+
declare function tryMap<T, E, U, F>(project: (value: T) => U, errorMapper: (error: unknown) => F): (source: Result<T, E>) => Result<U, E | F>;
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/core/recover.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* Recover: converts Err to Ok(defaultValue).
|
|
82
|
+
* Result is guaranteed to be Ok → Error type becomes `never`.
|
|
83
|
+
*/
|
|
84
|
+
declare function recover<T, E, F>(defaultValue: F): (source: Result<T, E>) => Result<T | F, never>;
|
|
85
|
+
/**
|
|
86
|
+
* Like `recover`, but calculates the default value based on the error.
|
|
87
|
+
*/
|
|
88
|
+
declare function recoverWith<T, E, F>(fn: (error: E) => F): (source: Result<T, E>) => Result<T | F, never>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/core/match.d.ts
|
|
91
|
+
/**
|
|
92
|
+
* Resolves the Result. The end of the pipe.
|
|
93
|
+
* Corresponds to Rust `match`.
|
|
94
|
+
*/
|
|
95
|
+
declare function match<T, E, R>(handlers: {
|
|
96
|
+
ok: (val: T) => R;
|
|
97
|
+
err: (e: E) => R;
|
|
98
|
+
}): (source: Result<T, E>) => R;
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/core/mapAsync.d.ts
|
|
101
|
+
/**
|
|
102
|
+
* Async version of map.
|
|
103
|
+
*/
|
|
104
|
+
declare function mapAsync<T, E, U>(project: (value: T) => Promise<U>): (source: Result<T, E>) => Promise<Result<U, E>>;
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/core/mapErrAsync.d.ts
|
|
107
|
+
/**
|
|
108
|
+
* Async version of mapErr.
|
|
109
|
+
*/
|
|
110
|
+
declare function mapErrAsync<T, E, F>(project: (error: E) => Promise<F>): (source: Result<T, E>) => Promise<Result<T, F>>;
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/core/flatMapAsync.d.ts
|
|
113
|
+
/**
|
|
114
|
+
* Async version of flatMap.
|
|
115
|
+
*/
|
|
116
|
+
declare function flatMapAsync<T, E, U, F>(project: (value: T) => Promise<Result<U, F>>): (source: Result<T, E>) => Promise<Result<U, E | F>>;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/core/tapAsync.d.ts
|
|
119
|
+
/**
|
|
120
|
+
* Async version of tap.
|
|
121
|
+
*/
|
|
122
|
+
declare function tapAsync<T, E>(observer: {
|
|
123
|
+
ok?: (val: T) => Promise<void>;
|
|
124
|
+
err?: (e: E) => Promise<void>;
|
|
125
|
+
}): (source: Result<T, E>) => Promise<Result<T, E>>;
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/core/filterAsync.d.ts
|
|
128
|
+
/**
|
|
129
|
+
* Async version of filter.
|
|
130
|
+
*/
|
|
131
|
+
declare function filterAsync<T, E>(predicate: (val: T) => Promise<boolean>, errorFn: () => Promise<E>): (source: Result<T, E>) => Promise<Result<T, E>>;
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/core/foldAsync.d.ts
|
|
134
|
+
/**
|
|
135
|
+
* Async version of `fold`. Folds the Result into a single value asynchronously.
|
|
136
|
+
* The end of the pipe.
|
|
137
|
+
*
|
|
138
|
+
* This is the async pipe operator equivalent of the `.fold()` instance method.
|
|
139
|
+
*/
|
|
140
|
+
declare function foldAsync<T, E, R>(handlers: {
|
|
141
|
+
ok: (val: T) => Promise<R>;
|
|
142
|
+
err: (e: E) => Promise<R>;
|
|
143
|
+
}): (source: Result<T, E>) => Promise<R>;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/core/tryCatchAsync.d.ts
|
|
146
|
+
/**
|
|
147
|
+
* Async version of tryCatch.
|
|
148
|
+
*/
|
|
149
|
+
declare function tryCatchAsync<T>(fn: () => Promise<T>): <SE>(source: Result<unknown, SE>) => Promise<Result<T, unknown>>;
|
|
150
|
+
declare function tryCatchAsync<T, E>(fn: () => Promise<T>, errorMapper: (error: unknown) => E): <SE>(source: Result<unknown, SE>) => Promise<Result<T, SE | E>>;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/core/tryMapAsync.d.ts
|
|
153
|
+
/**
|
|
154
|
+
* Async version of tryMap.
|
|
155
|
+
*/
|
|
156
|
+
declare function tryMapAsync<T, E, U>(project: (value: T) => Promise<U>): (source: Result<T, E>) => Promise<Result<U, unknown>>;
|
|
157
|
+
declare function tryMapAsync<T, E, U, F>(project: (value: T) => Promise<U>, errorMapper: (error: unknown) => F): (source: Result<T, E>) => Promise<Result<U, E | F>>;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/core/matchAsync.d.ts
|
|
160
|
+
/**
|
|
161
|
+
* Async version of match.
|
|
162
|
+
*/
|
|
163
|
+
declare function matchAsync<T, E, R>(handlers: {
|
|
164
|
+
ok: (val: T) => Promise<R>;
|
|
165
|
+
err: (e: E) => Promise<R>;
|
|
166
|
+
}): (source: Result<T, E>) => Promise<R>;
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/core/and.d.ts
|
|
169
|
+
/**
|
|
170
|
+
* Combines two Results. Returns the second one only if the first is Ok.
|
|
171
|
+
* Corresponds to Rust `and`.
|
|
172
|
+
*/
|
|
173
|
+
declare function and<T, E, U>(result: Result<T, E>, other: Result<U, E>): Result<U, E>;
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/core/or.d.ts
|
|
176
|
+
/**
|
|
177
|
+
* Fallback to another Result if the first is Err.
|
|
178
|
+
* Corresponds to Rust `or`.
|
|
179
|
+
*/
|
|
180
|
+
declare function or<T, E, F>(result: Result<T, E>, other: Result<T, F>): Result<T, F>;
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/core/orElse.d.ts
|
|
183
|
+
/**
|
|
184
|
+
* Fallback with a function that returns a Result.
|
|
185
|
+
* Corresponds to Rust `or_else`.
|
|
186
|
+
*/
|
|
187
|
+
declare function orElse<T, E, F>(result: Result<T, E>, fn: (error: E) => Result<T, F>): Result<T, F>;
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/core/mapOr.d.ts
|
|
190
|
+
/**
|
|
191
|
+
* Transforms the value or returns a default value.
|
|
192
|
+
* Corresponds to Rust `map_or`.
|
|
193
|
+
*/
|
|
194
|
+
declare function mapOr<T, E, U>(result: Result<T, E>, defaultValue: U, fn: (value: T) => U): U;
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/core/mapOrElse.d.ts
|
|
197
|
+
/**
|
|
198
|
+
* Transforms the value or calculates a default value using a function.
|
|
199
|
+
* Corresponds to Rust `map_or_else`.
|
|
200
|
+
*/
|
|
201
|
+
declare function mapOrElse<T, E, U>(result: Result<T, E>, defaultFn: (error: E) => U, fn: (value: T) => U): U;
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/core/swap.d.ts
|
|
204
|
+
/**
|
|
205
|
+
* Swaps Ok and Err.
|
|
206
|
+
* Result<T, E> → Result<E, T>
|
|
207
|
+
*/
|
|
208
|
+
declare function swap<T, E>(result: Result<T, E>): Result<E, T>;
|
|
209
|
+
//#endregion
|
|
210
|
+
export { and, bimap, combine, filter, filterAsync, flatMap, flatMapAsync, fold, foldAsync, map, mapAsync, mapBoth, mapErr, mapErrAsync, mapOr, mapOrElse, match, matchAsync, or, orElse, recover, recoverWith, swap, tap, tapAsync, tryCatch, tryCatchAsync, tryMap, tryMapAsync, zip };
|
|
211
|
+
//# sourceMappingURL=operators.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.d.mts","names":[],"sources":["../src/core/map.ts","../src/core/mapErr.ts","../src/core/mapBoth.ts","../src/core/flatMap.ts","../src/core/tap.ts","../src/core/filter.ts","../src/core/fold.ts","../src/core/tryCatch.ts","../src/core/tryMap.ts","../src/core/recover.ts","../src/core/match.ts","../src/core/mapAsync.ts","../src/core/mapErrAsync.ts","../src/core/flatMapAsync.ts","../src/core/tapAsync.ts","../src/core/filterAsync.ts","../src/core/foldAsync.ts","../src/core/tryCatchAsync.ts","../src/core/tryMapAsync.ts","../src/core/matchAsync.ts","../src/core/and.ts","../src/core/or.ts","../src/core/orElse.ts","../src/core/mapOr.ts","../src/core/mapOrElse.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