Bind a class to itself (syntactic sugar)
Class constructor
Optional
options: ServiceOptionsService options
Clear all singleton instances Useful for testing or resetting the container
Create a scoped container (child container) Useful for request-scoped services
Get a service from the container with automatic type inference
Service identifier (interface token or class) - strings are not supported
Service instance with correct type inferred from the key
Get a service from the container with automatic type inference
Service identifier (interface token or class) - strings are not supported
Service instance with correct type inferred from the key
Check if a service is registered
Service identifier
true if the service is registered
Register a service with the container using type-safe keys
Service identifier (interface token or class) - strings are not supported
Factory function to create the service
Service registration options
Register all services at once (bulk registration)
Array of service registrations
Type-safe Service Container for Dependency Injection
Features: