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

feat!: Support generating lazy runtypes #107

Merged
merged 5 commits into from
Jun 2, 2021
Merged

feat!: Support generating lazy runtypes #107

merged 5 commits into from
Jun 2, 2021

Conversation

runeh
Copy link
Collaborator

@runeh runeh commented Jun 1, 2021

Changes the behaviour of the generator so that it will emit runtypes using the Lazy pattern. This allows for generating runtypes that refer to each other. See runtypes/runtypes#14 (comment)

@runeh runeh requested a review from simenandre June 1, 2021 07:41
@codecov-commenter
Copy link

codecov-commenter commented Jun 1, 2021

Codecov Report

Merging #107 (f6d6150) into main (1dba38f) will increase coverage by 17.08%.
The diff coverage is 97.08%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #107       +/-   ##
===========================================
+ Coverage   80.00%   97.08%   +17.08%     
===========================================
  Files           2        2               
  Lines          35      240      +205     
  Branches        7       61       +54     
===========================================
+ Hits           28      233      +205     
  Misses          7        7               
Impacted Files Coverage Δ
src/util.ts 94.17% <94.17%> (ø)
src/main.ts 99.27% <99.27%> (+21.85%) ⬆️

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 85267f0...f6d6150. Read the comment docs.

options: GenerateOptions,
w: CodeWriter,
node: RootType,
) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just remembered that this function isn't taking the export options into account for the types. Will fix that

Copy link
Owner

@simenandre simenandre 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! Thank you 🙏

@runeh runeh merged commit a63d32c into main Jun 2, 2021
@runeh runeh deleted the emit-lazy-types branch June 2, 2021 14:48
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