I haven't looked much into this, but promise.d.ts defines a Connection interface with a changeUser method, but https://github.com/sidorares/node-mysql2/blob/master/promise.js defines PromiseConnection with a different structure. I noticed this when I got a run-time error stating my Connection object had no changeUser method.
This PromiseConnection is what is returned from createConnection.
https://github.com/sidorares/node-mysql2/blob/master/promise.js does not define a createUser method, but you do have access to the underlying Connection.
I haven't looked much into this, but
promise.d.tsdefines aConnectioninterface with achangeUsermethod, but https://github.com/sidorares/node-mysql2/blob/master/promise.js definesPromiseConnectionwith a different structure. I noticed this when I got a run-time error stating myConnectionobject had nochangeUsermethod.This
PromiseConnectionis what is returned fromcreateConnection.https://github.com/sidorares/node-mysql2/blob/master/promise.js does not define a
createUsermethod, but you do have access to the underlyingConnection.