/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { ClassExtends } from "./Type.js"; export declare function asError(e: any): Error; /** * Ensure that a cause is an error object. * * We consider anything with a "message" property to be a reasonable error object. */ export declare function errorOf(cause: unknown): Error; /** * Determine if one or more error classes are present in an error's causal chain. */ export declare function causedBy(error: unknown, ...causes: [new (...args: any[]) => Error, ...(new (...args: any[]) => Error)[]]): boolean; /** * Repacks an error object as a different error class. * The error stack is copied over from the original error instance */ export declare function repackErrorAs, I extends InstanceType>(error: unknown, repackAsErrorClass: E, message?: string): I; //# sourceMappingURL=Error.d.ts.map