exupery-core-types 0.3.32 → 0.3.33
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,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Data_Preparer } from "./Data_Preparer";
|
|
2
|
+
import { Transformer_Without_Parameters } from "./Transformer";
|
|
3
|
+
export interface Data_Preparation_Result<Output, Target_Error> {
|
|
4
|
+
transform<New_Output>(transformer: Transformer_Without_Parameters<Output, New_Output>): Data_Preparation_Result<New_Output, Target_Error>;
|
|
5
|
+
transform_error_temp<New_Target_Error>(transform_error: Transformer_Without_Parameters<Target_Error, New_Target_Error>): Data_Preparation_Result<Output, New_Target_Error>;
|
|
6
|
+
process_without_error_transformation<New_Output>(processor: Data_Preparer<Output, New_Output, Target_Error>): Data_Preparation_Result<New_Output, Target_Error>;
|
|
7
|
+
process<New_Output, Processor_Error>(processor: Data_Preparer<Output, New_Output, Processor_Error>, transform_error: (error: Processor_Error) => Target_Error): Data_Preparation_Result<New_Output, Target_Error>;
|
|
8
|
+
rework_error_temp<New_Target_Error, Rework_Error>(rework_error: Data_Preparer<Target_Error, New_Target_Error, Rework_Error>, transform_rework_error: Transformer_Without_Parameters<Rework_Error, New_Target_Error>): Data_Preparation_Result<Output, New_Target_Error>;
|
|
9
|
+
__extract_data: (success: ($: Output) => void, error: ($: Target_Error) => void) => void;
|
|
3
10
|
}
|
|
@@ -1,89 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// query_with_result<New_Result>(
|
|
4
|
-
// query: Query<Result, New_Result, Error>
|
|
5
|
-
// ): Query_Promise<New_Result, Error>
|
|
6
|
-
// rework_error_with_new_query<Target_Error, Rework_Query_Error>(
|
|
7
|
-
// query: Query<Error, Target_Error, Rework_Query_Error>,
|
|
8
|
-
// transform_rework_error: (error: Rework_Query_Error) => Target_Error,
|
|
9
|
-
// ): Query_Promise<Result, Target_Error>
|
|
10
|
-
// query<New_Result, Target_Error>(queries: {
|
|
11
|
-
// 'result': Query<Result, New_Result, Target_Error>,
|
|
12
|
-
// 'error': Query<Error, New_Result, Target_Error>,
|
|
13
|
-
// }): Query_Promise<New_Result, Target_Error>
|
|
14
|
-
// process_result<New_Result>(
|
|
15
|
-
// processor: Processor<Result, New_Result, Error>
|
|
16
|
-
// ): Query_Promise<New_Result, Error>
|
|
17
|
-
// process_error<Target_Error>(
|
|
18
|
-
// processor: Processor<Error, Result, Target_Error>
|
|
19
|
-
// ): Query_Promise<Result, Target_Error>
|
|
20
|
-
// process<New_Result, Target_Error>($: {
|
|
21
|
-
// 'result': Processor<Result, New_Result, Target_Error>,
|
|
22
|
-
// 'error': Processor<Error, New_Result, Target_Error>,
|
|
23
|
-
// }): Query_Promise<New_Result, Target_Error>
|
|
24
|
-
// transform_result<New_Result>(
|
|
25
|
-
// transformer: (Transformer_Without_Parameters<Result, New_Result>)
|
|
26
|
-
// ): Query_Promise<New_Result, Error>
|
|
27
|
-
// transform_error<Target_Error>(
|
|
28
|
-
// transformer: Transformer_Without_Parameters<Error, Target_Error>
|
|
29
|
-
// ): Query_Promise<Result, Target_Error>
|
|
30
|
-
// transform<New_Result, Target_Error>($: {
|
|
31
|
-
// 'result': Transformer_Without_Parameters<Result, New_Result>,
|
|
32
|
-
// 'error': Transformer_Without_Parameters<Error, Target_Error>,
|
|
33
|
-
// }): Query_Promise<New_Result, Target_Error>
|
|
34
|
-
// __start(
|
|
35
|
-
// on_success: ($: Result) => void,
|
|
36
|
-
// on_error: ($: Error) => void
|
|
37
|
-
// ): void
|
|
38
|
-
// export interface Process_Result<Output, Error> {
|
|
39
|
-
// 'transform': <New_Output>(
|
|
40
|
-
// transformer: Transformer_Without_Parameters<Output, New_Output>
|
|
41
|
-
// ) => Process_Result<New_Output, Error>
|
|
42
|
-
// 'transform error': <Target_Error>(
|
|
43
|
-
// transformer: Transformer_Without_Parameters<Error, Target_Error>
|
|
44
|
-
// ) => Process_Result<Output, Target_Error>
|
|
45
|
-
// 'transform with parameters': <New_Output, Parameters>(
|
|
46
|
-
// transformer: Transformer_With_Parameters<Output, Parameters, New_Output>,
|
|
47
|
-
// parameters: Parameters
|
|
48
|
-
// ) => Process_Result<New_Output, Error>
|
|
49
|
-
// 'refine': <New_Output, Refine_Error>(
|
|
50
|
-
// refiner: Refiner_Without_Parameters<Output, New_Output, Refine_Error>,
|
|
51
|
-
// map_error: ($: Refine_Error) => Error
|
|
52
|
-
// ) => Process_Result<New_Output, Error>
|
|
53
|
-
// 'refine with parameters': <New_Output, Parameters, Refine_Error>(
|
|
54
|
-
// refiner: Refiner_With_Parameters<Output, Parameters, New_Output, Refine_Error>,
|
|
55
|
-
// parameters: Parameters,
|
|
56
|
-
// map_error: ($: Refine_Error) => Error
|
|
57
|
-
// ) => Process_Result<New_Output, Error>
|
|
58
|
-
// __extract_data: (
|
|
59
|
-
// success: ($: Output) => void,
|
|
60
|
-
// error: ($: Error) => void
|
|
61
|
-
// ) => void
|
|
62
|
-
// }
|
|
63
|
-
// export interface Refinement_Result<T, E> {
|
|
64
|
-
// /**
|
|
65
|
-
// * @param set what to do when the value was set, returns the new type
|
|
66
|
-
// * @param not_set what to do when the value was not set, returns the new type
|
|
67
|
-
// */
|
|
68
|
-
// process(
|
|
69
|
-
// success: ($: T) => void,
|
|
70
|
-
// error: ($: E) => void,
|
|
71
|
-
// ): void
|
|
72
|
-
// map<NT, NE>(
|
|
73
|
-
// handle_value: ($: T) => NT,
|
|
74
|
-
// handle_error: ($: E) => NE
|
|
75
|
-
// ): Refinement_Result<NT, NE>
|
|
76
|
-
// map_result<NT>(
|
|
77
|
-
// handle_value: ($: T) => NT,
|
|
78
|
-
// ): Refinement_Result<NT, E>
|
|
79
|
-
// transform<NT>(
|
|
80
|
-
// handle_value: ($: T) => NT,
|
|
81
|
-
// handle_error: ($: E) => NT
|
|
82
|
-
// ): NT
|
|
83
|
-
// transform_error<NE>(
|
|
84
|
-
// handle_error: ($: E) => NE
|
|
85
|
-
// ): Refinement_Result<T, NE>
|
|
86
|
-
// with_result<NT>(
|
|
87
|
-
// handle_value: ($: T) => Refinement_Result<NT, E>,
|
|
88
|
-
// ): Refinement_Result<NT, E>
|
|
89
|
-
// }
|