Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/koa

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/koa - npm Package Compare versions

Comparing version 2.0.47 to 2.0.48

24

koa/index.d.ts

@@ -434,8 +434,8 @@ // Type definitions for Koa 2.x

declare class Application extends EventEmitter {
declare class Application<StateT = any, CustomT = {}> extends EventEmitter {
proxy: boolean;
middleware: Application.Middleware[];
middleware: Application.Middleware<StateT, CustomT>[];
subdomainOffset: number;
env: string;
context: Application.BaseContext;
context: Application.BaseContext & CustomT;
request: Application.BaseRequest;

@@ -501,3 +501,5 @@ response: Application.BaseResponse;

*/
use(middleware: Application.Middleware): this;
use<NewStateT = {}, NewCustomT = {}>(
middleware: Application.Middleware<StateT & NewStateT, CustomT & NewCustomT>,
): Application<StateT & NewStateT, CustomT & NewCustomT>;

@@ -515,6 +517,6 @@ /**

*/
createContext(
createContext<StateT = any>(
req: IncomingMessage,
res: ServerResponse,
): Application.Context;
): Application.ParameterizedContext<StateT>;

@@ -530,3 +532,3 @@ /**

declare namespace Application {
type Middleware = compose.Middleware<Context>;
type Middleware<StateT = any, CustomT = {}> = compose.Middleware<ParameterizedContext<StateT, CustomT>>;

@@ -691,3 +693,3 @@ interface BaseRequest extends ContextDelegatedRequest {

interface Context extends BaseContext {
type ParameterizedContext<StateT = any, CustomT = {}> = BaseContext & {
app: Application;

@@ -701,3 +703,3 @@ request: Request;

accept: accepts.Accepts;
state: any;
state: StateT;
/**

@@ -707,5 +709,7 @@ * To bypass Koa's built-in response handling, you may explicitly set `ctx.respond = false;`

respond?: boolean;
}
} & CustomT;
interface Context extends ParameterizedContext {}
}
export = Application;
{
"name": "@types/koa",
"version": "2.0.47",
"version": "2.0.48",
"description": "TypeScript definitions for Koa",

@@ -38,4 +38,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "5501a2ebc4e7459e9480137503bbd4db510d0726f098b8075badffcb5dfb13ea",
"typesPublisherContentHash": "4e42b1f8788df94b78f945a8453180d4f8606de73f9c60e52dcce84ad6c99f7a",
"typeScriptVersion": "2.3"
}

@@ -11,4 +11,4 @@ # Installation

Additional Details
* Last updated: Tue, 20 Nov 2018 18:02:56 GMT
* Dependencies: accepts, cookies, http-assert, keygrip, koa-compose, node
* Last updated: Mon, 31 Dec 2018 18:46:29 GMT
* Dependencies: @types/accepts, @types/cookies, @types/http-assert, @types/keygrip, @types/koa-compose, @types/node
* Global values: none

@@ -15,0 +15,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc