DEV Community

Discussion on: How to convert your JavaScript object literals to Typescript

Collapse
 
curiousdev profile image
CuriousDev

When you are using interfaces, can you also just add a property, which is not part of the initialized object, like you can do with JavaScript? For example, if you add the phone property, which is not part of any of the initalized objects, but made optional in the interface definition.