import * as dntShim from "../../../_dnt.shims.js"; export type RuntimeKind = "bun" | "cloudflare" | "deno" | "node" | "unknown"; /** @internal Exported so overlapping host signals can be regression-tested. */ export declare function classifyRuntimeSignals(signals: { bun: boolean; cloudflare: boolean; deno: boolean; node: boolean; }): RuntimeKind; export declare function getDenoRuntime(): typeof dntShim.Deno | undefined; /** * Check if an executable path is a compiled Deno binary. * Detects by binary name: "deno" or "deno.exe" = standard runtime, anything else = compiled. * @internal Exported for testing only. */ export declare function testDenoCompiledDetection(execPath: string, standalone?: boolean): boolean; export declare const runtimeKind: RuntimeKind; /** True if running in Bun runtime (Bun also exposes process.versions.node). */ export declare const isBun: boolean; /** True if running in Cloudflare Workers, including nodejs_compat workers. */ export declare const isCloudflare: boolean; /** True if running in Node.js rather than a more specific compatible host. */ export declare const isNode: boolean; /** True if running in the real Deno runtime rather than a dnt shim. */ export declare const isDeno: boolean; /** * True if running in a compiled Deno binary. * Compiled binaries cannot dynamically import HTTP URLs - they must use local file:// paths. * This is evaluated once at module load time. */ export declare const isDenoCompiled: boolean; /** * Detect if running in Node.js (vs Deno) at call time. * Use this function instead of the constant when runtime detection needs to happen * at call time (e.g., when bundled with esbuild's __esm lazy initialization pattern). */ export declare function isNodeRuntime(): boolean; /** * Detect if code is executing in a server environment (SSR). * * This function provides consistent SSR detection that works correctly even when * SSR globals stub the window/document objects. It should be used instead of * `typeof window === "undefined"` checks to avoid hydration mismatches. * * Priority: * 1. Check __VERYFRONT_SSR__ flag (set by ssr-globals/index.ts) - most reliable * 2. Check if window is undefined (fallback for non-veryfront environments) * * @returns true if executing on server, false if in browser * @see plans/architecture-audit/006.1-ssr-detection-inconsistencies.md */ export declare function isServerEnvironment(): boolean; /** * Detect if code is executing in a browser environment. * Inverse of isServerEnvironment() - use this instead of `typeof window !== "undefined"`. * * @returns true if executing in browser, false if on server */ export declare function isBrowserEnvironment(): boolean; //# sourceMappingURL=runtime.d.ts.map