diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 000000000..97b0b2272 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,2 @@ +export * from "./lib"; +export as namespace Zod; diff --git a/package.json b/package.json index 6723732de..e48cdc607 100644 --- a/package.json +++ b/package.json @@ -3,19 +3,20 @@ "version": "3.14.4", "description": "TypeScript-first schema declaration and validation library with static type inference", "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "types": "./index.d.ts", "module": "./lib/index.mjs", "dependencies": {}, "exports": { ".": { "require": "./lib/index.js", "import": "./lib/index.mjs", - "types": "./lib/index.d.ts" + "types": "./index.d.ts" }, "./package.json": "./package.json" }, "files": [ - "/lib" + "/lib", + "/index.d.ts" ], "repository": { "type": "git", diff --git a/rollup.config.js b/rollup.config.js index 7275a1441..76dabca04 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -10,6 +10,12 @@ export default [ format: "es", sourcemap: false, }, + { + file: "lib/index.umd.js", + name: "Zod", + format: "umd", + sourcemap: false, + }, ], plugins: [ typescript({