You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
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
Exception has occurred: TypeError
TypeError: Cannot read property 'indexOf' of undefined
at isNativeFunction (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:358:25)
at getParameterListAndReturnType (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:302:9)
at getResult (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:135:30)
at getTopLevelDeclarations (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:129:17)
at getResult (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:197:35)
at getTopLevelDeclarations (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:129:17)
at getResult (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:153:17)
at getTopLevelDeclarations (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:129:17)
at Object.generateIdentifierDeclarationFile (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\index.js:73:20)
at Object. (D:\Windows\Suisse\AppData\Roaming\npm\node_modules\dts-gen\bin\lib\run.js:62:24)
at Module._compile (internal/modules/cjs/loader.js:685:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
After investigating I found out the issue is when Proxy override the toString() method and return undefined.
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)
The text was updated successfully, but these errors were encountered: