Release Notes
What changed in each release of @remotex-labs/xinject.
v1.0.0
Initial release: a tiny, dependency-free dependency-injection container with decorators, providers, and singleton/transient scopes.
Core
@Injectable: registers a class with the container, with per-class options and an optional custom factory. The registration is readable viagetInjectableOptions.@Inject: marks a constructor parameter for resolution by token, with explicit-argument overrides.injectandforceInject: resolve an instance from a class or token, with full type inference.
Providers
- Provider shapes: bare class (self-provided),
useClass,useFactory, anduseValue. InjectionToken: typed tokens for injecting values and interfaces, alongside string and symbol tokens.- Type guards:
isProviderUseClass,isProviderUseValue,isProviderUseFactory.
Scopes
Types
- Exported types:
InjectableOptionsInterface,TokenType,ProviderType,ProvidersType,ProviderUseClassInterface,ProviderUseValueInterface,ProviderUseFactoryInterface.
