import Parser from 'web-tree-sitter'; /** * Lazily create (and cache) a tree-sitter parser configured for Python. * * The grammar is loaded from the prebuilt WebAssembly binary shipped by * `tree-sitter-wasms`, which avoids the native-build issues that the * `tree-sitter` Node bindings have on newer Node.js versions while still * giving us a proper parser instead of a regular expression. * * The native bindings fail to build on Node.js 24, see * https://github.com/tree-sitter/node-tree-sitter/issues/268 */ export declare function getPythonParser(): Promise; /** * Parse a Python source file with tree-sitter and return the top-level module * name of every import, in source order. * * - `import foo.bar` and `from foo.bar import baz` both yield `foo`. * - `import foo, bar` yields both `foo` and `bar`. * - Relative imports (`from . import x`) are ignored since they can never * reference another local project. */ export declare function extractImportedModules(parser: Parser, content: string): string[]; //# sourceMappingURL=infer.d.ts.map