Yeah this is a really important distinction. const and val are read only value references, but they don't mean that the value is an immutable value. You can still change the state of the object, and you don't get any of the guarantees around thread safety mentioned in the linked article.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Oh, not just in TypeScript: in JavaScript too. That's an advice I repeatedly tell as a good practice.
But don't ever forget that it will not make your objects immutable.
Yeah this is a really important distinction.
const
andval
are read only value references, but they don't mean that the value is an immutable value. You can still change the state of the object, and you don't get any of the guarantees around thread safety mentioned in the linked article.