forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 1
/
easy-xapi.d.ts
47 lines (40 loc) · 1.17 KB
/
easy-xapi.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
39
40
41
42
43
44
45
46
47
// Type definitions for easy-xapi
// Project: https://github.com/DeadAlready/easy-xapi
// Definitions by: Karl Düüna <https://github.com/DeadAlready/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
/// <reference path="../easy-jsend/easy-jsend.d.ts" />
/// <reference path="../bunyan/bunyan.d.ts" />
declare module Express {
export interface Request {
log: any;
}
}
declare module "easy-xapi" {
import express = require('express');
import http = require('http');
import bunyan = require('bunyan');
interface InitConfig {
jSend?: {partial: boolean};
}
interface Config {
root: string;
port: number;
name: string;
xHeaderDefaults?: Object;
log: {
name: string;
level: string
}
mount: (app: express.Application) => void
}
interface Result {
express: any;
app: express.Application;
server: http.Server;
log: bunyan.Logger;
listen: () => void;
}
export function init(conf: InitConfig): void;
export function create(conf: Config): Result;
}