1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 |
|
8 | function deprecatedPropType(validator, reason) {
|
9 | if (process.env.NODE_ENV === 'production') {
|
10 | return function () {
|
11 | return null;
|
12 | };
|
13 | }
|
14 |
|
15 | return function (props, propName, componentName, location, propFullName) {
|
16 | var componentNameSafe = componentName || '<<anonymous>>';
|
17 | var propFullNameSafe = propFullName || propName;
|
18 |
|
19 | if (typeof props[propName] !== 'undefined') {
|
20 | return new Error("The ".concat(location, " `").concat(propFullNameSafe, "` of ") + "`".concat(componentNameSafe, "` is deprecated. ").concat(reason));
|
21 | }
|
22 |
|
23 | return null;
|
24 | };
|
25 | }
|
26 |
|
27 | var _default = deprecatedPropType;
|
28 | exports.default = _default; |
\ | No newline at end of file |