Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Adapt a more conflict resistant naming for Prisma client's types #707

Closed
pantharshit00 opened this issue May 29, 2020 · 4 comments
Closed
Labels
kind/improvement An improvement to existing feature and code. tech/typescript Issue for tech TypeScript.
Milestone

Comments

@pantharshit00
Copy link
Contributor

Right now properties like ${name}Client are ending up in the denyList and it is very common to name something like UserClient.

This adds unnecessary friction and we can totally avoid this by using a more conflict resistant naming for types like User__Client.

Internal: https://prisma-company.slack.com/archives/CUXLS0Z6K/p1590736839231000

Related: prisma/prisma#2539

@pantharshit00 pantharshit00 added kind/improvement An improvement to existing feature and code. process/candidate Candidate for next Milestone. labels May 29, 2020
@Jolg42 Jolg42 added the tech/typescript Issue for tech TypeScript. label May 29, 2020
@dodas
Copy link

dodas commented May 29, 2020

What about generating those classes conflicting with model names to different file and import them to index under different, perhaps very conflict-tolerant/avoiding names?

@pantharshit00
Copy link
Contributor Author

Yes, that can be one way of doing that.

@janpio janpio added this to the 2.1.0 milestone Jun 10, 2020
@janpio janpio removed the process/candidate Candidate for next Milestone. label Jun 11, 2020
@janpio
Copy link
Member

janpio commented Jun 16, 2020

Possibly related: prisma/prisma#2656

@timsuchanek
Copy link
Contributor

We now implemented Prisma__UserClient.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/improvement An improvement to existing feature and code. tech/typescript Issue for tech TypeScript.
Projects
None yet
Development

No branches or pull requests

5 participants