import type { LanguageDefinition } from './types.js'; /** * Canonical list of supported language IDs. * SupportedLanguage type is derived from this array. * To add a new language: add its ID here, then add its definition to `definitions` below. */ export declare const LANGUAGE_IDS: readonly ["typescript", "javascript", "php", "python", "rust", "go", "java", "csharp", "ruby", "kotlin", "swift"]; export type SupportedLanguage = (typeof LANGUAGE_IDS)[number]; /** * Get the full language definition for a supported language. * * @throws Error if language is not registered */ export declare function getLanguage(language: SupportedLanguage): LanguageDefinition; /** * Detect which AST-supported language a file belongs to, based on extension. * * @returns SupportedLanguage or null if not AST-supported */ export declare function detectLanguage(filePath: string): SupportedLanguage | null; /** * Check if a language is registered (non-throwing). */ export declare function languageExists(language: string): boolean; /** * True when `language`'s typical test files import their subject as a whole * module rather than a specific file/symbol path (see * `LanguageDefinition.wholeModuleImports`), so import-based test-association * matching can never resolve a test file to the specific source file(s) it * covers — a structural gap (#869), not a fixable matching bug. Callers use * this to give an honest "not determinable" signal instead of a misleading * "no coverage" one. Only Swift sets this today. */ export declare function hasWholeModuleImports(language: SupportedLanguage): boolean; /** * True when `language` lets a nested namespace body reference an *enclosing* * namespace's members unqualified, with no `using`/`import` directive at all * (see `LanguageDefinition.enclosingNamespaceAccess`). C# confirmed (#875): * import-based test-association has no per-file signal for a test file that * only reaches its subject this way. Distinct from `hasWholeModuleImports` — * a language can have working per-file import matching for its *explicit* * imports (C# does, #866/#868) while still having this gap for the implicit * case, so callers must not conflate the two. Only C# sets this today. */ export declare function hasEnclosingNamespaceAccess(language: SupportedLanguage): boolean; /** * True when `language`'s bare, potentially multi-segment import specifiers * always name a single file rather than a package directory whose files are * all implicitly members (see `LanguageDefinition.singleFileImports`, #887). * Only Ruby sets this `true` today; every other language (notably Go, whose * `import "pkg/sub"` names a directory) sets it `false`, keeping the * permissive package-directory matching `matchesFile` has always done. */ export declare function hasSingleFileImports(language: SupportedLanguage): boolean; /** * True when `language`'s dominant test convention colocates a test file in * the same directory as its subject with no import statement at all (see * `LanguageDefinition.sameDirectoryTestConvention`, #902). Only Go sets this * today. Unlike `hasWholeModuleImports`/`hasEnclosingNamespaceAccess`, a * caller consulting this recovers a real association (the directory itself * is reliable evidence), not just an honesty label — see * `go-same-directory-tests.ts`. */ export declare function hasSameDirectoryTestConvention(language: SupportedLanguage): boolean; /** * True when `language`'s dominant test convention places a test file in the * same package as its subject with no import statement at all, WITHOUT * Go-style same-directory bounding (see * `LanguageDefinition.samePackageTestConvention`, #925). Only Java sets this * today. Like `hasSameDirectoryTestConvention`, a caller consulting this * recovers a real association (the package-relative path is reliable * evidence) rather than just an honesty label — see * `java-same-package-tests.ts`. */ export declare function hasSamePackageTestConvention(language: SupportedLanguage): boolean; /** * True when `language` has a known reason the import graph structurally * cannot see every real usage within the current compilation/scoping unit — * i.e. a real caller can reach `language`'s exports from the SAME package, * namespace, or module with NO per-file import statement naming them at all * (#1005's Mechanism 2). Used by `get_dependents`'s `dependentAttributionIncomplete` * honesty caveat (see `dependency-analyzer.ts`'s `checkDependentAttributionIncomplete`) * to decide whether a zero-dependent FILE-LEVEL answer needs hedging. * * Composed from three existing, narrower capability flags plus one * Kotlin-only flag, rather than a fourth wholesale reinterpretation of any of * them — each already documents this exact same underlying language fact for * its own original, narrower purpose (see each flag's own doc comment): * - `enclosingNamespaceAccess` (C#'s nested-namespace access, #930/#936). * - `samePackageTestConvention` (Java's same-package access — previously * consulted for TEST association only, #925; the underlying fact "this * package needs no import to see it" is exactly the same gap for * `get_dependents`'s general file-level answer, not something specific * to tests). * - `wholeModuleImports` (Swift's whole-module access, #869/#884). * - `sameUnitAccessWithoutImport` (Kotlin — no existing flag to reuse; see * that flag's own doc comment for why). * * Deliberately EXCLUDES `sameDirectoryTestConvention` (Go): Go's * same-directory test convention already recovers a REAL association * (`go-same-directory-tests.ts`), not just an honesty label, and Go was not * part of #1005's measured 100%-orphan set — folding it in here would * demote an already-working recovery path down to a mere caveat. * * Does not change what any of the underlying flags mean, and no other code * should read a `true` result here as "this language has C#-style namespace * scoping" or any other single mechanism — it is deliberately the widest, * least specific of the four flags it composes. */ export declare function hasDependentAttributionBlindSpot(language: SupportedLanguage): boolean; /** * True when `language` sets `LanguageDefinition.namespaceStyleImports` (#1028) * -- i.e. its import specifiers use case-insensitive, directory-mirroring * namespaces, the one confirmed real semantic `matchesFile`'s Strategy 4 * (`matchesPHPNamespace`) exists for. Only PHP sets this today. See that * flag's own doc comment for the Rust `dtolnay/anyhow` false-positive * (`use crate::{Error}` self-matching `src/error.rs`) this excludes for * every other language. */ export declare function hasNamespaceStyleImports(language: SupportedLanguage): boolean; /** * Get all registered language definitions. */ export declare function getAllLanguages(): readonly LanguageDefinition[]; export declare function getSupportedExtensions(): string[]; //# sourceMappingURL=registry.d.ts.map