code: function record(name, components, { ignoreExtraProps } = {}) {
    if (name != null && typeof name === 'object') {
      ({ ignoreExtraProps } = Object(components));
      components = name;
      name = `SomeRecord`;
    }
  
    const componentKeys = keysOf(components);
  
    /* istanbul ignore else */
    if (__DEV__) {
      assert(typeof name === 'string', `record()'s name must be a string`);
      assert(
        components != null && typeof components === 'object',
        `record()'s components must be an object`
      );
      for (const key of componentKeys) {
        assert(
          components[key][TYPICAL_TYPE],
          `record()'s component value must be a type`
        );
      }
    }
  
    const api = this;
  
    function Record(value, context) {
      if (Context.isRequired(context)) {
        return Context.with(value, Record, context, api);
      } else if (value == null || typeof value !== 'object') {
        return context.valueIsNotOfType(value, Record);
      }
  
      const result = forEachTypedProperty(
        value,
        componentKeys,
        k => components[k],
        context.validateAndCopy ? create(Record.prototype) : void 0,
        context
      );
  
      if (ignoreExtraProps === void 0) {
        ignoreExtraProps =
          context.ignoreExtraProps !== void 0 ? context.ignoreExtraProps : false;
      }
  
      if (!ignoreExtraProps) {
        const extras = keysOf(value).filter(k => !components[k]);
        if (extras.length) {
          if (!context.isErrorWrapper(result)) {
            return context.valueHasExtraProperties(value, extras);
          } else {
            return context.mergeWrappers(
              result,
              context.valueHasExtraProperties(value, extras)
            );
          }
        }
      }
  
      return result;
    }
  
    return decorate(Record, name, record, { ...components });
  }
docs: /* --------------------------------------------------------------------------------