Skip to content
This repository was archived by the owner on Jul 10, 2022. It is now read-only.

Commit 39ce5a4

Browse files
committed
Yet another QueryParams fix
1 parent b3eba29 commit 39ce5a4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This are the differences to the PHP version:
1818
Through [NPM](https://www.npmjs.com) as [@chubbyjs/psr-http-message][1].
1919

2020
```sh
21-
npm i @chubbyjs/[email protected].1
21+
npm i @chubbyjs/[email protected].2
2222
```
2323

2424
## Copyright

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chubbyjs/psr-http-message",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Common Http-message Interface (PHP FIG PSR-7).",
55
"keywords": [
66
"psr",

src/ServerRequestInterface.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import RequestInterface from './RequestInterface';
22

3-
export type QueryParams = { [key: string]: QueryParams } | Array<QueryParams> | string;
3+
export type QueryParamsValue = { [key: string]: QueryParams } | Array<QueryParams> | string;
4+
export type QueryParams = { [key: string]: QueryParamsValue };
45
export type ParsedBody = { [key: string]: ParsedBody } | Array<ParsedBody> | string | number | boolean | null;
56

67
interface ServerRequestInterface extends RequestInterface {
78
getCookieParams(): Map<string, string>;
89
withCookieParams(cookieParams: Map<string, string>): this;
9-
getQueryParams(): { [key: string]: QueryParams };
10-
withQueryParams(queryParams: { [key: string]: QueryParams }): this;
10+
getQueryParams(): QueryParams;
11+
withQueryParams(queryParams: QueryParams): this;
1112
getParsedBody(): ParsedBody | undefined;
1213
withParsedBody(parsedBody: ParsedBody | undefined): this;
1314
getAttributes(): Map<string, unknown>;

0 commit comments

Comments
 (0)