Closed Suisse00 closed 2 years ago
I did fix my errors by updating dts-gen, I have no idea if it will break something else but that could be a start. Unfortunately, I updated the .js instead of the .ts, and I can't find the equivalent of Object.toString(X) in TS so... good luck!
I was trying to create the definition for an addon of https://github.com/sequelize/sequelize 5.21.1 which would end up generating the sequelize definition as well.
the exception
After investigating I found out the issue is when Proxy override the toString() method and return undefined.
Reproduction steps (from sequelize)
Reproduction steps (POC) poc.js class Dummy { static toString(...args) { return undefined; } }
new Proxy(Dummy, { get(target, p) { return target[p]; }})
command
dst-gen --version 0.5.8 sequelize 5.21.1 (with patch)