Ovidiu Bodea
06/30/2022, 5:02 AMconst types = [
'model1',
'model2',
] as const;
return client[field].findMany({
where: {
verified: true,
},
});
The code works but TypeScript doesn’t like it
error TS2349: This expression is not callable.
Each member of the union type '(<T extends SkillTagFindManyArgs>(args?: SelectSubset<T, SkillTagFindManyArgs>) => CheckSelect<T, PrismaPromise<SkillTag[]>, PrismaPromise<...>>) | ... 4 more ... | (<T extends InterestFindManyArgs>(args?: SelectSubset<...>) => CheckSelect<...>)' has signatures, but none of those signatures are compatible with each other.
Any ideas? Thank youAlex Ruheni
// @ts-ignore before the return statement to eliminate the error.