Skip to content

refactor: Fix JSDoc warnings #1711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/CloudCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@
* @name Parse.Cloud.job
* @param {string} name The name of the Background Job
* @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}
*
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion src/LiveQueryClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class LiveQueryClient extends EventEmitter {
*
* @param {object} query - the ParseQuery you want to subscribe to
* @param {string} sessionToken (optional)
* @returns {LiveQuerySubscription} subscription
* @returns {LiveQuerySubscription | undefined}
*/
subscribe(query: Object, sessionToken: ?string): LiveQuerySubscription {
if (!query) {
Expand Down
10 changes: 5 additions & 5 deletions src/ParseFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class ParseFile {
* after you get the file from a Parse.Object.
*
* @param {object} options An object to specify url options
* @returns {string}
* @returns {string | undefined}
*/
url(options?: { forceSecure?: boolean }): ?string {
options = options || {};
Expand Down Expand Up @@ -220,7 +220,7 @@ class ParseFile {
* Saves the file to the Parse cloud.
*
* @param {object} options
* * Valid options are:<ul>
* Valid options are:<ul>
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
* be used for this request.
* <li>sessionToken: A valid session token, used for making a request on
Expand All @@ -237,9 +237,9 @@ class ParseFile {
* });
* </pre>
* </ul>
* @returns {Promise} Promise that is resolved when the save finishes.
* @returns {Promise | undefined} Promise that is resolved when the save finishes.
*/
save(options?: FullOptions) {
save(options?: FullOptions): ?Promise {
options = options || {};
options.requestTask = task => (this._requestTask = task);
options.metadata = this._metadata;
Expand Down Expand Up @@ -306,7 +306,7 @@ class ParseFile {
* In Cloud Code and Node only with Master Key.
*
* @param {object} options
* * Valid options are:<ul>
* Valid options are:<ul>
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
* be used for this request.
* <pre>
Expand Down
10 changes: 5 additions & 5 deletions src/ParseObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class ParseObject {
_objCount: number;
className: string;

/** Prototype getters / setters **/
/* Prototype getters / setters */

get attributes(): AttributeMap {
const stateController = CoreManager.getObjectStateController();
Expand All @@ -175,7 +175,7 @@ class ParseObject {
return this._getServerData().updatedAt;
}

/** Private methods **/
/* Private methods */

/**
* Returns a local or server Id used uniquely identify this object
Expand Down Expand Up @@ -446,7 +446,7 @@ class ParseObject {
return classMap;
}

/** Public methods **/
/* Public methods */

initialize() {
// NOOP
Expand Down Expand Up @@ -910,7 +910,7 @@ class ParseObject {
* object.op("x") would return an instance of Parse.Op.Increment.
*
* @param attr {String} The key.
* @returns {Parse.Op} The operation, or undefined if none.
* @returns {Parse.Op | undefined} The operation, or undefined if none.
*/
op(attr: string): ?Op {
const pending = this._getPendingOps();
Expand Down Expand Up @@ -1518,7 +1518,7 @@ class ParseObject {
return this;
}

/** Static methods **/
/* Static methods */

static _clearAllState() {
const stateController = CoreManager.getObjectStateController();
Expand Down
14 changes: 3 additions & 11 deletions src/ParseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ class ParseQuery {
* <li>context: A dictionary that is accessible in Cloud Code `beforeFind` trigger.
* <li>json: Return raw json without converting to Parse.Object
* </ul>
*
* @returns {Promise} A promise that is resolved with the result when
* the query completes.
*/
Expand Down Expand Up @@ -639,7 +638,6 @@ class ParseQuery {
* <li>context: A dictionary that is accessible in Cloud Code `beforeFind` trigger.
* <li>json: Return raw json without converting to Parse.Object
* </ul>
*
* @returns {Promise} A promise that is resolved with the results when
* the query completes.
*/
Expand Down Expand Up @@ -733,7 +731,6 @@ class ParseQuery {
* <li>sessionToken: A valid session token, used for making a request on
* behalf of a specific user.
* </ul>
*
* @returns {Promise} A promise that is resolved with the count when
* the query completes.
*/
Expand Down Expand Up @@ -769,7 +766,6 @@ class ParseQuery {
* <li>sessionToken: A valid session token, used for making a request on
* behalf of a specific user.
* </ul>
*
* @returns {Promise} A promise that is resolved with the query completes.
*/
distinct(key: string, options?: FullOptions): Promise<Array<mixed>> {
Expand Down Expand Up @@ -802,7 +798,6 @@ class ParseQuery {
* <li>sessionToken: A valid session token, used for making a request on
* behalf of a specific user.
* </ul>
*
* @returns {Promise} A promise that is resolved with the query completes.
*/
aggregate(pipeline: mixed, options?: FullOptions): Promise<Array<mixed>> {
Expand Down Expand Up @@ -852,7 +847,6 @@ class ParseQuery {
* <li>context: A dictionary that is accessible in Cloud Code `beforeFind` trigger.
* <li>json: Return raw json without converting to Parse.Object
* </ul>
*
* @returns {Promise} A promise that is resolved with the object when
* the query completes.
*/
Expand Down Expand Up @@ -1084,7 +1078,6 @@ class ParseQuery {
* <li>index: The index of the current Parse.Object being processed in the array.</li>
* <li>query: The query map was called upon.</li>
* </ul>
*
* @param {object} options Valid options are:<ul>
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
* be used for this request.
Expand Down Expand Up @@ -1173,7 +1166,6 @@ class ParseQuery {
* <li>index: The index of the current Parse.Object being processed in the array.</li>
* <li>query: The query filter was called upon.</li>
* </ul>
*
* @param {object} options Valid options are:<ul>
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
* be used for this request.
Expand All @@ -1200,7 +1192,7 @@ class ParseQuery {
return array;
}

/** Query Conditions **/
/* Query Conditions */

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

/** Query Orderings **/
/* Query Orderings */

/**
* Sorts the results in ascending order by the given key.
Expand Down Expand Up @@ -1806,7 +1798,7 @@ class ParseQuery {
return this;
}

/** Query Options **/
/* Query Options */

/**
* Sets the number of results to skip before returning any results.
Expand Down