I\'m trying to set a the sub property first that is defined in the Name interface but when do so I always get an error for example:
first
Name
You can also try this
interface Name{ first: string, last:string, } class Person{ private name = {} as Name; public setName(firstName, lastName){ this.name.first = firstName; this.name.last = lastName; } } var person1 = new Person(); person1.setName('Tracy','Herrera');