import { type BLASConfig } from './BLAS.js'; import { type RealTypeDescriptor } from './Complex.js'; import type { ComplexConfig, Modulo, Rounding } from './ComplexInterface.js'; /** Owned numeric and BLAS settings restored around each synchronous interpreter turn. */ export type RuntimeEnvironmentSnapshot = { engine: RealTypeDescriptor; complex: ComplexConfig; blas: BLASConfig; }; /** Serializable creation settings, applied before native constants and ASTs exist. */ export type NumericEnvironmentOptions = { readonly engine?: RealTypeDescriptor; readonly complex?: Partial>; }; /** * Interpreter-owned numeric configuration. * * The numeric implementation still exposes static facades for backward * compatibility. RuntimeEnvironment scopes those facades to one synchronous * interpreter operation and restores the previous host state afterwards. */ export declare class RuntimeEnvironment { private snapshot; constructor(snapshot?: RuntimeEnvironmentSnapshot, options?: NumericEnvironmentOptions); get settings(): RuntimeEnvironmentSnapshot; /** Applies session settings for a synchronous turn, captures changes and restores host settings even on failure. */ run(operation: () => T): T; /** Restores backend selection before applying its arithmetic and BLAS configuration. */ private apply; }