P
Prisma2mo ago
Vincent

Types for the experimental.extensions option don't work in 6.18.0=

If I set extensions to true in my prisma config, such as
export default {
experimental: {
extensions: true,
}
} satisfies PrismaConfig;
export default {
experimental: {
extensions: true,
}
} satisfies PrismaConfig;
The types do not now support an extensions config option at the top level of the object as I would expect. Instead typescript complains, even though the source code clearly shows this is supported:
function defineExtensionsConfig(config, configInput) {
if (!configInput["extensions"]) {
return;
}
config["extensions"] = configInput["extensions"];
debug2("[config.extensions]: %o", config["extensions"]);
}
function defineExtensionsConfig(config, configInput) {
if (!configInput["extensions"]) {
return;
}
config["extensions"] = configInput["extensions"];
debug2("[config.extensions]: %o", config["extensions"]);
}
Error: Object literal may only specify known properties, and 'extensions' does not exist in type 'PrismaConfigUnconditional & SchemaEngineConfigClassic'.ts(2353) I am using Prisma ^6.18.0 and TypeScript 5.9
3 Replies
Prisma AI Help
Prisma AI Help2mo ago
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.
Vincent
VincentOP2mo ago
I can make the error go away by doing something like PrismaConfig & { extensions: Record<string, unknown> } for example, but I would have expected this to be typed, even if it is an experimental setting.
Nurul
Nurul4w ago
Can you check if you get the same error in prisma 6.19.0 as well?

Did you find this page helpful?