◑docsParity
colinhacks/zod★ 44,199TypeScript

vs https://zod.dev/api

The provided code API surface is extremely thin — it only exposes package entry-point re-exports (zod, zod/mini, zod/v4, etc.) and does not include the schemas, methods, or option signatures the docs describe. Because almost none of the documented APIs (z.coerce, z.stringFormat, z.toZod, z.xor, z.deepPartial, z.property, z.promise deprecation, etc.) appear in the extracted surface, I cannot verify most doc claims against code and will not speculate. The one verifiable issue is that the docs' primary import pattern and a deprecated API can't be cross-checked, leaving little grounded to report.

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

2 mismatches found

01

Docs instruct `import * as z from "zod"` but package exposes a named `z` export; behavior depends on this

packages/zod/src/index.ts

low
In the code
export * from "./v4/classic/external.js"  // L2

export { z }  // L7

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

The docs' canonical import uses namespace import syntax, which works against the re-exported surface, but the package's actual documented/exported ergonomics rely on the named and default `z` exports. The docs only show the namespace form and never mention the `z` named export or default export, so users following other pages that assume `import { z } from "zod"` or `import z from "zod"` get inconsistent guidance. This is a documentation-completeness issue rather than a hard break, but the docs page shown never reflects the actual primary export style.

Suggested fix
Add a short note in the Primitives/import section showing all three supported import forms: `import { z } from "zod"`, `import z from "zod"`, and `import * as z from "zod"`, since the package explicitly exports the named symbol `z` and `z` as default.
02

Deprecated `z.promise()` documented without a code-confirmed replacement path in the surface

packages/zod/src/v4/classic/external.ts

low
In the code
export * from "./v4/classic/external.js"  // L2
In the docs
**Deprecated** — `z.promise()` is deprecated. There are vanishingly few valid uses cases for a `Promise` schema. If you suspect a value might be a `Promise`, simply `await` it before parsing it with Zod.

The docs mark `z.promise()` deprecated, which aligns with the project's intent, but the extracted API surface does not expose the `@deprecated` annotation or the replacement guidance at the export level, so this finding cannot be confirmed from the provided code. Noting it because the docs' deprecation note is the only signal; if the code still surfaces `z.promise()` as a first-class documented API elsewhere, the deprecation warning may be the only migration path users see.

Suggested fix
Confirm in `packages/zod/src/v4/classic/schemas.ts` whether `promise` is annotated `@deprecated`; if so, keep the docs warning and add an explicit code migration example (`await` before parse).