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

Add SetRequired and SetOptional types #48

Merged
merged 20 commits into from
Sep 14, 2019
Merged

Add SetRequired and SetOptional types #48

merged 20 commits into from
Sep 14, 2019

Conversation

crhistianramirez
Copy link
Contributor

@crhistianramirez crhistianramirez commented Jul 11, 2019

Now that I'm looking at it maybe SomeRequired and SomeOptional would be better names? Couples the two, as it should and expresses intent pretty well.

Edit: changed to SetRequired and SetOptional per feedback from sindresorhus

@sindresorhus
Copy link
Owner

sindresorhus commented Aug 15, 2019

maybe SomeRequired and SomeOptional would be better names?

👍 Some other name ideas: SetRequired, MakeRequired, RequiredKeys. One problem with SomeRequired is that it might give the impression to the user that it also makes unspecified keys not required (optional).

It's really too bad that the built-in Required type is not named RequiredAll or AllRequired...

@sindresorhus
Copy link
Owner

sindresorhus commented Aug 15, 2019

You need to add the types to the readme.

https://github.com/sindresorhus/type-fest/blob/master/.github/contributing.md

source/optionalize.d.ts Outdated Show resolved Hide resolved
source/optionalize.d.ts Outdated Show resolved Hide resolved
source/optionalize.d.ts Outdated Show resolved Hide resolved
source/optionalize.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
source/optionalize.d.ts Outdated Show resolved Hide resolved
@crhistianramirez crhistianramirez changed the title Add Require and Optionalize types Add SetRequired and SetOptional types Aug 24, 2019
@crhistianramirez
Copy link
Contributor Author

@sindresorhus thank you for the feedback I went ahead and resolved each line item. I'd appreciate additional feeedback you might have :)

Also did you prefer that I squash all the commits to clean it up? Wasn't sure, the readme didn't mention it.

@sindresorhus sindresorhus merged commit b29c31a into sindresorhus:master Sep 14, 2019
@sindresorhus
Copy link
Owner

Looks good now. Thanks :)

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