@abaplint/runtime 2.10.47 → 2.10.48

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.
@@ -13,7 +13,7 @@ function insertInternal(options) {
13
13
  }
14
14
  options.table = options.table.getPointer();
15
15
  }
16
- else if (options.data instanceof types_1.FieldSymbol) {
16
+ if (options.data instanceof types_1.FieldSymbol) {
17
17
  if (options.data.getPointer() === undefined) {
18
18
  throw new Error("GETWA_NOT_ASSIGNED");
19
19
  }
@@ -8,4 +8,5 @@ export interface ICharacter {
8
8
  offset?: number | INumeric | Hex;
9
9
  length?: number | INumeric | Hex;
10
10
  }): ICharacter;
11
+ clone(): ICharacter;
11
12
  }
@@ -2,4 +2,5 @@ export interface INumeric {
2
2
  set(value: INumeric | number): void;
3
3
  get(): number;
4
4
  clear(): void;
5
+ clone(): INumeric;
5
6
  }
@@ -66,10 +66,7 @@ class DataReference {
66
66
  throw new Error("OBJECTS_MOVE_NOT_SUPPORTED");
67
67
  }
68
68
  }
69
- else {
70
- return this.pointer?.set(value);
71
- }
72
- return this;
69
+ return this.pointer?.set(value);
73
70
  }
74
71
  getOffset(input) {
75
72
  if (input?.offset) {
@@ -55,7 +55,7 @@ export declare class HashedTable implements ITable {
55
55
  private readonly isStructured;
56
56
  private secondaryIndexes;
57
57
  constructor(rowType: TableRowType, options: ITableOptions, qualifiedName?: string);
58
- clone(): void;
58
+ clone(): HashedTable;
59
59
  getArrayLength(): number;
60
60
  getKeyByName(name: string): ITableKey | undefined;
61
61
  getSecondaryIndex(name: string): any[];
@@ -78,7 +78,11 @@ class HashedTable {
78
78
  this.qualifiedName = qualifiedName?.toUpperCase();
79
79
  }
80
80
  clone() {
81
- throw new Error("HashedTable, clone not implemented");
81
+ const copy = new HashedTable(this.rowType, this.options, this.qualifiedName);
82
+ for (const hash in this.value) {
83
+ copy.value[hash] = this.value[hash].clone();
84
+ }
85
+ return copy;
82
86
  }
83
87
  getArrayLength() {
84
88
  return Object.keys(this.value).length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.10.47",
3
+ "version": "2.10.48",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",