Typescript Error
Anyone know why this is happening? I upgraded my drizzle version so maybe something changed?

6 Replies
Any ideas?
Was the type changed in newer versions?
;c
Looks like
MySqlRawQueryResult
is a tuple. The first element response[0]
is of type ResultSetHeader
which has the affectedRows
property.
Try response?.[0]?.affectedRows
This worked thank you, where did you find the type? I could not find it in docs anywhere
It's not in the docs as far as I can tell. I searched for
MySqlRawQueryResult
in the source codeIf you import the type like this
In VS Code, you can right click and go to type definition.

That shows a type like:
And you can keep following the type definitions