@notjustcoders/ioc-arise
Version:
Arise type-safe IoC containers from your code. Zero overhead, zero coupling.
28 lines • 909 B
TypeScript
import { ClassInfo } from '../types';
export declare class ImportGenerator {
private classes;
private aliasMap;
constructor(classes: ClassInfo[]);
/**
* Detects name collisions and generates unique aliases for colliding class names.
*/
private generateAliases;
/**
* Generates a unique alias based on the class name and its module path.
*/
private generateUniqueAlias;
/**
* Gets the alias for a class, or returns the original name if no alias exists.
*/
getClassAlias(classInfo: ClassInfo): string;
/**
* Gets the alias for a class by its import path.
*/
getClassAliasByPath(importPath: string): string;
/**
* Checks if a class has an alias (i.e., was involved in a name collision).
*/
hasAlias(classInfo: ClassInfo): boolean;
generateImports(): string;
}
//# sourceMappingURL=import-generator.d.ts.map