shardex
shardex
PPrisma
Created by shardex on 7/19/2024 in #help-and-questions
property 'data' does not exist on args when using $extends
Basically I was trying the method provided in the solution of this stack overflow post https://stackoverflow.com/questions/77435838/hash-password-in-prisma-orm whoever when building the index.ts file I get the following:
src/index.ts:12:62 - error TS2339: Property 'data' does not exist on type 'UserFindUniqueArgs<InternalArgs & DefaultArgs> | UserFindUniqueOrThrowArgs<InternalArgs & DefaultArgs> | ... 13 more ... | UserCountArgs<...>'.
Property 'data' does not exist on type 'UserFindUniqueArgs<InternalArgs & DefaultArgs>'.

12 if (["create", "update"].includes(operation) && args.data["password"]) {
src/index.ts:12:62 - error TS2339: Property 'data' does not exist on type 'UserFindUniqueArgs<InternalArgs & DefaultArgs> | UserFindUniqueOrThrowArgs<InternalArgs & DefaultArgs> | ... 13 more ... | UserCountArgs<...>'.
Property 'data' does not exist on type 'UserFindUniqueArgs<InternalArgs & DefaultArgs>'.

12 if (["create", "update"].includes(operation) && args.data["password"]) {
any idea?
4 replies