Make Properties and Index Signatures Readonly in TypeScript

Marius Schulz
InstructorMarius Schulz

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.