All Projects → nestjs → mapped-types

nestjs / mapped-types

Licence: MIT License
Configuration module for Nest framework (node.js) 🐺

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to mapped-types

axios
Axios module for Nest framework (node.js) 🗂
Stars: ✭ 95 (-50.52%)
Mutual labels:  nest, nestjs
nestjs-redis
Redis(ioredis) module for NestJS framework
Stars: ✭ 112 (-41.67%)
Mutual labels:  nest, nestjs
nestjs-rest-cqrs-example
Example for Nest.js, MySQL, Redis, REST api, CQRS, DDD
Stars: ✭ 263 (+36.98%)
Mutual labels:  nest, nestjs
dothq.co
This repository has moved to:
Stars: ✭ 17 (-91.15%)
Mutual labels:  nest, nestjs
serverless-core-deprecated
[Deprecated] Serverless Core module for Nest framework (node.js) 🦊
Stars: ✭ 169 (-11.98%)
Mutual labels:  nest, nestjs
nestjs-dynamoose
Dynamoose module for Nest
Stars: ✭ 84 (-56.25%)
Mutual labels:  nest, nestjs
event-emitter
Event Emitter module for Nest framework (node.js) 🦋
Stars: ✭ 102 (-46.87%)
Mutual labels:  nest, nestjs
unnue-nuxt
开媛笔记,基于nuxt ssr首屏服务器端渲染 ⚡。用于分享、记录、交流和学习,希望可以帮助到小伙伴们。同时网站在永久更新,备好鸡血,一起来战 Ooh aah!
Stars: ✭ 98 (-48.96%)
Mutual labels:  nest, nestjs
server-next
😎 The next generation of RESTful API service and more for Mix Space, powered by @nestjs.
Stars: ✭ 43 (-77.6%)
Mutual labels:  nest, nestjs
azure-storage
Azure Storage module for Nest framework (node.js) ☁️
Stars: ✭ 71 (-63.02%)
Mutual labels:  nest, nestjs
nestjs-toolbox
The repository contains a suite of components and modules for Nest.js
Stars: ✭ 166 (-13.54%)
Mutual labels:  nest, nestjs
necord
🤖 A module for creating Discord bots using NestJS, based on Discord.js
Stars: ✭ 77 (-59.9%)
Mutual labels:  nest, nestjs
azure-func-http
Azure Functions HTTP adapter for Nest framework (node.js) 🌥
Stars: ✭ 121 (-36.98%)
Mutual labels:  nest, nestjs
nestjs-otel
OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
Stars: ✭ 273 (+42.19%)
Mutual labels:  nest, nestjs
nestjs-extensions
[WIP] A bunch of useful and opinionated filters, modules, pipes... to use with Nest framework. 😻
Stars: ✭ 43 (-77.6%)
Mutual labels:  nest, nestjs
nest-rest-mongo-boilerplate
🍱 backend with nest (typescript), mongoose, and authentication
Stars: ✭ 180 (-6.25%)
Mutual labels:  nest, nestjs
azure-serverless-deprecated
[Deprecated] Azure Serverless module for Nest framework (node.js) 🌩
Stars: ✭ 44 (-77.08%)
Mutual labels:  nest, nestjs
nest-xray
Distributed tracing for Nestjs with AWS X-Ray as the backend. Instrument incoming and outgoing HTTP requests
Stars: ✭ 50 (-73.96%)
Mutual labels:  nest, nestjs
aws-nestjs-starter
Serverless, AWS, NestJS, GraphQL and DynamoDB starter
Stars: ✭ 200 (+4.17%)
Mutual labels:  nest, nestjs
Firstsight
前后端分离,服务端渲染的个人博客,基于 Nodejs、 Vue、 Nuxt、Nestjs、PostgreSQL、Apollo
Stars: ✭ 19 (-90.1%)
Mutual labels:  nest, nestjs

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads Travis Linux Coverage Discord Backers on Open Collective Sponsors on Open Collective

Description

Mapped Types module for Nest used by the @nestjs/graphql and @nestjs/swagger packages.

Installation

$ npm i --save @nestjs/mapped-types

Quick Start

As you build out features, it's often useful to construct variants on a base entity type. A good example of such a variant is a Data Transfer Object (DTO). A Data Transfer Object is an object that is used to encapsulate data, and send it from one part of your application to another. DTO’s help us define the input and output interfaces of our system.

Let's imagine a real-world example, where we typically need to build both a create and update variations for the same entity type.

The create variant may require all fields, while the update variant may make all fields optional. Not to mention, both these types can also be variants of an entity type (to some extent).

That's a lot of redundant code!

Thus, NestJS now provides several utility functions that perform type transformations to help us avoid doing this, and make life a little bit easier.

Available mapped types:

  • PartialType - returns a type (class) with all the properties of the input type set to optional (requirement: at least 1 validation decorator applied to each property)
  • PickType - constructs a new type (class) by picking a set of properties from an input type
  • OmitType - constructs a type by picking all properties from an input type and then removing a particular set of keys
  • IntersectionType - combines two types into one new type (class)

Read more in this article.

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].