How TypeScript breaks referential transparency

added by JavaScript Kicks
1/24/2019 8:31:00 AM

493 Views

Suppose we have a function, purchase, which buys a product for us: We'll call this "inline form." In JavaScript, you can factor the inline parameter out into a variable and pass a reference without changing the behavior of your code: This is sometimes called referential transparency or the Substitution Principle.


0 comments