Skip to content

Commit 5805783

Browse files
authored
refactor: Fix JSDoc warnings (#1711)
1 parent f8c26d3 commit 5805783

File tree

5 files changed

+14
-23
lines changed

5 files changed

+14
-23
lines changed

src/CloudCode.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@
245245
* @name Parse.Cloud.job
246246
* @param {string} name The name of the Background Job
247247
* @param {Function} func The Background Job to register. This function should take two parameters a {@link Parse.Cloud.JobRequest} and a {@link Parse.Cloud.JobStatus}
248-
*
249248
*/
250249

251250
/**

src/LiveQueryClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class LiveQueryClient extends EventEmitter {
182182
*
183183
* @param {object} query - the ParseQuery you want to subscribe to
184184
* @param {string} sessionToken (optional)
185-
* @returns {LiveQuerySubscription} subscription
185+
* @returns {LiveQuerySubscription | undefined}
186186
*/
187187
subscribe(query: Object, sessionToken: ?string): LiveQuerySubscription {
188188
if (!query) {

src/ParseFile.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class ParseFile {
184184
* after you get the file from a Parse.Object.
185185
*
186186
* @param {object} options An object to specify url options
187-
* @returns {string}
187+
* @returns {string | undefined}
188188
*/
189189
url(options?: { forceSecure?: boolean }): ?string {
190190
options = options || {};
@@ -220,7 +220,7 @@ class ParseFile {
220220
* Saves the file to the Parse cloud.
221221
*
222222
* @param {object} options
223-
* * Valid options are:<ul>
223+
* Valid options are:<ul>
224224
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
225225
* be used for this request.
226226
* <li>sessionToken: A valid session token, used for making a request on
@@ -237,9 +237,9 @@ class ParseFile {
237237
* });
238238
* </pre>
239239
* </ul>
240-
* @returns {Promise} Promise that is resolved when the save finishes.
240+
* @returns {Promise | undefined} Promise that is resolved when the save finishes.
241241
*/
242-
save(options?: FullOptions) {
242+
save(options?: FullOptions): ?Promise {
243243
options = options || {};
244244
options.requestTask = task => (this._requestTask = task);
245245
options.metadata = this._metadata;
@@ -306,7 +306,7 @@ class ParseFile {
306306
* In Cloud Code and Node only with Master Key.
307307
*
308308
* @param {object} options
309-
* * Valid options are:<ul>
309+
* Valid options are:<ul>
310310
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
311311
* be used for this request.
312312
* <pre>

src/ParseObject.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class ParseObject {
148148
_objCount: number;
149149
className: string;
150150

151-
/** Prototype getters / setters **/
151+
/* Prototype getters / setters */
152152

153153
get attributes(): AttributeMap {
154154
const stateController = CoreManager.getObjectStateController();
@@ -175,7 +175,7 @@ class ParseObject {
175175
return this._getServerData().updatedAt;
176176
}
177177

178-
/** Private methods **/
178+
/* Private methods */
179179

180180
/**
181181
* Returns a local or server Id used uniquely identify this object
@@ -446,7 +446,7 @@ class ParseObject {
446446
return classMap;
447447
}
448448

449-
/** Public methods **/
449+
/* Public methods */
450450

451451
initialize() {
452452
// NOOP
@@ -910,7 +910,7 @@ class ParseObject {
910910
* object.op("x") would return an instance of Parse.Op.Increment.
911911
*
912912
* @param attr {String} The key.
913-
* @returns {Parse.Op} The operation, or undefined if none.
913+
* @returns {Parse.Op | undefined} The operation, or undefined if none.
914914
*/
915915
op(attr: string): ?Op {
916916
const pending = this._getPendingOps();
@@ -1518,7 +1518,7 @@ class ParseObject {
15181518
return this;
15191519
}
15201520

1521-
/** Static methods **/
1521+
/* Static methods */
15221522

15231523
static _clearAllState() {
15241524
const stateController = CoreManager.getObjectStateController();

src/ParseQuery.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,6 @@ class ParseQuery {
596596
* <li>context: A dictionary that is accessible in Cloud Code `beforeFind` trigger.
597597
* <li>json: Return raw json without converting to Parse.Object
598598
* </ul>
599-
*
600599
* @returns {Promise} A promise that is resolved with the result when
601600
* the query completes.
602601
*/
@@ -639,7 +638,6 @@ class ParseQuery {
639638
* <li>context: A dictionary that is accessible in Cloud Code `beforeFind` trigger.
640639
* <li>json: Return raw json without converting to Parse.Object
641640
* </ul>
642-
*
643641
* @returns {Promise} A promise that is resolved with the results when
644642
* the query completes.
645643
*/
@@ -733,7 +731,6 @@ class ParseQuery {
733731
* <li>sessionToken: A valid session token, used for making a request on
734732
* behalf of a specific user.
735733
* </ul>
736-
*
737734
* @returns {Promise} A promise that is resolved with the count when
738735
* the query completes.
739736
*/
@@ -769,7 +766,6 @@ class ParseQuery {
769766
* <li>sessionToken: A valid session token, used for making a request on
770767
* behalf of a specific user.
771768
* </ul>
772-
*
773769
* @returns {Promise} A promise that is resolved with the query completes.
774770
*/
775771
distinct(key: string, options?: FullOptions): Promise<Array<mixed>> {
@@ -802,7 +798,6 @@ class ParseQuery {
802798
* <li>sessionToken: A valid session token, used for making a request on
803799
* behalf of a specific user.
804800
* </ul>
805-
*
806801
* @returns {Promise} A promise that is resolved with the query completes.
807802
*/
808803
aggregate(pipeline: mixed, options?: FullOptions): Promise<Array<mixed>> {
@@ -852,7 +847,6 @@ class ParseQuery {
852847
* <li>context: A dictionary that is accessible in Cloud Code `beforeFind` trigger.
853848
* <li>json: Return raw json without converting to Parse.Object
854849
* </ul>
855-
*
856850
* @returns {Promise} A promise that is resolved with the object when
857851
* the query completes.
858852
*/
@@ -1084,7 +1078,6 @@ class ParseQuery {
10841078
* <li>index: The index of the current Parse.Object being processed in the array.</li>
10851079
* <li>query: The query map was called upon.</li>
10861080
* </ul>
1087-
*
10881081
* @param {object} options Valid options are:<ul>
10891082
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
10901083
* be used for this request.
@@ -1173,7 +1166,6 @@ class ParseQuery {
11731166
* <li>index: The index of the current Parse.Object being processed in the array.</li>
11741167
* <li>query: The query filter was called upon.</li>
11751168
* </ul>
1176-
*
11771169
* @param {object} options Valid options are:<ul>
11781170
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
11791171
* be used for this request.
@@ -1200,7 +1192,7 @@ class ParseQuery {
12001192
return array;
12011193
}
12021194

1203-
/** Query Conditions **/
1195+
/* Query Conditions */
12041196

12051197
/**
12061198
* Adds a constraint to the query that requires a particular key's value to
@@ -1729,7 +1721,7 @@ class ParseQuery {
17291721
return this._addCondition(key, '$geoIntersects', { $point: point });
17301722
}
17311723

1732-
/** Query Orderings **/
1724+
/* Query Orderings */
17331725

17341726
/**
17351727
* Sorts the results in ascending order by the given key.
@@ -1806,7 +1798,7 @@ class ParseQuery {
18061798
return this;
18071799
}
18081800

1809-
/** Query Options **/
1801+
/* Query Options */
18101802

18111803
/**
18121804
* Sets the number of results to skip before returning any results.

0 commit comments

Comments
 (0)