/** * Environment type * @typedef {'browser' | 'node' | 'unknown'} EnvironmentType */ /** * WASM asset status * @typedef {Object} WASMAssetStatus * @property {boolean} available - Whether WASM assets are available * @property {EnvironmentType} environment - Detected environment * @property {string} expectedJsPath - Expected JavaScript loader path * @property {string} expectedWasmPath - Expected WASM binary path * @property {string|null} error - Error message if unavailable */ /** * WASM load result * @typedef {Object} WASMLoadResult * @property {boolean} success - Whether load succeeded * @property {any} module - Loaded WASM module (if successful) * @property {number} loadTimeMs - Load duration in milliseconds * @property {string|null} error - Error message if failed */ /** * Detect the current runtime environment * @returns {EnvironmentType} Environment type */ export function detectEnvironment(): EnvironmentType; /** * Get expected asset paths for current environment * @param {EnvironmentType} environment - Target environment * @returns {{jsPath: string, wasmPath: string}} Asset paths */ export function getAssetPaths(environment: EnvironmentType): { jsPath: string; wasmPath: string; }; /** * Check if WASM assets are available * @returns {Promise} Asset availability status */ export function checkWASMAssets(): Promise; /** * Load AtomVM WASM module with OTEL instrumentation * @param {Object} [options={}] - Load options * @param {EnvironmentType} [options.environment] - Override environment detection * @param {string} [options.basePath] - Override base path for assets * @returns {Promise} Load result */ export function loadWASM(options?: { environment?: EnvironmentType; basePath?: string; }): Promise; /** * Validate WASM module interface * @param {any} module - WASM module to validate * @returns {{valid: boolean, missing: string[]}} Validation result */ export function validateWASMModule(module: any): { valid: boolean; missing: string[]; }; /** * Get WASM module info * @returns {{version: string, environment: EnvironmentType}} Module info */ export function getWASMInfo(): { version: string; environment: EnvironmentType; }; /** * AtomVM version * @constant {string} */ export const ATOMVM_VERSION: "[VERSION]"; declare namespace _default { export { ATOMVM_VERSION }; export { detectEnvironment }; export { getAssetPaths }; export { checkWASMAssets }; export { loadWASM }; export { validateWASMModule }; export { getWASMInfo }; } export default _default; /** * Environment type */ export type EnvironmentType = "browser" | "node" | "unknown"; /** * WASM asset status */ export type WASMAssetStatus = { /** * - Whether WASM assets are available */ available: boolean; /** * - Detected environment */ environment: EnvironmentType; /** * - Expected JavaScript loader path */ expectedJsPath: string; /** * - Expected WASM binary path */ expectedWasmPath: string; /** * - Error message if unavailable */ error: string | null; }; /** * WASM load result */ export type WASMLoadResult = { /** * - Whether load succeeded */ success: boolean; /** * - Loaded WASM module (if successful) */ module: any; /** * - Load duration in milliseconds */ loadTimeMs: number; /** * - Error message if failed */ error: string | null; };