Skip to content

Commit f7a26d4

Browse files
committed
feat: exposes WhereInput type and removes restriction on Model inside PrismaQuery
1 parent 10bc6e8 commit f7a26d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/casl-prisma/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { AbilityOptions, AbilityTuple, fieldPatternMatcher, PureAbility, RawRule
22
import { createAbilityFactory, createAccessibleByFactory, prismaQuery } from './runtime';
33
import { WhereInputPerModel, ModelName, PrismaQuery } from './prismaClientBoundTypes';
44

5-
export type { PrismaQuery } from './prismaClientBoundTypes';
5+
export type { PrismaQuery, WhereInput } from './prismaClientBoundTypes';
66
export type { Model, Subjects } from './runtime';
77
export { prismaQuery, ParsingQueryError } from './runtime';
88

packages/casl-prisma/src/prismaClientBoundTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface PrismaQueryTypeFactory extends hkt.GenericFactory {
2121
}
2222

2323
type PrismaModel = Model<Record<string, any>, string>;
24-
export type PrismaQuery<T extends PrismaModel = PrismaModel> =
24+
export type PrismaQuery<T = PrismaModel> =
2525
WhereInput<ExtractModelName<T, ModelName>> & hkt.Container<PrismaQueryTypeFactory>;
2626

2727
export type WhereInputPerModel = {

0 commit comments

Comments
 (0)