GitHub

daffCartRetrievalGetResponse

import { daffCartRetrievalGetResponse } from '@daffodil/cart/state'

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.

function daffCartRetrievalGetResponse<T extends DaffCart = DaffCart>(
  action: Action<string>
  retrievalActions: DaffCartRetrievalActionInjection[]
): Partial<T> | null