/* auto-generated by NAPI-RS */ /* eslint-disable */ export * from '@oxc-project/types'; export interface Comment { type: 'Line' | 'Block' value: string start: number end: number } /** * # Panics * * * Tokio crashes */ export declare function parseAsync(sourceText: string, options?: ParserOptions | undefined | null): Promise export interface ParseResult { program: import("@oxc-project/types").Program comments: Array errors: Array } /** * Babel Parser Options * * */ export interface ParserOptions { sourceType?: 'script' | 'module' | 'unambiguous' | undefined sourceFilename?: string /** * Emit `ParenthesizedExpression` in AST. * * If this option is true, parenthesized expressions are represented by * (non-standard) `ParenthesizedExpression` nodes that have a single `expression` property * containing the expression inside parentheses. * * Default: true */ preserveParens?: boolean } /** * # Panics * * * File extension is invalid * * Serde JSON serialization */ export declare function parseSync(sourceText: string, options?: ParserOptions | undefined | null): ParseResult /** * Parse without returning anything. * This is for benchmark purposes such as measuring napi communication overhead. * * # Panics * * * File extension is invalid * * Serde JSON serialization */ export declare function parseWithoutReturn(sourceText: string, options?: ParserOptions | undefined | null): void