@abaplint/runtime 2.1.88 → 2.1.89
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,4 +1,4 @@
|
|
|
1
1
|
import { String } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function concat(left: INumeric | ICharacter | string | number, right: INumeric | ICharacter | string | number): String;
|
|
4
|
+
export declare function concat(left: INumeric | ICharacter | string | number | any[], right: INumeric | ICharacter | string | number): String;
|
|
@@ -3,6 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.concat = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
function concat(left, right) {
|
|
6
|
+
if (Array.isArray(left)) {
|
|
7
|
+
// used in ampersand concatenation
|
|
8
|
+
let res = concat(left[0], left[1]);
|
|
9
|
+
for (let i = 2; i < left.length; i++) {
|
|
10
|
+
res = concat(res, left[i]);
|
|
11
|
+
}
|
|
12
|
+
return res;
|
|
13
|
+
}
|
|
6
14
|
let val = "";
|
|
7
15
|
if (typeof left === "string" || typeof left === "number") {
|
|
8
16
|
val += left;
|