Referential transparency

Referential transparency is another concept closely related to pure functions and side effects. A function is pure when it is free of side effects. An expression is said to be referentially transparent when it can be replaced with its corresponding value without changing the application's behavior.

A pure function is a referentially transparent expression. An expression that is not referentially transparent is known as referentially opaque.

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.