HaxeFoundation / HaxeFoundation/haxe

[js][es6] add ES6 module exports

Open
#8,033 2 comments 19 reactions 0 assignees View on GitHub
feature-es6 platform-javascript
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

Add a way to export classes and functions as an ES6 module. Maybe overriding the ```@:expose``` behavior when ```-D js_es=6```? Or introducing a new metadata?

i.e.
```hx
@:expose
class Test {
function new() {
}
}
```
would produce
```js
export class Test {
constructor() {
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.