import _extends from "@babel/runtime/helpers/esm/extends";
const specialProperty = "exact-prop: ​";
function exactProp(propTypes) {
  if (process.env.NODE_ENV === "production") {
    return propTypes;
  }
  return _extends({}, propTypes, {
    [specialProperty]: (props) => {
      const unsupportedProps = Object.keys(props).filter((prop) => !propTypes.hasOwnProperty(prop));
      if (unsupportedProps.length > 0) {
        return new Error(`The following props are not supported: ${unsupportedProps.map((prop) => `\`${prop}\``).join(", ")}. Please remove them.`);
      }
      return null;
    }
  });
}
export {
  exactProp as default
};
