Files
DefinitelyTyped/connect-timeout/connect-timeout.d.ts
Cyril Schumacher 36e064e2cb Fix error for "connect-timeout".
Add module to extend interface for "i18next".
Add default export for "express-brute-memcached".
Remove unnecessary interface for "i18next-express-middleware".
Add definitions for "i18next-browser-languagedetector" and "i18next-node-fs-backend".
2016-02-29 18:33:35 +01:00

43 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");
module e {
/**
* @summary Interface for timeout options.
* @interface
*/
interface TimeoutOptions {
/**
* @summary Controls if this module will "respond" in the form of forwarding an error.
* @type {boolean}
*/
respond?: boolean;
}
}
function e(timeout: string, options?: e.TimeoutOptions): express.RequestHandler;
export = e;
}