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 native Typescript enums #38

Closed
wants to merge 3 commits into from

Conversation

anglinb
Copy link
Contributor

@anglinb anglinb commented Jul 28, 2021

Why

Fixes #35 by adding support for native typescript enums

@codecov-commenter
Copy link

Codecov Report

Merging #38 (cec7bf2) into main (e5e4961) will decrease coverage by 0.41%.
The diff coverage is 97.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
- Coverage   98.49%   98.07%   -0.42%     
==========================================
  Files           8        9       +1     
  Lines         332      364      +32     
  Branches      102      110       +8     
==========================================
+ Hits          327      357      +30     
- Misses          5        6       +1     
- Partials        0        1       +1     
Impacted Files Coverage Δ
src/utils/resolveDefaultProperties.ts 95.23% <95.23%> (ø)
src/core/generate.ts 100.00% <100.00%> (ø)
src/core/generateZodSchema.ts 97.33% <100.00%> (+0.13%) ⬆️
src/core/jsDocTags.ts 98.46% <100.00%> (-1.54%) ⬇️
src/core/validateGeneratedTypes.ts 97.43% <100.00%> (+0.06%) ⬆️

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 d6ae0a1...cec7bf2. 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.

Let's just remove this commented line and we are good to go, thanks for this addition!

src/core/generateZodSchema.ts Show resolved Hide resolved
@fabien0102
Copy link
Owner

Let's also add a little test into generateZodSchema.test.ts

anglinb added a commit to anglinb/ts-to-zod that referenced this pull request Jul 29, 2021
anglinb added a commit to anglinb/ts-to-zod that referenced this pull request Jul 29, 2021
@anglinb
Copy link
Contributor Author

anglinb commented Jul 29, 2021

Closing in favor of #40. Handled the feedback on the other pr.

@anglinb anglinb closed this Jul 29, 2021
@anglinb
Copy link
Contributor Author

anglinb commented Jul 29, 2021

Let's also add a little test into generateZodSchema.test.ts

7de3372

fabien0102 pushed a commit that referenced this pull request Jul 29, 2021
* Checks in test documenting behavior

* Implements enum import & declartion

* Updates example to include enum

* Updates tests to document expected case

* Add handler for enum literals

* Updates example

* Addresses #38 (comment)

* Addresses #38 (comment)

* Addresses #40 (comment)
fabien0102 pushed a commit that referenced this pull request Jul 29, 2021
…40)

* Checks in test documenting behavior

* Implements enum import & declartion

* Updates example to include enum

* Updates tests to document expected case

* Add handler for enum literals

* Updates example

* Addresses #38 (comment)

* Addresses #38 (comment)

* Addresses #40 (comment)
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.

Circular dependency error for enum types
3 participants