import type { App } from "./App"; import type { StateConfigurationGS } from "../state/StateConfigurationGS"; import type { StateRuntimeGS } from "../state/StateRuntimeGS"; export declare enum RuntimeEnvironmentGSEnum { Browser = 0, Server = 1 } /** Mutable data owned by one browser application or one server request. */ export interface RuntimeScopeGS { readonly app: App; readonly environment: RuntimeEnvironmentGSEnum; readonly instances: Map; document?: Document; window?: Window; request?: Request; url?: string; language?: string; pendingPageElement?: HTMLElement; stateConfigurationOpen?: boolean; stateRuntimeFactory?: (app: App, configuration: StateConfigurationGS) => StateRuntimeGS; } interface RuntimeScopeRunnerGS { getStore(): RuntimeScopeGS | undefined; run(scope: RuntimeScopeGS, action: () => Promise): Promise; } /** * Internal scope boundary used by the static GS facade. * Browser code owns one persistent scope. The server adapter installs an * AsyncLocalStorage-backed runner so parallel requests never share mutable data. */ export declare class RuntimeGS { private static _browserScope?; private static _fallbackScope?; private static _scopeRunner?; static get current(): RuntimeScopeGS | undefined; static get document(): Document; static get window(): Window | undefined; static setBrowserScope(scope: RuntimeScopeGS): void; static installScopeRunner(runner: RuntimeScopeRunnerGS): void; static run(scope: RuntimeScopeGS, action: () => Promise): Promise; } export {};