Skip to content

Commit 51aeb1a

Browse files
committed
Replace universal Request with CommonRequest
1 parent e02da5a commit 51aeb1a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"lint-staged": "^8.1.7",
6969
"prettier": "^1.17.1",
7070
"rimraf": "^2.6.3",
71-
"servie": "^4.0.5",
71+
"servie": "^4.0.6",
7272
"ts-jest": "^24.0.2",
7373
"tslint": "^5.16.0",
7474
"tslint-config-prettier": "^1.18.0",

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Request } from "servie";
1+
import { CommonRequest } from "servie/dist/common";
22
import { URL } from "url";
33

44
type URLCache = { url: string; URL: URL };
5-
const map = new WeakMap<Request, URLCache>();
5+
const map = new WeakMap<CommonRequest, URLCache>();
66

77
/**
88
* Parse pathname from request url.
@@ -14,7 +14,7 @@ function toURL(url: string) {
1414
/**
1515
* Parse pathname from request instance.
1616
*/
17-
export function getURL(req: Request): URL {
17+
export function getURL(req: CommonRequest): URL {
1818
const { url } = req;
1919
const cache = map.get(req);
2020

0 commit comments

Comments
 (0)