Skip to content

Commit

Permalink
jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart committed Aug 27, 2024
1 parent d82e0b7 commit 33aed2f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export interface ProductTemplatesManager<
* @returns (Content) The content of the selected template, or null if no template can be selected for the given product.
*/
selectTemplate: (product: Product) => Content | null;
/**
* Selects the highest priority link template for which the given product satisfies all conditions.
* In the case where satisfied templates have equal priority, the template that was registered first is returned.
* @param product (Product) The product for which to select a template.
* @returns (Content) The content of the selected template, or null if no template can be selected for the given product.
*/
selectLinkTemplate: (product: Product) => LinkContent | null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export interface ResultTemplatesManager<
* @returns (Content) The selected template's content, or null if no template's conditions are satisfied.
*/
selectTemplate(result: Result): Content | null;
/**
* Selects the highest priority link template for which the given result satisfies all conditions.
* In the case where satisfied templates have equal priority, the template that was registered first is returned.
* @param result (Result) The result for which to select a template.
* @returns (Content) The selected template's content, or null if no template's conditions are satisfied.
*/
selectLinkTemplate(result: Result): LinkContent | null;
}

Expand Down

0 comments on commit 33aed2f

Please sign in to comment.