Type of property 'AND' circularly references itself in mapped type when using jest-mock-extended
See original GitHub issueBug description
validateUpsert(args: PrismaTypes.CandidateUpsertArgs) {
return Prisma.validator<PrismaTypes.CandidateUpsertArgs>()(args)
}
packages/repo/src/repository/candidate.ts:22:12 - error TS2615: Type of property 'AND' circularly references itself in mapped type '{ [K in keyof CandidateCommentScalarWhereInput]: K extends keyof CandidateCommentScalarWhereInput ? Exact<CandidateCommentScalarWhereInput[K], CandidateCommentScalarWhereInput[K]> : CandidateCommentScalarWhereInput[K]; }'.
How to reproduce
Expected behavior
No response
Prisma information
Environment & setup
- OS:
- Database:
- Node.js version:
Prisma Version
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:26 (8 by maintainers)
Top Results From Across the Web
Typescript circular reference when testing prisma with jest ...
Type of property 'AND' circularly references itself in mapped type. There is some discussion about this issue on github Testing with prisma.
Read more >System requirements - Prisma
$server.ts:6:25 - error TS2615: Type of property 'OR' circularly references itself in mapped type '{ [K in keyof { AND?:
Read more >jest-mock-extended - npm
jest -mock-extended allows for invocation matching expectations. Types of arguments, even when using matchers are type checked. const provider = ...
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >Mock Functions - Jest
You can create a mock function with jest.fn(). ... Reference. mockFn. ... Each entry in this array is an object containing a type...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have
"strictNullChecks": trueand the error persists for meSame issue here:
__tests__/user.spec.ts:19:5 - error TS2615: Type of property 'AND' circularly references itself in mapped type '{ [K in keyof { AND?: Enumerable<UtilisateurScalarWhereWithAggregatesInput>; OR?: Enumerable<UtilisateurScalarWhereWithAggregatesInput>; ... 5 more ...; dateModification?: string | ... 1 more ... | DateTimeWithAggregatesFilter; }]: Or<...> extends 1 ? { ...; }[K] extends infer TK ? GetHavingFields<...> : never : {} ...'.