Skip to content
Generates split ES6 modules and Typescript definitions from Haxe modules.
Haxe TypeScript Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
example
haxe_libraries More Type tests Feb 12, 2020
src
tests
.gitignore
.haxerc
.nvmrc
.travis.yml Add travis Aug 19, 2019
extraParams.hxml
haxelib.json 0.0.1 Feb 15, 2020
hxformat.json
package.json Disable type checking until we figure out how to exclude unused typedefs Feb 15, 2020
readme.md
test.hxml
tsconfig.json
yarn.lock Add openfl example Feb 15, 2020

readme.md

genes

Build Status

Generates split ES6 modules and Typescript definitions from Haxe modules.

Requires Haxe 4, status: experimental

Usage

lix +lib genes

Install the library and add -lib genes to your hxml.

Options:

  • add -D dts to generate Typescript definition files
  • use -debug or -D js-source-map to generate source maps

Dynamic imports

import genes.Genes.dynamicImport;
import my.module.MyClass;
// ...
dynamicImport(MyClass -> new MyClass()).then(trace);

Translates to:

import('./my/module/MyClass')
  .then(({MyClass}) => new MyClass())
  .then(console.log)

Alternatives

  • Split output with require calls: hxgenjs
  • Typescript definition generation: hxtsdgen
You can’t perform that action at this time.