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