/**
 * Runtime detection and environment-specific utilities
 *
 * This module provides utilities for detecting the JavaScript runtime environment,
 * checking for feature availability, and enabling environment-specific WASM loading strategies.
 *
 * @example Basic Runtime Detection
 * ```typescript
 * import { detectRuntime, isBrowser, isNode } from '@kreuzberg/wasm/runtime';
 *
 * if (isBrowser()) {
 *   console.log('Running in browser');
 * } else if (isNode()) {
 *   console.log('Running in Node.js');
 * }
 * ```
 *
 * @example Feature Detection
 * ```typescript
 * import { hasFileApi, hasWorkers } from '@kreuzberg/wasm/runtime';
 *
 * if (hasFileApi()) {
 *   // Can use File API for browser file uploads
 * }
 *
 * if (hasWorkers()) {
 *   // Can use Web Workers for parallel processing
 * }
 * ```
 */
export type RuntimeType = "browser" | "node" | "deno" | "bun" | "cloudflare-workers" | "edge-runtime" | "unknown";
/**
 * WebAssembly capabilities available in the runtime
 */
export interface WasmCapabilities {
    /** Runtime environment type */
    runtime: RuntimeType;
    /** WebAssembly support available */
    hasWasm: boolean;
    /** Streaming WebAssembly instantiation available */
    hasWasmStreaming: boolean;
    /** File API available (browser) */
    hasFileApi: boolean;
    /** Blob API available */
    hasBlob: boolean;
    /** Worker support available */
    hasWorkers: boolean;
    /** SharedArrayBuffer available (may be restricted) */
    hasSharedArrayBuffer: boolean;
    /** Module Workers available */
    hasModuleWorkers: boolean;
    /** BigInt support */
    hasBigInt: boolean;
    /** Specific runtime version if available */
    runtimeVersion?: string;
}
/**
 * Detect the current JavaScript runtime
 *
 * Checks for various global objects and properties to determine
 * which JavaScript runtime environment is currently executing.
 *
 * @returns The detected runtime type
 *
 * @example
 * ```typescript
 * import { detectRuntime } from '@kreuzberg/wasm/runtime';
 *
 * const runtime = detectRuntime();
 * switch (runtime) {
 *   case 'browser':
 *     console.log('Running in browser');
 *     break;
 *   case 'node':
 *     console.log('Running in Node.js');
 *     break;
 *   case 'deno':
 *     console.log('Running in Deno');
 *     break;
 *   case 'bun':
 *     console.log('Running in Bun');
 *     break;
 * }
 * ```
 */
export declare function detectRuntime(): RuntimeType;
/**
 * Check if running in a browser environment
 *
 * @returns True if running in a browser, false otherwise
 */
export declare function isBrowser(): boolean;
/**
 * Check if running in Node.js
 *
 * @returns True if running in Node.js, false otherwise
 */
export declare function isNode(): boolean;
/**
 * Check if running in Deno
 *
 * @returns True if running in Deno, false otherwise
 */
export declare function isDeno(): boolean;
/**
 * Check if running in Bun
 *
 * @returns True if running in Bun, false otherwise
 */
export declare function isBun(): boolean;
/**
 * Check if running in Cloudflare Workers
 *
 * @returns True if running in Cloudflare Workers, false otherwise
 */
export declare function isCloudflareWorkers(): boolean;
/**
 * Check if running in an edge runtime (Vercel Edge, etc.)
 *
 * @returns True if running in an edge runtime, false otherwise
 */
export declare function isEdgeRuntime(): boolean;
/**
 * Check if running in any edge/serverless environment
 *
 * This includes Cloudflare Workers, Vercel Edge, and similar environments.
 *
 * @returns True if running in an edge environment, false otherwise
 */
export declare function isEdgeEnvironment(): boolean;
/**
 * Check if running in a web environment (browser or similar)
 *
 * @returns True if running in a web browser, false otherwise
 */
export declare function isWebEnvironment(): boolean;
/**
 * Check if running in a server-like environment (Node.js, Deno, Bun, Cloudflare Workers, Edge)
 *
 * @returns True if running on a server runtime, false otherwise
 */
export declare function isServerEnvironment(): boolean;
/**
 * Check if File API is available
 *
 * The File API is required for handling browser file uploads.
 *
 * @returns True if File API is available, false otherwise
 *
 * @example
 * ```typescript
 * if (hasFileApi()) {
 *   const fileInput = document.getElementById('file');
 *   fileInput.addEventListener('change', (e) => {
 *     const file = e.target.files?.[0];
 *     // Handle file
 *   });
 * }
 * ```
 */
export declare function hasFileApi(): boolean;
/**
 * Check if Blob API is available
 *
 * @returns True if Blob API is available, false otherwise
 */
export declare function hasBlob(): boolean;
/**
 * Check if Web Workers are available
 *
 * @returns True if Web Workers can be created, false otherwise
 */
export declare function hasWorkers(): boolean;
/**
 * Check if SharedArrayBuffer is available
 *
 * Note: SharedArrayBuffer is restricted in some browser contexts
 * due to security considerations (Spectre/Meltdown mitigations).
 *
 * @returns True if SharedArrayBuffer is available, false otherwise
 */
export declare function hasSharedArrayBuffer(): boolean;
/**
 * Check if module workers are available
 *
 * Module workers allow importing ES modules in worker threads.
 *
 * @returns True if module workers are supported, false otherwise
 */
export declare function hasModuleWorkers(): boolean;
/**
 * Check if WebAssembly is available
 *
 * @returns True if WebAssembly is supported, false otherwise
 */
export declare function hasWasm(): boolean;
/**
 * Check if WebAssembly.instantiateStreaming is available
 *
 * Streaming instantiation is more efficient than buffering the entire WASM module.
 *
 * @returns True if streaming WebAssembly is supported, false otherwise
 */
export declare function hasWasmStreaming(): boolean;
/**
 * Check if BigInt is available
 *
 * @returns True if BigInt type is supported, false otherwise
 */
export declare function hasBigInt(): boolean;
/**
 * Get runtime version information
 *
 * @returns Version string if available, undefined otherwise
 *
 * @example
 * ```typescript
 * const version = getRuntimeVersion();
 * console.log(`Running on Node ${version}`); // "Running on Node 18.12.0"
 * ```
 */
export declare function getRuntimeVersion(): string | undefined;
/**
 * Get comprehensive WebAssembly capabilities for current runtime
 *
 * Returns detailed information about WASM and related APIs available
 * in the current runtime environment.
 *
 * @returns Object describing available WASM capabilities
 *
 * @example
 * ```typescript
 * import { getWasmCapabilities } from '@kreuzberg/wasm/runtime';
 *
 * const caps = getWasmCapabilities();
 * console.log(`WASM available: ${caps.hasWasm}`);
 * console.log(`Streaming WASM: ${caps.hasWasmStreaming}`);
 * console.log(`Workers available: ${caps.hasWorkers}`);
 *
 * if (caps.hasWasm && caps.hasWorkers) {
 *   // Can offload WASM processing to workers
 * }
 * ```
 */
export declare function getWasmCapabilities(): WasmCapabilities;
/**
 * Get comprehensive runtime information
 *
 * Returns detailed information about the current runtime environment,
 * capabilities, and identifying information.
 *
 * @returns Object with runtime details and capabilities
 *
 * @example
 * ```typescript
 * const info = getRuntimeInfo();
 * console.log(info.runtime); // 'browser' | 'node' | 'deno' | 'bun'
 * console.log(info.isBrowser); // true/false
 * console.log(info.userAgent); // Browser user agent string
 * console.log(info.capabilities); // Detailed capability information
 * ```
 */
export declare function getRuntimeInfo(): {
    runtime: RuntimeType;
    isBrowser: boolean;
    isNode: boolean;
    isDeno: boolean;
    isBun: boolean;
    isWeb: boolean;
    isServer: boolean;
    runtimeVersion: string | undefined;
    userAgent: string;
    capabilities: WasmCapabilities;
};
//# sourceMappingURL=runtime.d.ts.map