Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: implements product search constraints #74

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

SWH-Relewise
Copy link
Contributor

No description provided.

@SWH-Relewise SWH-Relewise requested a review from mzanoni August 12, 2024 08:44
Copy link
Collaborator

@mzanoni mzanoni left a comment

Choose a reason for hiding this comment

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

Awesome :)

Be aware that the build is broken atm

Comment on lines 7 to 10
this.resultConstraint = {
$type: 'Relewise.Client.Requests.Search.Settings.ResultMustHaveVariantConstraint, Relewise.Client',
...constaint,
} as ResultMustHaveVariantConstraint;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
this.resultConstraint = {
$type: 'Relewise.Client.Requests.Search.Settings.ResultMustHaveVariantConstraint, Relewise.Client',
...constaint,
} as ResultMustHaveVariantConstraint;
this.resultConstraint: ResultMustHaveVariantConstraint = {
$type: 'Relewise.Client.Requests.Search.Settings.ResultMustHaveVariantConstraint, Relewise.Client',
...constaint,
};

Using cast by parses a ton of the Typescript type-checks and should be avoided when possible, like it is here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This syntax is invalid here!
image

Copy link
Collaborator

@mzanoni mzanoni Aug 12, 2024

Choose a reason for hiding this comment

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

Just assign it to a local const variable before assigning to this.resultConstraint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do! 🫱🪖

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There you go!

@SWH-Relewise SWH-Relewise requested a review from mzanoni August 12, 2024 09:23
@mzanoni mzanoni merged commit 80479fb into main Aug 12, 2024
2 checks passed
@mzanoni mzanoni deleted the feat/product-search-constraints branch August 12, 2024 10:54
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.

2 participants