forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
method-override.d.ts
24 lines (21 loc) · 759 Bytes
/
method-override.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
// Type definitions for method-override
// Project: https://github.com/expressjs/method-override
// Definitions by: Santi Albo <https://github.com/santialbo/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare module Express {
export interface Request {
originalMethod?: string;
}
}
declare module "method-override" {
import express = require('express');
module e {
interface MethodOverrideOptions {
methods: string[];
}
}
function e(getter: string, options?: any): express.RequestHandler;
function e(getter: (req: express.Request, res: express.Response) => string, options?: any): express.RequestHandler;
export = e;
}