Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

Commit

Permalink
Improve typedefs (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
myknbani authored and daffl committed Mar 2, 2017
1 parent 327db24 commit 1cb1c79
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
declare function rest(handler:Function): Function;
import 'express';

declare namespace rest{
export function formatter(req:any, res:any, next:Function): void;
declare function rest(handler?: Formatter): Function;

declare interface Formatter {
(request: Express.Request, response: Express.Response, next?: Function);
}

declare namespace rest {
const formatter: Formatter;
}

export = rest;

0 comments on commit 1cb1c79

Please sign in to comment.