/** * Options for the Purus compiler. */ export interface CompileOptions { /** * Include "Generated by Purus" header comment in the output. * @default true */ header?: boolean; /** * Enable strict mode (`"use strict";` at the top of the output). * @default true */ strict?: boolean; /** * Output module format. * - `"module"` — ES Modules (default) * - `"commonjs"` — CommonJS (`require` / `module.exports`) * @default "module" */ type?: "module" | "commonjs"; } /** * Compile Purus source code to JavaScript. * * @param source - Purus source code * @param options - Compilation options * @returns Generated JavaScript code * * @example * ```ts * import { compile } from "purus"; * const js = compile('const x be 42'); * ``` */ export declare function compile( source: string, options?: CompileOptions, ): string; /** * Check Purus source code for syntax errors. * * @param source - Purus source code * @returns `true` if the syntax is valid * @throws {Error} If the source contains syntax errors * * @example * ```ts * import { check } from "purus"; * check('const x be 42'); // true * ``` */ export declare function check(source: string): true; /** * The Purus compiler version. */ export declare const version: string; declare const purus: { compile: typeof compile; check: typeof check; version: typeof version; }; export default purus;