iamgengar.
Explore posts from serversDTDrizzle Team
•Created by iamgengar. on 3/1/2025 in #help
How to make function that takes in a table as parameter with correct types?
e.g. if we have the following function, which takes in an arbitrary table and executes a where clause on it:
I get the following error ("drizzle-orm": "0.39.1"):
Argument of type 'T' is not assignable to parameter of type 'TableLikeHasEmptySelection<T> extends true ? DrizzleTypeError<"Cannot reference a data-modifying statement subquery if it doesn't contain a
returning
clause"> : T'.
Type 'Table<TableConfig<Column<any, object, object>>>' is not assignable to type 'TableLikeHasEmptySelection<T> extends true ? DrizzleTypeError<"Cannot reference a data-modifying statement subquery if it doesn't contain a returning
clause"> : T'3 replies