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

2.0.23 • Public • Published

Installation

npm install --save @types/koa-json

Summary

This package contains type definitions for koa-json (https://github.com/koajs/json).

Details

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

index.d.ts

/* =================== USAGE ===================

    import * as Koa from 'koa';
    import * as json from 'koa-json';

    const app = new Koa();
    app.use(json());

 =============================================== */

import * as Koa from "koa";

declare function json(opts?: {
    /**
     * default to pretty response [true]
     */
    pretty?: boolean | undefined;

    /**
     * optional query-string param for pretty responses [none]
     */
    param?: string | undefined;

    /**
     * JSON spaces [2]
     */
    spaces?: number | undefined;
}): Koa.Middleware;
declare namespace json {}
export = json;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/koa

Credits

These definitions were written by Alex Friedman.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/koa-json

Weekly Downloads

11,874

Version

2.0.23

License

MIT

Unpacked Size

3.85 kB

Total Files

5

Last publish

Collaborators

  • types