Skip to content

Commit bb8955f

Browse files
Tyler Breisacherflovilmart
Tyler Breisacher
authored andcommitted
Fix documentation and type annotations for include and select (#601)
These both can accept either a string, or an array of strings
1 parent b9b4564 commit bb8955f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ParseQuery.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,10 +1313,10 @@ class ParseQuery {
13131313
/**
13141314
* Includes nested Parse.Objects for the provided key. You can use dot
13151315
* notation to specify which fields in the included object are also fetched.
1316-
* @param {String} key The name of the key to include.
1316+
* @param {...String|Array<String>} key The name(s) of the key(s) to include.
13171317
* @return {Parse.Query} Returns the query, so you can chain this call.
13181318
*/
1319-
include(...keys: Array<string>): ParseQuery {
1319+
include(...keys: Array<string|Array<string>>): ParseQuery {
13201320
keys.forEach((key) => {
13211321
if (Array.isArray(key)) {
13221322
this._include = this._include.concat(key);
@@ -1331,10 +1331,10 @@ class ParseQuery {
13311331
* Restricts the fields of the returned Parse.Objects to include only the
13321332
* provided keys. If this is called multiple times, then all of the keys
13331333
* specified in each of the calls will be included.
1334-
* @param {Array} keys The names of the keys to include.
1334+
* @param {...String|Array<String>} keys The name(s) of the key(s) to include.
13351335
* @return {Parse.Query} Returns the query, so you can chain this call.
13361336
*/
1337-
select(...keys: Array<string>): ParseQuery {
1337+
select(...keys: Array<string|Array<string>>): ParseQuery {
13381338
if (!this._select) {
13391339
this._select = [];
13401340
}

0 commit comments

Comments
 (0)