@types/koa
Advanced tools
Comparing version 2.11.3 to 2.11.4
@@ -22,13 +22,14 @@ // Type definitions for Koa 2.11.0 | ||
/// <reference types="node" /> | ||
import * as accepts from "accepts"; | ||
import * as Cookies from "cookies"; | ||
import { EventEmitter } from "events"; | ||
import { IncomingMessage, ServerResponse, Server } from "http"; | ||
import * as accepts from 'accepts'; | ||
import * as Cookies from 'cookies'; | ||
import { EventEmitter } from 'events'; | ||
import { IncomingMessage, ServerResponse, Server } from 'http'; | ||
import { Http2ServerRequest, Http2ServerResponse } from 'http2'; | ||
import httpAssert = require("http-assert"); | ||
import * as Keygrip from "keygrip"; | ||
import * as compose from "koa-compose"; | ||
import { Socket, ListenOptions } from "net"; | ||
import * as url from "url"; | ||
import * as contentDisposition from "content-disposition"; | ||
import httpAssert = require('http-assert'); | ||
import * as HttpErrors from 'http-errors'; | ||
import * as Keygrip from 'keygrip'; | ||
import * as compose from 'koa-compose'; | ||
import { Socket, ListenOptions } from 'net'; | ||
import * as url from 'url'; | ||
import * as contentDisposition from 'content-disposition'; | ||
@@ -463,31 +464,10 @@ declare interface ContextDelegatedRequest { | ||
*/ | ||
listen( | ||
port?: number, | ||
hostname?: string, | ||
backlog?: number, | ||
listeningListener?: () => void, | ||
): Server; | ||
listen( | ||
port: number, | ||
hostname?: string, | ||
listeningListener?: () => void, | ||
): Server; | ||
listen( | ||
port: number, | ||
backlog?: number, | ||
listeningListener?: () => void, | ||
): Server; | ||
listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): Server; | ||
listen(port: number, hostname?: string, listeningListener?: () => void): Server; | ||
listen(port: number, backlog?: number, listeningListener?: () => void): Server; | ||
listen(port: number, listeningListener?: () => void): Server; | ||
listen( | ||
path: string, | ||
backlog?: number, | ||
listeningListener?: () => void, | ||
): Server; | ||
listen(path: string, backlog?: number, listeningListener?: () => void): Server; | ||
listen(path: string, listeningListener?: () => void): Server; | ||
listen(options: ListenOptions, listeningListener?: () => void): Server; | ||
listen( | ||
handle: any, | ||
backlog?: number, | ||
listeningListener?: () => void, | ||
): Server; | ||
listen(handle: any, backlog?: number, listeningListener?: () => void): Server; | ||
listen(handle: any, listeningListener?: () => void): Server; | ||
@@ -558,6 +538,5 @@ | ||
type Middleware< | ||
StateT = DefaultState, | ||
CustomT = DefaultContext | ||
> = compose.Middleware<ParameterizedContext<StateT, CustomT>>; | ||
type Middleware<StateT = DefaultState, CustomT = DefaultContext> = compose.Middleware< | ||
ParameterizedContext<StateT, CustomT> | ||
>; | ||
@@ -654,5 +633,3 @@ interface BaseRequest extends ContextDelegatedRequest { | ||
interface BaseContext | ||
extends ContextDelegatedRequest, | ||
ContextDelegatedResponse { | ||
interface BaseContext extends ContextDelegatedRequest, ContextDelegatedResponse { | ||
/** | ||
@@ -741,6 +718,3 @@ * util.inspect() implementation, which | ||
type ParameterizedContext< | ||
StateT = DefaultState, | ||
CustomT = DefaultContext | ||
> = ExtendableContext & { | ||
type ParameterizedContext<StateT = DefaultState, CustomT = DefaultContext> = ExtendableContext & { | ||
state: StateT; | ||
@@ -752,4 +726,11 @@ } & CustomT; | ||
type Next = () => Promise<any>; | ||
/** | ||
* A re-export of `HttpError` from the `http-assert` package. | ||
* | ||
* This is the error type that is thrown by `ctx.assert()` and `ctx.throw()`. | ||
*/ | ||
const HttpError: typeof HttpErrors.HttpError; | ||
} | ||
export = Application; |
{ | ||
"name": "@types/koa", | ||
"version": "2.11.3", | ||
"version": "2.11.4", | ||
"description": "TypeScript definitions for Koa", | ||
@@ -46,2 +46,3 @@ "license": "MIT", | ||
"@types/http-assert": "*", | ||
"@types/http-errors": "*", | ||
"@types/keygrip": "*", | ||
@@ -51,4 +52,4 @@ "@types/koa-compose": "*", | ||
}, | ||
"typesPublisherContentHash": "33c2f6518901d03475014c34d1e6da9d38aae516542d36ac65c5e971422325a2", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "ad73ebb389dbd97cf29b1bebd0c082e10200c789a2842d68909598efb2c7af5d", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -11,4 +11,4 @@ # Installation | ||
### Additional Details | ||
* Last updated: Fri, 27 Mar 2020 16:03:58 GMT | ||
* Dependencies: [@types/accepts](https://npmjs.com/package/@types/accepts), [@types/cookies](https://npmjs.com/package/@types/cookies), [@types/http-assert](https://npmjs.com/package/@types/http-assert), [@types/keygrip](https://npmjs.com/package/@types/keygrip), [@types/koa-compose](https://npmjs.com/package/@types/koa-compose), [@types/content-disposition](https://npmjs.com/package/@types/content-disposition), [@types/node](https://npmjs.com/package/@types/node) | ||
* Last updated: Tue, 18 Aug 2020 06:39:57 GMT | ||
* Dependencies: [@types/accepts](https://npmjs.com/package/@types/accepts), [@types/cookies](https://npmjs.com/package/@types/cookies), [@types/http-assert](https://npmjs.com/package/@types/http-assert), [@types/http-errors](https://npmjs.com/package/@types/http-errors), [@types/keygrip](https://npmjs.com/package/@types/keygrip), [@types/koa-compose](https://npmjs.com/package/@types/koa-compose), [@types/content-disposition](https://npmjs.com/package/@types/content-disposition), [@types/node](https://npmjs.com/package/@types/node) | ||
* Global values: none | ||
@@ -15,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23963
8
645
+ Added@types/http-errors@*