Files
DefinitelyTyped/easy-jsend/easy-jsend.d.ts
2015-07-16 20:58:44 +03:00

39 lines
1001 B
TypeScript

// 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;
}