@types/morgan-json
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Installation

npm install --save @types/morgan-json

Summary

This package contains type definitions for morgan-json (https://github.com/indexzero/morgan-json#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/morgan-json.

index.d.ts

import morgan = require("morgan");

interface Options {
    stringify: boolean;
}

interface FormatObject {
    [key: string]: string;
}

/**
 * Format strings
 * @example
 * :method :url :status :res[content-length] bytes :response-time ms
 * @example
 * {
 *      short: ':method :url :status',
 *      length: ':res[content-length]',
 *      'response-time': ':response-time ms'
 * }
 * @param format
 * @param opts
 */
declare function json(format: string | FormatObject, opts?: Options): morgan.FormatFn;

export = json;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/morgan

Credits

These definitions were written by Michal Grezel.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/morgan-json

Weekly Downloads

4,041

Version

1.1.3

License

MIT

Unpacked Size

3.71 kB

Total Files

5

Last publish

Collaborators

  • types