Skip to content

Conversation

@edenkaushansky-afk
Copy link

No description provided.

Copy link
Member

@Tamir198 Tamir198 left a comment

Choose a reason for hiding this comment

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

Looks good, left some comments

tag /* : add type here */
) /* : add return types */ {
return [];
function getProductsByTag(store:Store,tag:string) :Product[] {
Copy link
Member

Choose a reason for hiding this comment

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

If tag are collection of closed strings you could say that:

type Tag = "electronics" | "cable" | "accessories";

And then the type would be tag: Tag[]

tag /* : add type here */
) /* : add return types */ {
return [];
function getAvailableProductsByTag(store:Store,tag:string) :Product[] {
Copy link
Member

Choose a reason for hiding this comment

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

Same comment about the tag in here

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