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.