return a function that validates it's argument has all the properties in the interfacePropArrays
778056
function makeInterfaceValidator(interfacePropArrays) {
	var props = flatten(interfacePropArrays);

	return function(base) {
			var missingProps = props.reduce(function(missing, prop) {
				return prop in base ? missing : missing.concat(prop);
			}, []);

		return missingProps.length ? {message:"missing expected properties", related: missingProps} : undefined;
	};
}
959781
function checkArrayTypes() {
  var t, i;
  for (i = 0; i < arguments.length; i++) {
     if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]')
       throw new TypeError('unexpected type ' + t + ', use Uint8Array');
  }
}
898403
function isValid (options) {
  const types = options ? options.types : undefined
  return Array.isArray(types)
}
645640
function areArgumentsValid(args) {

  var isValid = args.every(function(arg) {
    if (Array.isArray(arg)) {
      return areArgumentsValid(arg);
    }
    return (arg !== null && typeof arg === 'object');
  });

  return isValid;

}
931440
def validate(self):
        

        validate_properties(self._data_map, self._metadata_props)

        for prop in self._data_map:
            validate_any(prop, getattr(self, prop), self._data_structures.get(prop))

        return self
778125
function (args, allowedProperties) {
  var props = [];
  for (var property in args) {
    if (args.hasOwnProperty(property)) {
      if (!contains(allowedProperties, property)) {
        props.push(property);
      }
    }
  }
  return props;
}
1368726
def validate_all_types(kwargs):
        
        for key in kwargs:
            assert isinstance(kwargs[key], type), """\n
    Typedtuple needs its arguments to be types. Argument "{k:}" was {type_name:}({val_repr}).
    You might want to try:
        {k:} = {type_name:}\n\n""".format(k=key, type_name=type(kwargs[key]).__name__, val_repr=kwargs[key].__repr__())
852394
function invalidArgumentsLength(
    typeInfo,           // :: TypeInfo
    index,              // :: Integer
    numArgsExpected,    // :: Integer
    args                // :: Array Any
  ) {
    return new TypeError (trimTrailingSpaces (
      q (typeInfo.name) +
      ' applied ' + q (show (typeInfo.types[index])) +
      ' to the wrong number of arguments\n\n' +
      underline (
        typeInfo,
        K (K (_)),
        function(index_) {
          return function(f) {
            return function(t) {
              return function(propPath) {
                return function(s) {
                  return index_ === index ?
                    t.format (_, function(k) { return k === '$1' ? f : _; }) :
                    _ (s);
                };
              };
            };
          };
        }
      ) + '\n' +
      'Expected ' + numArgs (numArgsExpected) +
      ' but received ' + numArgs (args.length) +
      toMarkdownList ('.\n', ':\n\n', show, args)
    ));
  }
205069
def validate_args(f):
    

    def wrapper(self, args):
        arg_types = set([type(arg) for arg in args])
        if len(arg_types) > 1:
            raise TypeError("Mixed input types are not allowed")

        elif list(arg_types)[0] not in (dict, str):
            raise TypeError("Only dict and str types accepted")

        return f(self, args)

    return wrapper
655235
function validateArgs(func, intervalLength, options) {

    // Validate "func"
    if (typeof func !== 'function') {
        throw new TypeError('Argument 1, "func", must be a function.')
    }

    // Validate "intervalLength"
    if (typeof intervalLength === 'number') {
        if (!Number.isInteger(intervalLength) || intervalLength < 0) {
            throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.')
        }
    } else if (typeof intervalLength !== 'function') {
        throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.')
    }

    // Validate options...
    if (typeof options !== 'object') {
        throw new TypeError('Argument 3, "options", must be an object.')
    }

    // Validate passed keys
    const allowedKeys = ['iterations', 'stopOnError']

    Object.keys(options).forEach(key => {
        if (!allowedKeys.includes(key)) {
            throw new TypeError('Option "' + key + '" is not a valid option.')
        }
    })
    
    // validate "iterations" option (if passed)
    if (options.hasOwnProperty('iterations')) {
        if (options.iterations !== Infinity && (!Number.isInteger(options.iterations) || options.iterations < 1)) {
            throw new TypeError('Option "iterations" must be Infinity or an integer greater than 0.')
        }
    }
    
    // validate "stopOnError" option (if passed)
    if (options.hasOwnProperty('stopOnError')) {
        if (typeof options.stopOnError !== 'boolean') {
            throw new TypeError('Option "stopOnError" must be a boolean.')
        }
    }
}
1354519
function checkArrayTypes() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    var t, i;
    for (i = 0; i < arguments.length; i++) {
        if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]')
            throw new TypeError('unexpected type ' + t + ', use Uint8Array');
    }
}
587367
def validate (properties):
    
    if isinstance(properties, Property):
        properties = [properties]
    assert is_iterable_typed(properties, Property)
    for p in properties:
        __validate1(p)
989268
function (val) {
      var valid = [
        'string',  'number', 'integer',
        'boolean', 'object', 'array',
        'null',    'any'
      ];

      valid = (Array.isArray(val) ? val : [val]).every(function (val) {
        return valid.indexOf(val) !== -1;
      });
      if (!valid) {
        throw new(TypeError)("invalid type.");
      }

      this.property.type = val;
      return this;
    }
830642
def validate_get_arguments(kwargs):
    # type: (Dict[Text, Any]) -> None
    
    for arg in ("AttributesToGet", "ProjectionExpression"):
        if arg in kwargs:
            raise InvalidArgumentError('"{}" is not supported for this operation'.format(arg))

    if kwargs.get("Select", None) in ("SPECIFIC_ATTRIBUTES", "ALL_PROJECTED_ATTRIBUTES"):
        raise InvalidArgumentError('Scan "Select" value of "{}" is not supported'.format(kwargs["Select"]))
259962
function handleInterfaces(interfs, target) {
        var interfaces = toArray(interfs),
            interf,
            x = interfaces.length,
            k,
            opts = { isConst: true };

        // Verify argument type
        if (!x && !isArray(interfs)) {
            throw new Error('$implements of class "' + target.prototype.$name + '" must be an interface or an array of interfaces.');
        }
        // Verify duplicate interfaces
        if (x !== unique(interfaces).length && compact(interfaces).length === x) {
            throw new Error('There are duplicate entries in $implements of class "' + target.prototype.$name + '".');
        }

        for (x -= 1; x >= 0; x -= 1) {
            interf = interfaces[x];

            // Verify if it's a valid interface
            if (!isFunction(interf) || !interf[$interface]) {
                throw new Error('Entry at index ' + x + ' in $implements of class "' + target.prototype.$name + '" is not a valid interface.');
            }

            // Inherit constants and add interface to the interfaces array
            if (!contains(target[$class].interfaces, interf)) {
                // Inherit constants
                for (k in interf[$interface].constants) {
                    addProperty(k, interf[k], target, opts);
                }

                // Add to interfaces array
                target[$class].interfaces.push(interf);
            }

            if (!target[$abstract]) {
                interfaces[x][$interface].check(target);
            }
        }
    }
225111
def validate_arguments_type_of_function(param_type=None):
    

    def inner(function):

        def wrapper(self, *args, **kwargs):
            type_ = param_type or type(self)
            for arg in args + tuple(kwargs.values()):
                if not isinstance(arg, type_):
                    raise TypeError(
                        (
                            'Invalid Type: {}.{}() accepts only the '
                            'arguments of type "<{}>"'
                        ).format(
                            type(self).__name__,
                            function.__name__,
                            type_.__name__,
                        )
                    )

            return function(self, *args, **kwargs)

        return wrapper

    return inner
597460
def property(func):
    
    attr = abc.abstractmethod(func)
    attr.__iproperty__ = True
    attr = Property(attr)
    return attr