Skip to content
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

Fix addIndex annotation in ParseSchema #1071

Merged
merged 3 commits into from
Feb 7, 2020
Merged
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
8 changes: 6 additions & 2 deletions src/ParseSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,13 @@ class ParseSchema {
/**
* Adding an Index to Create / Update a Schema
*
* @param {String} name Name of the field that will be created on Parse
* @param {String} type Can be a (String|Number|Boolean|Date|Parse.File|Parse.GeoPoint|Array|Object|Pointer|Parse.Relation)
* @param {String} name Name of the index
* @param {Object} index { field: value }
* @return {Parse.Schema} Returns the schema, so you can chain this call.
JeffGuKang marked this conversation as resolved.
Show resolved Hide resolved
*
* <pre>
* schema.addIndex('index_name', { 'field': 1 });
* </pre>
*/
addIndex(name: string, index: any) {
if (!name) {
Expand Down