Vending Machine sample with typescript