◑docsParity
colinhacks/zod★ 44,199TypeScript

vs https://zod.dev/api

The provided API surface is extremely sparse (mostly barrel re-export files), so it is impossible to verify most of the detailed API usage shown in the docs against actual signatures. A few genuine discrepancies are visible: the docs use `import * as z from "zod"` while the package also exposes a named and default `z` export, and the docs reference subpath entry points (`zod/mini`, `zod/v4`) whose actual export shapes are not fully substantiated. Most doc claims cannot be falsified from the given material, so I report only the grounded findings with honest confidence levels.

0 high0 medium4 low
Open issue with all findings ↗
12
Files analyzed
17
API symbols
2
Doc pages
36.7s
Analyzed in
100%
API coverage: Well documented
17 of 17 exported symbols mentioned in docs
12 source files inspected · deepseek-chat · Oct 26, 2026

4 mismatches found

01

Import style in docs vs. named/default `z` export

packages/zod/src/index.ts

low
In the code
export { z }  // L7
export { z as default }  // L7
In the docs
import * as z from "zod";

The docs exclusively show `import * as z from "zod"`. The code additionally exports a named `z` and a default `z`. While namespace import still works, the docs never mention the documented named/default exports, and developers following the docs won't know `import { z } from "zod"`, `import z from "zod"`, or `import * as z from "zod"` all work. This is an omission rather than a hard break, but it is a real doc/code divergence in how the package is described.

Suggested fix
Add a short note in the Primitives section showing the supported import forms: `import * as z from "zod"`, `import { z } from "zod"`, and `import z from "zod"` (default export).
02

Zod Mini subpath export shown only as `zod/mini`

packages/mini/src/index.ts

low
In the code
// packages/mini/src/index.ts
export * from "zod/mini"  // L1

// packages/zod/src/mini/index.ts
export * from "../v4/mini/external.js"  // L2
export { z }  // L3
In the docs
ZodZod Mini

```
z.string().max(5);
z.string().min(5);
```

The docs toggle between "Zod" and "Zod Mini" but never show the actual import path for Zod Mini. The code exposes it via both `zod/mini` and `packages/zod/src/mini`, which also exports a named `z`. A developer following the Mini tab has no documented import statement to use.

Suggested fix
Add an explicit import line under the Zod Mini tab, e.g. `import * as z from "zod/mini";` (or `import { z } from "zod/mini";`), noting both named and default exports are available.
03

`zod/v4` default export shape undocumented

packages/zod/src/v4/index.ts

low
In the code
// packages/zod/src/v4/index.ts
export * from "./classic/index.js"  // L2
export { z4 as default }  // L4
In the docs
(not documented)

The v4 entry point (`zod/v4`) re-exports the classic API and provides a default export named `z4`. The docs never mention the `zod/v4` subpath at all (they implicitly assume v4 is default). Developers upgrading from v3 who expect `zod/v4` to exist, or who rely on the default export, have no documentation to confirm its shape.

Suggested fix
Document that Zod 4 is available at the root `zod` entry point and at `zod/v4`, and note that `zod/v4` exposes a default export in addition to the namespace contents.
04

v3 compatibility subpath `zod/v3` undocumented on this page

packages/zod/src/v3/index.ts

low
In the code
// packages/zod/src/v3/index.ts
export * from "./external.js"  // L2
export { z }  // L3
export default z  // L4
In the docs
(not documented)

The package still ships a `zod/v3` entry point with its own `z` and default export, but the API page makes no mention of it. Developers migrating or maintaining mixed v3/v4 codebases have no reference on this page for how to import the legacy version.

Suggested fix
Add a migration note: `import * as z from "zod/v3"` (or `import z from "zod/v3"`) to use the legacy v3 API alongside the v4 root export.