DefinitelyTyped/connect-timeout/connect-timeout.d.ts
Cyril Schumacher 5f2a5d25bb Update definitions for "i18next-express-middleware", "i18next" and
"connect-timeout".
Remove "tscparams" file for "acc-wizard".
2016-01-07 16:23:33 +01:00

40 lines
1.1 KiB
TypeScript

// Type definitions for connect-timeout
// Project: https://github.com/expressjs/timeout
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare module Express {
export interface Request {
/**
* @summary Clears the timeout on the request.
*/
clearTimeout(): void;
/**
*
* @return {boolean} true if timeout fired; false otherwise.
*/
timedout(event: string, message: string): boolean;
}
}
declare module "connect-timeout" {
import express = require("express");
/**
* @summary Interface for timeout options.
* @interface
*/
interface TimeoutOptions extends Object {
/**
* @summary Controls if this module will "respond" in the form of forwarding an error.
* @type {boolean}
*/
respond: boolean;
}
export default function timeout(timeout: string, options?: TimeoutOptions): express.RequestHandler;
}