hstar9527

A dependency injection library for TypeScript

53
7
100% credibility
Found Feb 11, 2026 at 24 stars 2x -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

star-ts-di is a lightweight library for TypeScript that simplifies connecting and managing dependencies between services in applications using simple tags.

How It Works

1
🕵️ Discover star-ts-di

You hear about a handy tool that makes connecting app helpers super simple, like magic wiring for your project.

2
💡 Plan your helpers

Think about the support pieces your app needs, like a logger for messages and a reader for settings.

3
Mark helper spots

Add friendly tags in your app code to show exactly where each helper should connect.

4
📋 Register your helpers

List out which real helpers match those tags, like your console logger and environment reader.

5
🔗 Build the main app

Create your app's core, and watch it automatically grab and link all the helpers it needs.

6
▶️ Start your app

Run your app, and everything flows together without any manual setup hassle.

🎉 App works perfectly

Your app springs to life with all helpers connected seamlessly, ready for action.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 24 to 53 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is star-ts-di?

star-ts-di is a lightweight dependency injection container for TypeScript, enabling decorator-based injection in constructors for clean service wiring. It handles automatic dependency resolution, cycle detection, and instance creation from a simple registry, much like the dependency injection pattern in Java, C#, Python, or Rust—but optimized for TypeScript apps. Developers get runtime DI without manual new calls, supporting interfaces and env-based configs out of the box.

Why is it gaining traction?

Its minimal API stands out: create token decorators, register impls in a collection, and instantiate with one call—no complex scopes or factories needed, unlike heavier options. Full test coverage enforcement and multi-format bundles (ESM, CJS, UMD) make it drop-in friendly for Node or browser projects. Ties into GitHub dependency graph and insights workflows, appealing to devs tracking dependency injection typescript alongside tools like github dependency bot or dependency track.

Who should use this?

TypeScript backend devs building modular Node services, like API handlers with logging and config layers. Frontend TS library authors wanting lightweight DI without Angular's overhead. Teams prototyping micro-apps or porting dependency injection erklärung from C# to TS, especially if eyeing github dependency check integration.

Verdict

With 18 stars and 1.0% credibility score, star-ts-di is early-stage but promising for small projects—solid README quickstart and 100% test thresholds show care, though dispose handling lags. Try for prototypes; skip for production until more adoption.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.