Closed ciscoheat closed 1 year ago
The externs should still work – dts2hx has also generated types in .haxelib/node, which are essentially an alternative to hxnodejs (try adding --library node
in addition to --library puppeteer
to make it work)
However I expect some users will want to use hxnodejs externs instead, so it's worth adding as a feature to dts2hx, I think I'll add under a new flag --hxnodejs
Mind if I change the title to "Feature request: map types to hxnodejs externs" to help me remember?
Using hxnodejs was indeed the reason it didn't work, so an option for that would be great. No problem changing the title. :)
Feature added! (Sorry it took so long!)
You can now add --hxnodejs
and it'll map types where they exist to hxnodejs
Thank you!
When using your instructions in #54 the generation works fine, except for a few mishaps:
Browser.hx
:Which is fixed by changing it to (using hxnodejs):
ElementHandle.hx
and othersWhere
global.Buffer
must be replaced withjs.node.Buffer
.The rest works very well!