UNPKG

@metamask/kernel-errors

Version:
22 lines 601 B
import type { Json } from "@metamask/utils"; import type { ErrorCode, ErrorSentinel } from "./constants.cjs"; export type ErrorOptionsWithStack = ErrorOptions & { stack?: string; }; export type OcapError = { code: ErrorCode; data: Json | undefined; } & Error; export type MarshaledError = { [ErrorSentinel]: true; message: string; code?: ErrorCode; data?: Json; stack?: string; cause?: MarshaledError | string; }; export type MarshaledOcapError = Omit<MarshaledError, 'code' | 'data'> & { code: ErrorCode; data: Json; }; //# sourceMappingURL=types.d.cts.map