import type { RequestEvent as SvelteKitRequestEvent } from "@sveltejs/kit"; import { Dispatcher as InternalDispatcher } from "../dispatcher.js"; import { Context, Layer, ManagedRuntime } from "effect"; /** * Subset of SvelteKit's `RequestEvent` that remote handlers typically access. * * @example * ```ts * const event: RequestEvent = yield* RequestEvent; * console.log(event.url.pathname); * ``` * * @since 2.0.0 */ export interface RequestEvent extends Pick { } /** * SvelteKit's `RequestEvent` exposed as an Effect {@link Context.Tag}. * * @example * ```ts * const event = yield* RequestEvent; * ``` * * @since 2.0.0 */ export declare const RequestEvent: Context.Reference; /** * Builder for the server-side Effect runtime. * * @example * ```ts * ServerRuntime.make(Db.Live); * ``` * * @since 2.0.0 */ export declare class ServerRuntime { /** * Build and cache the server-side `ManagedRuntime`. * * @since 2.0.0 * @param layer - Optional Effect layer to provide to the runtime. * @returns The configured ManagedRuntime. */ static make(layer?: Layer.Layer): ManagedRuntime.ManagedRuntime; } /** * Returns the active server runtime, creating a default one if needed. * * @example * ```ts * const runtime = get_server_runtime_or_throw(); * ``` * * @since 2.0.0 * @returns The current ManagedRuntime instance. */ export declare function get_server_runtime_or_throw(): ManagedRuntime.ManagedRuntime; export declare function get_server_dispatcher(): InternalDispatcher; export declare function reset_server_runtime(): void;