@xaendar/compiler 0.7.20 → 0.7.22

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.
@@ -2923,6 +2923,14 @@ function typeCheckElement(node, parentNode, index, context) {
2923
2923
  const beginning = parsedEventParameter ? "($event)" : "()";
2924
2924
  retVal.code.push(`const ${nodeName}_${name} = ${beginning} => root.${handler}(${mappedParameters})`);
2925
2925
  });
2926
+ if (node.children.length) retVal.functionsToProcess.set(`${nodeName}Children`, {
2927
+ fn: {
2928
+ node,
2929
+ parentNode,
2930
+ context
2931
+ },
2932
+ args: [nodeName]
2933
+ });
2926
2934
  return retVal;
2927
2935
  }
2928
2936
  //#endregion
@@ -3083,7 +3091,7 @@ var TypeChecker = class {
3083
3091
  generatedCode.push("}");
3084
3092
  for (const [key, fnData] of this._nodeToProcess.entries()) {
3085
3093
  const { node, parentNode, precode, context } = fnData.fn;
3086
- generatedCode.push(`\nfunction ${key} (${fnData.args?.join(", ") ?? ""}) {`);
3094
+ generatedCode.push(`\nfunction ${key} (${fnData.args?.join(", ") ?? ""}): void {`);
3087
3095
  if (precode) generatedCode.push(indent(precode));
3088
3096
  generatedCode.push(...indent([...node.children.map((child, i) => {
3089
3097
  const result = this._processNode(child, parentNode, i.toString(), context);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaendar/compiler",
3
- "version": "0.7.20",
3
+ "version": "0.7.22",
4
4
  "description": "A library for transpiling Xaendar Templates into JavaScript code",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -16,8 +16,8 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@xaendar/common": "0.7.20",
20
- "@xaendar/types": "0.7.20",
19
+ "@xaendar/common": "0.7.22",
20
+ "@xaendar/types": "0.7.22",
21
21
  "typescript": "^6.0.3"
22
22
  }
23
23
  }