UNPKG

@3id/common

Version:
29 lines (28 loc) 1.36 kB
/// <reference types="node" /> declare const ThreeIDError_base: { new (code: string | number, message: string, wrapError?: Error | undefined): { code: string; errorStack: import("errors-utils").StackError[]; metadata: Record<string, unknown>; name: string; toErrorStack(): import("errors-utils").StackError[]; toJSON(withStack?: boolean | undefined): import("errors-utils").StackErrorJSON; toString(): string; message: string; stack?: string | undefined; cause?: Error | undefined; }; from(error: Error, code?: string | undefined): import("errors-utils").StackError; fromJSON(json: import("errors-utils").StackErrorJSON): import("errors-utils").StackError; captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void; prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; stackTraceLimit: number; }; export declare class ThreeIDError extends ThreeIDError_base { } export declare function assert(condition: boolean, code: number, message: string): asserts condition; export declare namespace assert { var isDefined: <T = unknown>(value: T, message: string) => asserts value is NonNullable<T>; var isString: (value: unknown, message?: string) => asserts value is string; } export {};