DZone

How can we utilize the const assertion in TypeScript to flip the script and define types from immutable data?

Since TypeScript 3.4, we’ve been able to use the as const notation for creating “const assertions” on our literals. This is used to signal to the compiler that any object properties of the literal are read-only, any array literals are read-only, and lastly that any literal types used cannot be widened.

Source: DZone