@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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.238,338ts5.7
2.0.238,338ts5.6
2.0.238,338latest
2.0.238,338ts4.5
2.0.238,338ts4.6
2.0.238,338ts4.7
2.0.238,338ts4.8
2.0.238,338ts4.9
2.0.238,338ts5.0
2.0.238,338ts5.1
2.0.238,338ts5.2
2.0.238,338ts5.3
2.0.238,338ts5.4
2.0.238,338ts5.5
2.0.238,338ts5.8
2.0.204,334ts3.6
2.0.204,334ts3.7
2.0.204,334ts3.8
2.0.204,334ts3.9
2.0.204,334ts4.0
2.0.204,334ts4.1
2.0.204,334ts4.2
2.0.204,334ts4.3
2.0.204,334ts4.4
2.0.18503ts2.3
2.0.18503ts2.4
2.0.18503ts2.5
2.0.18503ts2.6
2.0.18503ts2.7
2.0.18503ts2.8
2.0.18503ts2.9
2.0.18503ts3.0
2.0.18503ts3.1
2.0.18503ts3.2
2.0.18503ts3.3
2.0.18503ts3.4
2.0.18503ts3.5
2.0.171ts2.0
2.0.171ts2.1
2.0.171ts2.2

Version History

VersionDownloads (Last 7 Days)Published
2.0.238,338
2.0.228
2.0.2138
2.0.204,334
2.0.190
2.0.18503
2.0.171
2.0.160
2.0.151
2.0.140
2.0.13-alpha0
2.0.12-alpha0
2.0.11-alpha0
2.0.10-alpha0
2.0.9-alpha0
2.0.8-alpha0
2.0.3-alpha0
2.0.2-alpha12

Package Sidebar

Install

npm i @types/koa-json

Weekly Downloads

13,235

Version

2.0.23

License

MIT

Unpacked Size

3.85 kB

Total Files

5

Last publish

Collaborators

  • types