Use NextJsHotReloaderInterface in router-server (#55317)

Small typing win as it ensures this is the same type between Turbopack/webpack.
This commit is contained in:
Tim Neutkens 2023-09-13 13:43:47 +02:00 committed by GitHub
parent 6111845e11
commit 83e2c67a69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,7 @@ import {
PHASE_DEVELOPMENT_SERVER,
PERMANENT_REDIRECT_STATUS,
} from '../../shared/lib/constants'
import type { NextJsHotReloaderInterface } from '../dev/hot-reloader-types'
const debug = setupDebug('next:router-server:main')
@ -134,11 +135,7 @@ export async function initialize(opts: {
;(global as any)._nextDevHandlers = {
async ensurePage(
dir: string,
match: Parameters<
InstanceType<
typeof import('../dev/hot-reloader-webpack').default
>['ensurePage']
>[0]
match: Parameters<NextJsHotReloaderInterface['ensurePage']>[0]
) {
const curDevInstance = devInstances[dir]
// TODO: remove after ensure is pulled out of server