Elestia Open Source Ratings
5.2

TSyringe

Reasonable, with limits. 5th of 7 dependency injection.

TSyringe is Microsoft's small, decorator-based DI container for TypeScript. It is simple and works, but it depends on legacy experimental decorators and reflect-metadata. It has had one commit and no npm release in the last year, so it is best kept where it already runs rather than chosen for new work.

Best for: Existing TypeScript codebases that already use experimentalDecorators and want a minimal constructor-injection container.

GitHubnpm

Scores

Overall5.2

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

TSyringe is pleasant and small, but it is close to dormant and tied to legacy decorators that modern toolchains increasingly do not support. Awilix is actively maintained and needs no decorators, and Inversify has kept releasing and offers more features; both are better picks for new work. Keep TSyringe where it already runs.

  • peers Awilix commitsLastYear: Awilix: 68 commits and a release in November 2026
  • peers InversifyJS latestPublishedAt: Inversify published 2026-11-07
  • github.com/microsoft/tsyringe/issues/225: No path to standard decorators
  • github commitsLastYear: 1 commit in the last year

GPT-6.2 Sol: 6.3, likely 5.2 to 7.4

TSyringe is a reasonable choice for class-heavy TypeScript projects that already emit legacy decorator metadata. Awilix is the stronger default for a new Node.js project because it works without decorators and has a much more active release and maintenance record. The upper end of the range reflects how little wiring TSyringe needs in a compatible build, while the lower end reflects uncertain support as build tools change.

  • github.com/microsoft/tsyringe: Shows the compact constructor injection API and its build requirements.
  • github.com/jeffijoe/awilix: Documents decorator-free registration and strict lifetime checks.
  • github.commitsLastYear, npm.latestPublishedAt, peers: TSyringe trails Awilix on recent commits and release activity.
Needed by many4.1

How many developers need a tool for this job?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

Few JavaScript or TypeScript projects use a standalone DI container; it is mostly used by backend and large-app teams. TSyringe narrows that further to TypeScript projects that accept legacy decorators and metadata emission.

  • npm-compare.com/awilix,inversify,tsyringe: Compares the decorator-based tsyringe and Inversify with Awilix, which needs no decorators
  • DI usage in JS ecosystem: Standalone DI containers are a niche outside NestJS and Angular

GPT-6.2 Sol: 4.2, likely 3.1 to 5.4

A container is useful when a class-heavy app has many services to construct or needs several lifetimes. Smaller apps can wire services directly, and some frameworks supply their own container. TSyringe works across frameworks, but its legacy decorator setup narrows the fit, and the State of JavaScript survey measures TypeScript use without measuring demand for standalone containers.

Helps a lot6.1

How well does it do the job for those who need it?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

The core features are simple and solid: constructor injection, tokens, lifecycles and child containers. It is tied to legacy decorators and reflect-metadata, has no support for standard decorators, and fails with toolchains that do not emit metadata, such as tsx and Vite. Open bugs in disposal and scoping, plus a smaller feature set than Inversify, keep it mid-range.

GPT-6.2 Sol: 7.2, likely 6.2 to 8.2

Version 4.10.0 covers everyday constructor injection well, with four lifetimes, child containers, factories, and disposal. The examples give coding agents a clear pattern to copy, but TypeScript cannot catch missing token registrations and users report runtime failures with tsx. An external benchmark found good throughput against Awilix and InversifyJS in several scenarios, though the results come from one competitor’s test suite.

Holds up over time3.4

Will it still be a good choice in two years?

Claude Opus 5.5: 2.5, likely 1.5 to 4.0

There was one commit and no npm release in the last year; the last publish, 4.10.0, was in April 2025. GitHub release tags stopped at v4.4.0 in 2020, and a changelog request sits untriaged. The ecosystem is moving towards standard decorators and decorator-free containers, so the project is drifting away from where TypeScript is going, even though it is not archived and sits under Microsoft.

  • github commitsLastYear: 1 commit in the last year
  • npm versionsLastYear: 0 versions in the last year; latest 4.10.0 from 2025-04-16
  • github openIssues / closedIssues: 64 open against 89 closed
  • github.com/microsoft/tsyringe/issues: Many issues labelled awaiting triage, including #271 asking for a changelog
  • bluesky top: A user noted the last commit was two years old and hesitated to adopt it

GPT-6.2 Sol: 4.3, likely 3.2 to 5.7

The repository recorded one commit in the past year, and npm last shipped version 4.10.0 in April 2025. The library has stayed on major version 4 for years, but the open standard-decorator issue and the pull request backlog make future tooling support uncertain. Awilix shows much more recent development, and InversifyJS has published more recently.

  • github.commitsLastYear, github.openPullRequests, npm.latestPublishedAt, npm.versionsLastYear: One commit, 21 open pull requests, and no npm release within the past year.
  • github.com/microsoft/tsyringe/releases: GitHub release notes stop at 4.4.0, behind the npm package.
  • javascripts.com/packages/tsyringe: npm version history shows 4.x releases from 2019 through April 2025.
  • github.com/microsoft/tsyringe/issues/225: The question about standard TypeScript decorators has been open since 2023.
  • peers: Awilix recorded 68 commits, and both Awilix and InversifyJS published in November 2026.
Used widely5.8

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

Downloads jumped from 4.5M to 91.8M per 4 weeks, a ratio of about 20 against a median of 4.1. That jump is almost certainly transitive, coming through packages such as @peculiar/x509 and not from developers choosing it. Dependents are a better guide: 6,704 repos and 642 packages, behind Inversify (17.6k) and injection-js (13.6k) but ahead of Awilix and TypeDI. Direct choice probably counts in the tens of thousands of projects and is not clearly growing.

GPT-6.2 Sol: 5.6, likely 4.3 to 6.9

Four-week downloads rose from 4.49 million to 91.79 million, about 20.4 times the prior year and well above the 4.1 times catalog baseline. webpack-dev-server’s move to selfsigned 5 brought in TSyringe through @peculiar/x509 and likely accounts for a substantial share of the surge. The 6,704 tracked dependent repositories put it ahead of Awilix and behind InversifyJS and injection-js. Sparse recent discussion and the unknown share of indirect installs leave growth in direct adoption uncertain.

Vouched for5.4

Who stands behind it being good?

Claude Opus 5.5: 4.5, likely 3.0 to 6.0

It is backed by the Microsoft organisation and used by libraries such as @peculiar/x509. A few company write-ups, such as GameChanger's, report good results. There are no current survey data, independent benchmarks or framework that builds on it, and most endorsements are old.

GPT-6.2 Sol: 6.2, likely 5.0 to 7.3

Peculiar Ventures uses TSyringe in its X.509 library, Discordx maintains an integration, and Siemens lists it in SINEC NMS. Developers report that the API is simple to extend in a monorepo, alongside tooling complaints from other users. The evidence shows use in real software, while broad satisfaction and retention data remain scarce.

Safe7.2

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It has no advisories ever and a single dependency (tslib) under an MIT licence. The Scorecard of 7.2 is from 2022 and stale, with weak Maintained and Token-Permissions checks. Low maintenance means slow responses if a problem ever appears.

  • advisories total: 0 advisories
  • npm dependencies: 1 dependency
  • scorecard: 7.2 from 2022-08-15; Maintained 3, Token-Permissions 0
  • security.snyk.io/package/npm/tsyringe: Snyk lists no known vulnerabilities

GPT-6.2 Sol: 7.4, likely 6.2 to 8.5

The MIT license, one declared runtime dependency, and zero recorded OSV advisories support a favorable rating. Standard setup also loads a separate Reflect polyfill. Microsoft publishes a security reporting policy, the project documents a GitHub Actions release trigger, and npm lists two maintainers. The 2022 Scorecard flagged token permissions and fuzzing, and sparse recent releases leave current publishing controls and patch response uncertain.

  • advisories.total, npm.dependencies, npm.license: Zero OSV advisories, one declared dependency, and a permissive MIT license.
  • scorecard: The August 2022 score was 7.2, with zeroes for token permissions and fuzzing.
  • github.com/microsoft/tsyringe: Documents the separate Reflect polyfill and the version-change trigger for releases.
  • github.com/microsoft/tsyringe/security: Microsoft provides a coordinated vulnerability disclosure process.
  • socket.dev/npm/package/tsyringe: Lists two npm maintainers.

Good

  • Very small API: @injectable(), @inject() and container.resolve() cover most needs with little setup.
  • Only one runtime dependency (tslib), an MIT licence and no known advisories.
  • Child containers, scoped lifecycles and token-based injection cover typical app and test needs.
  • It sits in the Microsoft GitHub organisation and is well represented in tutorials and AI training data.

Bad

  • It needs experimentalDecorators, emitDecoratorMetadata and a reflect-metadata polyfill, and it does not support TC39 standard decorators.
  • Maintenance has nearly stopped: one commit and no npm release in the last year, and many issues are still awaiting triage.
  • Users report open problems with tsx, Vite and other esbuild-based toolchains, which do not emit decorator metadata.
  • There are known open bugs around disposal and resolution scopes, such as #274, #285 and #289.

The numbers

npm downloads, 4 weeks
92M ×20 in a year
GitHub stars
6k
Commits, 12 months
1
npm version
4.10.0 Apr 2025
Versions, 12 months
0
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
7.2 out of 10, Aug 2022
Licence
MIT

Read on 21 November 2026 from GitHub (microsoft/tsyringe), npm (tsyringe), OSV and the OpenSSF Scorecard.

Dependency injection

  1. 7.5Awilix
  2. 7.4InversifyJS
  3. 6.3Needle DI
  4. 5.2injection-js
  5. 5.2TSyringe
  6. 4.7Brandi
  7. 3.1TypeDI
Compare all 7 on six scores