Skip to content

Instantly share code, notes, and snippets.

@mickaelw
Created March 1, 2020 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mickaelw/78dcdd8ad7f93f8109f33d56bfc93c34 to your computer and use it in GitHub Desktop.
Save mickaelw/78dcdd8ad7f93f8109f33d56bfc93c34 to your computer and use it in GitHub Desktop.
export class Basket {
//...
private applyDiscount(totalOfSameBookBorrowed: number, price: number): number {
return DiscountCalculatorFactory
.for(totalOfSameBookBorrowed)
.applyDiscountOn(price)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment