facebook / prop-types

Runtime type checking for React props and similar objects
MIT License
4.48k stars 356 forks source link

Add expected types to oneOfType warning #198

Closed joshalling closed 5 years ago

joshalling commented 6 years ago

Adds data object to returned error in type checker so that the expected types can be accessed from within oneOfType check. Also, updates the tests slightly.

Fixes #9. Fixes https://github.com/facebook/react/issues/1919.

oliviertassinari commented 5 years ago

❤️