Type Alias InjectableClass<Services, Service, Tokens>

InjectableClass<Services, Service, Tokens>: Tokens extends readonly ValidTokens<Services>[]
    ? {
        dependencies: Tokens;
        new (...args: AsTuple<CorrespondingServices<Services, Tokens<Tokens>>>): Service;
    }
    : never

Represents a class that can be used as an injectable service within a dependency injection Container. The InjectableClass type ensures that the class's dependencies and constructor signature align with the services available in the container, providing strong type safety.

Type Parameters

  • Services
  • Service
  • Tokens