/** * Structured error system for SignalX runtime. * * Every runtime error has a unique code (SIGX001–SIGX999) so users can * programmatically handle errors and look them up in documentation. * * @example * ```ts * try { * app.mount('#app'); * } catch (e) { * if (e instanceof SigxError && e.code === 'SIGX101') { * // handle missing mount target * } * } * ``` */ /** * Base error class for all SignalX runtime errors. */ export declare class SigxError extends Error { readonly code: string; readonly suggestion?: string; readonly cause?: Error; constructor(message: string, options: { code: string; suggestion?: string; cause?: Error; }); } /** * Error codes for the SignalX runtime. * * Ranges: * - SIGX001–SIGX099: App lifecycle * - SIGX100–SIGX199: Rendering / mounting * - SIGX200–SIGX299: Dependency injection * - SIGX300–SIGX399: Hooks / async * - SIGX400–SIGX499: Messaging */ export declare const SigxErrorCode: { readonly NO_MOUNT_FUNCTION: 'SIGX001'; readonly RENDER_TARGET_NOT_FOUND: 'SIGX100'; readonly MOUNT_TARGET_NOT_FOUND: 'SIGX101'; readonly ASYNC_SETUP_CLIENT: 'SIGX102'; readonly ERROR_SCOPE_OUTSIDE_SETUP: 'SIGX103'; readonly PROVIDE_OUTSIDE_SETUP: 'SIGX200'; readonly PROVIDE_INVALID_INJECTABLE: 'SIGX201'; readonly REQUIRED_INJECTABLE_NOT_PROVIDED: 'SIGX202'; readonly FACTORY_INVALID_RETURN: 'SIGX203'; readonly HOOK_OUTSIDE_SETUP: 'SIGX300'; readonly TOPIC_DESTROYED: 'SIGX400'; readonly TOPIC_GROUP_DESTROYED: 'SIGX401'; }; export declare function prodError(code: string, detail?: string): SigxError; export declare function noMountFunctionError(): SigxError; export declare function renderTargetNotFoundError(selector: string): SigxError; export declare function mountTargetNotFoundError(selector: string): SigxError; export declare function asyncSetupClientError(componentName: string): SigxError; export declare function errorScopeOutsideSetupError(): SigxError; export declare function provideOutsideSetupError(): SigxError; /** * @param hint - Dev-only replacement for the generated suggestion. A pack whose * injectable is satisfied by rendering something (``) rather * than by `defineProvide` passes its own remedy here. */ export declare function requiredInjectableNotProvidedError(name: string, hint?: string): SigxError; export declare function provideInvalidInjectableError(): SigxError; export declare function factoryInvalidReturnError(got: string): SigxError; export declare function hookOutsideSetupError(hookName: string): SigxError; export declare function topicDestroyedError(name?: string): SigxError; export declare function topicGroupDestroyedError(key: string): SigxError; //# sourceMappingURL=errors.d.ts.map