/** * Single source of truth for which files are indexable and which * {@link SymbolLang} they map to. * * Keep this list broad: missing a native AST parser must never mean "skip * the file". Unknown programming/config sources still go through the generic * regex extractor under their mapped lang (or `'other'`). */ import type { SymbolLang } from './schema.js'; /** * Extension → language. Keys are lowercase including the leading dot. * Multi-dot extensions (`.d.ts`) are handled specially in {@link detectLang}. */ export declare const EXT_TO_LANG: Readonly>; /** Sorted unique extension list for discovery walks. */ export declare const INDEXABLE_EXTENSIONS: readonly string[]; /** * Detect {@link SymbolLang} from a file path. * Returns `null` only for paths we intentionally refuse to index (binary * assets, lockfiles handled elsewhere, plain `.txt` without special name, …). */ export declare function detectLang(file: string): SymbolLang | null; /** True when the path is eligible for the codebase index. */ export declare function isIndexablePath(file: string): boolean; /** * A group of {@link SymbolLang}s whose symbols may legitimately reference each * other by bare name. * * Ref resolution matches `to_name` against `symbols.name`. Done globally that * is actively wrong once more than one language is indexed: `main`, `New`, * `Get`, `String`, `__init__`, `Parse` and `Config` all exist in half a dozen * languages at once, so a Go call would resolve to a TypeScript declaration and * draw a Code Atlas edge between files that have nothing to do with each other. * Scoping resolution to a family keeps cross-language noise out while still * letting genuinely mixed families (`.ts`/`.tsx` + the script block of a * `.vue`/`.svelte` file, `.java`/`.kt` on the JVM) resolve into one another. */ type LangFamily = 'js' | 'go' | 'py' | 'rs' | 'jvm' | 'dotnet' | 'c' | 'ruby' | 'php' | 'swift' | 'dart' | 'elixir' | 'haskell' | 'zig' | 'lua' | 'r' | 'shell' | 'sql' | 'data' | 'web' | 'proto' | 'graphql' | 'other'; /** * `(lang, family)` pairs, for mirroring the mapping into SQLite so ref * resolution can join on it instead of expanding a family into an IN-list of * placeholders on every statement. */ export declare const LANG_FAMILY_ENTRIES: ReadonlyArray; /** Family a language resolves within. */ export declare function languageFamily(lang: SymbolLang): LangFamily; /** Every language in the same resolution family as `lang`, including itself. */ export declare function familyMembers(lang: SymbolLang): SymbolLang[]; export {}; //# sourceMappingURL=languages.d.ts.map