HaxeFoundation / HaxeFoundation/haxe

JavaScript: No way to add Symbol.asyncIterator method to a class

Open
#12,735 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

I would expect

```haxe
@:native("[Symbol.asyncIterator]")
public function asyncIterator() {
return this;
}
```

to work, but that puts the literal quotes into the JavaScript which we don't want

Contributor guide

Open the contributing guide

Research direction

No files or tests are named in the issue. Start by tracing JavaScript generation for the @:native annotation and compare the emitted member name with the requested Symbol.asyncIterator form; done means the generated property uses the symbol key without literal quote characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.