From 7a1ebd6450f40e2972abbae4acc1ddf46c71e484 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 9 Dec 2024 07:51:44 +0000 Subject: [PATCH] fix(prisma): add useDefineForClassFields option to default ts compilation option Closes: #2927 --- packages/orm/prisma/src/generator/generateCode.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/orm/prisma/src/generator/generateCode.ts b/packages/orm/prisma/src/generator/generateCode.ts index b6d68571afe..9d8ed4a50d1 100644 --- a/packages/orm/prisma/src/generator/generateCode.ts +++ b/packages/orm/prisma/src/generator/generateCode.ts @@ -15,7 +15,8 @@ const baseCompilerOptions: CompilerOptions = { module: ModuleKind.ESNext, emitDecoratorMetadata: true, experimentalDecorators: true, - esModuleInterop: true + esModuleInterop: true, + useDefineForClassFields: false }; export interface GenerateCodeOptions { @@ -31,7 +32,9 @@ export async function generateCode(dmmf: DMMF.Document, options: GenerateCodeOpt const project = new Project({ compilerOptions: { ...baseCompilerOptions, - ...(emitTranspiledCode && {declaration: true}) + ...(emitTranspiledCode && { + declaration: true + }) } });