---
title: "Comment by Blaine Garrett on \"Generating Union Types from a Bijective Map Using Typescript's  Const Assertion\" | Hashnode"
description: "While putting this all together, I was wondering about the difference between TypeScripts&#39; const assertions and Object.freeze() Here is a good article on th"
url: "https://hashnode.com/posts/generating-union-types-from-a-bijective-map-using-typescripts-const-assertion/5e34a69cfc003cfb0c64324b/comment/5e34c5c88a805c490b5a8ae8"
---

[Discussion](https://hashnode.com/posts/generating-union-types-from-a-bijective-map-using-typescripts-const-assertion/5e34a69cfc003cfb0c64324b)

Comment [Generating Union Types from a Bijective Map Using Typescript's Const Assertion](https://hashnode.com/posts/generating-union-types-from-a-bijective-map-using-typescripts-const-assertion/5e34a69cfc003cfb0c64324b)

[Blaine Garrett](https://hashnode.com/@blainegarrrett)

[Feb 1, 2020](https://hashnode.com/posts/generating-union-types-from-a-bijective-map-using-typescripts-const-assertion/5e34a69cfc003cfb0c64324b/comment/5e34c5c88a805c490b5a8ae8)

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…](https://www.sitepoint.com/compile-time-immutability-in-typescript/)
