drizzle-orm and helper type #2206
Unanswered
merthanmerter
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Any idea why would the type of
import { and } from 'drizzle-orm'
helper would change from(alias) and(...conditions: SQLWrapper[]): SQL<unknown>
to
(alias) and(...conditions: (SQLWrapper | undefined)[]): SQL<unknown> | undefined
now I get error
Argument of type '"" | SQL<unknown>' is not assignable to parameter of type 'SQLWrapper | undefined'. Type 'string' is not assignable to type 'SQLWrapper'.
with a usage likeand(name && like(xxx.name, sql.placeholder('name')))
appreciate the help.
Beta Was this translation helpful? Give feedback.
All reactions