forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
easy-jsend.d.ts
38 lines (32 loc) · 1001 Bytes
/
easy-jsend.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Type definitions for easy-jsend
// Project: https://github.com/DeadAlready/easy-jsend
// Definitions by: Karl Düüna <https://github.com/DeadAlready/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare module Express {
interface MakePartialInput {
model:any;
opts: {
limit: number;
skip: number;
};
search: Object;
result: any;
}
interface PartialInput {
limit?: number;
offset: number;
count: number;
data: any;
}
export interface Response {
success (data?: any, status?: number): void;
fail (data: any, status?: number): void;
error (err: any, status?: number): void;
partial? (data: PartialInput, status?: number): void;
makePartial? (data: MakePartialInput): void;
}
}
declare module "easy-jsend" {
export function init(conf?:{partial:boolean}): void;
}