import type { ParseResult, ParserOptions } from 'oxc-parser'; export type ParseSync = (filename: string, source: string, options?: ParserOptions) => ParseResult; /** * oxc-parser's `parseSync`. Its native binding can be missing, e.g. when * optional dependencies weren't installed or node_modules was copied from * another platform; `oxcLoadError` is thrown then, and again on every later * call without retrying the load. */ export declare function loadOxcParser(): ParseSync; /** * A failure to load oxc-parser, named as such: its own error ("Cannot find * native binding", with how to reinstall) doesn't say which package it is * about. */ export declare function oxcLoadError(error: unknown): Error; /** * Parses a TypeScript or JSX file the way its extension says: declaration * files allow syntax that regular files don't, and JSX is only enabled for * `.tsx` and `.jsx`, since in a `.ts` file type brackets would confuse the * parser. `.cts` files are CommonJS, the rest modules. * * @throws SyntaxError on the first syntax error, with its line and column. * oxc recovers from syntax errors and returns a partial AST, which is never * returned here. */ export declare function parseWithOxc(parseSync: ParseSync, filePath: string, contents: string, options?: ParserOptions): ParseResult;