UNPKG

@notjustcoders/ioc-arise

Version:

Arise type-safe IoC containers from your code. Zero overhead, zero coupling.

32 lines 1.79 kB
import { ClassInfo, FactoryInfo, ValueInfo } from '../types'; import { TsConfigPathsResolver } from '../utils/tsConfigPathsResolver'; export declare class IoCContainerGenerator { /** * Generates the IoC container code for the given classes * @param classes - Analyzed classes to be registered (can be flat or grouped) * @param outputPath - Path where the container file will be generated * @param moduleGroupedClasses - Optional: Classes grouped by modules * @param factories - Optional: Factory functions to be registered * @param values - Optional: Plain object values to be registered with useValue */ static generate(classes: ClassInfo[], outputPath: string, moduleGroupedClasses?: Map<string, ClassInfo[]>, factories?: FactoryInfo[], values?: ValueInfo[], moduleGroupedFactories?: Map<string, FactoryInfo[]>, moduleGroupedValues?: Map<string, ValueInfo[]>, pathsResolver?: TsConfigPathsResolver, isModular?: boolean): string[]; private static generateFlatCode; private static generateModularFiles; private static generateModuleFile; private static generateModuleFactoryRegistrations; private static generateModuleValueRegistrations; private static generateMainContainerFile; private static generateModularCode; private static generateModuleDefinitions; private static generateModuleInstantiations; private static generateModuleRegistrations; private static generateImports; /** * Checks for class name collisions and throws an error if any are found */ private static checkForNameCollisions; private static generateRegistrations; private static generateFactoryRegistrations; private static generateValueRegistrations; } //# sourceMappingURL=ioc-container-generator.d.ts.map