@metamask/kernel-errors
Version:
36 lines • 1.65 kB
text/typescript
import { BaseError } from "../BaseError.cjs";
import type { ErrorOptionsWithStack, MarshaledOcapError } from "../types.cjs";
export declare class VatAlreadyExistsError extends BaseError {
constructor(vatId: string, options?: ErrorOptionsWithStack);
/**
* A superstruct struct for validating marshaled {@link VatAlreadyExistsError} instances.
*/
static struct: import("@metamask/superstruct").Struct<{
"@@MARSHALED_ERROR": true;
code: "VAT_ALREADY_EXISTS";
data: {
vatId: string;
};
message: string;
stack?: string | undefined;
}, {
code: import("@metamask/superstruct").Struct<"VAT_ALREADY_EXISTS", "VAT_ALREADY_EXISTS">;
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 VatAlreadyExistsError}.
*
* @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): VatAlreadyExistsError;
}
//# sourceMappingURL=VatAlreadyExistsError.d.cts.map