@kubb/plugin-zod 5.4.0 → 5.5.0-canary.20260929T184855

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.js CHANGED
@@ -1409,7 +1409,7 @@ const printerZod = ast.createPrinter((options) => {
1409
1409
  if (entries.length === 0) return catchallType ? `${recordFn}(${propertyNamesKeySchema || "z.string()"}, ${catchallType})` : objectBase;
1410
1410
  return catchallType ? `${objectBase}.catchall(${catchallType})` : objectBase;
1411
1411
  }
1412
- if (entries.length === 0 && patterns.length === 0 && propertyNamesKeySchema && !isStrict) {
1412
+ if (entries.length === 0 && patterns.length === 0 && propertyNamesKeySchema) {
1413
1413
  const unknownType = this.transform(ast.factory.createSchema({ type: "unknown" }));
1414
1414
  return `${recordFn}(${propertyNamesKeySchema}, ${unknownType})`;
1415
1415
  }
@@ -1680,7 +1680,7 @@ const printerZodMini = ast.createPrinter((options) => {
1680
1680
  if (entries.length === 0) return catchallType ? `${recordFn}(${propertyNamesKeySchema || "z.string()"}, ${catchallType})` : objectBase;
1681
1681
  return catchallType ? `z.catchall(${objectBase}, ${catchallType})` : objectBase;
1682
1682
  }
1683
- if (entries.length === 0 && patterns.length === 0 && propertyNamesKeySchema && !isStrict) return `${recordFn}(${propertyNamesKeySchema}, ${this.transform(ast.factory.createSchema({ type: "unknown" }))})`;
1683
+ if (entries.length === 0 && patterns.length === 0 && propertyNamesKeySchema) return `${recordFn}(${propertyNamesKeySchema}, ${this.transform(ast.factory.createSchema({ type: "unknown" }))})`;
1684
1684
  if (node.additionalProperties === true) return objectBase;
1685
1685
  if (isStrict) return objectBase;
1686
1686
  if (patterns.length > 0) {