Socket
Socket
Sign inDemoInstall

@nestjs/mapped-types

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/mapped-types

Nest - modern, fast, powerful node.js web framework (@mapped-types)


Version published
Weekly downloads
2.4M
increased by4.89%
Maintainers
2
Weekly downloads
 
Created

What is @nestjs/mapped-types?

The @nestjs/mapped-types package is a utility module for NestJS, which provides functions to transform and map types. It is commonly used to create DTOs (Data Transfer Objects) by inheriting validation rules without the need to redefine them, thus reducing redundancy and potential for errors.

What are @nestjs/mapped-types's main functionalities?

PartialType

Creates a type (class) with all the properties of the input type set to optional. Useful for update operations where only a subset of properties may be provided.

{"@nestjs/swagger": "^5.0.0", "@nestjs/mapped-types": "^0.4.0"}

PickType

Creates a type by picking a set of properties from an existing type. This is useful when you want to expose only certain fields of a model for a particular use case.

{"@nestjs/swagger": "^5.0.0", "@nestjs/mapped-types": "^0.4.0"}

OmitType

Creates a type by omitting a set of properties from an existing type. This can be used to exclude sensitive information or irrelevant properties from being exposed.

{"@nestjs/swagger": "^5.0.0", "@nestjs/mapped-types": "^0.4.0"}

IntersectionType

Combines two types into one new type (class) that includes all properties from both types. This is useful for combining properties from multiple sources or adding additional properties to an existing type.

{"@nestjs/swagger": "^5.0.0", "@nestjs/mapped-types": "^0.4.0"}

Other packages similar to @nestjs/mapped-types

FAQs

Package last updated on 30 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc