From 4b0b64bd58aa00102f3f081a84fcc695378257c8 Mon Sep 17 00:00:00 2001 From: James Hegedus Date: Mon, 12 Mar 2018 20:43:21 +1100 Subject: [PATCH] fix some lint errors and answer qs from PR template --- types/next/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/next/index.d.ts b/types/next/index.d.ts index a6cf91ddc6..77cea7062d 100644 --- a/types/next/index.d.ts +++ b/types/next/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for next 2.4 +// Type definitions for next 5.0 // Project: https://github.com/zeit/next.js // Definitions by: Drew Hays // Brice BERNARD @@ -7,21 +7,21 @@ // TypeScript Version: 2.6 /// -/// import * as http from "http"; import * as url from "url"; import * as fetch from "isomorphic-unfetch"; declare namespace next { + // <> interface NextContext { - pathname?: string; //path section of URL + pathname?: string; // path section of URL query?: any; // meant to be an object - // query string section of URL parsed as an object asPath?: string; // String of the actual path (including the query) shows in the browser - req?: http.IncomingMessage; //HTTP request object (server only) - res?: http.ServerResponse; //HTTP response object (server only) - jsonPageRes?: fetch.IsomorphicResponse; //Fetch Response object (client only) - from https://developer.mozilla.org/en-US/docs/Web/API/Response - err?: Error; //Error object if any error is encountered during the rendering + req?: http.IncomingMessage; // HTTP request object (server only) + res?: http.ServerResponse; // HTTP response object (server only) + jsonPageRes?: fetch.IsomorphicResponse; // Fetch Response object (client only) - from https://developer.mozilla.org/en-US/docs/Web/API/Response + err?: Error; // Error object if any error is encountered during the rendering } type UrlLike = url.UrlObject | url.Url;