From ab68eac5f6dd889ee51c60f1f9bdde6afc81d38f Mon Sep 17 00:00:00 2001 From: Jeff Gu Kang Date: Fri, 24 Jan 2020 19:56:19 +0900 Subject: [PATCH 1/2] Update ParseSchema.js Fix `addIndex` comments. --- src/ParseSchema.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ParseSchema.js b/src/ParseSchema.js index c42064678..855b231e5 100644 --- a/src/ParseSchema.js +++ b/src/ParseSchema.js @@ -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 {[fieldName: string]: string | number | boolean | Date | File | GeoPoint | any[] | object | Pointer | Relation} * @return {Parse.Schema} Returns the schema, so you can chain this call. + * + *
+   * schema.addIndex('index_name', { 'field': 1 });
+   * 
*/ addIndex(name: string, index: any) { if (!name) { From 070bc6bb3402bfed3277ec8adfe488b1a447c829 Mon Sep 17 00:00:00 2001 From: Jeff Gu Kang Date: Sat, 25 Jan 2020 19:35:45 +0900 Subject: [PATCH 2/2] Fix addIndex anotation --- src/ParseSchema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ParseSchema.js b/src/ParseSchema.js index 855b231e5..dd0d1b521 100644 --- a/src/ParseSchema.js +++ b/src/ParseSchema.js @@ -222,7 +222,7 @@ class ParseSchema { * Adding an Index to Create / Update a Schema * * @param {String} name Name of the index - * @param {Object} index {[fieldName: string]: string | number | boolean | Date | File | GeoPoint | any[] | object | Pointer | Relation} + * @param {Object} index { field: value } * @return {Parse.Schema} Returns the schema, so you can chain this call. * *