'as const' is an amazingly useful TypeScript feature that most people still don't know about.
00:00 SO underrated
00:12 Objects are mutable!
01:54 How as const works
02:38 Object.freeze
03:19 Deriving types from as const
04:30 keyof typeof
Become a TypeScript Wizard with my free beginners TypeScript Course:
https://www.totaltypescript.com/tutorials/beginners-typescript
Follow Matt on Twitter
https://twitter.com/mattpocockuk
Join the Discord:
https://mattpocock.com/discord