/** * Base class for runtime-authored errors. The class gives every local failure * a stable JavaScript error name while preserving the technical message that * reaches Vite, SvelteKit, and test output. * * @example * ```ts * throw new RuntimeError("Invariant violated."); * ``` * * @since 2.4.0 * @param message - Technical diagnostic message describing the failed runtime * invariant. */ export declare class RuntimeError extends Error { constructor(message: string); } export declare function make_error_message(code: string, message: string): string; /** * Base error class for all preprocessor errors emitted during script and * markup transformation. Carries the source filename so error messages can * reference the affected file. * * @example * ```ts * throw new PreprocessError("Component.svelte: invalid transform input.", "Component.svelte"); * ``` * * @since 2.0.0 * @param message - Technical diagnostic message for the transform failure. * @param filename - Source filename that triggered the transform failure. */ export declare class PreprocessError extends RuntimeError { /** * The source filename that triggered this error. * * @since 2.0.0 */ readonly filename: string; constructor(message: string, filename: string); } /** * Thrown when a statement mixes JavaScript `await` with Effect `yield*` work * that must be lowered into an `Effect.gen` program. * * @example * ```ts * throw new AwaitInEffectWorkError("Component.svelte", "const value = await load();"); * ``` * * @since 2.0.0 * @param filename - Source filename containing the unsupported statement. * @param statement_text - Full source text for the statement containing * mixed async work. */ export declare class AwaitInEffectWorkError extends PreprocessError { /** * The full text of the problematic statement containing mixed async work. * * @since 2.0.0 */ readonly statement_text: string; constructor(filename: string, statement_text: string); } /** * Thrown when async Effect work appears inside a Svelte rune position that * must stay synchronous. * * @example * ```ts * throw new AsyncEffectInSyncRuneError("$derived", "$derived(yield* load())", "Component.svelte"); * ``` * * @since 2.0.0 * @param rune_name - Name of the Svelte rune containing the unsupported async * Effect work. * @param expression_text - Full source text for the rune expression. * @param filename - Source filename containing the unsupported rune. */ export declare class AsyncEffectInSyncRuneError extends PreprocessError { /** * The name of the rune that contained async Effect work. * * @since 2.0.0 */ readonly rune_name: string; /** * The full text of the expression that triggered the error. * * @since 2.0.0 */ readonly expression_text: string; constructor(rune_name: string, expression_text: string, filename: string); } /** * Thrown when async Effect work appears inside a non-generator callback nested * in a markup event handler. * * @example * ```ts * throw new AsyncEffectInEventCallbackError( * "Component.svelte", * "Effect.try(() => yield* save())", * ); * ``` * * @since 2.0.0 * @param filename - Source filename containing the invalid event handler. * @param expression_text - Event handler expression that contains the nested * unsupported async Effect work. */ export declare class AsyncEffectInEventCallbackError extends PreprocessError { /** * The full text of the problematic event handler body. * * @since 2.0.0 */ readonly expression_text: string; constructor(filename: string, expression_text: string); } /** * Thrown when an event handler callback contains the old raw `yield*` * shorthand. Effectful event handlers must put `yield*` directly in the event * attribute so the callback boundary is generated by the markup runtime. * * @example * ```ts * throw new YieldStarInEventCallbackError("Component.svelte", "() => yield* save()"); * ``` * * @since 2.0.0 * @param filename - Svelte component filename used to identify where the * invalid event handler callback was found. * @param expression_text - Original event handler callback text that contained * `yield*` and should be rewritten as a direct event Effect expression. */ export declare class YieldStarInEventCallbackError extends PreprocessError { /** * The full text of the problematic event handler callback. * * @since 2.0.0 */ readonly expression_text: string; constructor(filename: string, expression_text: string); } /** * Thrown when async Effect work appears in a markup position SER cannot lower * safely. * * @example * ```ts * throw new UnsupportedMarkupEffectPositionError( * "Component.svelte", * "value={yield* load()}", * ); * ``` * * @since 2.4.2 * @param filename - Source filename containing the unsupported markup. * @param expression_text - The unsupported markup expression text. */ export declare class UnsupportedMarkupEffectPositionError extends PreprocessError { /** * The unsupported markup expression text. * * @since 2.4.2 */ readonly expression_text: string; constructor(filename: string, expression_text: string); } /** * Thrown when the request-scoped SvelteKit event context is read outside a * remote handler. * * @example * ```ts * throw new RequestEventUnavailableError(); * ``` * * @since 2.4.0 */ export declare class RequestEventUnavailableError extends RuntimeError { constructor(); } /** * Thrown when an unchecked Query declaration omits the handler. * * @example * ```ts * throw new UncheckedQueryHandlerMissingError(); * ``` * * @since 2.4.0 */ export declare class UncheckedQueryHandlerMissingError extends RuntimeError { constructor(); } /** * Thrown when a batch Query declaration omits the batch handler. * * @example * ```ts * throw new BatchQueryHandlerMissingError(); * ``` * * @since 2.4.0 */ export declare class BatchQueryHandlerMissingError extends RuntimeError { constructor(); } /** * Thrown when an unchecked live Query declaration omits the handler. * * @example * ```ts * throw new UncheckedLiveQueryHandlerMissingError(); * ``` * * @since 2.4.0 */ export declare class UncheckedLiveQueryHandlerMissingError extends RuntimeError { constructor(); } /** * Thrown when an unchecked Command declaration omits the handler. * * @example * ```ts * throw new UncheckedCommandHandlerMissingError(); * ``` * * @since 2.4.0 */ export declare class UncheckedCommandHandlerMissingError extends RuntimeError { constructor(); } /** * Thrown when an unchecked Form declaration omits the handler. * * @example * ```ts * throw new UncheckedFormHandlerMissingError(); * ``` * * @since 2.4.0 */ export declare class UncheckedFormHandlerMissingError extends RuntimeError { constructor(); } /** * Thrown when an unchecked Prerender declaration omits the handler. * * @example * ```ts * throw new UncheckedPrerenderHandlerMissingError(); * ``` * * @since 2.4.0 */ export declare class UncheckedPrerenderHandlerMissingError extends RuntimeError { constructor(); } /** * Thrown when a live query handler resolves to a value that cannot be streamed. * * @example * ```ts * throw new InvalidLiveQueryReturnError(); * ``` * * @since 2.4.0 */ export declare class InvalidLiveQueryReturnError extends RuntimeError { constructor(); } /** * Thrown when generated component code yields a Stream that completes before * producing a value. * * @example * ```ts * throw new EmptyStreamYieldError(); * ``` * * @since 3.4.8 */ export declare class EmptyStreamYieldError extends RuntimeError { constructor(); } /** * Thrown when generated component code receives a value that cannot be yielded * through the SER runtime. * * @example * ```ts * throw new InvalidYieldableError(null); * ``` * * @since 4.0.0 * @param value - Runtime value that was expected to be an Effect, generator, or * Stream. */ export declare class InvalidYieldableError extends RuntimeError { /** * Runtime value rejected by the generated yield boundary. * * @since 4.0.0 */ readonly value: unknown; constructor(value: unknown); } /** * Thrown when a dispatcher operation is requested after disposal. * * @example * ```ts * throw new DispatcherDisposedError(); * ``` * * @since 2.4.0 */ export declare class DispatcherDisposedError extends RuntimeError { constructor(); } /** * Thrown when Effect work is bound to a component scope that has already been * disposed. * * @example * ```ts * throw new ScopeDisposedError(); * ``` * * @since 3.1.0 */ export declare class ScopeDisposedError extends RuntimeError { constructor(); } /** * Thrown when an application attempts to configure a runtime after one has * already been initialized. * * @example * ```ts * throw new RuntimeAlreadyInitializedError("ClientRuntime"); * ``` * * @since 3.4.0 * @param runtime_name - Public runtime API that was initialized more than once. */ export declare class RuntimeAlreadyInitializedError extends RuntimeError { constructor(runtime_name: string); } /** * Thrown when a generated or native remote query export is not callable. * * @example * ```ts * throw new InvalidQueryFactoryError(); * ``` * * @since 2.4.0 */ export declare class InvalidQueryFactoryError extends RuntimeError { constructor(); } /** * Thrown when a generated or native remote prerender export is not callable. * * @since 4.0.0 */ export declare class InvalidPrerenderFactoryError extends RuntimeError { constructor(); } /** * Thrown when a generated or native remote live query export is not callable. * * @example * ```ts * throw new InvalidLiveQueryFactoryError(); * ``` * * @since 2.4.0 */ export declare class InvalidLiveQueryFactoryError extends RuntimeError { constructor(); } /** * Thrown when a generated or native remote command export is not callable. * * @example * ```ts * throw new InvalidCommandFactoryError(); * ``` * * @since 2.4.0 */ export declare class InvalidCommandFactoryError extends RuntimeError { constructor(); } /** * Thrown when the client-side form adapter cannot derive a remote endpoint. * * @example * ```ts * throw new RemoteFormEndpointMissingError(); * ``` * * @since 2.4.0 */ export declare class RemoteFormEndpointMissingError extends RuntimeError { constructor(); } /** * Thrown when a remote form response envelope is not an object with a response * type. * * @example * ```ts * throw new InvalidRemoteFormResponseError(envelope); * ``` * * @since 2.4.0 * @param envelope - Raw response envelope returned by the remote form endpoint. */ export declare class InvalidRemoteFormResponseError extends RuntimeError { /** * Raw response envelope returned by the remote form endpoint. * * @since 2.4.0 */ readonly envelope: unknown; constructor(envelope?: unknown); } /** * Thrown when a remote form response has a well-formed envelope but an * unsupported response type or payload slot. * * @example * ```ts * throw new UnsupportedRemoteFormResponseError(envelope); * ``` * * @since 2.4.0 * @param envelope - Raw response envelope returned by the remote form endpoint. */ export declare class UnsupportedRemoteFormResponseError extends RuntimeError { /** * Raw response envelope returned by the remote form endpoint. * * @since 2.4.0 */ readonly envelope: unknown; constructor(envelope?: unknown); } /** * Thrown when a serialized remote failure envelope cannot be decoded. * * @example * ```ts * throw new RemoteErrorDecodeError(raw); * ``` * * @since 2.4.0 * @param raw - Raw serialized remote failure payload that failed decoding. */ export declare class RemoteErrorDecodeError extends RuntimeError { /** * Raw serialized remote failure payload that failed decoding. * * @since 2.4.0 */ readonly raw: unknown; constructor(raw?: unknown); } /** * Thrown when a root server-only helper is imported without Vite rewriting. * * @example * ```ts * throw new ServerOnlyImportError("Query"); * ``` * * @since 2.4.0 * @param export_name - Name of the server-only root export that was invoked. */ export declare class ServerOnlyImportError extends RuntimeError { /** * Name of the server-only root export that was invoked. * * @since 2.4.0 */ readonly export_name: string; constructor(export_name: string); } /** * Thrown when the publish-time `$app/server` shim executes outside SvelteKit. * * @example * ```ts * throw new SvelteKitServerExportUnavailableError("query"); * ``` * * @since 2.4.0 * @param export_name - Name of the `$app/server` export that was invoked. */ export declare class SvelteKitServerExportUnavailableError extends RuntimeError { /** * Name of the `$app/server` export that was invoked. * * @since 2.4.0 */ readonly export_name: string; constructor(export_name: string); } /** * Thrown when a SvelteKit remote helper reports that it was called outside the * route-scoped remote module context. * * @example * ```ts * throw new RemoteHelperContextError("Query"); * ``` * * @since 2.4.0 * @param helper_name - SER helper name that triggered the context failure. */ export declare class RemoteHelperContextError extends RuntimeError { /** * SER helper name that triggered the context failure. * * @since 2.4.0 */ readonly helper_name: string; constructor(helper_name: string); } /** * Thrown when a SvelteKit remote helper normalizes a non-Error thrown value. * * @example * ```ts * throw new RemoteHelperError("raw failure"); * ``` * * @since 2.4.0 * @param value - Non-Error value thrown while creating a remote helper. */ export declare class RemoteHelperError extends RuntimeError { /** * Non-Error value that was normalized. * * @since 2.4.0 */ readonly value: unknown; constructor(value: unknown); }