@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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/create-error

      Weekly Downloads

      9,546

      Version

      0.3.33

      License

      MIT

      Unpacked Size

      3.71 kB

      Total Files

      5

      Last publish

      Collaborators

      • types