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

Adds support for maybeSchemaValue config #482

Closed
wants to merge 9 commits into from

Conversation

Ustice
Copy link

@Ustice Ustice commented Sep 21, 2023

Adds support for maybeSchemaValue. This adds compatibility with changes to the inputMaybeValue configuration option.

resolves #308

Ustice and others added 9 commits September 21, 2023 13:13
@AaronMBMorse
Copy link

Is there anything holding back the merge? Would be great to have this in place.

@almereyda
Copy link

almereyda commented Nov 26, 2023

Your PR is acting different than I had expected from the documentation in #308 (comment)

What it does is, that it literally replaces the string nullish with whichever string is defined as maybeSchemaValue. The notation of the configuration example is also invalid YAML, and therefore a little inviting for misunderstandings.

Providing undefined will unfortunately not cast .optional(), but just .undefined().

Similarily writing nullish().undefined will cast .nullish().undefined().

I would like to set: mybeSchemaValue: null and have it remove everything behind the inferred Maybe type, removing the Maybe altogether. But that may be harsh.

Would it be possible to provide little examples with this new feature, and also to document it before merge?

@Code-Hex
Copy link
Owner

This PR is closed as it appears to be suspended. If you have any questions, I would appreciate it if you could submit the PR again!

@Code-Hex Code-Hex closed this Jun 15, 2024
@sbalay
Copy link

sbalay commented Oct 14, 2024

@Code-Hex would you be open to re reviewing this work and merging the new feature if I pick it up?

The work done here seems to be in a mergeable state, do you have any feedback?

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.

Allow configuration of zod optional/null type
5 participants