@notjustcoders/ioc-arise
Version:
Arise type-safe IoC containers from your code. Zero overhead, zero coupling.
39 lines • 1.96 kB
TypeScript
import { ConstructorParameter, InjectionScope } from '../types';
export declare class ASTParser {
parseFile(filePath: string): any;
findClassesImplementingInterfaces(root: any): any[];
findClassesExtendingClasses(root: any): any[];
findAllClasses(root: any): any[];
extractClassName(classNode: any): string | undefined;
extractInterfaceName(classNode: any): string | undefined;
extractParentClassName(classNode: any): string | undefined;
isAbstractClass(classNode: any): boolean;
extractConstructorParameters(classNode: any): ConstructorParameter[];
extractJSDocComments(root: any): Map<string, InjectionScope>;
extractScopeFromJSDoc(className: string, jsDocScopes: Map<string, InjectionScope>): InjectionScope;
extractTypeAliases(root: any): Map<string, string>;
extractImportMappings(root: any): Map<string, string>;
extractInterfaces(root: any): string[];
findAllFunctions(root: any): any[];
extractFunctionName(functionNode: any): string | undefined;
extractFunctionParameters(functionNode: any): ConstructorParameter[];
extractObjectTypeProperties(functionNode: any, paramName: string): {
name: string;
type: string;
}[];
extractFunctionReturnType(functionNode: any): string | undefined;
isExportedFunction(functionNode: any): boolean;
findAllExportedValues(root: any): any[];
extractValueName(valueNode: any): string | undefined;
extractValueType(valueNode: any): string | undefined;
isExportedValue(valueNode: any): boolean;
/**
* Finds names that are re-exported from external (non-relative) packages.
* Handles: export type { IFoo, IBar } from 'some-package'
* export { IFoo } from 'some-package'
* These names should be treated as valid DI tokens even though they have no
* local declaration.
*/
extractExternalReExports(root: any): string[];
}
//# sourceMappingURL=ast-parser.d.ts.map