/** * JavaScript runtime env. * * @category Env * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) * @see * - {@link currentRuntimeEnv} * - {@link isRuntimeEnv} * - {@link perEnv} */ export declare enum RuntimeEnv { Node = "node", Web = "web" } /** * Determine the current {@link RuntimeEnv} value. Usually you shouldn't need to call this, you can * simply import {@link currentRuntimeEnv} directly. * * @category Env * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function determineRuntimeEnv(): RuntimeEnv; /** * The current {@link RuntimeEnv}. * * @category Env * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) * @see * - {@link RuntimeEnv} * - {@link isRuntimeEnv} * - {@link perEnv} */ export declare const currentRuntimeEnv: RuntimeEnv; /** * Checks if the given {@link RuntimeEnv} value is the current {@link RuntimeEnv} value. * * @category Env * @category Package : @augment-vir/common * @returns `true` if the given {@link RuntimeEnv} is the current {@link RuntimeEnv}. * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) * @see * - {@link RuntimeEnv} * - {@link currentRuntimeEnv} * - {@link perEnv} */ export declare function isRuntimeEnv(itItThisEnv: RuntimeEnv): boolean; /** * Throw this Error to indicate that something was attempted that cannot be done in the current * runtime. * * @category Env * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare class RuntimeEnvError extends Error { readonly name = "RuntimeEnvError"; } /** * Requires defining an object of functions for all possible {@link RuntimeEnv} values and then only * calls the function for the current runtime. * * @category Env * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) * @see * - {@link RuntimeEnv} * - {@link currentRuntimeEnv} * - {@link isRuntimeEnv} */ export declare function perEnv(perEnv: Record T>): T; /** * Determines if the current code is being executed within a playwright test. * * @category Env * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function isInsidePlaywrightTest(): boolean;