Unverified Commit 24b20dd1 authored by Henrik Wenz's avatar Henrik Wenz Committed by GitHub

chore: Migrate with-prefetching example to typescript (#40671)

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
parent 6279dba3
...@@ -7,7 +7,12 @@ ...@@ -7,7 +7,12 @@
}, },
"dependencies": { "dependencies": {
"next": "latest", "next": "latest",
"react": "^17.0.2", "react": "^18.2.0",
"react-dom": "^17.0.2" "react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "18.7.18",
"@types/react": "18.0.20",
"typescript": "4.8.3"
} }
} }
import type { AppProps } from 'next/app'
import Nav from '../components/Nav' import Nav from '../components/Nav'
export default function App({ Component, pageProps }) { export default function App({ Component, pageProps }: AppProps) {
return ( return (
<> <>
<Nav /> <Nav />
......
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment