TS Ep 15: Immutability with `as const` & Const Assertions
·867 words·5 mins
An exhaustive analysis of Const Assertions (as const). Learn the 3 transformation rules of const assertions, deep recursive read-only object properties, converting arrays into readonly tuples, and deriving union types dynamically using typeof ARRAY[number].
