Make Properties and Index Signatures Readonly in TypeScript

Share this video with your friends

Send Tweet

TypeScript 2.0 introduced the readonly modifier which can be added to a property or index signature declaration. It helps prevent against unintended property assignments. This lesson gives various use cases for readonly and shows what the generated JavaScript code looks like.

Marc Loan
Marc Loan
~ 10 months ago

Hi, there's an error at the end of the video that doesn't allow to mark it as watched. Other than that, the video is great to explain how readonly works.