diff --git a/types/next/index.d.ts b/types/next/index.d.ts index 4942e778c5..2dadc6e10b 100644 --- a/types/next/index.d.ts +++ b/types/next/index.d.ts @@ -59,7 +59,7 @@ declare namespace next { req: http.IncomingMessage, res: http.ServerResponse, pathname: string, - query?: { [key: string]: any }, + query?: { [key: string]: string | string[] }, parsedUrl?: UrlLike, ): Promise; renderError( @@ -67,7 +67,7 @@ declare namespace next { req: http.IncomingMessage, res: http.ServerResponse, pathname: string, - query?: { [key: string]: any }, + query?: { [key: string]: string | string[] }, ): Promise; render404( req: http.IncomingMessage, @@ -78,14 +78,14 @@ declare namespace next { req: http.IncomingMessage, res: http.ServerResponse, pathname: string, - query?: { [key: string]: any }, + query?: { [key: string]: string | string[] }, ): Promise; renderErrorToHTML( err: any, req: http.IncomingMessage, res: http.ServerResponse, pathname: string, - query?: { [key: string]: any }, + query?: { [key: string]: string | string[] }, ): Promise; serveStatic( diff --git a/types/next/router.d.ts b/types/next/router.d.ts index 90a2e3af55..4102e87b12 100644 --- a/types/next/router.d.ts +++ b/types/next/router.d.ts @@ -20,7 +20,7 @@ export interface SingletonRouter { readonly pathname: string; readonly route: string; readonly asPath?: string; - readonly query?: { [key: string]: any }; + readonly query?: { [key: string]: string | string[] }; // router methods reload(route: string): Promise;