Skip to content

Commit 83e2c67

Browse files
authored
Use NextJsHotReloaderInterface in router-server (#55317)
Small typing win as it ensures this is the same type between Turbopack/webpack.
1 parent 6111845 commit 83e2c67

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/next/src/server/lib/router-server.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
PHASE_DEVELOPMENT_SERVER,
3939
PERMANENT_REDIRECT_STATUS,
4040
} from '../../shared/lib/constants'
41+
import type { NextJsHotReloaderInterface } from '../dev/hot-reloader-types'
4142

4243
const debug = setupDebug('next:router-server:main')
4344

@@ -134,11 +135,7 @@ export async function initialize(opts: {
134135
;(global as any)._nextDevHandlers = {
135136
async ensurePage(
136137
dir: string,
137-
match: Parameters<
138-
InstanceType<
139-
typeof import('../dev/hot-reloader-webpack').default
140-
>['ensurePage']
141-
>[0]
138+
match: Parameters<NextJsHotReloaderInterface['ensurePage']>[0]
142139
) {
143140
const curDevInstance = devInstances[dir]
144141
// TODO: remove after ensure is pulled out of server

0 commit comments

Comments
 (0)