Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprudhomme committed Aug 19, 2024
1 parent 31f1ac1 commit bf875c2
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ import {

export type {Pagination, PaginationProps, PaginationState};

/**
* Defines a `Pagination` controller instance.
*
* @param props - The configurable `Pagination` properties.
* @returns The `Pagination` controller definition.
*
* @internal
*/
export function definePagination<
TOptions extends ControllerDefinitionOption | undefined,
>(props?: PaginationProps, options?: TOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ export type {
CommerceSearchParameters,
};

/**
* Defines a `ParameterManager` controller instance.
*
* @returns The `ParameterManager` controller definition.
*
* @internal
*/
export function defineParameterManager<
TOptions extends ControllerDefinitionOption | undefined,
>(options?: TOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ import {Sort, SortProps, SortState} from './headless-core-commerce-sort';

export type {Sort, SortProps, SortState};

/**
* Defines a `Sort` controller instance.
*
* @param props - The configurable `Sort` properties.
* @returns The `Sort` controller definition.
*
* @internal
*/
export function defineSort<
TOptions extends ControllerDefinitionOption | undefined,
>(props?: SortProps, options?: TOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export type {
SummaryState,
};

/**
* Defines a `Summary` controller instance.
*
* @returns The `Summary` controller definition.
*
* @internal
*/
export function defineSummary<
TOptions extends ControllerDefinitionOption | undefined,
>(options?: TOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export interface ProductViewDefinition
extends SharedControllerDefinitionWithoutProps<ProductView> {}

/**
* Defines a `ProductView` controller.
* Defines a `ProductView` controller instance.
*
* This controller is stateless and does not implement a `subscribe` method,
* making it simpler but different from other controllers in the system.
* Its sole purpose is to log an `ec_productView` event.
*
* @returns The `ProductView` controller definition.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ import {DidYouMean, DidYouMeanState} from './headless-did-you-mean';

export type {DidYouMean, DidYouMeanState};

/**
* Defines a `DidYouMean` controller instance.
*
* @returns The `DidYouMean` controller definition.
*
* @internal
* */
export function defineDidYouMean(): SearchOnlyControllerDefinitionWithoutProps<DidYouMean> {
return {
search: true,
Expand Down

0 comments on commit bf875c2

Please sign in to comment.