updated useCart types
This commit is contained in:
		| @@ -6,10 +6,10 @@ import { useCommerce } from '..' | ||||
| export type CartResponse<Data> = ResponseState<Data> & { isEmpty?: boolean } | ||||
|  | ||||
| export type CartInput = { | ||||
|   cartId: Cart['id'] | ||||
|   cartId?: BaseCart['id'] | ||||
| } | ||||
|  | ||||
| export default function useCart<Data>( | ||||
| export default function useCart<Data extends BaseCart | null>( | ||||
|   options: HookFetcherOptions, | ||||
|   input: HookInput, | ||||
|   fetcherFn: HookFetcher<Data, CartInput>, | ||||
|   | ||||
							
								
								
									
										3
									
								
								framework/commerce/types.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								framework/commerce/types.d.ts
									
									
									
									
										vendored
									
									
								
							| @@ -127,7 +127,8 @@ interface BaseCart { | ||||
|   discounts?: DiscountBase[] | ||||
| } | ||||
|  | ||||
| interface Cart extends Entity { | ||||
| // TODO: Remove this type in favor of BaseCart | ||||
| interface Cart2 extends Entity { | ||||
|   id: string | undefined | ||||
|   currency: { code: string } | ||||
|   taxIncluded?: boolean | ||||
|   | ||||
		Reference in New Issue
	
	Block a user