import { CompilerHost, CompilerOptions, ExportDeclaration, ImportDeclaration, JSDocImportTag, ResolvedModule, SourceFile, StringLiteral } from 'typescript'; export declare function patternMatch(path: string, patterns: string[], base?: string): boolean; /** * A utility to resolve a module path and its declaration. * * It automatically reads a SourceFile, binds and caches it. */ export declare class Resolver { compilerOptions: CompilerOptions; host: CompilerHost; protected sourceFiles: { [fileName: string]: SourceFile; }; constructor(compilerOptions: CompilerOptions, host: CompilerHost, sourceFiles: { [fileName: string]: SourceFile; }); resolve(from: SourceFile, importOrExportNode: ExportDeclaration | ImportDeclaration | JSDocImportTag): SourceFile | undefined; protected resolveImpl(modulePath: StringLiteral, sourceFile: SourceFile): ResolvedModule | undefined; /** * Tries to resolve the .ts/d.ts file path for a given module path. * Scans relative paths. Looks into package.json "types" and "exports" (with new 4.7 support) * * @param sourceFile the SourceFile of the file that contains the import. modulePath is relative to that. * @param modulePath the x in 'from x'. */ resolveSourceFile(sourceFile: SourceFile, modulePath: StringLiteral): SourceFile | undefined; }