exupery-core-types 0.1.6 → 0.3.0

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/Array.d.ts CHANGED
@@ -20,7 +20,7 @@ export interface Array<T> {
20
20
  * This method is only to be used by resources
21
21
  *
22
22
  */
23
- __get_length(): number;
23
+ __get_number_of_elements(): number;
24
24
  /**
25
25
  * This method is only to be used by resources
26
26
  *
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A circular dependency is a function without parameters returning the specified type
3
+ * it makes it possible to do the evaluation only when the function is called
4
+ * useful for lazy evaluation
5
+ */
6
+ export type Circular_Dependency<T> = {
7
+ 'get circular dependent': () => T;
8
+ };
@@ -19,7 +19,7 @@ export interface Dictionary<T> {
19
19
  * This method is only to be used by resources
20
20
  * iterates over all entries in a sorted manner
21
21
  */
22
- to_array(compare: Compare_Function<T>): Array<Key_Value_Pair<T>>;
22
+ deprecated_to_array(compare: Compare_Function<T>): Array<Key_Value_Pair<T>>;
23
23
  /**
24
24
  * This method is only to be used by resources
25
25
  * returns an {@link Optional_Value } of type T reflecting wether the entry existed or not
@@ -27,7 +27,5 @@ export interface Dictionary<T> {
27
27
  * @param key
28
28
  */
29
29
  __get_entry(key: string): Optional_Value<T>;
30
- __add_entry_if_not_exists(key: string, value: T): Dictionary<T>;
31
- __add_entry_overwrite_if_exists(key: string, value: T): Dictionary<T>;
32
- __remove_entry_if_exists(key: string): Dictionary<T>;
30
+ __get_number_of_entries(): number;
33
31
  }
package/dist/Lookup.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import { Optional_Value } from "./Optional_Value";
2
2
  /**
3
3
  * A lookup is similar to a Dictionary, but much more basic.
4
- * There are only operations to retrieve entries
4
+ * There is only 1 operation: __get_entry.
5
5
  */
6
6
  export interface Lookup<T> {
7
7
  /**
8
- * This method is only to be used by resources
9
8
  * returns an {@link Optional_Value } of type T reflecting wether the entry existed or not
10
9
  *
11
10
  * @param key
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "./Array";
2
- export * from "./Computed_Value";
2
+ export * from "./Circular_Dependency";
3
3
  export * from "./Dictionary";
4
4
  export * from "./Lookup";
5
5
  export * from "./Optional_Value";
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Array"), exports);
18
- __exportStar(require("./Computed_Value"), exports);
18
+ __exportStar(require("./Circular_Dependency"), exports);
19
19
  __exportStar(require("./Dictionary"), exports);
20
20
  __exportStar(require("./Lookup"), exports);
21
21
  __exportStar(require("./Optional_Value"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-types",
3
- "version": "0.1.6",
3
+ "version": "0.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Corno",
6
6
  "description": "core types for Exupery",
@@ -1,8 +0,0 @@
1
- /**
2
- * A computed value is a function without paramters returning the specified type
3
- * it makes it possible to do the evaluation only when the function is called
4
- * useful for lazy evaluation or when side effects are needed
5
- */
6
- export type Computed_Value<T> = {
7
- 'compute': () => T;
8
- };