PACKAGE · ORM & DATABASE

typeorm

Data-Mapper ORM for TypeScript and ES2023+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.

WEEKLY DOWNLOADS 5.4M
STARS 36.7K
FORKS 6.7K
OPEN ISSUES 681
GZIP SIZE 147.3 kB
UNPACKED SIZE 21.7 MB
DEPENDENCIES 10
LAST UPDATED 7mo ago
DOWNLOAD TRENDS

typeorm downloads · last 12 months

Download trends for typeorm1 download series from Oct 2025 to Sep 2026. Use left and right arrow keys to inspect monthly values.05.4M10.8M16.2M21.6MOct 2025JanAprJulSep 2026
typeorm
ABOUT TYPEORM

TypeORM is a powerful Object-Relational Mapper (ORM) designed for TypeScript and modern JavaScript (ES2023+). It bridges the gap between object-oriented programming paradigms and relational databases, simplifying database interactions by allowing developers to work with database entities as JavaScript/TypeScript objects. This abstraction layer helps manage database schemas, queries, and data persistence with less boilerplate code.

The core philosophy of TypeORM is to provide a flexible and robust ORM that supports multiple database types and different development patterns. It caters to developers who prefer working with TypeScript's strong typing for improved code quality and maintainability. The library aims to be an enterprise-grade solution, offering features necessary for complex applications while remaining accessible for smaller projects.

TypeORM supports both the Active Record and Data Mapper patterns. With the Active Record pattern, entities themselves contain methods for database operations like saving or removing. The Data Mapper pattern separates entities from the database logic, using dedicated mapper classes for persistence operations. Key features include schema synchronization, migrations, complex query building, and support for relations (one-to-one, one-to-many, many-to-many).

It integrates seamlessly with popular Node.js frameworks like NestJS, Express, and Koa, providing decorators and utilities that fit well within these ecosystems. TypeORM also works with various database clients and can be configured to connect to supported databases such as PostgreSQL, MySQL, MS SQL Server, Oracle, SAP HANA, SQLite, and even MongoDB, offering broad compatibility.

With a significant presence indicated by 36.6K GitHub stars and 4.0M weekly downloads, TypeORM is a mature and widely adopted solution. Its unpacked size of 21.7 MB and gzipped bundle size of 147.3 kB suggest a comprehensive feature set, which may be a consideration for bundle-size-sensitive applications. The last update in 2026-09-01 indicates ongoing development and maintenance.

Developers should be aware that the extensive feature set and flexibility can introduce a learning curve. Managing complex data relationships and ensuring optimal query performance might require careful attention to TypeORM's configuration and usage patterns. The 620 open issues suggest an active community but also potential areas where bugs or feature requests are being addressed.

WHEN TO USE
  • When building applications that require strong typing for database entities and relationships using TypeScript.
  • When your project needs to support multiple database systems like PostgreSQL, MySQL, or SQLite within the same codebase.
  • To leverage the Data Mapper pattern for a cleaner separation between your business logic and data access layers.
  • When automating database schema synchronization and managing migrations across development, staging, and production environments.
  • To utilize decorators for defining entities, columns, and relations, simplifying the mapping between your code and database tables.
  • When integrating with Node.js frameworks like NestJS, which has built-in support and examples for TypeORM.
WHEN NOT TO USE
  • If you only require simple data storage and retrieval for a small, less complex application, a lighter solution or direct SQL queries might be more appropriate.
  • When working with NoSQL databases that do not fit TypeORM's primary relational and document database mapping capabilities.
  • If minimizing frontend bundle size is a critical requirement, as the 147.3 kB gzipped size may be prohibitive for certain client-side scenarios.
  • For projects where managing database migrations and schema evolution is not a primary concern.
  • If the learning curve associated with configuring and effectively using an ORM with many features is a significant blocker for rapid development.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 6
typeorm vs knex ★ 20.3K · 5.2M/wk typeorm vs sequelize ★ 30.4K · 2.7M/wk typeorm vs mongoose ★ 27.5K · 6.7M/wk typeorm vs kysely ★ 14.3K · 17.6M/wk typeorm vs drizzle-orm ★ 35.9K · 25.2M/wk typeorm vs prisma ★ 22 · 17.7M/wk