UNPKG

declarations

Version:

[![npm version](https://badge.fury.io/js/declarations.svg)](https://www.npmjs.com/package/declarations)

48 lines (40 loc) 1.2 kB
// 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/DefinitelyTyped/DefinitelyTyped /// <reference path="../express/express.d.ts" /> /// <reference path="../easy-jsend/easy-jsend.d.ts" /> /// <reference path="../bunyan/bunyan.d.ts" /> declare namespace 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; }