@abaplint/transpiler 2.5.33 → 2.5.34

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.
@@ -59,15 +59,12 @@ class FunctionModuleTranspiler {
59
59
  name += "_";
60
60
  }
61
61
  ret += `let ${name} = INPUT.${direction}?.${name};\n`;
62
- if (direction === "exporting" || direction === "importing" || direction === "changing") {
63
- const type = (_c = scope === null || scope === void 0 ? void 0 : scope.findVariable(name)) === null || _c === void 0 ? void 0 : _c.getType();
64
- if (type !== undefined) {
65
- // todo, set DEFAULT value
66
- // todo, check for OPTIONALness and raise exceptions and stuff
67
- ret += `if (${name} === undefined) {
68
- ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
69
- }\n`;
70
- }
62
+ const type = (_c = scope === null || scope === void 0 ? void 0 : scope.findVariable(name)) === null || _c === void 0 ? void 0 : _c.getType();
63
+ if (type !== undefined && p.optional === true) {
64
+ // todo, set DEFAULT value
65
+ ret += `if (${name} === undefined) {
66
+ ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
67
+ }\n`;
71
68
  }
72
69
  }
73
70
  return ret;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.5.33",
3
+ "version": "2.5.34",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",