Add typescript typings to config files
complete
Emilie Ringwald
updated the status to
complete
Hi Thalles, thanks for the request! Good news: since Strapi v5.36.0, new TypeScript projects come with typed config files out of the box, so your editor shows you which options Strapi supports.
For existing projects, you can add the types yourself:
```ts
import type { Core } from '@strapi/strapi';
const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Server => ({
// ...
});
export default config;
```
The same works for the other files:
Core.Config.Admin
, Core.Config.Database
, Core.Config.Api
, Core.Config.Middlewares
and Core.Config.Plugin
.Release note: https://github.com/strapi/strapi/releases/tag/v5.36.0