From 98d2bc9bb356e3c6152b52ea5adcd4ae3882193c Mon Sep 17 00:00:00 2001 From: Brice BERNARD Date: Fri, 1 Dec 2017 11:10:02 +0100 Subject: [PATCH] Update query param typing --- types/next/index.d.ts | 8 ++++---- types/next/router.d.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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;