Open code-masala opened 2 years ago
import * as PropTypes from "prop-types"; const {checkPropTypes, number} = PropTypes; const propTypes = { threshold: number, }; checkPropTypes(propTypes, $$props, "prop", "Observer");
This is giving error checkPropTypes is not a function
checkPropTypes is not a function
import * as is almost never what you want; this is a CJS package so I’d suggest instead import PropTypes from ‘prop-types’, and then PropTypes.checkPropTypes.
import * as
import PropTypes from ‘prop-types’
PropTypes.checkPropTypes
This is giving error
checkPropTypes is not a function