Following up on #3453, thank you for the work on this. I ran into an issue trying to switch schema.prisma's client generator from prisma-client-js to prisma-client.
Reproduction
generator client {
provider = "prisma-client"
output = "../generated/prisma"
}
generator tsed {
provider = "tsed-prisma"
output = "../generated/tsed"
emitTranspiledCode = true
}
datasource db {
provider = "postgresql"
}
model User {
id String @id @default(uuid())
email String @unique
}
With a tsconfig.json present in the project root and DATABASE_URL set to any syntactically valid connection string, npx prisma generate completes without error, but the resulting generated/prisma/internal/class.js contains invalid JavaScript:
get;
user();
Prisma.UserDelegate();
The corresponding .ts source is correct:
get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>;
This is an interface-only member with no implementation. Whatever compiles it to .js strips the type annotations without recognizing the whole declaration should be dropped, leaving three broken statement fragments instead.
Tested, to narrow it down:
- Only reproduces when both the
generator tsed block and a tsconfig.json are present together. Neither alone triggers it.
- Reproduces on
prisma/@prisma/client@7.3.0 (same version as packages/orm/prisma/test/prisma-client uses) and on 7.10.0.
Environment
prisma / @prisma/client: tested on 7.3.0 and 7.10.0
@tsed/prisma: 8.40.0
- Node 22
Following up on #3453, thank you for the work on this. I ran into an issue trying to switch
schema.prisma's client generator fromprisma-client-jstoprisma-client.Reproduction
With a
tsconfig.jsonpresent in the project root andDATABASE_URLset to any syntactically valid connection string,npx prisma generatecompletes without error, but the resultinggenerated/prisma/internal/class.jscontains invalid JavaScript:The corresponding
.tssource is correct:This is an interface-only member with no implementation. Whatever compiles it to
.jsstrips the type annotations without recognizing the whole declaration should be dropped, leaving three broken statement fragments instead.Tested, to narrow it down:
generator tsedblock and atsconfig.jsonare present together. Neither alone triggers it.prisma/@prisma/client@7.3.0(same version aspackages/orm/prisma/test/prisma-clientuses) and on7.10.0.Environment
prisma/@prisma/client: tested on 7.3.0 and 7.10.0@tsed/prisma: 8.40.0