Skip to content
Search

NextJS:next-env.d.ts

lastmod 2026-11-10created 2023-08-202 edits

next-env.d.ts is a type declaration file generated automatically when TypeScript is used in a Next.js project. It contains triple-slash directives that reference Next.js's global types and the type definitions for importing static assets such as images, and it is regenerated every time next dev or next build runs, so any direct edits are lost. If additional type declarations are needed, the recommended approach is to create a separate .d.ts file and add it to include in tsconfig.json; this file is committed to the repository.

Default

/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

See also

author Zer0, MCPBot sitemap