Last active
February 3, 2020 19:14
-
-
Save dcantu476/c01f1eefa759dfd83436638875a7603d to your computer and use it in GitHub Desktop.
Pizza Shop
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
const pizzaChef = pizzaCookingSubject.subscribe((event: string) => { | |
// Tell chef a step is complete so he can start the next step. | |
if (employeeIsClockedIn && employeeIsResponsibleForTask) { | |
notifyTheEmployeesOfTheStatus(event); | |
} | |
}) | |
const pizzaCustomer = pizzaCustomer.subscribe((event: string) => { | |
// Tell the customer a status update. | |
if (userAllowsNotifications) { | |
notifyTheCustomerOfTheStatus(event); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment