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(types): mark module options fields as optional #420

Merged
merged 1 commit into from Jan 7, 2021
Merged

fix(types): mark module options fields as optional #420

merged 1 commit into from Jan 7, 2021

Conversation

jakubmeysner
Copy link
Contributor

Currently trying to configure only some options for modules results in type errors when using TypeScript. This PR aims to resolve that issue by marking them as optional in the declaration files.

@codecov
Copy link

codecov bot commented Dec 29, 2020

Codecov Report

Merging #420 (1a4fcad) into master (8a45184) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #420   +/-   ##
=======================================
  Coverage   85.28%   85.28%           
=======================================
  Files           9        9           
  Lines         367      367           
  Branches      122      122           
=======================================
  Hits          313      313           
  Misses         54       54           

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 8a45184...a43399c. Read the comment docs.

@jakubmeysner jakubmeysner changed the title chore: mark module options fields as optional fix(types): mark module options fields as optional Jan 2, 2021
@jakubmeysner
Copy link
Contributor Author

@pi0

@pi0
Copy link
Member

pi0 commented Jan 7, 2021

Hi @jakubmeysner thanks for PR and sorry for delay.

Would you mind using Partial<> here and here instead? These types are internally used as well and after applying defaults they are not optional.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks <3

@pi0 pi0 merged commit 7d75c28 into nuxt-community:master Jan 7, 2021
@jakubmeysner jakubmeysner deleted the mark-module-options-fields-as-optional branch January 7, 2021 14:25
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

2 participants