dts2hx
dts2hx copied to clipboard
Converts TypeScript definition files (d.ts) to haxe externs (.hx) via the TypeScript compiler API
In TypeScript we have module-level fields like: ```typescript declare const cheerio: cheerio.CheerioAPI; export = cheerio; ``` Ideally we can represent this in haxe as: ```haxe @:jsRequire("cheerio") extern final cheerio: cheerio.CheerioAPI;...
`@jest/globals` has the haxelib name `@jest/globals` which doesn't pass validation, whereas `jest-globals` the filepath is ok.
Running dts2hx on firebase-admin v9.4.2 generates the code below which results in a recursive typedef error ```haxe package firebase_admin.messaging; /** Payload for the admin.messaging.send() operation. The payload contains all the...
I tried to generate extern for fastify by ``` npx dts2hx fastify --output lib/dts2hx ``` It outputted a bunch of errors: ``` > Converting module fastify > Error: [TypeScript 3.7]...
Just reporting it in hope dts2hx will work out of the box for [telegraf](https://www.npmjs.com/package/telegraf) (4.0.0). Btw, dts2hx is super cool, please keep it up :) ``` > Converting module telegraf...
Generates: ```haxe import fontkit.*; @:jsRequire("fontkit") @valueModuleOnly extern class Fontkit { @:native("default") static final default_ : fontkit.Fontkit; } ``` But .default does not resolve to the class, instead it should be...
from cocoscreator .ts ```js { requireComponent?: Function } ``` convert to haxe ```haxe var requireComponent : haxe.Constraints.Function ``` when I convert from js ```js { requireComponent: dragonBones.ArmatureDisplay; } ``` to...
when running dts2hx on puppeteer it generates a Request typedef that contains the following. ``` @:native('continue') function continue_(?overrides:Overrides):js.lib.Promise; ``` From what I can tell this only works for classes &...
`npx dts2hx @tensorflow/tfjs` https://www.tensorflow.org/js/guide/layers_for_keras_users?hl=en I can't find any api like `tf.layers.dense`   where is wrong here. test.ts when I use typescript.  maybe there is some bug here? 
I'm using [Got](https://www.npmjs.com/package/got) for http requests and received the following error after using dts2hx to generate externs: `/11,8,0/got/RequestError.hx:7 : Should extend by using a class` referring to this line in...