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

fix: union properties can be optional & nullable #66

Merged

Conversation

tvillaren
Copy link
Collaborator

Why

This PR fixes #65
Feel free to refuse, my knowledge of the source code is very limited and I might not have all the perspective needed for this edit!

@tvillaren tvillaren force-pushed the fix-nullable-optional-properties branch from 898e871 to 5ab06eb Compare December 8, 2021 17:25
@fabien0102 fabien0102 self-requested a review December 10, 2021 09:10
@codecov-commenter
Copy link

Codecov Report

Merging #66 (ea35e24) into main (e5e4961) will decrease coverage by 1.23%.
The diff coverage is 95.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
- Coverage   98.49%   97.25%   -1.24%     
==========================================
  Files           8       11       +3     
  Lines         332      474     +142     
  Branches      102      157      +55     
==========================================
+ Hits          327      461     +134     
- Misses          5       10       +5     
- Partials        0        3       +3     
Impacted Files Coverage Δ
src/core/generateZodSchema.ts 95.54% <91.93%> (-1.66%) ⬇️
src/utils/resolveDefaultProperties.ts 95.23% <95.23%> (ø)
src/utils/resolveModules.ts 97.87% <97.87%> (ø)
src/core/generate.ts 100.00% <100.00%> (ø)
src/core/jsDocTags.ts 98.50% <100.00%> (-1.50%) ⬇️
src/core/validateGeneratedTypes.ts 97.50% <100.00%> (+0.13%) ⬆️
src/utils/isNotNull.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e48c5fe...ea35e24. Read the comment docs.

Copy link
Owner

@fabien0102 fabien0102 left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for this fix! 💯

@fabien0102 fabien0102 merged commit 2ba1838 into fabien0102:main Dec 10, 2021
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.

Optional & nullable not output together on optional union type property with null value
3 participants