On readonly properties, type guards and unions — If you would like to see more JS articles like this one, or if you’re interested in my services, take a look at my blogfolio: https://js-blog.dev/. 1. Readonly properties In TypeScript 2.0, the readonly modifier was added to the language. Properties marked with readonly can only be assigned during initialization or from within…