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

Support oneOf #4

Open
ostrowr opened this issue Oct 31, 2019 · 2 comments
Open

Support oneOf #4

ostrowr opened this issue Oct 31, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@ostrowr
Copy link
Owner

ostrowr commented Oct 31, 2019

This supports anyOf/allOf fine, but supporting oneOf with strict type definitions will be tricky.

@EdwardDrapkin
Copy link

EdwardDrapkin commented Nov 7, 2019

I haven't had time to dive into how you've implemented this library, so I haven't quite gotten to the point where I can open a PR, but I did figure out how to match exactly one of two given types in TS. Here's the Playground Link, it's a fat abuse of conditional types, but it demonstrably works... however, I don't know if the way it works is compatible with how you've implemented this library. That's a problem for another night.

@ostrowr
Copy link
Owner Author

ostrowr commented Nov 8, 2019

Nice! I'll take a look this weekend and will hopefully get something like this in.

@ostrowr ostrowr added the enhancement New feature or request label Dec 13, 2019
@github-staff github-staff deleted a comment May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants