DaffCartRetrievalActionTransformedInjection
Represents an injection of a retrieval action that doesn't implement the DaffCartRetrievalAction
interface.
Contains a way to get the cart from the action.
import { DaffCartRetrievalActionTransformedInjection } from '@daffodil/cart/state'
interface DaffCartRetrievalActionTransformedInjection<T extends Action = Action> {
type: T['type']
transform: <TCart extends DaffCart = DaffCart>(action: T) => Partial<TCart>
}
Properties
Name | Type | Description |
---|---|---|
type | T['type'] | The action type. |
transform | <TCart extends DaffCart = DaffCart>(action: T) => Partial<TCart> | A function that gets the retrieved cart from the action. |