Tokens
A token is a runtime key with a TypeScript type.Providers
A provider tells the container how to create or return a dependency. Wyrly supports:useClassfor class-backed dependenciesuseValuefor constants and test doublesuseFactoryfor dependencies that need custom constructionuseExistingfor aliases
Containers
The root container owns application-wide registrations.Scopes
A scope is a child resolution context. In web apps, adapters usually create one scope per request.Lifetimes
Pick the narrowest lifetime that matches the dependency’s state and resource ownership.
Validation
Usecontainer.validate() to catch graph problems before production:
- missing providers
- circular dependencies
- invalid provider shapes
- lifetime violations