{"id":13539917,"url":"https://github.com/nestjs/mapped-types","last_synced_at":"2025-05-14T01:04:32.574Z","repository":{"id":37051300,"uuid":"256451936","full_name":"nestjs/mapped-types","owner":"nestjs","description":"Configuration module for Nest framework (node.js) 🐺 ","archived":false,"fork":false,"pushed_at":"2025-05-10T21:40:01.000Z","size":5245,"stargazers_count":409,"open_issues_count":3,"forks_count":63,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-10T22:26:59.648Z","etag":null,"topics":["javascript","mapped-types","nest","nestjs","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://nestjs.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nestjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-17T08:54:50.000Z","updated_at":"2025-05-10T21:40:04.000Z","dependencies_parsed_at":"2023-10-16T02:27:01.808Z","dependency_job_id":"f38ab02f-7014-460e-be86-8c0bb8ebfe34","html_url":"https://github.com/nestjs/mapped-types","commit_stats":{"total_commits":1444,"total_committers":18,"mean_commits":80.22222222222223,"dds":0.5193905817174516,"last_synced_commit":"1b018ca487185f22aaf7d7753cc59198e23367e0"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fmapped-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fmapped-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fmapped-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fmapped-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nestjs","download_url":"https://codeload.github.com/nestjs/mapped-types/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492160,"owners_count":21916952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","mapped-types","nest","nestjs","nodejs","typescript"],"created_at":"2024-08-01T09:01:34.060Z","updated_at":"2025-05-14T01:04:32.551Z","avatar_url":"https://github.com/nestjs.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo-small.svg\" width=\"120\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master\n[travis-url]: https://travis-ci.org/nestjs/nest\n[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux\n[linux-url]: https://travis-ci.org/nestjs/nest\n\n  \u003cp align=\"center\"\u003eA progressive \u003ca href=\"http://nodejs.org\" target=\"blank\"\u003eNode.js\u003c/a\u003e framework for building efficient and scalable server-side applications.\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/~nestjscore\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@nestjs/core.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/~nestjscore\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@nestjs/core.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/~nestjscore\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@nestjs/core.svg\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/G7Qnnhy\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/nest#backer\"\u003e\u003cimg src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/nest#sponsor\"\u003e\u003cimg src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://paypal.me/kamilmysliwiec\"\u003e\u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-dc3d53.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/nestframework\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social\u0026label=Follow\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n  \u003c!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)--\u003e\n\n## Description\n\nMapped Types module for [Nest](https://github.com/nestjs/nest) used by the `@nestjs/graphql` and `@nestjs/swagger` packages.\n\n## Installation\n\n```bash\n$ npm i --save @nestjs/mapped-types\n```\n\n## Quick Start\n\nAs 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.\n\nLet's imagine a real-world example, where we typically need to build both a **create** and **update** variations for the same entity type.\n\nThe 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).\n\nThat's a lot of redundant code!\n\nThus, [NestJS](https://github.com/nestjs/nest) now provides several utility functions that perform type transformations to help us avoid doing this, and make life a little bit easier.\n\nAvailable mapped types:\n\n- `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)\n- `PickType` - constructs a new type (class) by picking a set of properties from an input type\n- `OmitType` - constructs a type by picking all properties from an input type and then removing a particular set of keys\n- `IntersectionType` - combines two types into one new type (class)\n\nRead more in [this article](https://trilon.io/blog/introducing-mapped-types-for-nestjs).\n\n## Support\n\nNest 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](https://docs.nestjs.com/support).\n\n## Stay in touch\n\n- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)\n- Website - [https://nestjs.com](https://nestjs.com/)\n- Twitter - [@nestframework](https://twitter.com/nestframework)\n\n## License\n\nNest is [MIT licensed](LICENSE).\n","funding_links":["https://opencollective.com/nest","https://paypal.me/kamilmysliwiec"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjs%2Fmapped-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnestjs%2Fmapped-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjs%2Fmapped-types/lists"}