response-time/ 000755 001751 000166 0000000000 15020720275 015321 5 ustar 00runner 000000 000000 15020720275 15020720275 response-time/LICENSE 000644 001751 000166 0000002165 15020720275 016332 0 ustar 00runner 000000 000000 15020720275 15020720275 MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
response-time/README.md 000644 001751 000166 0000004145 15020720275 016574 0 ustar 00runner 000000 000000 15020720600 15020720275 # 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/response-time/index.d.ts)
````ts
/* =================== USAGE ===================
import responseTime = require('response-time');
app.use(responseTime());
=============================================== */
///
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: Sat, 07 Jun 2025 02:15:25 GMT
* Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [Uros Smolnik](https://github.com/urossmolnik), [TonyYang](https://github.com/TonyPythoneer), [Dan Manastireanu](https://github.com/danmana), and [Sebastian Beltran](https://github.com/bjohansebas).
response-time/index.d.ts 000644 001751 000166 0000002364 15020720275 017227 0 ustar 00runner 000000 000000 15020720275 15020720275 /* =================== USAGE ===================
import responseTime = require('response-time');
app.use(responseTime());
=============================================== */
///
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;
}
}
response-time/package.json 000644 001751 000166 0000002532 15020720275 017601 0 ustar 00runner 000000 000000 15020720600 15020720275 {
"name": "@types/response-time",
"version": "2.3.9",
"description": "TypeScript definitions for response-time",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/response-time",
"license": "MIT",
"contributors": [
{
"name": "Uros Smolnik",
"githubUsername": "urossmolnik",
"url": "https://github.com/urossmolnik"
},
{
"name": "TonyYang",
"githubUsername": "TonyPythoneer",
"url": "https://github.com/TonyPythoneer"
},
{
"name": "Dan Manastireanu",
"githubUsername": "danmana",
"url": "https://github.com/danmana"
},
{
"name": "Sebastian Beltran",
"githubUsername": "bjohansebas",
"url": "https://github.com/bjohansebas"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/response-time"
},
"scripts": {},
"dependencies": {
"@types/express": "*",
"@types/node": "*"
},
"peerDependencies": {},
"typesPublisherContentHash": "ff8af5d919c38721e37536754aabdf32f4456930c9efbbd17b5a528c2997aa78",
"typeScriptVersion": "5.1"
}