@zenstackhq/sdk 3.3.0-beta.3 → 3.3.0-beta.4

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.
package/dist/index.cjs CHANGED
@@ -1504,7 +1504,11 @@ var TsSchemaGenerator = class {
1504
1504
  ]);
1505
1505
  }
1506
1506
  createArrayExpression(expr) {
1507
+ const arrayResolved = expr.$resolvedType?.decl;
1508
+ const arrayType = typeof arrayResolved === "string" ? arrayResolved : arrayResolved?.name;
1509
+ (0, import_common_helpers2.invariant)(arrayType, "Array type must be resolved to a string or declaration");
1507
1510
  return this.createExpressionUtilsCall("array", [
1511
+ this.createLiteralNode(arrayType),
1508
1512
  ts.factory.createArrayLiteralExpression(expr.items.map((item) => this.createExpression(item)))
1509
1513
  ]);
1510
1514
  }