Skip to content

Commit

Permalink
Merge pull request DefinitelyTyped#26846 from herrstucki/fix-next-app…
Browse files Browse the repository at this point in the history
…-router

[@types/next] Fix wrong router type in app
  • Loading branch information
paulvanbrenk authored Jun 26, 2018
2 parents 35b0085 + 31bc8ee commit 8c27494
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions types/next/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import * as React from "react";
import { NextContext } from ".";
import { SingletonRouter } from "./router";
import { RouterProps } from "./router";

export interface AppComponentProps {
Component: React.ComponentType<any>;
router: RouterProps;
pageProps: any;
}

export interface AppComponentContext {
Component: React.ComponentType<any>;
router: SingletonRouter;
router: RouterProps;
ctx: NextContext;
}

Expand Down
2 changes: 1 addition & 1 deletion types/next/test/next-app-tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TestApp extends App<NextComponentProps> {
}

render() {
const { Component, pageProps } = this.props;
const { Component, router, pageProps } = this.props;
return (
<Container>
<Component {...pageProps} />
Expand Down

0 comments on commit 8c27494

Please sign in to comment.