code: function createChainableTypeChecker(validate) {
          function checkType(isRequired, props, propName, componentName, location, propFullName) {
              for (var _len = arguments.length, rest = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
                  rest[_key - 6] = arguments[_key];
              }
  
              return mobx.untracked(function () {
                  componentName = componentName || '<<anonymous>>';
                  propFullName = propFullName || propName;
                  if (props[propName] == null) {
                      if (isRequired) {
                          var actual = props[propName] === null ? 'null' : 'undefined';
                          return new Error('The ' + location + ' `' + propFullName + '` is marked as required ' + 'in `' + componentName + '`, but its value is `' + actual + '`.');
                      }
                      return null;
                  } else {
                      return validate.apply(undefined, [props, propName, componentName, location, propFullName].concat(rest));
                  }
              });
          }
  
          var chainedCheckType = checkType.bind(null, false);
          chainedCheckType.isRequired = checkType.bind(null, true);
          return chainedCheckType;
      }
docs: Copied from React.PropTypes