awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
typestack avatar

typestack/typedi

0
View on GitHub↗
4,242 stars·165 forks·TypeScript·MIT·23 viewsdocs.typestack.community/typedi/v/develop/01-getting-started↗

Typedi

TypeDI is a TypeScript dependency injection container and inversion of control tool. It functions as a centralized registry and service locator that manages object instantiation and decouples component dependencies using type inference and decorators.

The project provides scoped dependency management to isolate service instances within specific contexts, preventing data leakage between different execution flows. It supports flexible service resolution through the use of type-safe tokens and the ability to map unique identifiers or class constructors to specific service instances.

The container covers comprehensive service lifecycle management, including singleton and transient lifetimes, as well as the resolution of circular references. It includes capabilities for service grouping, factory-based instantiation, and integration with external frameworks. For quality assurance, the system provides utilities for dependency mocking and resetting container state to ensure isolation during unit testing.

Features

  • TypeScript Dependency Injection Libraries - A specialized dependency injection library utilizing TypeScript decorators and type inference to decouple class dependencies.
  • Dependency Injection - Provides a comprehensive TypeScript container for decoupling software components through automated dependency injection.
  • Metadata-Driven Dependency Injection - Implements a system that uses TypeScript decorators and metadata for automatic service registration and resolution.
  • Hierarchical Containers - Provides hierarchical containers that allow for scoped dependency resolution and isolated service sets across different contexts.
  • Execution Context Isolation - Provides scoped dependency management to isolate service instances within specific contexts and prevent data leakage between execution flows.
  • Dependency Injection Containers - Implements a container that manages service lifecycles and resolves class dependencies using TypeScript-specific metadata.
  • Inversion-of-Control Containers - Functions as a centralized registry that manages object lifecycles and dependency wiring to decouple components.
  • Instance Lifecycles - Manages service lifetimes, allowing users to define whether dependencies should be shared singletons or fresh transient instances.
  • Dependency Lifetimes - Implements comprehensive service lifecycle management, supporting both singleton and transient lifetimes for optimized memory and state handling.
  • Service Dependency Registration - Provides a centralized registry to map classes and unique tokens to their respective service implementations.
  • Service Locators - Provides a centralized registry for resolving and retrieving shared or transient service instances via unique tokens.
  • Token-Based Service Mapping - Allows decoupling of service retrieval by mapping unique identifiers or class types to specific service implementations.
  • Service Lifetime Scopes - Provides configuration for service lifetimes, specifically supporting singleton and transient scopes within the container.
  • Type-Safe Tokens - Implements type-safe tokens to prevent errors caused by using string identifiers for service retrieval.
  • Isolated Resolution Scopes - Implements isolated resolution scopes to prevent data leakage between separate execution flows or users.
  • Circular Dependency Resolvers - Provides mechanisms to break circular dependency loops during object instantiation using proxies or delayed resolution.
  • Dependency Injection Integrations - Provides a bridge to integrate third-party libraries and external frameworks into the centralized dependency container.
  • Custom Injection Logic - Allows the creation of specialized decorators and factory functions to define custom instantiation logic for dependencies.
  • Factory-Based Instantiation - Supports the creation of complex services through custom factory functions that handle dynamic setup logic.
  • Circular Dependency Resolution - Handles circular dependencies between components by deferring registration and using function-based resolution.
  • Function - Enables the resolution of dependencies for standalone functions and factory objects in addition to standard classes.
  • Named Service Injection - Allows controlling which specific service instance is injected by associating them with unique names or identifiers.
  • Modular Application Architectures - Supports organizing services into scoped containers and groups to manage complex dependencies between application modules.
  • Dependency Mocking - Provides mechanisms to replace registered services with mock implementations for isolated unit testing.
  • Unit Testing - Enables component isolation during automated tests by substituting real service implementations with mock objects.

Star history

Star history chart for typestack/typediStar history chart for typestack/typedi

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does typestack/typedi do?

TypeDI is a TypeScript dependency injection container and inversion of control tool. It functions as a centralized registry and service locator that manages object instantiation and decouples component dependencies using type inference and decorators.

What are the main features of typestack/typedi?

The main features of typestack/typedi are: TypeScript Dependency Injection Libraries, Dependency Injection, Metadata-Driven Dependency Injection, Hierarchical Containers, Execution Context Isolation, Dependency Injection Containers, Inversion-of-Control Containers, Instance Lifecycles.

Which projects share features with typestack/typedi?

Projects with overlapping indexed features include: microsoft/tsyringe — tsyringe is a TypeScript dependency injection container and inversion of control framework. It decouples class… ets-labs/python-dependency-injector — This is a dependency injection framework and inversion of control container for Python. It decouples object creation… inversify/inversifyjs — InversifyJS is an inversion of control framework and dependency injection library for TypeScript. It provides a… jeffijoe/awilix — Awilix is a JavaScript dependency injection framework and inversion of control container. It provides a centralized… autofac/autofac — Autofac is a dependency injection framework and inversion of control container for .NET. It functions as a component… code4craft/tiny-spring — tiny-spring is a Java inversion of control container and aspect-oriented programming framework. It provides a system…

Projects sharing features with Typedi

These projects share indexed features with Typedi. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • microsoft/tsyringemicrosoft avatar

    microsoft/tsyringe

    5,960View on GitHub↗

    tsyringe is a TypeScript dependency injection container and inversion of control framework. It decouples class implementations from object creation by managing dependencies and object lifecycles using decorators and metadata. The framework features a hierarchical container system where child containers can maintain independent registration scopes and fall back to parent containers for dependency resolution. It provides a provider system that controls object longevity through singleton and transient instantiation rules. The system supports recursive constructor injection and handles circular

    TypeScriptcontainerdecoratorsdependency
    View on GitHub↗5,960
  • ets-labs/python-dependency-injectorets-labs avatar

    ets-labs/python-dependency-injector

    4,805View on GitHub↗

    This is a dependency injection framework and inversion of control container for Python. It decouples object creation from business logic by managing how services and their dependencies are assembled, delivered, and linked within an application. The framework is distinguished by its ability to perform automated component wiring, using import hooks and decorators to inject dependencies into functions and classes across different modules. It supports non-blocking flows through an asynchronous dependency resolver and manages the initialization and shutdown sequences of shared external resources a

    Pythonaiohttpasynciodependency-injection
    View on GitHub↗4,805
  • inversify/inversifyjsinversify avatar

    inversify/InversifyJS

    12,066View on GitHub↗

    InversifyJS is an inversion of control framework and dependency injection library for TypeScript. It provides a centralized container to manage object lifecycles and automate the instantiation of classes and their dependencies. The library decouples software components by mapping unique identifiers to concrete implementations. This architecture separates object creation from business logic and allows for the replacement of real service implementations with mock objects during unit testing. The framework utilizes TypeScript decorators to provide metadata-driven injection and recursive depende

    TypeScript
    View on GitHub↗12,066
  • jeffijoe/awilixjeffijoe avatar

    jeffijoe/awilix

    4,088View on GitHub↗

    Awilix is a JavaScript dependency injection framework and inversion of control container. It provides a centralized system for registering and resolving services, decoupling application components by automating how dependencies are created and passed to the functions or classes that require them. The framework features an automatic module loader that scans the filesystem using glob patterns to register dependencies based on filenames and exports. It supports parameter-name-based injection and proxy-based resolution to manage how dependencies are delivered to constructors and functions. The s

    TypeScriptawilixdependency-injectionioc
    View on GitHub↗4,088
Compare all 30 related projects→