/** * Custom error classes for Storion. * Using named error classes helps with error identification and handling. */ /** * Base class for all Storion errors. */ export declare class StorionError extends Error { constructor(message: string); } /** * Thrown when a method that should only be called during setup phase * is called outside of it (e.g., inside actions or async callbacks). */ export declare class SetupPhaseError extends StorionError { constructor(method: string, hint?: string); } /** * Thrown when a store with keepAlive lifetime tries to depend on * or create a store with autoDispose lifetime. */ export declare class LifetimeMismatchError extends StorionError { constructor(parentName: string, childName: string, operation: "depend on" | "create"); } /** * Thrown when an async function (returning Promise) is used where * a synchronous function is required. */ export declare class AsyncFunctionError extends StorionError { constructor(context: string, hint: string); } /** * Thrown when attempting to call an action on a disposed store. */ export declare class StoreDisposedError extends StorionError { constructor(storeId: string); } /** * Thrown when an action definition is not a function. */ export declare class InvalidActionError extends StorionError { constructor(actionName: string, actualType: string); } /** * Thrown when pick() is called outside of an effect or useStore selector. */ export declare class HooksContextError extends StorionError { constructor(method: string, requiredContext: string); } /** * Thrown when useContainer is called outside of StoreProvider. */ export declare class ProviderMissingError extends StorionError { constructor(hook: string, provider: string); } /** * Thrown when a local store (useLocalStore) has dependencies. */ export declare class LocalStoreDependencyError extends StorionError { constructor(storeName: string, dependencyCount: number); } /** * Thrown when refresh() is called while the effect is still running. */ export declare class EffectRefreshError extends StorionError { constructor(); } /** * Thrown when scoped() is called outside of a selector function. */ export declare class ScopedOutsideSelectorError extends StorionError { constructor(); } /** * Thrown when a meta entry references a field that doesn't exist in the store state. */ export declare class InvalidMetaFieldError extends StorionError { constructor(storeName: string, invalidField: string, validFields: string[]); } //# sourceMappingURL=errors.d.ts.map