Interface IDependencyRegistryEngine

Interface to facilitate the ability to add custom IOC containers by conforming to the proxy of adding and retrieval of services

interface IDependencyRegistryEngine {
    addService(serviceConstructor: any): void;
    clearAllServices(): void;
    getAllServices(): Set<unknown>;
    getService<T>(classType: T): null | InstanceOf<T>;
}

Implemented by

Methods

  • Add a service from the IOC container.

    Parameters

    • serviceConstructor: any

      The type of service to add

    Returns void

  • Clear all Discord service classes

    Returns void

  • Get all Discord service classes

    Returns Set<unknown>

  • Get a service from the IOC container

    Type Parameters

    • T

    Parameters

    • classType: T

      the Class of the service to retrieve

    Returns null | InstanceOf<T>

    the instance of this service or null if there is no instance