casl: Can't use Prisma package if built into custom directory
Here’s a repro of type errors with Prisma 3.14 (same with 3.0.2) https://codesandbox.io/s/cranky-frog-dy6nfq?file=/src/index.ts
No typesafety for conditions with AbilityBuilder and type error with raw rules.
I believe the reason is that typings depend on types from @prisma/client, but that doesn’t exist in all the prisma usage scenarios
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 16 (9 by maintainers)
updated docs
Hey, I noticed one issue here. I see that you deprecated
PrismaAbilityin favor ofcreatePrismaAbilityin the same commit as you added the support custom generated prisma clients. You also added additional documentation for the custom generation of the client, but the old documentation regarding the usage of@casl/prismais now out of date, since thePrismaAbilityis still used there. I think that the documentation should be updated as well since this is quite confusing now