Skip to content

v0.8.0 is ready!

Choose a tag to compare

@riktar riktar released this 23 Jan 18:17
· 35 commits to main since this release

Implement Abstract Class-Based DI with @Primary and @Named decorators
Add comprehensive dependency injection pattern using abstract classes as contracts:

Features:

  • @Implements decorator: register implementations for abstract classes,
  • @Primary decorator: select default implementation when multiple exist,
  • @Named decorator: qualified injection for specific named implementations,
  • Full registry tracking and container resolution,
  • Support for both property and constructor injection,
  • Combine @Primary with @Named for default + specific access,

Changes:

  • Add 16 comprehensive tests,
  • Update documentation with examples,

https://rikta.dev/docs/fundamentals/dependency-injection#3-use-abstract-classes-for-complex-contracts