@notjustcoders/ioc-arise
Version:
Arise type-safe IoC containers from your code. Zero overhead, zero coupling.
40 lines • 1.87 kB
TypeScript
import { BaseContainerGenerator } from './base-container-generator';
import { ClassInfo } from '../types';
/**
* Factory class for creating the appropriate container generator
* based on the input type (flat classes or module-grouped classes).
* Handles dependency injection at the factory level instead of constructor level.
*/
export declare class ContainerGeneratorFactory {
/**
* Creates the appropriate container generator based on the input type.
* Injects all necessary dependencies in the constructor.
*
* @param classesOrModules - Either a flat array of classes or a Map of module-grouped classes
* @param outputPath - The output path for the generated container file
* @returns The appropriate container generator instance with dependencies injected
*/
static create(classesOrModules: Map<string, ClassInfo[]>, outputPath: string): BaseContainerGenerator;
/**
* Determines if the input represents a modular structure.
*
* @param classesOrModules - The input to check
* @returns true if the input is a Map (modular), false if it's an array (flat)
*/
static isModular(classesOrModules: ClassInfo[] | Map<string, ClassInfo[]>): boolean;
/**
* Gets the total number of classes from either flat or modular input.
*
* @param classesOrModules - The input to count classes from
* @returns The total number of classes
*/
static getClassCount(classesOrModules: ClassInfo[] | Map<string, ClassInfo[]>): number;
/**
* Gets the number of modules from modular input.
*
* @param classesOrModules - The input to count modules from
* @returns The number of modules, or 1 for flat structure
*/
static getModuleCount(classesOrModules: Map<string, ClassInfo[]>): number;
}
//# sourceMappingURL=container-generator-factory.d.ts.map