node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

Connection.query() lacks typings

Open thomasgauvin opened this issue 6 months ago • 1 comments

Despite having both mysql2 and @types/node installed, connection.query does not seem to have the proper types defined, despite being a valid and documented command:

Image

Image

https://sidorares.github.io/node-mysql2/docs/documentation/typescript-examples

Any suggestions?

thomasgauvin avatar May 08 '25 15:05 thomasgauvin

Hi, @thomasgauvin 🙋🏻‍♂️

Can you share your tsconfig.json to try to reproduce this behavior?

Probably related, when the tsconfig.json overwrites the types path, even in node_modules, it will ignore the @types/node: https://github.com/sidorares/node-mysql2/issues/3023#issuecomment-2340241159

wellwelwel avatar May 08 '25 19:05 wellwelwel