Skip to content

Commit

Permalink
apply correction
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lakhdar committed Aug 28, 2024
1 parent e578cf9 commit 3ff170f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {SearchAndListingControllerDefinitionWithoutProps} from '../../../../app/commerce-ssr-engine/types/common';
import {UniversalControllerDefinitionWithoutProps} from '../../../../app/commerce-ssr-engine/types/common';
import {Cart, buildCart, CartProps, CartInitialState} from './headless-cart';

export type {CartState, CartItem, CartProps} from './headless-cart';
export type {Cart, CartInitialState};

export interface CartDefinition
extends SearchAndListingControllerDefinitionWithoutProps<Cart> {}
extends UniversalControllerDefinitionWithoutProps<Cart> {}

/**
* Defines a `Cart` controller instance.
Expand All @@ -18,6 +18,7 @@ export function defineCart(props: CartProps = {}): CartDefinition {
return {
listing: true,
search: true,
standalone: true,
build: (engine) => buildCart(engine, props),
};
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SearchAndListingControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common';
import {UniversalControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common';
import {
Context,
buildContext,
Expand All @@ -11,7 +11,7 @@ export type {ContextState, Context, ContextProps} from './headless-context';
export type {View, ContextOptions};

export interface ContextDefinition
extends SearchAndListingControllerDefinitionWithoutProps<Context> {}
extends UniversalControllerDefinitionWithoutProps<Context> {}

/**
* Defines a `Context` controller instance.
Expand All @@ -24,6 +24,7 @@ export function defineContext(props: ContextProps = {}): ContextDefinition {
return {
listing: true,
search: true,
standalone: true,
build: (engine) => buildContext(engine, props),
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function defineQuerySummary<
solutionType === SolutionType.listing
? buildProductListing(engine).summary()
: buildSearch(engine).summary(),
// TODO: support recommendation summary
// TODO: KIT-3503: support recommendation summary
} as SubControllerDefinitionWithoutProps<
Summary<ProductListingSummaryState & SearchSummaryState>, // TODO: fix conditional typing to return the appropriate type based on current solution type
TOptions
Expand Down

0 comments on commit 3ff170f

Please sign in to comment.