I'm trying to use the @google-cloud/bigquery module with typescript, but found out than it doesn't have typescript support, like @google-cloud/storage does.
So I thought to use the dts-gen tool to create a declaration file, however, there seems to be a problem when a module starts with an @ and an error is thrown.
➜ git:(master-github-origin) ✗ dts-gen -m @google-cloud/bigquery
Unexpected crash! Please log a bug with the commandline you specified.
/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:130
throw e;
^
Error: ENOENT: no such file or directory, open '@google-cloud/bigquery.d.ts'
at Object.fs.openSync (fs.js:667:18)
at Object.fs.writeFileSync (fs.js:1326:33)
at Object.<anonymous> (/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:112:12)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Function.Module.runMain (module.js:703:10)
at startup (bootstrap_node.js:193:16)
Found in the issues section that I should use the -f parameter. Doing so creates the .d.ts file successfully but only with 3 lines and no declarations, thus it cannot be used, and a TS compiler error is launched.
I'm trying to use the
@google-cloud/bigquery
module with typescript, but found out than it doesn't have typescript support, like@google-cloud/storage
does.So I thought to use the
dts-gen
tool to create a declaration file, however, there seems to be a problem when a module starts with an@
and an error is thrown.Found in the issues section that I should use the
-f
parameter. Doing so creates the.d.ts
file successfully but only with 3 lines and no declarations, thus it cannot be used, and a TS compiler error is launched.Could this be a dts-gen problem? or is there something I'm missing?