Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ class Tracker {
* @function trackSearchResultClick
* @param {string} term - Search results query term
* @param {object} parameters - Additional parameters to be sent with request
* @param {string} parameters.itemName - Product item name
* @param {string} [parameters.itemName] - Product item name
* @param {string} parameters.itemId - Product item unique identifier
* @param {string} [parameters.variationId] - Product item variation unique identifier
* @param {string} [parameters.resultId] - Search result identifier (returned in response from Constructor)
Expand Down
2 changes: 1 addition & 1 deletion src/types/tracker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ declare class Tracker {
trackSearchResultClick(
term: string,
parameters: {
itemName: string;
itemName?: string;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: itemIsConvertible is typed as string (itemIsConvertible?: string) but the runtime implementation at src/modules/tracker.js:981 checks typeof itemIsConvertible === 'boolean'. This is a pre-existing inconsistency, but since the type signature is being touched right next to it this would be a good opportunity to fix it to boolean so that consumers receive correct compile-time guidance. This is low-risk since making it stricter is a narrowing, not a widening, of the public type.

itemId: string;
variationId?: string;
resultId?: string;
Expand Down
Loading