import type { LocalLLMErrorCode } from "./ExpoLocalLlm.types"; /** An error raised by this library's JavaScript layer, coded like native errors. */ export declare class LocalLLMError extends Error { readonly code: LocalLLMErrorCode; constructor(code: LocalLLMErrorCode, message: string); } /** * The `LocalLLMErrorCode` of an error thrown or rejected by this library, or * null for any other error (including ones thrown by your own tool handlers). * * ```ts * try { * await session.respond(prompt); * } catch (error) { * if ( * error instanceof Error && * getLocalLLMErrorCode(error) === "ERR_CONTEXT_WINDOW_EXCEEDED" * ) { * session.reset(); * } * } * ``` */ export declare function getLocalLLMErrorCode(error: Error): LocalLLMErrorCode | null; //# sourceMappingURL=errors.d.ts.map