import { IResolverBase } from "./i-resolver"; import { Identifier, Node, SourceFile } from "typescript"; import { IClassService } from "../service/class/i-class-service"; import { IImportService } from "../service/import/i-import-service"; import { ITypescriptLanguageService } from "@wessberg/typescript-language-service"; import { IExportService } from "../service/export/i-export-service"; import { IInterfaceDeclarationService } from "../service/interface-declaration/i-interface-declaration-service"; import { IModuleUtil } from "@wessberg/moduleutil"; /** * A service that can resolve nodes from Identifiers */ export declare class Resolver implements IResolverBase { private readonly languageService; private readonly classService; private readonly interfaceDeclarationService; private readonly importService; private readonly exportService; private readonly moduleUtil; constructor(languageService: ITypescriptLanguageService, classService: IClassService, interfaceDeclarationService: IInterfaceDeclarationService, importService: IImportService, exportService: IExportService, moduleUtil: IModuleUtil); /** * Resolves declaration that the provided Identifier references * @param {Identifier} identifier * @param {SourceFile} sourceFile * @returns {Node} */ resolve(identifier: Identifier | string, sourceFile: SourceFile): Node | undefined; /** * Locates the provided Identifier within the ImportDeclarations of the given SourceFile * @param {string} identifier * @param {SourceFile} sourceFile * @returns {Node} */ private locateInSourceFileImports; /** * Locates an identifier within the ExportDeclarations of the provided SourceFile. * Will skip those that exports from the SourceFile itself since it has already * been checked. * @param {string} identifier * @param {SourceFile} sourceFile * @returns {Node} */ private locateInSourceFileExports; /** * Locates an Identifier within the provided ExportDeclaration * @param {string} identifier * @param {ExportDeclaration} exportDeclaration * @returns {Node} */ private locateInSourceFileExport; /** * Locates the identifier within all of the files referenced by Namespace exports in the given SourceFile * @param {string} identifier * @param {SourceFile} sourceFile * @returns {Node} */ private locateInSourceFileNamespaceExports; /** * Locates the definition for the given identifier within the provided SourceFile * @param {string} identifier * @param {SourceFile} sourceFile * @returns {Node} */ private locateInSourceFile; }