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: Various type extractions #159

Merged
merged 6 commits into from Oct 20, 2023

Conversation

tvillaren
Copy link
Collaborator

Why

Various expressions where not taken into account when extracting types, thus leading to missing schema in output generation.

The two latter ones were implemented in #152 and #155 which I close to merge all fixes in this PR.

Support of TypeScript Helpers

The following helpers were not handled well: ["Array", "Promise", "Omit", "Pick", "Record", "Partial", "Required"]
when used in expressions such as

export type Person = Partial<Villain>

Add support for ParenthesisTypeNodes

This was added in #152 (closed) following this comment: #148 (comment)

Type identifiers not extracted from type alias declaration

This was added in #155 (closed)

Extracting types from expression such as

export type Person = SuperHero

was not working

@codecov-commenter
Copy link

Codecov Report

Merging #159 (9ce1c42) into main (8d3b297) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
+ Coverage   97.33%   97.38%   +0.04%     
==========================================
  Files          14       14              
  Lines         676      688      +12     
  Branches      275      278       +3     
==========================================
+ Hits          658      670      +12     
  Misses         18       18              
Files Changed Coverage Δ
src/utils/traverseTypes.ts 100.00% <100.00%> (ø)

@fabien0102
Copy link
Owner

I'm very late to review this, but this looks amazing!!! Thanks for this amazing contribution

@fabien0102 fabien0102 changed the title [Fix] Various type extractions fix: Various type extractions Oct 20, 2023
@fabien0102 fabien0102 merged commit 18825d9 into fabien0102:main Oct 20, 2023
3 checks passed
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.

None yet

3 participants