exupery-core-types 0.3.66 → 0.3.67

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.
@@ -11,13 +11,13 @@ export type Key_Value_Pair<T> = {
11
11
  export interface Dictionary<T> {
12
12
  /**
13
13
  *
14
- * @param handle_value callback to transform an individual entry. keys are not available.
14
+ * @param handle_entry callback to transform an individual entry. keys are not available.
15
15
  */
16
- map<NT>(handle_value: ($: T, key: string) => NT): Dictionary<NT>;
16
+ map<NT>(handle_entry: (value: T, key: string) => NT): Dictionary<NT>;
17
17
  /**
18
18
  * the ordering of the list will be the same as the insertion order in the dictionary
19
19
  */
20
- to_list<New_Type>(handle_value: (value: T, key: string) => New_Type): List<New_Type>;
20
+ to_list<New_Type>(handle_entry: (value: T, key: string) => New_Type): List<New_Type>;
21
21
  /**
22
22
  * This method is only to be used by resources
23
23
  * returns an {@link Optional_Value } of type T reflecting wether the entry existed or not
@@ -26,6 +26,6 @@ export interface Dictionary<T> {
26
26
  */
27
27
  get_entry(key: string): Optional_Value<T>;
28
28
  get_number_of_entries(): number;
29
- filter<New_Type>(handle_value: (value: T, key: string) => Optional_Value<New_Type>): Dictionary<New_Type>;
29
+ filter<New_Type>(handle_entry: (value: T, key: string) => Optional_Value<New_Type>): Dictionary<New_Type>;
30
30
  is_empty(): boolean;
31
31
  }
@@ -6,12 +6,16 @@ import { Optional_Value } from "./Optional_Value";
6
6
  export interface List<T> {
7
7
  /**
8
8
  *
9
- * @param handle_value callback to transform an individual entry.
9
+ * @param handle_element callback to transform an individual entry.
10
10
  */
11
- map<NT>(handle_value: ($: T) => NT): List<NT>;
12
- filter<New_Type>(handle_value: ($: T) => Optional_Value<New_Type>): List<New_Type>;
11
+ map<NT>(handle_element: ($: T) => NT): List<NT>;
12
+ filter<New_Type>(handle_element: ($: T) => Optional_Value<New_Type>): List<New_Type>;
13
13
  get_number_of_elements(): number;
14
14
  is_empty(): boolean;
15
+ append_element(new_element: T): List<T>;
16
+ prepend_element(new_element: T): List<T>;
17
+ reverse(): List<T>;
18
+ flatten<New_Type>(handle_element: ($: T) => List<New_Type>): List<New_Type>;
15
19
  __get_element_at(index: number): Optional_Value<T>;
16
20
  __get_raw_copy(): readonly T[];
17
21
  /**
@@ -20,5 +24,5 @@ export interface List<T> {
20
24
  *
21
25
  * @param $handle_value callback to process the entry
22
26
  */
23
- __for_each(handle_value: ($: T) => void): void;
27
+ __for_each(handle_element: ($: T) => void): void;
24
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-types",
3
- "version": "0.3.66",
3
+ "version": "0.3.67",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Corno",
6
6
  "description": "core types for Exupery",