Skip to content

Commit 37c0f18

Browse files
JeffGuKangdplewis
andauthored
Fix addIndex annotation in ParseSchema (#1071)
* Update ParseSchema.js Fix `addIndex` comments. * Fix addIndex anotation Co-authored-by: Diamond Lewis <findlewis@gmail.com>
1 parent 345a5e6 commit 37c0f18

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ParseSchema.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,13 @@ class ParseSchema {
221221
/**
222222
* Adding an Index to Create / Update a Schema
223223
*
224-
* @param {String} name Name of the field that will be created on Parse
225-
* @param {String} type Can be a (String|Number|Boolean|Date|Parse.File|Parse.GeoPoint|Array|Object|Pointer|Parse.Relation)
224+
* @param {String} name Name of the index
225+
* @param {Object} index { field: value }
226226
* @return {Parse.Schema} Returns the schema, so you can chain this call.
227+
*
228+
* <pre>
229+
* schema.addIndex('index_name', { 'field': 1 });
230+
* </pre>
227231
*/
228232
addIndex(name: string, index: any) {
229233
if (!name) {

0 commit comments

Comments
 (0)