haxiomic / dts2hx

Converts TypeScript definition files (d.ts) to haxe externs (.hx) via the TypeScript compiler API
MIT License
134 stars 9 forks source link
hacktoberfest haxe haxe-externs typescript-compiler typescript-definitions

TypeScript Definitions to Haxe Extern Converter

Command-line tool to convert TypeScript type definitions to haxe externs

dts2hx command-line interface

Thanks to the Haxe Foundation for supporting this project!

Getting Started

See examples/ for example projects using popular js libraries

The generated externs use haxe 4+ syntax. See dts2hx --help for a complete list of options

FAQ

Building and Contributing

Code Overview

Testing

Our test setup is fairly bare bones but effective – dts2hx is executed on a range of tricky libraries and edge cases and the result is committed to this repo. After making a change to dts2hx, the git diff can be reviewed for expected and unexpected changes. While there's basic CI, reviewing the diff is a manual process

TypeScript Compiler Documentation Links

Roadmap

dts2hx is currently in alpha release, everything should work but please report any issues!

Road to Beta

Road to 1.0