Question · NestJS course · Module 10: Data Validation

DTO Flexibility from PartialType to Full

Which mapped type in NestJS makes ALL DTO fields optional?

Answer options

  • PartialType(CreateDto)
  • PickType(CreateDto, ['name'])
  • OmitType(CreateDto, ['id'])
  • IntersectionType(CreateDto, MetadataDto)

You can check the correct answer by solving this task in the CodeWorlds game.