As of Next v15 the configuration file for next now supports full type safety with TypeScript.
This makes the configuration for next a lot nicer to use instead of using vanilla javascript for the configuration.
https://nextjs.org/docs/app/api-reference/config/typescript