Still I see readonly as a tool for the job. Object.freeze is fully run-time thing and it is decoupled from type definition. Declaration of readonly is included into type definition, so it is explicit. I don't think run-time block is needed here.
We're a place where coders share, stay up-to-date and grow their careers.
Still I see
readonly
as a tool for the job.Object.freeze
is fully run-time thing and it is decoupled from type definition. Declaration ofreadonly
is included into type definition, so it is explicit. I don't think run-time block is needed here.