Hiding internal state in TypeScript objects

https://www.carlos-menezes.com/posts/hiding-properties-typescript

8 points · 1 comments · view on lemmy.world

1 Comments

Vulwsztyn@programming.dev · 1 pts · 14d

Nothing stops you from reassigning x. _priv=3 only if you have too lenient typescript settings