interface ModuleRepository<T extends ModuleInstance = ModuleInstance> {
    addResolver: (resolver: ModuleResolverInstance<T>) => this;
    priority: ObjectResolverPriority;
    removeResolver: (resolver: ModuleResolverInstance<T>) => this;
    root: ModuleInstance;
    add(mod: T): this;
    add(mod: T[]): this;
    add(mod: T | T[]): this;
    remove(address: string[] | Lowercase<string>): this;
    resolve<T extends ModuleInstance = T>(): Promisable<undefined | T>;
    resolve<T extends ModuleInstance = T>(
        all: "*",
        options?: ObjectFilterOptions<T>,
    ): Promisable<T[]>;
    resolve<T extends ModuleInstance = T>(
        id: string,
        options?: ObjectFilterOptions<T>,
    ): Promisable<undefined | T>;
    resolve<T extends ModuleInstance = T>(
        filter: ObjectFilter<T>,
        options?: ObjectFilterOptions<T>,
    ): Promisable<T[]>;
    resolve<T extends ModuleInstance = T>(
        filter?: ObjectFilter<T>,
        options?: ObjectFilterOptions<T>,
    ): Promisable<T[]>;
    resolve<T extends ModuleInstance = T>(
        idOrFilter?: string | ObjectFilter<T>,
        options?: ObjectFilterOptions<T>,
    ): Promisable<undefined | T | T[]>;
    resolveIdentifier(
        id: string,
        options?: ObjectFilterOptions,
    ): Promisable<undefined | Lowercase<string>>;
    resolvePrivate<T extends ModuleInstance = T>(
        all: "*",
        options?: ObjectFilterOptions<T>,
    ): Promise<T[]>;
    resolvePrivate<T extends ModuleInstance = T>(
        id: string,
        options?: ObjectFilterOptions<T>,
    ): Promise<undefined | T>;
    resolvePrivate<T extends ModuleInstance = T>(
        id: string,
        options?: ObjectFilterOptions<T>,
    ): Promise<undefined | T | T[]>;
}

Type Parameters

Hierarchy (View Summary)

Properties

addResolver: (resolver: ModuleResolverInstance<T>) => this
removeResolver: (resolver: ModuleResolverInstance<T>) => this

Methods