import { TSESTree } from '@typescript-eslint/utils'; import type { CompilerOptions, ModuleResolutionCache } from 'typescript'; export type MessageIds = 'missingTypeScript' | 'preferSourceImport' | 'preferSourceImports'; export type Options = [ { fixStyle?: 'auto' | 'preserve-alias' | 'relative'; ignore?: string[]; paths?: Record; tsconfig?: boolean | string; }? ]; export type ReExportTarget = { importedName: string; resolvedFilePath: string; sourceSpecifier: string; isTypeOnly: boolean; fromExportAll: boolean; isNamespace?: boolean | undefined; }; export type ReExportOrigin = { importedName: string; isNamespace: boolean; isTypeOnly: boolean; resolvedFilePath: string; sourceSpecifier: string; }; export type NamedImportSpecifier = TSESTree.ImportSpecifier & { imported: TSESTree.Identifier; local: TSESTree.Identifier; }; export type SupportedImportSpecifier = NamedImportSpecifier | TSESTree.ImportDefaultSpecifier; export type MatchedSpecifier = { preferredSourceSpecifier: string | null; specifier: SupportedImportSpecifier; reExportTarget: ReExportTarget; }; export type ReExportKind = 'value' | 'type' | 'value-or-type'; export type BarrelAnalysis = { lookup(importedName: string, kind: ReExportKind): ReExportTarget | undefined; }; export type AnalysisCaches = { exportedBindings: Map>; parsedModules: Map; }; export type TsconfigInfo = { compilerOptions: CompilerOptions; configFilePath: string; moduleResolutionCache: ModuleResolutionCache; }; export type ResolutionCaches = { barrelAnalyses: Map; importResolutions: Map; tsconfigInfo: Map; tsconfigPaths: Map; }; export type ImportResolverCaches = { analysis: AnalysisCaches; resolution: ResolutionCaches; }; export type ImportResolver = { getBarrelAnalysis(barrelFilePath: string): BarrelAnalysis | null; getPreferredSourceSpecifier(importerFilename: string, originalImportSpecifier: string, reExportTarget: ReExportTarget): string | null; resolveImport(importerFilename: string, specifier: string): string | null; }; export type ManualAliasMapping = { pattern: string; target: string; }; //# sourceMappingURL=types.d.ts.map