Generating Union Types from a Bijective Map Using Typescript's Const Assertion
In this post, I explore a handful of TypeScript features to create Union types from a Bijective Map and use them to restrict what value (not just type) the keys can take when sending data object to Google Analytics.
As a recap, two sets are describe...
hashnode.blainegarrett.com12 min read
Blaine Garrett
Software Engineer and Artist
While putting this all together, I was wondering about the difference between TypeScripts' const assertions and Object.freeze() Here is a good article on the topic. sitepoint.com/compile-time-immutability-in-typesc…