Unverified Commit 82dfe157 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Fix method return shape (#13299)

* Fix method return shape

* adjust type
Co-authored-by: 's avatarTim Neutkens <tim@timneutkens.nl>
parent 89bc7490
...@@ -185,7 +185,7 @@ export default class HotReloader { ...@@ -185,7 +185,7 @@ export default class HotReloader {
const handlePageBundleRequest = async ( const handlePageBundleRequest = async (
res: ServerResponse, res: ServerResponse,
parsedUrl: UrlObject parsedUrl: UrlObject
) => { ): Promise<{ finished?: true }> => {
const { pathname } = parsedUrl const { pathname } = parsedUrl
const params = matchNextPageBundleRequest(pathname) const params = matchNextPageBundleRequest(pathname)
if (!params) { if (!params) {
...@@ -193,7 +193,7 @@ export default class HotReloader { ...@@ -193,7 +193,7 @@ export default class HotReloader {
} }
if (params.buildId !== this.buildId) { if (params.buildId !== this.buildId) {
return return {}
} }
const page = `/${params.path.join('/')}` const page = `/${params.path.join('/')}`
...@@ -232,7 +232,7 @@ export default class HotReloader { ...@@ -232,7 +232,7 @@ export default class HotReloader {
return {} return {}
} }
const { finished } = (await handlePageBundleRequest(res, parsedUrl)) as any const { finished } = await handlePageBundleRequest(res, parsedUrl)
for (const fn of this.middlewares) { for (const fn of this.middlewares) {
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment