mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-20 16:14:57 +08:00
26 lines
725 B
TypeScript
26 lines
725 B
TypeScript
// 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
|
|
|
|
|
|
|
|
declare namespace Express {
|
|
export interface Request {
|
|
originalMethod?: string;
|
|
}
|
|
}
|
|
|
|
import express = require('express');
|
|
|
|
declare namespace e {
|
|
export interface MethodOverrideOptions {
|
|
methods: string[];
|
|
}
|
|
}
|
|
|
|
declare function e(getter?: string, options?: e.MethodOverrideOptions): express.RequestHandler;
|
|
declare function e(getter?: (req: express.Request, res: express.Response) => string, options?: e.MethodOverrideOptions): express.RequestHandler;
|
|
|
|
export = e;
|