Parse-SDK-JS icon indicating copy to clipboard operation
Parse-SDK-JS copied to clipboard

alias for `destroy`

Open vince1995 opened this issue 2 years ago • 3 comments

New Feature / Enhancement Checklist

Current Limitation

When I want to delete a Parse.Object, I often try to call delete instead of destroy. Also, the cloud trigger is afterDelete and not afterDestroy, which is very confusing (for me).

Feature / Enhancement Description

Just an alias that delete does the same as destroy.

Example Use Case

See above

Alternatives / Workarounds

Maybe overwrite the Parse constructor in the index file.

3rd Party References

No 3rd party references.

vince1995 avatar Feb 02 '22 08:02 vince1995

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

I think it your suggested terminology makes sense. We could add delete as an alias and eventually deprecate destroy in the future. Not sure how widespread that change would be in terms of other Parse SDKs and / or related methods that contain the word destroy if there are any.

mtrezza avatar Feb 06 '22 14:02 mtrezza

Using delete would be consistent with other SDKs. The names of the delete functions are also delete in Objective C, Java and Swift.

vince1995 avatar Feb 07 '22 13:02 vince1995