@types/next
Advanced tools
Comparing version 6.1.7 to 6.1.8
@@ -16,3 +16,3 @@ import * as React from "react"; | ||
*/ | ||
export interface NextAppContext<Q = DefaultQuery> { | ||
export interface NextAppContext<Q extends DefaultQuery = DefaultQuery> { | ||
Component: NextComponentType<any, any, NextContext<Q>>; | ||
@@ -29,3 +29,3 @@ router: RouterProps<Q>; | ||
*/ | ||
export interface AppProps<Q = DefaultQuery> { | ||
export interface AppProps<Q extends DefaultQuery = DefaultQuery> { | ||
Component: NextComponentType<any, any, NextContext<Q>>; | ||
@@ -46,4 +46,4 @@ router: RouterProps<Q>; | ||
export class Container extends React.Component {} | ||
export default class App<IP = {}, C = NextAppContext> extends React.Component<IP & AppProps> { | ||
getInitialProps(context: C): Promise<IP> | IP; | ||
export default class App<P = {}> extends React.Component<P & AppProps> { | ||
static getInitialProps(context: NextAppContext): Promise<{ pageProps: any }>; | ||
} |
@@ -33,3 +33,3 @@ import * as React from "react"; | ||
*/ | ||
export interface NextDocumentContext<Q = DefaultQuery> extends NextContext<Q> { | ||
export interface NextDocumentContext<Q extends DefaultQuery = DefaultQuery> extends NextContext<Q> { | ||
/** A callback that executes the actual React rendering logic (synchronously) */ | ||
@@ -90,6 +90,4 @@ renderPage<E extends PageProps = AnyPageProps, P extends any = E>( | ||
export class NextScript extends React.Component<NextScriptProps> {} | ||
export default class Document<IP = {}, C = NextDocumentContext> extends React.Component< | ||
IP & DocumentProps | ||
> { | ||
getInitialProps(context: C): Promise<IP> | IP; | ||
export default class Document<P = {}> extends React.Component<P & DocumentProps> { | ||
static getInitialProps(context: NextDocumentContext): DocumentProps; | ||
} |
@@ -36,3 +36,3 @@ // Type definitions for next 6.1 | ||
*/ | ||
interface NextContext<Q = DefaultQuery> { | ||
interface NextContext<Q extends DefaultQuery = DefaultQuery> { | ||
/** path section of URL */ | ||
@@ -39,0 +39,0 @@ pathname: string; |
{ | ||
"name": "@types/next", | ||
"version": "6.1.7", | ||
"version": "6.1.8", | ||
"description": "TypeScript definitions for next", | ||
@@ -49,4 +49,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "48ead1919210c3fc430baea8c436f779288a72dd0ff8921ae025de34a45c9530", | ||
"typesPublisherContentHash": "c8d2dbc283f23d5e3bee5885c0a0d06f3b75d69f61f311579dcdf211a11cdfa0", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Thu, 20 Sep 2018 23:55:07 GMT | ||
* Last updated: Mon, 24 Sep 2018 18:20:24 GMT | ||
* Dependencies: react, url, http, node-fetch, node | ||
@@ -14,0 +14,0 @@ * Global values: none |
19859
456