Skip to main content

Function: destroy()

destroy<C, E, D, I>(instance): (action) => Action<Awaited<C & ConsumeModel <Model<D, I>> & ConsumeInstance<I> & ConsumeId> & object, E>

Prepare context for an instance deletion.

Type parameters

C extends object

E extends object

D extends object

I extends ModelInstance<D>

Parameters

instance: ModelClassInstance<D> & I

Returns

Function

Parameters

action: Action<C, E>

Returns

Action<Awaited<C & ConsumeModel <Model<D, I>> & ConsumeInstance<I> & ConsumeId> & object, E>

Source

packages/core/src/actions/context/enhancers/crud/destroy.ts:47