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

Added defaultOptions and hardcoded two-level defaults nesting #59

Merged
merged 4 commits into from
Jul 15, 2021
Merged

Added defaultOptions and hardcoded two-level defaults nesting #59

merged 4 commits into from
Jul 15, 2021

Conversation

JoshuaKGoldberg
Copy link
Collaborator

Builds onto #57 with the long-lived temporary solution @gr2m referenced in that PR thread of having a known finite level of nesting.

I did away with fancy conditional types to make sure the type system doesn't get bogged down computing them all for plugins with a few options. I can add them back if you have test cases that require more than just version being required?

The big return type of the static defaults in theory could be automated a little bit with a recursive type. However, we wouldn't be able to go infinitely deep, and again the code to get that to work would be a good bit longer and less readable than how it is now. 🤷

index.js Outdated Show resolved Hide resolved
@gr2m gr2m self-assigned this Jul 15, 2021
@gr2m gr2m merged commit 8a27ce5 into gr2m:defaults-options-inheritance Jul 15, 2021
@gr2m
Copy link
Owner

gr2m commented Jul 15, 2021

wait what just happened?!

@gr2m
Copy link
Owner

gr2m commented Jul 15, 2021

ah I accidentally pushed to my local defaults-options-inheritance branch when I thought I was pushing to yours :( sorry!

can we continue discussion at #57?

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.

2 participants