@metamask/kernel-errors
Version:
36 lines • 1.6 kB
text/typescript
import { BaseError } from "../BaseError.mjs";
import type { ErrorOptionsWithStack, MarshaledOcapError } from "../types.mjs";
export declare class VatDeletedError extends BaseError {
constructor(vatId: string, options?: ErrorOptionsWithStack);
/**
* A superstruct struct for validating marshaled {@link VatDeletedError} instances.
*/
static struct: import("@metamask/superstruct").Struct<{
"@@MARSHALED_ERROR": true;
code: "VAT_DELETED";
data: {
vatId: string;
};
message: string;
stack?: string | undefined;
}, {
code: import("@metamask/superstruct").Struct<"VAT_DELETED", "VAT_DELETED">;
data: import("@metamask/superstruct").Struct<{
vatId: string;
}, {
vatId: import("@metamask/superstruct").Struct<string, null>;
}>;
"@@MARSHALED_ERROR": import("@metamask/superstruct").Struct<true, true>;
message: import("@metamask/superstruct").Struct<string, null>;
stack: import("@metamask/superstruct").Struct<string | undefined, null>;
}>;
/**
* Unmarshals a {@link MarshaledError} into a {@link VatDeletedError}.
*
* @param marshaledError - The marshaled error to unmarshal.
* @param unmarshalErrorOptions - The function to unmarshal the error options.
* @returns The unmarshaled error.
*/
static unmarshal(marshaledError: MarshaledOcapError, unmarshalErrorOptions: (marshaledError: MarshaledOcapError) => ErrorOptionsWithStack): VatDeletedError;
}
//# sourceMappingURL=VatDeletedError.d.mts.map