Skip to content

[CDX-281] Mark itemName as optional in trackSearchResultClick#444

Merged
esezen merged 2 commits intomasterfrom
cdx-281-js-client-mark-itemname-as-optional-in
Apr 7, 2026
Merged

[CDX-281] Mark itemName as optional in trackSearchResultClick#444
esezen merged 2 commits intomasterfrom
cdx-281-js-client-mark-itemname-as-optional-in

Conversation

@quiteeasy
Copy link
Copy Markdown
Contributor

No description provided.

@quiteeasy quiteeasy requested review from esezen and jjl014 as code owners March 30, 2026 16:45
Copilot AI review requested due to automatic review settings March 30, 2026 16:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

constructor-claude-bedrock[bot]

This comment was marked as outdated.

@esezen esezen merged commit 94f83c8 into master Apr 7, 2026
8 of 9 checks passed
@esezen esezen deleted the cdx-281-js-client-mark-itemname-as-optional-in branch April 7, 2026 18:45
Copy link
Copy Markdown

@constructor-claude-bedrock constructor-claude-bedrock bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR marks itemName as optional in trackSearchResultClick — both in the JSDoc and the TypeScript declaration — aligning the type signature with the actual runtime behavior (the implementation already handles missing itemName gracefully). The change is minimal and correct.

Inline comments: 2 discussions added

Overall Assessment: ⚠️ Needs Work

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants