UNPKG

declarations

Version:

[![npm version](https://badge.fury.io/js/declarations.svg)](https://www.npmjs.com/package/declarations)

22 lines (17 loc) 808 B
// Type definitions for create-error.js 0.3.1 // Project: https://github.com/tgriesser/create-error // Definitions by: Tanguy Krotoff <https://github.com/tkrotoff> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'create-error' { // FIXME See Global type references https://github.com/Microsoft/TypeScript/issues/983 type Err = Error; namespace createError { interface Error<T extends Err> extends Err { new (message?: string, obj?: any): T; } } function createError(): createError.Error<Error>; function createError<T extends createError.Error<Error>>(name: string, properties?: any): T; function createError<T extends createError.Error<Error>>(Target: createError.Error<Error>, name?: string, properties?: any): T; export = createError; }