3 ms·Typescript has a readonly directive you can declare for interfaces, and it gives a type error on assignment.by jeremyjh 9y agoTypescript has a readonly directive you can declare for interfaces, and it gives a type error on assignment.