DEV Community

Discussion on: 4 Must-Know TypeScript Tips & Tricks

Collapse
 
_rodrigomd profile image
Rodrigo 👨‍💻🤙

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