diff --git a/lib/exp_lists.js b/lib/exp_lists.js index 725ad537..d9a37b8a 100644 --- a/lib/exp_lists.js +++ b/lib/exp_lists.js @@ -26,7 +26,6 @@ const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal') *********************************************************************************/ function getListType (type, returnType, isMulti) { - if (!Object.values(exp.type).includes(type)) { throw new TypeError('invalid value for valueType parameter') } @@ -48,6 +47,9 @@ function getListType (type, returnType, isMulti) { expected = exp.type.LIST } break + case lists.returnType.EXISTS: + expected = exp.type.BOOL + break case lists.returnType.NONE: default: throw new TypeError('either set the return type as auto or match with return object data type') diff --git a/lib/exp_maps.js b/lib/exp_maps.js index 92a08f6b..34b7b66b 100644 --- a/lib/exp_maps.js +++ b/lib/exp_maps.js @@ -11,7 +11,6 @@ const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal') *********************************************************************************/ function getMapType (type, returnType, isMulti) { - if (!Object.values(exp.type).includes(type)) { throw new TypeError('invalid value for valueType parameter') } @@ -34,6 +33,9 @@ function getMapType (type, returnType, isMulti) { expected = exp.type.LIST } break + case maps.returnType.EXISTS: + expected = exp.type.BOOL + break case maps.returnType.KEY_VALUE: case maps.returnType.ORDERED_MAP: case maps.returnType.UNORDERED_MAP: