npm install --save @types/err
This package contains type definitions for err (https://github.com/IonicaBizau/err#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/err.
export = Err;
/** Values required if the only argument to the constructor is an object. */
interface RequiredData {
message: string;
code: string;
}
/** Arbitrary data to include in the error. */
type Data = Record<string, string>;
/** Create a custom error object. */
declare class Err extends Error {
constructor(error: string | Error, code?: string, data?: Data);
constructor(error: string | Error, data: Data);
constructor(error: RequiredData & Data);
}
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: none
These definitions were written by Jimmy Cuadra.