exupery-core-internals 0.3.0 → 0.3.1

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.
@@ -19,14 +19,6 @@ class Dictionary {
19
19
  };
20
20
  }));
21
21
  }
22
- __map_with_key($v) {
23
- return new Dictionary(this.source.map(($) => {
24
- return {
25
- key: $.key,
26
- value: $v($.value, $.key),
27
- };
28
- }));
29
- }
30
22
  deprecated_to_array(compare) {
31
23
  const sorted_keys = this.source.slice().sort(compare);
32
24
  return (0, array_literal_1.array_literal)(sorted_keys);
package/dist/index.d.ts CHANGED
@@ -7,5 +7,4 @@ export * from "./imp/public/block";
7
7
  export * from "./imp/public/switch_state";
8
8
  export * from "./imp/public/set";
9
9
  export * from "./imp/public/not_set";
10
- export * from "./transformation";
11
10
  export * from "./refinement";
package/dist/index.js CHANGED
@@ -23,5 +23,4 @@ __exportStar(require("./imp/public/block"), exports);
23
23
  __exportStar(require("./imp/public/switch_state"), exports);
24
24
  __exportStar(require("./imp/public/set"), exports);
25
25
  __exportStar(require("./imp/public/not_set"), exports);
26
- __exportStar(require("./transformation"), exports);
27
26
  __exportStar(require("./refinement"), exports);
@@ -1,17 +1,5 @@
1
- export interface Refinement_Result<T, E> {
2
- /**
3
- * @param set what to do when the value was set, returns the new type
4
- * @param not_set what to do when the value was not set, returns the new type
5
- */
6
- process(success: ($: T) => void, exception: ($: E) => void): void;
7
- map<NT, NE>(handle_value: ($: T) => NT, handle_exception: ($: E) => NE): Refinement_Result<NT, NE>;
8
- map_result<NT>(handle_value: ($: T) => NT): Refinement_Result<NT, E>;
9
- transform<NT>(handle_value: ($: T) => NT, handle_exception: ($: E) => NT): NT;
10
- with_result<NT>(handle_value: ($: T) => Refinement_Result<NT, E>): Refinement_Result<NT, E>;
11
- }
12
- export type Refinement_With_Parameters<In, Parameters, Out, Error> = ($: In, $p: Parameters) => Refinement_Result<Out, Error>;
13
- export type Refinement_Without_Parameters<In, Out, Error> = ($: In) => Refinement_Result<Out, Error>;
1
+ import * as _et from 'exupery-core-types';
14
2
  export declare namespace refinement {
15
- const failed: <T, E>(exception: E) => Refinement_Result<T, E>;
16
- const successful: <T, E>(value: T) => Refinement_Result<T, E>;
3
+ const failed: <T, E>(exception: E) => _et.Refinement_Result<T, E>;
4
+ const successful: <T, E>(value: T) => _et.Refinement_Result<T, E>;
17
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-internals",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "license": "ISC",
5
5
  "description": "",
6
6
  "author": "Corno",
@@ -15,7 +15,7 @@
15
15
  "url": "https://github.com/corno/exupery-core/issues"
16
16
  },
17
17
  "dependencies": {
18
- "exupery-core-types": "^0.3.0"
18
+ "exupery-core-types": "^0.3.2"
19
19
  },
20
20
  "main": "./dist/index.js",
21
21
  "types": "dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- export type Transformation_With_Parameters<In, Parameters, Out> = ($: In, $p: Parameters) => Out;
2
- export type Transformation_Without_Parameters<In, Out> = ($: In) => Out;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });