JavaScript's Object.freeze and TypeScript's Readonly
By Dale L. Jefferson. Published
Do you want static or runtime immutability, or both? In this article I will show you how to combine Object.freeze with Readonly to get the best of both worlds.
TypeScript, JavaScript, React, React Native
Do you want static or runtime immutability, or both? In this article I will show you how to combine Object.freeze with Readonly to get the best of both worlds.