-
Notifications
You must be signed in to change notification settings - Fork 29
add requiredFirst option #13
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
Conversation
Thank you for the PR! Unfortunately there seem to be no tests for the |
Hey, so I have made the tests but I also found an issue I am not 100% on in the current code:
If you add bam to the bottom of this type you will get the error |
@nhannah Thanks for updating tests! I'll investigate fixer failure later, seems like an edge case. The PR looks good to me, I'll merge and publish it shortly. I've been working on a complete Typescript rewrite in the meantime which is almost finished, so I'll have to incorporate your changes smh 😄 |
This is a solution for allowing preference to be given to non-optionals. This option will basically split the type in 2 for sorting with non-optionals first in the list. Required types first is a standard quite often it seems so with sorting it allows for the best of both worlds.