How to convert an object to a read-only or a constant object in TypeScript?
Originally Published Here ๐!
To convert an entire object to a read-only or a constant object, you can use the as keyword after the object initialization followed by the keyword const in TypeScript.
TL;DR
// using "as" keyword after the person
// obj...
melvingeorge-me.hashnode.dev3 min read