Hello, i have a dto for each entity in my backend.
What i wanted to do:
lets say i have this dto:
export class UserDto {
@IsString()
firstName: string;
@IsString()
lastName: string;
@IsString()
id: string;
@IsEmail()
email: string;
}
And i want to create a new DTO named "UpdateUserDto" that should only have firstName and lastName
What i imagined:
export class UpdateUserDto extends Pick<UserDto, "firstName", "lastName"> { }
But this wont work sadly.
Is there maybe a way to create a type that will do what i want?