2.3.8 • Published 6 months ago
@types/response-time v2.3.8
Installation
npm install --save @types/response-time
Summary
This package contains type definitions for response-time (https://github.com/expressjs/response-time).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/response-time.
index.d.ts
// Type definitions for response-time 2.3.2
// Project: https://github.com/expressjs/response-time
// Definitions by: Uros Smolnik <https://github.com/urossmolnik>, TonyYang <https://github.com/TonyPythoneer>
// Dan Manastireanu <https://github.com/danmana>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/* =================== USAGE ===================
import responseTime = require('response-time');
app.use(responseTime());
=============================================== */
/// <reference types="node" />
import http = require("http");
import express = require("express");
export = responseTime;
/**
* Response time header for node.js
* Returns middleware that adds a X-Response-Time header to responses.
*/
declare function responseTime(options?: responseTime.ResponseTimeOptions):
(request: http.IncomingMessage, response: http.ServerResponse, callback: (err: any) => void) => any;
declare function responseTime(fn: responseTime.ResponseTimeFunction):
(request: http.IncomingMessage, response: http.ServerResponse, callback: (err: any) => void) => any;
declare function responseTime(fn: (request: express.Request, response: express.Response, time: number) => any):
express.RequestHandler;
declare namespace responseTime {
export interface ResponseTimeOptions {
digits?: number | undefined;
header?: string | undefined;
suffix?: boolean | undefined;
}
export interface ResponseTimeFunction {
(request: http.IncomingMessage, response: http.ServerResponse, time: number ): any;
}
}
Additional Details
- Last updated: Wed, 07 Jul 2021 18:02:25 GMT
- Dependencies: @types/express, @types/node
- Global values: none
Credits
These definitions were written by Uros Smolnik, TonyYang, and Dan Manastireanu.
2.3.8
6 months ago
2.3.7
7 months ago
2.3.6
7 months ago
2.3.5
3 years ago
2.3.4
5 years ago
2.3.3
6 years ago
2.3.2
6 years ago
2.3.1
7 years ago
2.3.0
7 years ago
2.2.28
8 years ago
2.2.27
8 years ago
2.2.26-alpha
8 years ago
2.2.25-alpha
8 years ago
2.2.24-alpha
8 years ago
2.2.23-alpha
8 years ago
2.2.22-alpha
8 years ago
2.2.21-alpha
8 years ago
2.2.20-alpha
8 years ago
2.2.15-alpha
8 years ago
2.2.14-alpha
8 years ago