exupery-core-types 0.3.51 → 0.3.52
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/Refinement_Result.d.ts +4 -11
- package/package.json +1 -1
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import { Query_Result } from "./Query_Result";
|
|
2
1
|
import { Transformer } from "./Transformer";
|
|
3
|
-
type
|
|
2
|
+
type Refiner<Output, Error, Input> = ($: Input) => Refinement_Result<Output, Error>;
|
|
4
3
|
export interface Refinement_Result<Output, Error> {
|
|
5
4
|
transform<Target>(output_transformer: Transformer<Target, Output>, error_transformer: Transformer<Target, Error>): Target;
|
|
6
5
|
transform_result<New_Output>(transformer: Transformer<New_Output, Output>): Refinement_Result<New_Output, Error>;
|
|
7
6
|
transform_error_temp<New_Error>(error_transformer: Transformer<New_Error, Error>): Refinement_Result<Output, New_Error>;
|
|
8
|
-
refine_without_error_transformation<New_Output>(refiner:
|
|
9
|
-
refine<New_Output, Stager_Error>(refiner:
|
|
7
|
+
refine_without_error_transformation<New_Output>(refiner: Refiner<New_Output, Error, Output>): Refinement_Result<New_Output, Error>;
|
|
8
|
+
refine<New_Output, Stager_Error>(refiner: Refiner<New_Output, Stager_Error, Output>,
|
|
10
9
|
/**
|
|
11
10
|
* if the stager fails, rework its error into the desired error type
|
|
12
11
|
*/
|
|
13
12
|
error_transformer: Transformer<Error, Stager_Error>): Refinement_Result<New_Output, Error>;
|
|
14
|
-
|
|
15
|
-
query<New_Output, Stager_Error>(query: Stager<New_Output, Stager_Error, Output>,
|
|
16
|
-
/**
|
|
17
|
-
* if the stager fails, rework its error into the desired error type
|
|
18
|
-
*/
|
|
19
|
-
error_transformer: Transformer<Error, Stager_Error>): Query_Result<New_Output, Error>;
|
|
20
|
-
rework_error_temp<New_Error, Rework_Error>(error_reworker: Stager<New_Error, Rework_Error, Error>,
|
|
13
|
+
rework_error_temp<New_Error, Rework_Error>(error_reworker: Refiner<New_Error, Rework_Error, Error>,
|
|
21
14
|
/**
|
|
22
15
|
* if the reworker fails, we need to transform *that* error into the New_Error
|
|
23
16
|
*/
|