Last active
April 25, 2020 11:39
-
-
Save mickaelw/a6dd68497c19ab63fb58f920e8c7941a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class InMemoryBasketRepository implements BasketRepository { | |
private _basket: Basket = new Basket() | |
getBasket(): Promise<Basket> { | |
return Promise.resolve(this._basket) | |
} | |
async save(basket: Basket): Promise<void> { | |
this._basket = basket | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment