Installation
npm install --save @types/create-error
Summary
This package contains type definitions for create-error (https://github.com/tgriesser/create-error).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/create-error.
type Err = Error;
declare namespace createError {
interface Error<T extends Err> extends Err {
new(message?: string, obj?: any): T;
}
}
declare function createError(): createError.Error<Error>;
declare function createError<T extends createError.Error<Error>>(name: string, properties?: any): T;
declare function createError<T extends createError.Error<Error>>(
Target: createError.Error<Error>,
name?: string,
properties?: any,
): T;
export = createError;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: none
Credits
These definitions were written by Tanguy Krotoff.