Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(pipes): improve zod examples #2924

Merged
merged 1 commit into from
Dec 18, 2023
Merged

Conversation

LucasHang
Copy link
Contributor

  • For TS, use ZodSchema interface instead of ZodObject as value type (this way satisfying all zod schemas constructions. For example, when using refine() the schema type become ZodEffects instead of ZodObject)
  • For Both, returns the parsed value of the schema, this way applying the zod strip(), equivalent to class-transform whitelist.
  • For JS, fixes Pipe name (there was a missing "e" at the end of the name) and removes unused ZodObject import

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Docs
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

use ZodSchema interface instead of ZodObject
@kamilmysliwiec kamilmysliwiec merged commit 836cd84 into nestjs:master Dec 18, 2023
4 checks passed
@kamilmysliwiec
Copy link
Member

lgtm

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.

3 participants