How do I use the next-env.d.ts file in Next.js?

next-env.d.ts file is explained here: https://nextjs.org/docs/basic-features/typescript

A file named next-env.d.ts will be created in the root of your project. This file ensures Next.js types are picked up by the TypeScript compiler. You cannot remove it, however, you can edit it (but you don’t need to).

For what your are trying to achieve with the enums, you can export your enum as a regular ES Module, so you can import it whenever you want in your code.

Hope that helps.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)