Unverified Commit ffba7026 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Create file referencing Next.js types (#7545)

parent 3d385509
......@@ -268,6 +268,15 @@ export async function verifyTypeScriptSetup(dir: string): Promise<void> {
await writeJson(tsConfigPath, appTsConfig)
}
// Reference `next` types
const appTypeDeclarations = path.join(dir, 'next-env.d.ts')
if (!fs.existsSync(appTypeDeclarations)) {
fs.writeFileSync(
appTypeDeclarations,
`/// <reference types="next" />${os.EOL}`
)
}
if (toInstall.length > 0) {
console.warn(
chalk.red(
......
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