I have two classes.
UserDto
export class UserDto {
name: string;
}
AuthDto
export class AuthDto {
email: string;
password: string;
}
I want to create a class of RegistrationDto
, which will be a merge of these two classes.
I tried to do this
export class RegisterDto extends UserDto, AuthDto {}
But this only works for interfaces. I am using it as Nestjs
dtos, so if I'm thinking about it in the wrong way, please let me know.
How do I handle the classes in this case?