Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma has stopped inferring/creating types after added this library #395

Open
2 tasks done
vendramini opened this issue Oct 10, 2024 · 1 comment
Open
2 tasks done

Comments

@vendramini
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Versions

"prisma": "^5.20.0",
"prisma-json-types-generator": "^3.1.1",
"@trpc/client": "^11.0.0-rc.485",
"@trpc/next": "^11.0.0-rc.485",
"@trpc/react-query": "^11.0.0-rc.485",
"@trpc/server": "^11.0.0-rc.485",

A minimal reproducible example

Don't have it

Description

Before using this libray:
image

After using this library:
image

I will try to create a reproducible demo as soon as possible. I decided to post it without one in case you have any idea about what could be happening. I've seen this issue #302 which also has a conflict. Maybe is related?

Steps to Reproduce

schema.prisma

model Company {
  id       Int     @id @default(autoincrement())
  user     User    @relation(fields: [userId], references: [clerkId])
  userId   String  @unique
  name     String?
  imageUrl String?
  salary   Price[]

  /// [WorkDayHoursType]
  workDayHours Json?
}

prisma.d.ts

declare global {
  namespace PrismaJson {
    type WorkDayHoursType = {
      mon: number;
      tue: number;
      wed: number;
      thu: number;
      fri: number;
      sat: number;
      sun: number;
    };
  }
}

npx prisma generate. Just it.

Expected Behavior

Keep Prisma types.

@arthurfiorette
Copy link
Owner

arthurfiorette commented Oct 11, 2024

Hi! thanks for creating this issue. Would you like to open a PR? Remember to add unit tests :)

Without a reproduction example I can't help you...

I've seen this issue #302 which also has a conflict. Maybe is related?

can be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants