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

Strategy Pattern #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Strategy Pattern #1

wants to merge 8 commits into from

Conversation

v-sokolov
Copy link
Owner

Adding a basic example of the Strategy patten implementation & usage.

@v-sokolov v-sokolov self-assigned this Nov 15, 2024
src/patterns/strategy/interfaces.ts Outdated Show resolved Hide resolved
src/patterns/strategy/interfaces.ts Outdated Show resolved Hide resolved
src/patterns/strategy/strategies.impl.ts Outdated Show resolved Hide resolved
src/patterns/strategy/context.impl.ts Outdated Show resolved Hide resolved
src/patterns/strategy/examples.ts Outdated Show resolved Hide resolved
@v-sokolov
Copy link
Owner Author

v-sokolov commented Nov 25, 2024

@MaslovMykhailo
I'd like to know your opinion about these files:

src/patterns/strategy/discount-example/context/context.impl.ts
src/patterns/strategy/discount-example/example/example.impl.ts

Whether it is a proper area for that logic and matches with the our previous discussions as well.

Comment on lines 6 to 7
clientApp(RANDOM_PRICE, {
price: RANDOM_PRICE,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Everything looks good
Looks like the price is duplicating, as the first argument and insider order
It seems to me that having price in order should be enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants