Creates a child scope (child container) Useful for HTTP requests, transactions, or isolated contexts
New scoped provider instance
Releases provider resources Called during application cleanup or shutdown
Checks if a token is already registered in the container
Token to check
true if the token is registered, false otherwise
Registers a class in the container
The type of the class instance
Token (symbol or class) to register under
Optionalimplementation: Constructor<T>Class to instantiate (optional if token is a class)
Optionallifecycle: ProviderLifecycleInstance lifecycle (Singleton, Transient, or Scoped)
Registers a factory function in the container
The type of the value produced by the factory
Symbol token to register the factory under
Function that creates the instance (receives the provider to resolve dependencies)
Registers a static value in the container
The type of the value
Symbol token to register the value under
The value to register
Resolves a dependency from the container
The type of the resolved dependency
Token of the dependency to resolve
Instance of the dependency
DI Container Provider Interface
Contract that each adapter (tsyringe, awilix, inversify, etc.) must implement to be compatible with WireDI.
Example