NestJS · Junior · Question 71 of 75

What does PartialType(CreateUserDto) give you?

export class UpdateUserDto extends PartialType(CreateUserDto) {}

Explanation

Mapped types (PartialType, PickType, OmitType, IntersectionType) come from @nestjs/mapped-types or @nestjs/swagger and keep validation and docs metadata.

Further reading

Problem with a question

NestJS · Junior · question 71

Test yourself

Take the NestJS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz