@abaplint/runtime 2.11.26 → 2.11.28
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ABAPObject, FieldSymbol } from "../types";
|
|
2
|
-
export declare function cast(target: ABAPObject | FieldSymbol, source: ABAPObject): Promise<
|
|
2
|
+
export declare function cast(target: ABAPObject | FieldSymbol, source: ABAPObject): Promise<FieldSymbol | ABAPObject | undefined>;
|
|
@@ -7,6 +7,7 @@ const types_1 = require("../types");
|
|
|
7
7
|
// todo, local classes?
|
|
8
8
|
// check with javascript instanceof?
|
|
9
9
|
// handling interfaces?
|
|
10
|
+
// todo: remove the "async"
|
|
10
11
|
async function cast(target, source) {
|
|
11
12
|
if (source instanceof types_1.ABAPObject && source.get() === undefined) {
|
|
12
13
|
target.clear();
|
|
@@ -48,5 +49,6 @@ async function cast(target, source) {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
target.set(source);
|
|
52
|
+
return target;
|
|
51
53
|
}
|
|
52
54
|
//# sourceMappingURL=cast.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FieldSymbol, Structure } from "../types";
|
|
2
|
-
export declare function moveCorresponding(source: Structure | FieldSymbol, target: Structure | FieldSymbol):
|
|
2
|
+
export declare function moveCorresponding(source: Structure | FieldSymbol, target: Structure | FieldSymbol): Structure;
|
|
@@ -7,15 +7,13 @@ function moveCorresponding(source, target) {
|
|
|
7
7
|
if (source.isAssigned() === false) {
|
|
8
8
|
throw new Error("GETWA_NOT_ASSIGNED");
|
|
9
9
|
}
|
|
10
|
-
moveCorresponding(source.getPointer(), target);
|
|
11
|
-
return;
|
|
10
|
+
return moveCorresponding(source.getPointer(), target);
|
|
12
11
|
}
|
|
13
12
|
if (target instanceof types_1.FieldSymbol) {
|
|
14
13
|
if (target.isAssigned() === false) {
|
|
15
14
|
throw new Error("GETWA_NOT_ASSIGNED");
|
|
16
15
|
}
|
|
17
|
-
moveCorresponding(source, target.getPointer());
|
|
18
|
-
return;
|
|
16
|
+
return moveCorresponding(source, target.getPointer());
|
|
19
17
|
}
|
|
20
18
|
for (const n in source.get()) {
|
|
21
19
|
if (target.get()[n] instanceof types_1.Structure) {
|
|
@@ -25,5 +23,6 @@ function moveCorresponding(source, target) {
|
|
|
25
23
|
target.get()[n]?.set(source.get()[n]);
|
|
26
24
|
}
|
|
27
25
|
}
|
|
26
|
+
return target;
|
|
28
27
|
}
|
|
29
28
|
//# sourceMappingURL=move_corresponding.js.map
|