Skip to content

docs: lead the properties section with the check and add a Zod Mini tab - #6598

Merged
colinhacks merged 1 commit into
mainfrom
docs-instanceof-properties
Sep 13, 2026
Merged

docs: lead the properties section with the check and add a Zod Mini tab#6598
colinhacks merged 1 commit into
mainfrom
docs-instanceof-properties

Conversation

@colinhacks

Copy link
Copy Markdown
Owner

Since #6594 z.properties() is a check, but the API reference still led with z.instanceof().properties(), which Zod Mini doesn't have. The section now opens with the spread form both builds share, in a Zod / Zod Mini tab pair, and the method follows as the Zod-only sugar that narrows the inferred type.

Kept the method rather than dropping it, since the narrowing is the only thing it buys — .check() returns this in both builds, so the spread form infers plain Response. Also moved the no-clone fact up into the Instanceof intro and stated it directly: parsing returns the exact object that was passed in, which covers every instance schema rather than just the properties check.

Refs #6594

z.properties() is a check again since #6594, so the section now opens with
the spread form both Zod and Zod Mini have, in a tab pair. The z.instanceof()
method follows as the Zod-only sugar that narrows the inferred type.

Also states that z.instanceof() returns the exact object passed in. The
no-clone fact moves up to the Instanceof intro, where it covers every
instance schema rather than just the properties check.
Copilot AI lite review requested due to automatic review settings September 13, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes This review covers the API-reference update for z.instanceof() properties after z.properties() returned to its check role.

  • Shared properties example Documents the iterable z.properties() check with equivalent Zod and Zod Mini examples, while retaining classic .properties() as narrowing sugar.
  • Instance identity Moves the in-place, identity-preserving parsing behavior to the z.instanceof() introduction and illustrates it directly.

Pullfrog  | View workflow run | Using GPT Terra𝕏

@colinhacks
colinhacks merged commit de65a5c into main Sep 13, 2026
9 checks passed
@colinhacks
colinhacks deleted the docs-instanceof-properties branch September 13, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants