worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
26
node_modules/@mui/utils/exactProp/exactProp.js
generated
vendored
Normal file
26
node_modules/@mui/utils/exactProp/exactProp.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exactProp;
|
||||
// This module is based on https://github.com/airbnb/prop-types-exact repository.
|
||||
// However, in order to reduce the number of dependencies and to remove some extra safe checks
|
||||
// the module was forked.
|
||||
|
||||
const specialProperty = 'exact-prop: \u200b';
|
||||
function exactProp(propTypes) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
return propTypes;
|
||||
}
|
||||
return {
|
||||
...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;
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue