tslint-immutable icon indicating copy to clipboard operation
tslint-immutable copied to clipboard

Enforce ReadonlySet over Set, and ReadonlyMap over Map

Open astorije opened this issue 6 years ago • 2 comments

I am making extensive use of the readonly-array rule, and was wondering: do you happen to have any plans for equivalent readonly-set and readonly-map rules that would enforce the same constraint on Maps and Sets?

astorije avatar Dec 22 '18 07:12 astorije

I currently have no plans to implement those rules but it sound like a really nice idea! I will see if I can get some time to implement that, and I would certainly accept a PR for those rules if someone else wants to work on it. (I currently don't use Map and Set much in my own projects as I mostly deal with state that needs to be serializable to JSON).

jonaskello avatar Dec 22 '18 14:12 jonaskello

That's great, thanks for the update @jonaskello!

astorije avatar Dec 24 '18 02:12 astorije