exupery-core-async 0.3.18 → 0.3.19

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/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from "./algorithms/query/create_query_promise";
4
4
  export * from "./algorithms/procedure/create_procedure";
5
5
  export * from "./algorithms/procedure/create_procedure_promise";
6
6
  export * from "./algorithms/procedure/create_procedure_primed_with_resources";
7
+ export * from "./process_result";
7
8
  export * from "./shorthands";
8
9
  export * from "./procedure/assert_async";
9
10
  export * from "./procedure/assert_sync";
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ __exportStar(require("./algorithms/query/create_query_promise"), exports);
22
22
  __exportStar(require("./algorithms/procedure/create_procedure"), exports);
23
23
  __exportStar(require("./algorithms/procedure/create_procedure_promise"), exports);
24
24
  __exportStar(require("./algorithms/procedure/create_procedure_primed_with_resources"), exports);
25
+ __exportStar(require("./process_result"), exports);
25
26
  __exportStar(require("./shorthands"), exports);
26
27
  // procedure exports
27
28
  __exportStar(require("./procedure/assert_async"), exports);
@@ -0,0 +1,3 @@
1
+ import * as _et from 'exupery-core-types';
2
+ export declare const create_process_result: <Data, Error>($: Data) => _et.Process_Result<Data, Error>;
3
+ export declare const create_failed_process_result: <Data, Error>($: Error) => _et.Process_Result<Data, Error>;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.create_failed_process_result = exports.create_process_result = void 0;
4
+ const create_process_result = ($) => {
5
+ return {
6
+ 'transform': (transformer) => {
7
+ return (0, exports.create_process_result)(transformer($));
8
+ },
9
+ 'transform with parameters': (transformer, parameters) => {
10
+ return (0, exports.create_process_result)(transformer($, parameters));
11
+ },
12
+ 'refine': (refiner, map_error) => {
13
+ return refiner($).transform(($) => (0, exports.create_process_result)($), ($) => (0, exports.create_failed_process_result)(map_error($)));
14
+ },
15
+ 'refine with parameters': (refiner, parameters, map_error) => {
16
+ return refiner($, parameters).transform(($) => (0, exports.create_process_result)($), ($) => (0, exports.create_failed_process_result)(map_error($)));
17
+ },
18
+ '__extract_data': (success, exception) => {
19
+ success($);
20
+ }
21
+ };
22
+ };
23
+ exports.create_process_result = create_process_result;
24
+ const create_failed_process_result = ($) => {
25
+ return {
26
+ 'transform': () => {
27
+ return (0, exports.create_failed_process_result)($);
28
+ },
29
+ 'transform with parameters': () => {
30
+ return (0, exports.create_failed_process_result)($);
31
+ },
32
+ 'refine': () => {
33
+ return (0, exports.create_failed_process_result)($);
34
+ },
35
+ 'refine with parameters': () => {
36
+ return (0, exports.create_failed_process_result)($);
37
+ },
38
+ '__extract_data': (success, exception) => {
39
+ exception($);
40
+ }
41
+ };
42
+ };
43
+ exports.create_failed_process_result = create_failed_process_result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-async",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Corno",
6
6
  "description": "async types for Exupery",