G4brym/workers-qb

How can I mark an insert as only returning one row?

Closed this issue · 2 comments

I'm inserting a row into a table, but the results property that comes back is typed as <TableType | TableType[]>.

My IDE gives the following error:

image

I'm guessing just casting the result to the singular is a workaround?

Hey @MrSuttonmann, currently you need to cast the result to singular, because my typescript knowledge is limited and i didn't manage to solve this issue
I will try to solve it again soon, but meanwhile pull requests are well come to solve this 😄

Hello @MrSuttonmann i've just published a new version (v1.2.3) that solves your issue, can you install the update and confirm the fix?
Thanks