Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Validating if the arguments passed to oneOf is not a function #36

Closed
wants to merge 1 commit into from

Conversation

bytetwin
Copy link

Warn if mistakenly oneOf has been used instead of oneOfType.

Fixes issue 9 (Main reported issue - facebook/react#1919)

@bytetwin
Copy link
Author

@aweary Please review and let me know for any changes

@dcorb
Copy link

dcorb commented Oct 6, 2017

+1, we hit this one

Copy link
Contributor

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break if I wanted the prop to literally be a specific function.

@lednhatkhanh
Copy link

+1 for this

@ljharb
Copy link
Contributor

ljharb commented Feb 7, 2019

Since oneOf can take a function itself, this warning wouldn't be correct. Closing.

@ljharb ljharb closed this Feb 7, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants