TypeScript correctly type a queryresult MySQL
I am using the mysql2/promise
npm package for connecting and doing queries to a MySQL database. I got confused trying to set the correct typing for my query result, because I don’t know in advance what type the result will be.