[@types/next] Fix getInitialProps typings for the _error page (#30051)

* Fix getInitialProps typings for the _error page

* Optional Promise for _error's getInitialProps
This commit is contained in:
Pierre de la Martinière
2018-11-08 08:46:59 -08:00
committed by Andy
parent 26d2add0db
commit df37b63ca9
+1 -1
View File
@@ -10,5 +10,5 @@ export interface DefaultErrorIProps {
}
export default class Error<P = {}> extends React.Component<P & DefaultErrorIProps> {
static getInitialProps(context: NextContext): DefaultErrorIProps;
static getInitialProps(context: NextContext): Promise<DefaultErrorIProps> | DefaultErrorIProps;
}