@types/express-serve-static-core
Advanced tools
Comparing version 4.17.5 to 4.17.6
@@ -31,3 +31,6 @@ // Type definitions for Express 4.17 | ||
import { Options as RangeParserOptions, Result as RangeParserResult, Ranges as RangeParserRanges } from "range-parser"; | ||
import { ParsedQs } from "qs"; | ||
export type Query = ParsedQs; | ||
export interface NextFunction { | ||
@@ -44,6 +47,3 @@ // tslint:disable-next-line callable-types (In ts2.1 it thinks the type alias has no call signatures) | ||
// Return type of qs.parse, the default query parser (https://expressjs.com/en/api.html#app-settings-property). | ||
export interface Query { [key: string]: string | Query | Array<string | Query>; } | ||
export interface RequestHandler<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = Query> { | ||
export interface RequestHandler<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = ParsedQs> { | ||
// tslint:disable-next-line callable-types (This is extended from and can't extend from a type alias in ts<2.2 | ||
@@ -53,3 +53,3 @@ (req: Request<P, ResBody, ReqBody, ReqQuery>, res: Response<ResBody>, next: NextFunction): any; | ||
export type ErrorRequestHandler<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = Query> = | ||
export type ErrorRequestHandler<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = ParsedQs> = | ||
(err: any, req: Request<P, ResBody, ReqBody, ReqQuery>, res: Response<ResBody>, next: NextFunction) => any; | ||
@@ -59,3 +59,3 @@ | ||
export type RequestHandlerParams<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = Query> | ||
export type RequestHandlerParams<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = ParsedQs> | ||
= RequestHandler<P, ResBody, ReqBody, ReqQuery> | ||
@@ -68,5 +68,5 @@ | ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery> | ||
// tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.) | ||
<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = Query>(path: PathParams, ...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery>>): T; | ||
<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = ParsedQs>(path: PathParams, ...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery>>): T; | ||
// tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.) | ||
<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = Query>(path: PathParams, ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery>>): T; | ||
<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = ParsedQs>(path: PathParams, ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery>>): T; | ||
(path: PathParams, subApplication: Application): T; | ||
@@ -221,3 +221,3 @@ } | ||
*/ | ||
export interface Request<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = Query> extends http.IncomingMessage, Express.Request { | ||
export interface Request<P extends Params = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = ParsedQs> extends http.IncomingMessage, Express.Request { | ||
/** | ||
@@ -224,0 +224,0 @@ * Return request header. |
{ | ||
"name": "@types/express-serve-static-core", | ||
"version": "4.17.5", | ||
"version": "4.17.6", | ||
"description": "TypeScript definitions for Express", | ||
@@ -63,6 +63,7 @@ "license": "MIT", | ||
"@types/node": "*", | ||
"@types/qs": "*", | ||
"@types/range-parser": "*" | ||
}, | ||
"typesPublisherContentHash": "6f11b0a320663b711f0a20e1d54b8ddeff4658036983278ea3c5f628de4950e3", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "184fe9ace554efe986c5b1e2644baa356cce7f6a053e8e146704b3bf68b5c0d3", | ||
"typeScriptVersion": "2.9" | ||
} |
@@ -11,4 +11,4 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 15 Apr 2020 03:34:13 GMT | ||
* Dependencies: [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/node](https://npmjs.com/package/@types/node) | ||
* Last updated: Tue, 05 May 2020 16:44:21 GMT | ||
* Dependencies: [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/qs](https://npmjs.com/package/@types/qs), [@types/node](https://npmjs.com/package/@types/node) | ||
* Global values: none | ||
@@ -15,0 +15,0 @@ |
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
39904
3
+ Added@types/qs@*
+ Added@types/qs@6.9.16(transitive)