diff --git a/jmespath/functions.py b/jmespath/functions.py index 627b569..670fb04 100644 --- a/jmespath/functions.py +++ b/jmespath/functions.py @@ -96,6 +96,12 @@ def _type_check(self, actual, signature, function_name): if allowed_types: self._type_check_single(actual[i], allowed_types, function_name) + if signature and signature[-1].get('variadic'): + allowed_types = signature[-1]['types'] + if allowed_types: + for i in range(len(signature), len(actual)): + self._type_check_single(actual[i], allowed_types, + function_name) def _type_check_single(self, current, types, function_name): # Type checking involves checking the top level type,