import type { Except } from 'type-fest'; import { type Import, type Mode } from './types.js'; /** * Extracts the specifier from an import statement using a regular expression. * * @param statement - The import statement. */ export declare const extractSpecifier: (statement: string) => Except | null; /** * Detects the type of import specifier - whether it is a npm package, relative import or an alias. * * @param dependencies - An array of dependencies to check against. */ export declare const detectSpecifierType: (dependencies?: string[]) => (i: Except) => Except; /** * Detects the file extension of a given import specifier. * * @param i - ParsedImport object. */ export declare const detectFileExtension: (i: Except) => Import; /** * Extracts imports using TypeScript's AST. * * @param code - The source code string. * @param dependencies - List of package dependencies */ export declare const extractImportsAst: (code: string, dependencies: string[]) => Import[]; /** * Parses the import statements from the given code string using regex. * * @param code - The source code string. * @param dependencies - List of package dependencies */ export declare const extractImportsRegex: (code: string, dependencies: string[]) => Import[]; /** * Parses the import statements from the given code string using the specified mode. * * @param code - The source code string. * @param dependencies - List of package dependencies * @param mode - The extraction mode ('regex' or 'ast') */ export declare const extractImports: (code: string, dependencies: string[], mode?: Mode) => Import[];