1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Update @types/next to latest in typescript example. (#4750)

Updating to a more recent version of `@types/next` fixes an error I encountered while building a new app on top of the "with-typescript" example:

`Property `push` not found in SingletonRouter`

Additional context: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/26665

To test, add a simple Router.push operation to the `pages/index.tsx`

```
import Router from 'next/router'
// ...
<span onClick={() => Router.push({ pathname: '/about' })}>TEST</span>
```
This commit is contained in:
jhartley218 2018-07-09 06:32:52 -05:00 committed by Tim Neutkens
parent a42a969e07
commit ad2d4432e7

View file

@ -13,7 +13,7 @@
"react-dom": "^16.2.0"
},
"devDependencies": {
"@types/next": "^2.4.7",
"@types/next": "latest",
"@types/react": "^16.0.36"
},
"license": "ISC"