|
|
|
|
|
by conartist6
977 days ago
|
|
Private and readonly properties are 100% possible on classes, and you don't even need the newfangled private property syntax! You can roll it your own easily, and all you need is WeakMap. Unfortunately nobody seems to understand what weak maps are for... Here's the example code: https://gist.github.com/conartist6/95f5be3488b2ae6c0dfd9a886... |
|
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...