import {Item, ShoppingCart} from "./ShoppingCart";
import {CreditCardStrategy, PaymentResult, PaymentStrategy} from "./Payment";

let strategy: PaymentStrategy = new CreditCardStrategy();
let shoppingCart: ShoppingCart = new ShoppingCart(strategy)

let item1: Item = new Item(20)

shoppingCart.AddItem(item1)
let result:PaymentResult = shoppingCart.Pay()
console.log(result)