Skip to content

Commit c6e63d5

Browse files
committed
adjust typescript type
1 parent c865882 commit c6e63d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/remix/src/utils/instrumentServer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,9 @@ function createRoutes(manifest: ServerRouteManifest, parentId?: string): ServerR
274274

275275
function wrapRequestHandler(origRequestHandler: RequestHandler, build: ServerBuild): RequestHandler {
276276
const routes = createRoutes(build.routes);
277-
const pkg = loadModule<{ matchRoutes: (routes: ServerRoute[], pathname: string) => any[] }>('react-router-dom');
278-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
277+
const pkg = loadModule<{
278+
matchRoutes: (routes: ServerRoute[], pathname: string) => RouteMatch<ServerRoute>[] | null;
279+
}>('react-router-dom');
279280
// https://github.com/remix-run/remix/blob/38e127b1d97485900b9c220d93503de0deb1fc81/packages/remix-server-runtime/routeMatching.ts#L12-L24
280281
function matchServerRoutes(routes: ServerRoute[], pathname: string): RouteMatch<ServerRoute>[] | null {
281282
if (!pkg) {

0 commit comments

Comments
 (0)