destroy
Destroy an instance.
connection.destroy( instance )
Destroys an instance using the connection by calling
destroyData.
// get an instance
connection.get({id: 5}).then(function( instance ){
// destroy it
connection.destroy( instance );
})
Note that can/map adds destroy to the instance
type's prototype.
Parameters
- instance
{Instance}:A typed instance.
Returns
{Promise<Instance>}:
Returns a promise that resolve with destroyed instance if destroyData is resolved. The promise is rejected if destroyData is rejected.