I want to create class base on interface but it looks link it does not respect readonly modifier.
code below works without compiler error:
interface I {
readonly a: string
}
class C implements I{
a= ""
}
const D = new C
D.a = "something"
in order to make property 'a' really readonly I should make it readonly in class definition too! so what's the use case on readonly modifier in interface definition?
in other word how can I make sure when I am creating a class by implementing interface I creating it with right modifier?