forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-error.d.ts
More file actions
21 lines (17 loc) · 808 Bytes
/
create-error.d.ts
File metadata and controls
21 lines (17 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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;
}