GitHub

daffCartRetrievalGetResponse

Gets the cart from the passed action if it is a recognized retrieval action and applies the transformation if needed. If the action is not recognized as a retrieval action, returns null.

import { daffCartRetrievalGetResponse } from '@daffodil/cart/state'
function daffCartRetrievalGetResponse<T extends DaffCart = DaffCart>(
  action: Action<string>
  retrievalActions: DaffCartRetrievalActionInjection[]
): Partial<T> | null