export interface JDErrorOptions { /** * The error code */ code?: string; /** * If true, the error is not reported to the user */ cancel?: boolean; } /** * Common Jacdac error type * @category Runtime */ export declare class JDError extends Error { readonly code: string; readonly cancel: boolean; constructor(message: string, options?: JDErrorOptions); } export declare function throwError(msg: string, options?: JDErrorOptions): void; export declare function isCancelError(e: Error): boolean; export declare function isAckError(e: Error): boolean; export declare function isTimeoutError(e: Error): boolean; export declare function isCodeError(e: Error, code: string): boolean; /** * Extract the Jacdac error code if any * @param e * @returns * @category Runtime */ export declare function errorCode(e: Error): string;