Skip to content

Commit

Permalink
fix signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl committed Jan 16, 2024
1 parent 9ce8990 commit a709906
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
11 changes: 4 additions & 7 deletions packages/cart/src/services/cart-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,10 @@ export default class CartModuleService implements ICartModuleService {
}

addLineItems(
data: CartTypes.CreateLineItemForCartDTO,
sharedContext?: Context
data: CartTypes.CreateLineItemForCartDTO
): Promise<CartTypes.CartLineItemDTO>
addLineItems(
data: CartTypes.CreateLineItemForCartDTO[],
sharedContext?: Context
data: CartTypes.CreateLineItemForCartDTO[]
): Promise<CartTypes.CartLineItemDTO[]>
addLineItems(
cartId: string,
Expand All @@ -272,7 +270,7 @@ export default class CartModuleService implements ICartModuleService {
| string
| CartTypes.CreateLineItemForCartDTO[]
| CartTypes.CreateLineItemForCartDTO,
data: CartTypes.CreateLineItemDTO[] | CartTypes.CreateLineItemDTO,
data?: CartTypes.CreateLineItemDTO[] | CartTypes.CreateLineItemDTO,
@MedusaContext() sharedContext: Context = {}
): Promise<CartTypes.CartLineItemDTO[] | CartTypes.CartLineItemDTO> {
let items: LineItem[] = []
Expand Down Expand Up @@ -322,8 +320,7 @@ export default class CartModuleService implements ICartModuleService {
}

updateLineItems(
data: CartTypes.UpdateLineItemWithSelectorDTO[],
sharedContext?: Context
data: CartTypes.UpdateLineItemWithSelectorDTO[]
): Promise<CartTypes.CartLineItemDTO[]>
updateLineItems(
selector: Partial<CartTypes.CartLineItemDTO>,
Expand Down
13 changes: 3 additions & 10 deletions packages/types/src/cart/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,16 @@ export interface ICartModuleService extends IModuleService {
deleteAddresses(ids: string[], sharedContext?: Context): Promise<void>
deleteAddresses(ids: string, sharedContext?: Context): Promise<void>

addLineItems(
data: CreateLineItemForCartDTO,
sharedContext?: Context
): Promise<CartLineItemDTO>
addLineItems(
data: CreateLineItemForCartDTO[],
sharedContext?: Context
): Promise<CartLineItemDTO[]>
addLineItems(data: CreateLineItemForCartDTO): Promise<CartLineItemDTO>
addLineItems(data: CreateLineItemForCartDTO[]): Promise<CartLineItemDTO[]>
addLineItems(
cartId: string,
items: CreateLineItemDTO[],
sharedContext?: Context
): Promise<CartLineItemDTO[]>

updateLineItems(
data: UpdateLineItemWithSelectorDTO[],
sharedContext?: Context
data: UpdateLineItemWithSelectorDTO[]
): Promise<CartLineItemDTO[]>
updateLineItems(
selector: Partial<CartLineItemDTO>,
Expand Down

0 comments on commit a709906

Please sign in to comment.