@abaplint/transpiler 2.5.72 → 2.5.74

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.
@@ -170,13 +170,14 @@ class Traversal {
170
170
  return undefined;
171
171
  }
172
172
  buildAttributes(def) {
173
+ var _a, _b;
173
174
  const attr = [];
174
175
  // TODO: visibility is wrong for classes
175
- for (const a of (def === null || def === void 0 ? void 0 : def.getAttributes().getAll()) || []) {
176
+ for (const a of ((_a = def === null || def === void 0 ? void 0 : def.getAttributes()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
176
177
  const type = new transpile_types_1.TranspileTypes().toType(a.getType());
177
178
  attr.push(`"${a.getName().toUpperCase()}": {"type": () => {return ${type};}, "visibility": "U", "is_constant": " "}`);
178
179
  }
179
- for (const a of (def === null || def === void 0 ? void 0 : def.getAttributes().getConstants()) || []) {
180
+ for (const a of ((_b = def === null || def === void 0 ? void 0 : def.getAttributes()) === null || _b === void 0 ? void 0 : _b.getConstants()) || []) {
180
181
  const type = new transpile_types_1.TranspileTypes().toType(a.getType());
181
182
  attr.push(`"${a.getName().toUpperCase()}": {"type": () => {return ${type};}, "visibility": "U", "is_constant": "X"}`);
182
183
  }
@@ -288,6 +289,7 @@ class Traversal {
288
289
  return undefined;
289
290
  }
290
291
  buildConstructorContents(scope, def) {
292
+ var _a, _b, _c;
291
293
  let ret = "";
292
294
  if (def.getSuperClass() !== undefined
293
295
  && def.getMethodDefinitions().getByName("CONSTRUCTOR") === undefined) {
@@ -296,7 +298,7 @@ class Traversal {
296
298
  const cName = Traversal.escapeNamespace(def.getName().toLowerCase());
297
299
  ret += "this.me = new abap.types.ABAPObject();\n";
298
300
  ret += "this.me.set(this);\n";
299
- for (const a of def.getAttributes().getAll()) {
301
+ for (const a of ((_a = def.getAttributes()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
300
302
  if (a.getMeta().includes("static" /* abaplint.IdentifierMeta.Static */) === true) {
301
303
  continue;
302
304
  }
@@ -309,11 +311,11 @@ class Traversal {
309
311
  ret += this.dataFromInterfaces(i.name, scope);
310
312
  }
311
313
  // handle aliases after initialization of carrier variables
312
- for (const a of def.getAliases().getAll()) {
314
+ for (const a of ((_b = def.getAliases()) === null || _b === void 0 ? void 0 : _b.getAll()) || []) {
313
315
  ret += "this." + a.getName().toLowerCase() + " = this." + Traversal.escapeNamespace(a.getComponent().replace("~", "$").toLowerCase()) + ";\n";
314
316
  }
315
317
  // constants can be accessed both statically and via reference
316
- for (const c of def.getAttributes().getConstants()) {
318
+ for (const c of ((_c = def.getAttributes()) === null || _c === void 0 ? void 0 : _c.getConstants()) || []) {
317
319
  ret += "this." + Traversal.escapeNamespace(c.getName().toLowerCase()) + " = " + cName + "." + Traversal.escapeNamespace(c.getName().toLowerCase()) + ";\n";
318
320
  }
319
321
  return ret;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.5.72",
3
+ "version": "2.5.74",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "author": "abaplint",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@abaplint/core": "^2.96.2",
31
+ "@abaplint/core": "^2.97.2",
32
32
  "source-map": "^0.7.4"
33
33
  },
34
34
  "devDependencies": {