exupery-core-types 0.3.4 → 0.3.5

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.
@@ -0,0 +1,6 @@
1
+ export type Procedure<Parameters, Error, Resources> = ($r: Resources) => Procedure_Primed_With_Resources<Parameters, Error>;
2
+ export type Procedure_Primed_With_Resources<Parameters, Error> = ($: Parameters) => Procedure_Promise<Error>;
3
+ export type Procedure_Promise<Error> = {
4
+ __start: (on_success: () => void, on_error: (error: Error) => void) => void;
5
+ map_error<NE>(handle_error: (error: Error) => NE): Procedure_Promise<NE>;
6
+ };
@@ -0,0 +1,8 @@
1
+ export type Query<Parameters, Result, Error, Resources> = ($r: Resources) => Query_Primed_With_Resources<Parameters, Result, Error>;
2
+ export type Query_Primed_With_Resources<Parameters, Result, Error> = ($: Parameters) => Query_Promise<Result, Error>;
3
+ export type Query_Promise<Result, Error> = {
4
+ map_<NT>(handle_value: ($: Result) => NT): Query_Promise<NT, Error>;
5
+ map_exception_<NE>(handle_exception: ($: Error) => NE): Query_Promise<Result, NE>;
6
+ then_unguaranteed<NT>(handle_value: ($: Result) => Query_Promise<NT, Error>): Query_Promise<NT, Error>;
7
+ __start(on_success: ($: Result) => void, on_error: ($: Error) => void): void;
8
+ };
package/dist/index.d.ts CHANGED
@@ -3,9 +3,7 @@ export * from "./Circular_Dependency";
3
3
  export * from "./Dictionary";
4
4
  export * from "./Lookup";
5
5
  export * from "./Optional_Value";
6
- export * from "./Guaranteed_Procedure";
7
- export * from "./Unguaranteed_Procedure";
8
- export * from "./Guaranteed_Query";
9
- export * from "./Unguaranteed_Query";
6
+ export * from "./Procedure";
7
+ export * from "./Query";
10
8
  export * from "./Refiner";
11
9
  export * from "./Transformer";
package/dist/index.js CHANGED
@@ -19,9 +19,7 @@ __exportStar(require("./Circular_Dependency"), exports);
19
19
  __exportStar(require("./Dictionary"), exports);
20
20
  __exportStar(require("./Lookup"), exports);
21
21
  __exportStar(require("./Optional_Value"), exports);
22
- __exportStar(require("./Guaranteed_Procedure"), exports);
23
- __exportStar(require("./Unguaranteed_Procedure"), exports);
24
- __exportStar(require("./Guaranteed_Query"), exports);
25
- __exportStar(require("./Unguaranteed_Query"), exports);
22
+ __exportStar(require("./Procedure"), exports);
23
+ __exportStar(require("./Query"), exports);
26
24
  __exportStar(require("./Refiner"), exports);
27
25
  __exportStar(require("./Transformer"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-types",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Corno",
6
6
  "description": "core types for Exupery",
@@ -1,5 +0,0 @@
1
- export type Guaranteed_Procedure<Parameters, Resources> = ($r: Resources) => Guaranteed_Procedure_Primed_With_Resources<Parameters>;
2
- export type Guaranteed_Procedure_Primed_With_Resources<Parameters> = ($: Parameters) => Guaranteed_Procedure_Promise;
3
- export type Guaranteed_Procedure_Promise = {
4
- __start: (on_finished: () => void) => void;
5
- };
@@ -1,18 +0,0 @@
1
- export type Guaranteed_Query<Parameters, Result, Resources> = ($r: Resources) => Guaranteed_Query_Primed_With_Resources<Parameters, Result>;
2
- export type Guaranteed_Query_Primed_With_Resources<Parameters, Result> = ($: Parameters) => Guaranteed_Query_Promise<Result>;
3
- /**
4
- * A value that will asynchronously become available.
5
- * Similar to the concept of a promise, but with a smaller API.
6
- */
7
- export type Guaranteed_Query_Promise<Result> = {
8
- map<NT>(handle_value: ($: Result) => NT): Guaranteed_Query_Promise<NT>;
9
- /**
10
- * maps the current async value into a new async value
11
- * @param handle_value callback that transforms the actual value into a new Async_Value
12
- */
13
- then<NT>(handle_value: ($: Result) => Guaranteed_Query_Promise<NT>): Guaranteed_Query_Promise<NT>;
14
- /**
15
- * This method is only to be used by resources
16
- */
17
- __start(on_finished: ($: Result) => void): void;
18
- };
@@ -1,6 +0,0 @@
1
- export type Unguaranteed_Procedure<Parameters, Error, Resources> = ($r: Resources) => Unguaranteed_Procedure_Primed_With_Resources<Parameters, Error>;
2
- export type Unguaranteed_Procedure_Primed_With_Resources<Parameters, Error> = ($: Parameters) => Unguaranteed_Procedure_Promise<Error>;
3
- export type Unguaranteed_Procedure_Promise<Error> = {
4
- __start: (on_success: () => void, on_error: (error: Error) => void) => void;
5
- map_error<NE>(handle_error: (error: Error) => NE): Unguaranteed_Procedure_Promise<NE>;
6
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- import { Guaranteed_Query_Promise } from "./Guaranteed_Query";
2
- export type Unguaranteed_Query<Parameters, Result, Error, Resources> = ($r: Resources) => Unguaranteed_Query_Primed_With_Resources<Parameters, Result, Error>;
3
- export type Unguaranteed_Query_Primed_With_Resources<Parameters, Result, Error> = ($: Parameters) => Unguaranteed_Query_Promise<Result, Error>;
4
- export type Unguaranteed_Query_Promise<Result, Error> = {
5
- map_<NT>(handle_value: ($: Result) => NT): Unguaranteed_Query_Promise<NT, Error>;
6
- map_exception_<NE>(handle_exception: ($: Error) => NE): Unguaranteed_Query_Promise<Result, NE>;
7
- then<NT>(handle_value: ($: Result) => Guaranteed_Query_Promise<NT>): Unguaranteed_Query_Promise<NT, Error>;
8
- then_unguaranteed<NT>(handle_value: ($: Result) => Unguaranteed_Query_Promise<NT, Error>): Unguaranteed_Query_Promise<NT, Error>;
9
- catch_(handle_exception: ($: Error) => Guaranteed_Query_Promise<Result>): Guaranteed_Query_Promise<Result>;
10
- __start(on_success: ($: Result) => void, on_error: ($: Error) => void): void;
11
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
File without changes
File without changes