Snippets for TypeORM and NestJS to speed up development — ready-to-use decorators, entity scaffolds, lifecycle hooks, relations, module wiring, and common TypeORM patterns.
This Visual Studio Code extension provides a curated collection of TypeScript-first snippets for using TypeORM within NestJS applications. Quickly scaffold entities, decorators, relations, subscribers, module wiring, and common repository patterns with smart placeholders.
- Visual Studio Code 1.46.0 or later
- Open Visual Studio Code.
- Open the Extensions view (
Ctrl+Shift+X/⌘+Shift+X). - Search for NestJS TypeORM Snippets or install directly from the Marketplace page.
- Click Install and reload the editor if prompted.
Type part of a snippet prefix and press Tab or Enter to expand it. Snippets are scoped to TypeScript files by default.
| Snippet | Purpose |
|---|---|
ns_typeorm_deco_entity |
@Entity() — scaffold entity class |
ns_typeorm_deco_column |
@Column() |
ns_typeorm_deco_primary_generated_column |
@PrimaryGeneratedColumn() |
ns_typeorm_deco_create_date_column |
@CreateDateColumn() |
ns_typeorm_deco_update_date_column |
@UpdateDateColumn() |
ns_typeorm_deco_delete_date_column |
@DeleteDateColumn() |
ns_typeorm_deco_many_to_one / ns_typeorm_deco_one_to_many |
Relation decorators |
ns_typeorm_deco_join_column |
@JoinColumn() |
ns_typeorm_deco_many_to_many / ns_typeorm_deco_join_table |
Many-to-many with join table |
ns_typeorm_deco_primary_column |
@PrimaryColumn() |
ns_typeorm_deco_version_column |
@VersionColumn() |
ns_typeorm_deco_view_entity |
@ViewEntity() / @ViewColumn() |
ns_typeorm_deco_event_subscriber |
@EventSubscriber() |
ns_typeorm_module_root |
TypeOrmModule.forRoot(...) |
ns_typeorm_module_feature |
TypeOrmModule.forFeature([...]) |
ns_typeorm_base_entity |
Base entity class scaffold |
Contributions to the NestJS TypeORM Snippets are welcome and appreciated. To contribute:
-
Fork the GitHub repository.
-
Create a new branch for your feature or fix:
git checkout -b feature/your-feature
-
Make your changes, commit them, and push to your fork.
-
Submit a Pull Request targeting the
mainbranch.
Before contributing, please review the Contribution Guidelines for coding standards, testing, and commit message conventions. If you encounter a bug or wish to request a new feature, please open an Issue.
For a complete list of changes, see the CHANGELOG.md.
- Manuel Gil - Owner - @ManuelGil
For a complete list of contributors, please refer to the contributors page.
-
Auto Barrel Automatically generates and maintains barrel (
index.ts) files for your TypeScript projects. -
Angular File Generator Generates boilerplate and navigates your Angular (9→20+) project from within the editor, with commands for components, services, directives, modules, pipes, guards, reactive snippets, and JSON2TS transformations.
-
NestJS File Generator Simplifies creation of controllers, services, modules, and more for NestJS projects, with custom commands and Swagger snippets.
-
NestJS Snippets Ready-to-use code patterns for creating controllers, services, modules, DTOs, filters, interceptors, and more in NestJS.
-
T3 Stack / NextJS / ReactJS File Generator Automates file creation (components, pages, hooks, API routes, etc.) in T3 Stack (Next.js, React) projects and can start your dev server from VSCode.
-
Drizzle ORM Snippets Collection of code snippets to speed up Drizzle ORM usage, defines schemas, migrations, and common database operations in TypeScript/JavaScript.
-
CodeIgniter 4 Spark Scaffolds controllers, models, migrations, libraries, and CLI commands in CodeIgniter 4 projects using Spark, directly from the editor.
-
CodeIgniter 4 Snippets Snippets for accelerating development with CodeIgniter 4, including controllers, models, validations, and more.
-
CodeIgniter 4 Shield Snippets Snippets tailored to CodeIgniter 4 Shield for faster authentication and security-related code.
-
Mustache Template Engine - Snippets & Autocomplete Snippets and autocomplete support for Mustache templates, making HTML templating faster and more reliable.
For developers who work with .vsix files for offline installations or distribution, the complementary One-Click VSIX extension is recommended, available for both Chrome and Firefox.
One-Click VSIX integrates a direct "Download Extension" button into each VSCode Marketplace page, ensuring the file is saved with the
.vsixextension, even if the server provides a.ziparchive. This simplifies the process of installing or sharing extensions offline by eliminating the need for manual file renaming.
This project is licensed under the MIT License. See the LICENSE file for full details.