@types/next
Advanced tools
Comparing version 6.1.5 to 6.1.6
@@ -19,7 +19,7 @@ // Type definitions for next 6.1 | ||
import { SingletonRouter } from './router'; | ||
import { SingletonRouter, DefaultQuery } from './router'; | ||
declare namespace next { | ||
/** Map object used in query strings. */ | ||
type QueryStringMapObject = Record<string, string | string[] | undefined>; | ||
// Deprecated | ||
type QueryStringMapObject = DefaultQuery; | ||
@@ -31,3 +31,3 @@ /** | ||
*/ | ||
interface NextContext<Q = QueryStringMapObject> { | ||
interface NextContext<Q = DefaultQuery> { | ||
/** path section of URL */ | ||
@@ -49,4 +49,4 @@ pathname: string; | ||
type NextSFC<TProps = {}, Q = QueryStringMapObject> = NextStatelessComponent<TProps, Q>; | ||
interface NextStatelessComponent<TProps = {}, Q = QueryStringMapObject> | ||
type NextSFC<TProps = {}, Q = DefaultQuery> = NextStatelessComponent<TProps, Q>; | ||
interface NextStatelessComponent<TProps = {}, Q = DefaultQuery> | ||
extends React.StatelessComponent<TProps> { | ||
@@ -148,3 +148,3 @@ getInitialProps?: (ctx: NextContext<Q>) => Promise<TProps>; | ||
pathname: string, | ||
query?: QueryStringMapObject, | ||
query?: DefaultQuery, | ||
parsedUrl?: UrlLike | ||
@@ -156,3 +156,3 @@ ): Promise<void>; | ||
pathname: string, | ||
query?: QueryStringMapObject | ||
query?: DefaultQuery | ||
): Promise<string>; | ||
@@ -164,3 +164,3 @@ renderError( | ||
pathname: string, | ||
query?: QueryStringMapObject | ||
query?: DefaultQuery | ||
): Promise<void>; | ||
@@ -172,3 +172,3 @@ renderErrorToHTML( | ||
pathname: string, | ||
query?: QueryStringMapObject | ||
query?: DefaultQuery | ||
): Promise<string>; | ||
@@ -175,0 +175,0 @@ render404( |
{ | ||
"name": "@types/next", | ||
"version": "6.1.5", | ||
"version": "6.1.6", | ||
"description": "TypeScript definitions for next", | ||
@@ -45,8 +45,8 @@ "license": "MIT", | ||
"dependencies": { | ||
"@types/react": "*", | ||
"@types/node-fetch": "*", | ||
"@types/node": "*", | ||
"@types/react": "*" | ||
"@types/node": "*" | ||
}, | ||
"typesPublisherContentHash": "878123fc0e05f9854ec4a28a23da29096d18f65d906b07353fc548eedbad0fa2", | ||
"typesPublisherContentHash": "2381e73323604a385b7433276791ff3620b8995e6f6bb64bd7a524e6113fb633", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,4 +11,4 @@ # Installation | ||
Additional Details | ||
* Last updated: Fri, 14 Sep 2018 16:10:12 GMT | ||
* Dependencies: http, url, node-fetch, node, react | ||
* Last updated: Mon, 17 Sep 2018 19:34:38 GMT | ||
* Dependencies: react, url, http, node-fetch, node | ||
* Global values: none | ||
@@ -15,0 +15,0 @@ |
@@ -29,11 +29,3 @@ import * as React from "react"; | ||
export interface DefaultQuery { | ||
[key: string]: | ||
| boolean | ||
| boolean[] | ||
| number | ||
| number[] | ||
| string | ||
| string[]; | ||
} | ||
export type DefaultQuery = Record<string, string | string[] | undefined>; | ||
@@ -40,0 +32,0 @@ export interface RouterProps<Q = DefaultQuery> { |
16745
367