@@ -132,6 +132,7 @@ class NewError extends Error {
132132* @param {string|PlainObject } preferredOutput
133133* @param {"value"|"property" } type
134134* @param {ReturnObject } fullRetObj
135+ * @returns {void }
135136*/
136137
137138/**
@@ -140,16 +141,35 @@ class NewError extends Error {
140141* @param {string } path
141142* @param {PlainObject|GenericArray } parent
142143* @param {string } parentPropName
144+ * @returns {boolean }
143145*/
144146
145147/**
146- * @param {PlainObject } [opts] If present, must be an object
147- * @param {string } expr JSON path to evaluate
148- * @param {JSON } obj JSON object to evaluate against
149- * @param {JSONPathCallback } callback Passed 3 arguments: 1) desired payload
148+ * @typedef {PlainObject } JSONPathOptions
149+ * @property {JSON } json
150+ * @property {string|string[] } path
151+ * @property {"value"|"path"|"pointer"|"parent"|"parentProperty"|"all" }
152+ * [resultType="value"]
153+ * @property {boolean } [flatten=false]
154+ * @property {boolean } [wrap=true]
155+ * @property {PlainObject } [sandbox={}]
156+ * @property {boolean } [preventEval=false]
157+ * @property {PlainObject|GenericArray|null } [parent=null]
158+ * @property {string|null } [parentProperty=null]
159+ * @property {JSONPathCallback } [callback]
160+ * @property {OtherTypeCallback } [otherTypeCallback] Defaults to
161+ * function which throws on encountering `@other`
162+ * @property {boolean } [autostart=true]
163+ */
164+
165+ /**
166+ * @param {string|JSONPathOptions } opts If a string, will be treated as `expr`
167+ * @param {string } [expr] JSON path to evaluate
168+ * @param {JSON } [obj] JSON object to evaluate against
169+ * @param {JSONPathCallback } [callback] Passed 3 arguments: 1) desired payload
150170 * per `resultType`, 2) `"value"|"property"`, 3) Full returned object with
151171 * all payloads
152- * @param {OtherTypeCallback } otherTypeCallback If `@other()` is at the end
172+ * @param {OtherTypeCallback } [ otherTypeCallback] If `@other()` is at the end
153173 * of one's query, this will be invoked with the value of the item, its
154174 * path, its parent, and its parent's property name, and it should return
155175 * a boolean indicating whether the supplied value belongs to the "other"
0 commit comments