Socket
Socket
Sign inDemoInstall

@types/express-serve-static-core

Package Overview
Dependencies
4
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.17.32 to 4.17.33

65

express-serve-static-core/index.d.ts

@@ -21,2 +21,3 @@ // Type definitions for Express 4.17

interface Response {}
interface Locals {}
interface Application {}

@@ -59,2 +60,4 @@ }

export interface Locals extends Express.Locals {}
export interface RequestHandler<

@@ -65,8 +68,8 @@ P = ParamsDictionary,

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
> {
// tslint:disable-next-line callable-types (This is extended from and can't extend from a type alias in ts<2.2)
(
req: Request<P, ResBody, ReqBody, ReqQuery, Locals>,
res: Response<ResBody, Locals>,
req: Request<P, ResBody, ReqBody, ReqQuery, LocalsObj>,
res: Response<ResBody, LocalsObj>,
next: NextFunction,

@@ -81,7 +84,7 @@ ): void;

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
> = (
err: any,
req: Request<P, ResBody, ReqBody, ReqQuery, Locals>,
res: Response<ResBody, Locals>,
req: Request<P, ResBody, ReqBody, ReqQuery, LocalsObj>,
res: Response<ResBody, LocalsObj>,
next: NextFunction,

@@ -97,6 +100,6 @@ ) => void;

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
> =
| RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>
| ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>
| RequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj>
| ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj>
| Array<RequestHandler<P> | ErrorRequestHandler<P>>;

@@ -137,3 +140,3 @@

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(

@@ -145,3 +148,3 @@ // (it's used as the default type parameter for P)

// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -154,3 +157,3 @@ <

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(

@@ -162,3 +165,3 @@ // (it's used as the default type parameter for P)

// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -170,3 +173,3 @@ <

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(

@@ -176,3 +179,3 @@ path: PathParams,

// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -184,3 +187,3 @@ <

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(

@@ -190,3 +193,3 @@ path: PathParams,

// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -204,7 +207,7 @@ (path: PathParams, subApplication: Application): T;

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(
// (This generic is meant to be passed explicitly.)
// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -216,7 +219,7 @@ <

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(
// (This generic is meant to be passed explicitly.)
// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -228,7 +231,7 @@ <

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(
// (This generic is meant to be passed explicitly.)
// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -240,7 +243,7 @@ <

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
>(
// (This generic is meant to be passed explicitly.)
// eslint-disable-next-line no-unnecessary-generics
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
): T;

@@ -399,3 +402,3 @@ }

ReqQuery = ParsedQs,
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
> extends http.IncomingMessage,

@@ -674,3 +677,3 @@ Express.Request {

*/
res?: Response<ResBody, Locals> | undefined;
res?: Response<ResBody, LocalsObj> | undefined;
next?: NextFunction | undefined;

@@ -690,3 +693,3 @@ }

ResBody = any,
Locals extends Record<string, any> = Record<string, any>,
LocalsObj extends Record<string, any> = Record<string, any>,
StatusCode extends number = number

@@ -1036,3 +1039,3 @@ > extends http.ServerResponse,

locals: Locals;
locals: LocalsObj & Locals;

@@ -1079,3 +1082,3 @@ charset: string;

export interface Application<
Locals extends Record<string, any> = Record<string, any>
LocalsObj extends Record<string, any> = Record<string, any>
> extends EventEmitter, IRouter, Express.Application {

@@ -1247,3 +1250,3 @@ /**

locals: Locals;
locals: LocalsObj & Locals;

@@ -1250,0 +1253,0 @@ /**

{
"name": "@types/express-serve-static-core",
"version": "4.17.32",
"version": "4.17.33",
"description": "TypeScript definitions for Express",

@@ -52,4 +52,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core",

},
"typesPublisherContentHash": "e778331bb638d0ec18ce0e0b88173b62d735975962ce8e4d7a8568feb9f468b4",
"typesPublisherContentHash": "0a827d8ef2f7f9ef4c3093ee5f8b4a148b276b25d09a337a636065cf58d32616",
"typeScriptVersion": "4.2"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 30 Dec 2022 23:03:38 GMT
* Last updated: Mon, 23 Jan 2023 21:32:41 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser)

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc