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