exupery-core-types 0.3.41 → 0.3.43
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/Command.d.ts +2 -1
- package/dist/Stager.d.ts +3 -2
- package/dist/Staging_Result.d.ts +14 -6
- package/dist/Transformer.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{Query.d.ts → Query_Procedure.d.ts} +0 -0
- /package/dist/{Query.js → Query_Procedure.js} +0 -0
package/dist/Command.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Transformer } from "./Transformer";
|
|
1
2
|
export type Command_Procedure<Error, Parameters, Command_Resources, Query_Resources> = ($c: Command_Resources, $q: Query_Resources) => Command<Error, Parameters>;
|
|
2
3
|
export type Command<Error, Parameters> = {
|
|
3
|
-
'execute': <
|
|
4
|
+
'execute': <Target_Error>(parameters: Parameters, error_transformer: Transformer<Target_Error, Error>) => Command_Promise<Target_Error>;
|
|
4
5
|
};
|
|
5
6
|
export type Command_Promise<Error> = {
|
|
6
7
|
__start: (on_success: () => void, on_error: (error: Error) => void) => void;
|
package/dist/Stager.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Staging_Result } from "./Staging_Result";
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { Transformer } from "./Transformer";
|
|
3
|
+
export type Stager<Output, Error, Input> = <Target_Error>($: Input, transform_error: Transformer<Target_Error, Error>) => Staging_Result<Output, Target_Error>;
|
|
4
|
+
export type Query<Output, Error, Input> = Stager<Output, Error, Input>;
|
package/dist/Staging_Result.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { Stager } from "./Stager";
|
|
2
|
-
import {
|
|
2
|
+
import { Transformer } from "./Transformer";
|
|
3
3
|
export interface Staging_Result<Output, Error> {
|
|
4
|
-
transform<New_Output>(transformer:
|
|
5
|
-
transform_error_temp<New_Error>(error_transformer:
|
|
6
|
-
stage_without_error_transformation<New_Output>(
|
|
7
|
-
stage<New_Output,
|
|
8
|
-
|
|
4
|
+
transform<New_Output>(transformer: Transformer<New_Output, Output>): Staging_Result<New_Output, Error>;
|
|
5
|
+
transform_error_temp<New_Error>(error_transformer: Transformer<New_Error, Error>): Staging_Result<Output, New_Error>;
|
|
6
|
+
stage_without_error_transformation<New_Output>(stager: Stager<New_Output, Error, Output>): Staging_Result<New_Output, Error>;
|
|
7
|
+
stage<New_Output, Stager_Error>(stager: Stager<New_Output, Stager_Error, Output>,
|
|
8
|
+
/**
|
|
9
|
+
* if the stager fails, rework its error into the desired error type
|
|
10
|
+
*/
|
|
11
|
+
error_transformer: Transformer<Error, Stager_Error>): Staging_Result<New_Output, Error>;
|
|
12
|
+
rework_error_temp<New_Error, Rework_Error>(error_reworker: Stager<New_Error, Rework_Error, Error>,
|
|
13
|
+
/**
|
|
14
|
+
* if the reworker fails, we need to transform *that* error into the New_Error
|
|
15
|
+
*/
|
|
16
|
+
rework_error_transformer: Transformer<New_Error, Rework_Error>): Staging_Result<Output, New_Error>;
|
|
9
17
|
__extract_data: (on_success: ($: Output) => void, on_error: ($: Error) => void) => void;
|
|
10
18
|
}
|
package/dist/Transformer.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type Transformer_With_Parameters<Out, In, Parameters> = ($: In, $p: Parameters) => Out;
|
|
2
|
-
export type
|
|
2
|
+
export type Transformer<Out, In> = ($: In) => Out;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,5 +22,5 @@ __exportStar(require("./Optional_Value"), exports);
|
|
|
22
22
|
__exportStar(require("./Command"), exports);
|
|
23
23
|
__exportStar(require("./Stager"), exports);
|
|
24
24
|
__exportStar(require("./Staging_Result"), exports);
|
|
25
|
-
__exportStar(require("./
|
|
25
|
+
__exportStar(require("./Query_Procedure"), exports);
|
|
26
26
|
__exportStar(require("./Transformer"), exports);
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|