Skip to content

Commit 1e3bb91

Browse files
JeffGuKangdplewis
authored andcommitted
Fix deleteIndex and deleteField in ParseSchema (#949)
- Fix wrong annotation - Add `return this`
1 parent 55e5bd2 commit 1e3bb91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ParseSchema.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,23 +404,23 @@ class ParseSchema {
404404
/**
405405
* Deleting a Field to Update on a Schema
406406
*
407-
* @param {String} name Name of the field that will be created on Parse
408-
* @param {String} targetClass Name of the target Pointer Class
407+
* @param {String} name Name of the field
409408
* @return {Parse.Schema} Returns the schema, so you can chain this call.
410409
*/
411410
deleteField(name: string) {
412411
this._fields[name] = { __op: 'Delete'};
412+
return this;
413413
}
414414

415415
/**
416416
* Deleting an Index to Update on a Schema
417417
*
418-
* @param {String} name Name of the field that will be created on Parse
419-
* @param {String} targetClass Name of the target Pointer Class
418+
* @param {String} name Name of the field
420419
* @return {Parse.Schema} Returns the schema, so you can chain this call.
421420
*/
422421
deleteIndex(name: string) {
423422
this._indexes[name] = { __op: 'Delete'};
423+
return this;
424424
}
425425
}
426426

0 commit comments

Comments
 (0)