@types/koa-json
Advanced tools
@@ -24,3 +24,3 @@ // Type definitions for koa-json v2.x | ||
| */ | ||
| pretty?: boolean, | ||
| pretty?: boolean | undefined, | ||
@@ -30,3 +30,3 @@ /** | ||
| */ | ||
| param?: string, | ||
| param?: string | undefined, | ||
@@ -36,5 +36,5 @@ /** | ||
| */ | ||
| spaces?: number | ||
| spaces?: number | undefined | ||
| }): Koa.Middleware; | ||
| declare namespace json { } | ||
| export = json; |
+1
-1
| MIT License | ||
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
| Copyright (c) Microsoft Corporation. | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
| { | ||
| "name": "@types/koa-json", | ||
| "version": "2.0.18", | ||
| "version": "2.0.19", | ||
| "description": "TypeScript definitions for koa-json", | ||
| "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-json", | ||
| "license": "MIT", | ||
@@ -14,5 +15,7 @@ "contributors": [ | ||
| "main": "", | ||
| "types": "index.d.ts", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
| "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
| "directory": "types/koa-json" | ||
| }, | ||
@@ -23,4 +26,4 @@ "scripts": {}, | ||
| }, | ||
| "typesPublisherContentHash": "b01753f2477b14f738e052ebcfad71a876157c6e78ffcd12cd5b13eb7d92f8c0", | ||
| "typeScriptVersion": "2.3" | ||
| "typesPublisherContentHash": "2c13528d51b16a8eed8fa614e833dca35db536fff09c2e33e98ee27abe0a2031", | ||
| "typeScriptVersion": "3.6" | ||
| } |
+46
-5
@@ -8,10 +8,51 @@ # Installation | ||
| # Details | ||
| Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-json | ||
| Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-json. | ||
| ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-json/index.d.ts) | ||
| ````ts | ||
| // Type definitions for koa-json v2.x | ||
| // Project: https://github.com/koajs/json | ||
| // Definitions by: Alex Friedman <https://github.com/brooklyndev> | ||
| // Definitions: https://github.com/brooklyndev/DefinitelyTyped | ||
| // TypeScript Version: 2.3 | ||
| Additional Details | ||
| * Last updated: Thu, 09 Nov 2017 08:43:08 GMT | ||
| * Dependencies: koa | ||
| /* =================== 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, 06 Jul 2021 22:02:38 GMT | ||
| * Dependencies: [@types/koa](https://npmjs.com/package/@types/koa) | ||
| * Global values: none | ||
| # Credits | ||
| These definitions were written by Alex Friedman <https://github.com/brooklyndev>. | ||
| These definitions were written by [Alex Friedman](https://github.com/brooklyndev). |
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
4344
35.79%0
-100%58
241.18%