2.1.5 • Published 7 months ago

@types/koa-response-time v2.1.5

Weekly downloads
1,303
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/koa-response-time

Summary

This package contains type definitions for koa-response-time (https://github.com/koajs/response-time#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-response-time.

index.d.ts

// Type definitions for koa-response-time 2.1
// Project: https://github.com/koajs/response-time#readme
// Definitions by: Steven McDowall <https://github.com/sjmcdowall>
//                 Dwscdv3 <https://github.com/Dwscdv3>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import { Middleware } from 'koa';

interface KoaResponseTimeOptions {
    hrtime?: boolean | undefined;
}

/**
 * Add X-Response-Time header field.
 * @param options options dictionary. { hrtime }
 *
 *        hrtime: boolean.
 *          `true` to use time in nanoseconds.
 *          `false` to use time in milliseconds.
 *          Default is `false` to keep back compatible.
 * @api public
 */
declare function koa_response_time(options?: KoaResponseTimeOptions): Middleware;

export = koa_response_time;

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:35:00 GMT
  • Dependencies: @types/koa
  • Global values: none

Credits

These definitions were written by Steven McDowall, and Dwscdv3.