diff --git a/index.js b/index.js index 05d42f3..98b6597 100644 --- a/index.js +++ b/index.js @@ -109,14 +109,19 @@ function check_filters (filters, e, or = false) { * @type {object} * @property {string|string[]} field - fields to apply filter on * @property {RegExp} filter - filter - * @property {Filter[]} or - create an OR group of filters + */ + +/** + * @typedef FilterOrGroup + * @type {object} + * @property {(Filter|FilterOrGroup)[]} or - create an OR group of filters */ /** * filter nested objects * * @param {Array} input - * @param {Filter[]} filters + * @param {(Filter|FilterOrGroup)[]} filters * @returns {Array} filtered data */ function recursive_filter (input, filters, children_key = 'children') {