/** * Copyright (c) 2025 Elara AI Pty Ltd * Licensed under BSL 1.1. See LICENSE for details. */ import { EastIR, AsyncEastIR, type IR } from '@elaraai/east'; /** * Load IR from a file (.json, .east, or .beast2) */ export declare function loadIR(filePath: string): Promise; /** * Encode IR to Beast2 format. * * NOTE: this is a "raw IR" path and does NOT include a source map in the * blob. For program serialization use `eastIRToBeast2` or `encodeEastIR` * which preserve the source map end-to-end. */ export declare function irToBeast2(ir: IR): Uint8Array; /** * Encode an EastIR bundle (IR + source map) to Beast2 format. * * Use this when serializing a program so that downstream CLIs can resolve * loc_ids back to source locations on error. */ export declare function eastIRToBeast2(eastIR: EastIR | AsyncEastIR): Uint8Array; /** * Load an EastIR bundle from a .beast2 file, returning the appropriate * sync/async wrapper based on the IR root variant. */ export declare function loadEastIR(filePath: string): Promise | AsyncEastIR>; /** * Write a ReadableStream to a file */ export declare function writeStreamToFile(stream: ReadableStream, filePath: string): Promise; /** * Load a value from Beast2 file */ export declare function loadBeast2(filePath: string, type: any): Promise; /** * Format a value as .east format */ export declare function formatEast(value: any, type: any): string; /** * Parse a value from .east format */ export declare function parseEast(text: string, type: any): any; /** * Load a value from any format (.json, .east, or .beast2) */ export declare function loadValue(filePath: string, type: any): Promise; /** * Encode a value to Beast2 format */ export declare function valueToBeast2(value: any, type: any): Uint8Array; //# sourceMappingURL=formats.d.ts.map