TypeScript doesn't actually throw run-time errors because it is compiled (transpiled) to JS, and that code is the one used in production, and because JS is typeless, you can override and change values as you wish.
TypeScript will throw an error at the development stage because when the object's name is changed, it will not match the interface that was declared when the object was defined.
The IDE will highlight the error if configured correctly
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.
Hi vetras,
TypeScript doesn't actually throw run-time errors because it is compiled (transpiled) to JS, and that code is the one used in production, and because JS is typeless, you can override and change values as you wish.
TypeScript will throw an error at the development stage because when the object's name is changed, it will not match the interface that was declared when the object was defined.
The IDE will highlight the error if configured correctly