exupery-core-async 0.1.21 → 0.1.23
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/Safe_Command_Result.d.ts +1 -1
- package/dist/Safe_Query_Result.d.ts +2 -2
- package/dist/Unsafe_Command_Result.d.ts +5 -5
- package/dist/Unsafe_Query_Result.d.ts +1 -1
- package/dist/execute_unsafe_command.js +2 -2
- package/dist/run_safe_query.js +2 -2
- package/dist/run_unsafe_query.js +2 -2
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ export interface Safe_Query_Result<T> {
|
|
|
11
11
|
* @param handle_value callback that transforms the actual value into a new Async_Value
|
|
12
12
|
*/
|
|
13
13
|
then<NT>(handle_value: ($: T) => Safe_Query_Result<NT>): Safe_Query_Result<NT>;
|
|
14
|
-
process_safe(handle_value: (
|
|
15
|
-
process_unsafe<E>(handle_value: (
|
|
14
|
+
process_safe(handle_value: ($i: Safe_Command_Result, $: T) => Safe_Command_Result): Safe_Command_Result;
|
|
15
|
+
process_unsafe<E>(handle_value: ($i: Unsafe_Command_Result<E>, $: T) => Unsafe_Command_Result<E>): Unsafe_Command_Result<E>;
|
|
16
16
|
/**
|
|
17
17
|
* This method is only to be used by resources
|
|
18
18
|
*/
|
|
@@ -13,11 +13,11 @@ export interface Unsafe_Command_Result<E> {
|
|
|
13
13
|
* note that this is different from `catch`,
|
|
14
14
|
* which would switch to the safe context
|
|
15
15
|
*/
|
|
16
|
-
process_exception<NE>(handle: (
|
|
17
|
-
throw_exception<E>($: E
|
|
18
|
-
catch(handle_exception: (
|
|
19
|
-
then(handle: (
|
|
20
|
-
then_safe(handle: (
|
|
16
|
+
process_exception<NE>(handle: ($i: Safe_Command_Result, $: E) => Safe_Command_Result, map: ($: E) => NE): Unsafe_Command_Result<NE>;
|
|
17
|
+
throw_exception<E>($: E): Unsafe_Command_Result<E>;
|
|
18
|
+
catch(handle_exception: ($i: Safe_Command_Result, $: E) => Safe_Command_Result): Safe_Command_Result;
|
|
19
|
+
then(handle: ($i: Unsafe_Command_Result<E>) => Unsafe_Command_Result<E>): Unsafe_Command_Result<E>;
|
|
20
|
+
then_safe(handle: ($i: Safe_Command_Result) => Safe_Command_Result): Unsafe_Command_Result<E>;
|
|
21
21
|
then_dictionary<E2>($: _et.Dictionary<Unsafe_Command_Result<E2>>, aggregate_exceptions: ($: _et.Dictionary<E2>) => E): Unsafe_Command_Result<E>;
|
|
22
22
|
then_multiple<E2>($: _et.Array<Unsafe_Command_Result<E2>>, aggregate_exceptions: ($: _et.Array<E2>) => E): Unsafe_Command_Result<E>;
|
|
23
23
|
__start(on_success: () => void, on_exception: ($: E) => void): void;
|
|
@@ -19,6 +19,6 @@ export interface Unsafe_Query_Result<T, E> {
|
|
|
19
19
|
* @param map_exception the handler that will map the exception of the query into a new exception value of the command's exception type
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
|
-
process<NE>(handle_exception: (
|
|
22
|
+
process<NE>(handle_exception: ($i: Safe_Command_Result, $: E) => Safe_Command_Result, map_exception: ($: E) => NE, handle_value: ($i: Unsafe_Command_Result<NE>, $: T) => Unsafe_Command_Result<NE>): Unsafe_Command_Result<NE>;
|
|
23
23
|
__start(on_value: ($: T) => void, on_exception: ($: E) => void): void;
|
|
24
24
|
}
|
|
@@ -36,7 +36,7 @@ class Unsafe_Command_Result_Class {
|
|
|
36
36
|
return new Unsafe_Command_Result_Class({
|
|
37
37
|
'execute': (new_on_success, new_on_exception) => {
|
|
38
38
|
this.executer.execute(new_on_success, ($) => {
|
|
39
|
-
handle(
|
|
39
|
+
handle((0, execute_safe_command_1.initialize_safe_command)(), $).__start(() => new_on_exception(map($)));
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -45,7 +45,7 @@ class Unsafe_Command_Result_Class {
|
|
|
45
45
|
return (0, execute_safe_command_1.__execute_safe_command)({
|
|
46
46
|
'execute': (new_on_success) => {
|
|
47
47
|
this.executer.execute(new_on_success, ($) => {
|
|
48
|
-
handle_exception(
|
|
48
|
+
handle_exception((0, execute_safe_command_1.initialize_safe_command)(), $).__start(new_on_success);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
});
|
package/dist/run_safe_query.js
CHANGED
|
@@ -29,7 +29,7 @@ class Safe_Query_Result_Class {
|
|
|
29
29
|
return (0, execute_safe_command_1.__execute_safe_command)({
|
|
30
30
|
'execute': (on_success) => {
|
|
31
31
|
this.executer.execute((value) => {
|
|
32
|
-
handle_value(
|
|
32
|
+
handle_value((0, execute_safe_command_1.initialize_safe_command)(), value).__start(on_success);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -38,7 +38,7 @@ class Safe_Query_Result_Class {
|
|
|
38
38
|
return (0, execute_unsafe_command_1.__execute_unsafe_command)({
|
|
39
39
|
'execute': (on_success, on_exception) => {
|
|
40
40
|
this.executer.execute((value) => {
|
|
41
|
-
handle_value(
|
|
41
|
+
handle_value((0, execute_unsafe_command_1.initialize_unsafe_command)(), value).__start(on_success, on_exception);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
});
|
package/dist/run_unsafe_query.js
CHANGED
|
@@ -48,9 +48,9 @@ class Unsafe_Query_Result_Class {
|
|
|
48
48
|
return (0, execute_unsafe_command_1.__execute_unsafe_command)({
|
|
49
49
|
'execute': (on_success, on_exception) => {
|
|
50
50
|
this.executer.execute((value) => {
|
|
51
|
-
handle_value(
|
|
51
|
+
handle_value((0, execute_unsafe_command_1.initialize_unsafe_command)(), value).__start(on_success, on_exception);
|
|
52
52
|
}, (exception) => {
|
|
53
|
-
handle_exception(
|
|
53
|
+
handle_exception((0, execute_safe_command_1.initialize_safe_command)(), exception).__start(() => on_exception(map_exception(exception)));
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
});
|