import { A as detectCodeFormat, C as ProxifiedModule, D as ProxyBase, E as ProxifiedValue, O as ProxyType, S as ProxifiedMemberExpression, T as ProxifiedObject, _ as ProxifiedFunctionExpression, a as LocPosition, b as ProxifiedImportsMap, c as BinaryOperator, d as ProxifiedArray, f as ProxifiedArrowFunctionExpression, g as ProxifiedFunctionCall, h as ProxifiedBlockStatement, i as Loc, j as Options, k as CodeFormatOptions, l as ImportItemInput, m as ProxifiedBinaryExpression, n as GenerateOptions, o as ParsedFileNode, p as ProxifiedAwaitExpression, r as GenerateResult, s as Token, t as ASTNode, u as Proxified, v as ProxifiedIdentifier, w as ProxifiedNewExpression, x as ProxifiedLogicalExpression, y as ProxifiedImportItem } from "./types-DIXJPpmb.js"; //#region src/builders.d.ts /** Builders for constructing and proxifying JavaScript expressions. */ export declare const builders: { /** * Create a proxified function call expression. * * Arguments are serialized as JavaScript literals; use {@link raw} for source * expressions such as identifiers, callbacks, or member access. * * @param callee Identifier naming the called function. * @param args Values to serialize as call arguments. */ functionCall(callee: string, ...args: unknown[]): Proxified; /** * Create a proxified `new` expression. * * Arguments are serialized as JavaScript literals. * * @param callee Identifier naming the constructor. * @param args Values to serialize as constructor arguments. */ newExpression(callee: string, ...args: unknown[]): Proxified; /** * Create a proxified binary expression from literal operands. * * @param left Left operand value. * @param operator JavaScript binary operator. * @param right Right operand value. */ binaryExpression(left: unknown, operator: Exclude">, right: unknown): Proxified; /** * Create a proxified `await` expression. * * An object with an `$ast` property is inserted as a source expression; * other values are serialized as literals. * * @param argument Value or proxified expression to await. */ awaitExpression(argument: unknown): Proxified; /** * Convert a runtime value into an AST node suitable for insertion. * * @param value JavaScript value to serialize. * @returns An AST node; existing proxified values are returned by reference. */ literal(value: unknown): ASTNode; /** * Parse a raw JavaScript expression and return its proxified value. * * ```ts * const obj = builders.raw("{ foo: 1 }"); * console.log(obj.foo); // 1 * ``` * * @param code Source text containing one expression. */ raw(code: string): Proxified; }; //#endregion //#region src/code.d.ts /** * Parse a JavaScript or TypeScript module into a mutable proxy. * * Provide `Exports` when using TypeScript to type the module's exports, for * example `parseModule<{ default: { plugins: string[] } }>(source)`. * * @param code Module source text. * @param options Parser and printer options. * @returns A module proxy exposing mutable `imports` and `exports` views. */ export declare function parseModule(code: string, options?: Options): ProxifiedModule; /** * Parse a single JavaScript or TypeScript expression into a mutable proxy. * * @typeParam T Expected runtime shape of the expression. * @param code Source text containing one expression. * @param options Parser and printer options. * @returns A proxy for the parsed expression. */ export declare function parseExpression(code: string, options?: Options): Proxified; /** * Print a proxified value or AST node to JavaScript source. * * @param node Proxified value, module, or AST node to print. * @param options Printer options and optional formatting overrides. * @returns Generated source code and, when requested, its source map. */ export declare function generateCode(node: { $ast: ASTNode; } | ASTNode | ProxifiedModule, options?: GenerateOptions): GenerateResult; //#endregion //#region src/error.d.ts export interface MagicastErrorOptions { ast?: ASTNode; code?: string; } export declare class MagicastError extends Error { rawMessage: string; options?: MagicastErrorOptions; constructor(message: string, options?: MagicastErrorOptions); } //#endregion export { ASTNode, BinaryOperator, CodeFormatOptions, GenerateOptions, GenerateResult, ImportItemInput, Loc, LocPosition, ParsedFileNode, Proxified, ProxifiedArray, ProxifiedArrowFunctionExpression, ProxifiedAwaitExpression, ProxifiedBinaryExpression, ProxifiedBlockStatement, ProxifiedFunctionCall, ProxifiedFunctionExpression, ProxifiedIdentifier, ProxifiedImportItem, ProxifiedImportsMap, ProxifiedLogicalExpression, ProxifiedMemberExpression, ProxifiedModule, ProxifiedNewExpression, ProxifiedObject, ProxifiedValue, ProxyBase, ProxyType, Token, detectCodeFormat };