Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Lack of Reflection in `prop-types`

node v9.11.2
version: 1.0.0
endpointsharetweet
I'm attempting to reflect on `prop-types` instances within React for developer tooling. The only problem is that prop-type instances are completely opaque functions. All of their metadata are hidden within their closures.
const propTypes = require( 'prop-types' ) // Can't reflec on the opaque function shim is returned const creaturesPropType = propTypes.oneOf([ 'penguin', 'axolotl' ])
Loading…

no comments

    sign in to comment