HaxeFoundation / HaxeFoundation/haxe
Enhancement request: js.Promise<Void> (or similar)
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Separated this out of the conversation in #6790:
As long as we're thinking about js.Promise, it'd be nice if you could have a `Promise` (or just Promise), where resolve() and then(callback) expect no arguments. I know it's features like this that balloon the complexity, but I'm just saying -- it'd be nice. Otherwise I'm forced to write ugly crufty code like:
```
new Promise
resolve(null);
.then(function(ignore) { });
```
Cludgy Dynamic, useless null, and empty ignore -- all terrible conventions.
Maybe it'd be possible with abstract EmptyPromise (Promise)?
Maybe @elsassph / @kevinresol have some thought?
@jdonaldson commented:
> Here's some typescript folks struggling with the same issue:
> Microsoft/TypeScript#8516
> Microsoft/TypeScript#3356
> Microsoft/TypeScript#4260
> DefinitelyTyped/DefinitelyTyped#6091
Contributor guide
Assessment
This issue has not been assessed yet.