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

Use anyOf for TS Unions #673

Merged
merged 1 commit into from Apr 29, 2020
Merged

Use anyOf for TS Unions #673

merged 1 commit into from Apr 29, 2020

Conversation

WoH
Copy link
Collaborator

@WoH WoH commented Apr 29, 2020

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Closing issues

Closes #671

If this is a new feature submission:

  • Has the issue had a maintainer respond to the issue and clarify that the feature is something that aligns with the goals and philosophy of the project?

Potential Problems With The Approach
If anyone was relying on this, admittedly suboptimal behavior, their code may break.

Buy Why
Our validation already does what anyOf should do. Also, it's a better reflection of TS Union checking as of right now.

@WoH WoH added this to In progress in V3 (operation type aliases) via automation Apr 29, 2020
@WoH WoH added this to the 3.0 milestone Apr 29, 2020
@WoH WoH merged commit 8527eda into lukeautry:master Apr 29, 2020
V3 (operation type aliases) automation moved this from In progress to Beta Apr 29, 2020
@WoH WoH added the ba label Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

typescript union should be implemented as anyOf
1 participant