@types/create-error
TypeScript icon, indicating that this package has built-in type declarations

0.3.33 • Public • Published

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.

index.d.ts

// FIXME See Global type references https://github.com/Microsoft/TypeScript/issues/983
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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.336,888ts4.6
0.3.336,888ts4.7
0.3.336,888ts4.8
0.3.336,888ts4.9
0.3.336,888ts5.0
0.3.336,888ts5.1
0.3.336,888ts5.7
0.3.336,888ts5.3
0.3.336,888ts5.4
0.3.336,888ts5.5
0.3.336,888ts5.6
0.3.336,888ts5.8
0.3.336,888ts5.2
0.3.336,888latest
0.3.336,888ts4.5
0.3.336,888ts5.9
0.3.302,527ts3.0
0.3.302,527ts3.1
0.3.302,527ts3.2
0.3.302,527ts3.3
0.3.302,527ts3.4
0.3.302,527ts3.5
0.3.302,527ts3.6
0.3.302,527ts3.7
0.3.302,527ts3.8
0.3.302,527ts3.9
0.3.302,527ts4.0
0.3.302,527ts4.1
0.3.302,527ts4.2
0.3.302,527ts2.6
0.3.302,527ts2.0
0.3.302,527ts2.1
0.3.302,527ts2.2
0.3.302,527ts2.3
0.3.302,527ts2.4
0.3.302,527ts2.5
0.3.302,527ts2.7
0.3.302,527ts2.8
0.3.302,527ts2.9
0.3.31162ts4.4
0.3.31162ts4.3

Version History

VersionDownloads (Last 7 Days)Published
0.3.336,888
0.3.32114
0.3.31162
0.3.302,527
0.3.290
0.3.28-alpha0
0.3.27-alpha0
0.3.26-alpha0
0.3.25-alpha0
0.3.24-alpha0
0.3.23-alpha0
0.3.22-alpha0
0.3.17-alpha0
0.3.16-alpha0

Package Sidebar

Install

npm i @types/create-error

Weekly Downloads

9,691

Version

0.3.33

License

MIT

Unpacked Size

3.71 kB

Total Files

5

Last publish

Collaborators

  • types