My question pertains to a programming interface I have created called PersonInterface. Within this interface, I have included a property called 'address' which has a type of AddressInterface - another interface that I have defined. I am wondering if it is correct to have a property with the type of an interface, or if it would be better practice to create a class 'Address' that implements the address interface.
PersonInterface
import {AddressInterface} from "./address.interface"
export interface PersonInterface{
firstname:string;
lastname:string;
dob:string;
address:AddressInterface;
username:string;
email:string;
}
AddressInterface
export interface AddressInterface{
name:string;
line1:string;
line2:string;
city:string;
postalcode:string;
region:string;
country:string;
}