@gilles-coudert/pure-trace 1.0.5 → 1.0.6
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Message } from './pure_message';
|
|
2
2
|
import { Success, Failure, Result } from './pure_result';
|
|
3
|
-
type ResultAsyncValue<S> = PromiseLike<Success<S>>;
|
|
4
|
-
interface ResultAsyncHelpers {
|
|
3
|
+
export type ResultAsyncValue<S> = PromiseLike<Success<S>>;
|
|
4
|
+
export interface ResultAsyncHelpers {
|
|
5
5
|
liftResult<S>(result: Result<S>): ResultAsyncValue<S>;
|
|
6
6
|
liftSuccess<S>(value: S): ResultAsyncValue<S>;
|
|
7
7
|
fromResultPromise<S>(promise: PromiseLike<Result<S>>): ResultAsyncValue<S>;
|
|
8
8
|
fromPromise<S>(promise: PromiseLike<S>, failure: (reason: unknown) => Failure): ResultAsyncValue<S>;
|
|
9
9
|
}
|
|
10
|
-
interface ResultAsync<S> extends PromiseLike<Result<S>> {
|
|
10
|
+
export interface ResultAsync<S> extends PromiseLike<Result<S>> {
|
|
11
11
|
resolve(): Promise<Result<S>>;
|
|
12
12
|
tap(f: (result: Result<S>) => void): ResultAsync<S>;
|
|
13
13
|
mapSuccess<S2>(onSuccess: (value: S) => Success<S2>): ResultAsync<S2>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gilles-coudert/pure-trace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "A TypeScript library providing standardized, localizable, and traceable error handling by design, with observability built-in.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|