import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleContext } from "@typescript-eslint/utils/ts-eslint"; import type { Layer } from "effect"; import { Effect } from "effect"; import type { TypeScriptServiceError } from "../effects/errors.js"; import type { FilesystemService } from "../services/filesystem.js"; import type { TypeScriptCompilerServiceTag } from "../services/typescript-compiler-effect.js"; export type ModuleSpecifier = TSESTree.ImportSpecifier | TSESTree.ExportSpecifier; export interface TypeScriptServiceLayerContext { readonly layer: Layer.Layer; readonly hasTypeScript: boolean; } /** * Base configuration for import validation rules * * @purity SHELL */ export interface ImportValidationConfig { readonly validateSpecifier: (specifier: ModuleSpecifier, importName: string, modulePath: string, containingFilePath: string) => Effect.Effect; readonly fallbackValidationEffect?: (filesystemService: FilesystemService) => (importName: string, modulePath: string, contextFilePath: string) => Effect.Effect; readonly formatMessage: (result: TResult) => string; readonly messageId: string; readonly skipWhenTypeScriptAvailable?: boolean; } /** * Validates import specifier using TypeScript service with filesystem fallback * * @purity SHELL * @effect ESLint reporting, Effect execution * @complexity O(1) for validation, O(n) for suggestions where n = number of exports * @throws Never */ export declare const validateImportSpecifierBase: (specifier: TSESTree.ImportSpecifier, modulePath: string, config: ImportValidationConfig, context: RuleContext, tsService: TypeScriptServiceLayerContext) => void; /** * Validates export specifier in re-export statements using shared logic * * @purity SHELL */ export declare const validateExportSpecifierBase: (specifier: TSESTree.ExportSpecifier, modulePath: string, config: ImportValidationConfig, context: RuleContext, tsService: TypeScriptServiceLayerContext) => void; export declare const createTypeScriptServiceLayerForContext: (context: RuleContext) => TypeScriptServiceLayerContext; //# sourceMappingURL=import-validation-base.d.ts.map